TWIM error crash , same code, two laptop

Hi,

I moved my code on a second windows pc, checkout the code from git,download the same nordic sdk and softdevice version, same SES version but running on my board, the code crash after calling a twim transfert function :

I compared both project, there are similar, and it is running on my old laptop.

If fail on calling xfer function:

const nrfx_twim_xfer_desc_t my_xfer = {.type = NRFX_TWIM_XFER_TXRX,
.address=slaveAddr,
.primary_length = 2,
.secondary_length = (nMemAddressRead<<1),
.p_primary_buf = &addr,
.p_secondary_buf = data
};

err_code = nrfx_twim_xfer(&my_twi, &my_xfer ,0);

I have a guess that it could come from the environement but all software are installed at the same place in C:/ 

Do you have any clue may be ?

Thanks a lot for your help, i have no idea at the moment and after closing, cleaning rebuild etc the project i still don't understand.

Slight smile

Parents Reply
  • Hi Sigurd,

    I noticed that I previously comment in the source file nrfx_twim this check Sweat smile Sweat smile 

    NRFX_ASSERT(TWIM_LENGTH_VALIDATE(p_instance->drv_inst_idx,
    p_xfer_desc->primary_length,
    p_xfer_desc->secondary_length));

    So my mistake... i don't know why there is this check but as i need to read in one shot 1700bytes, i disable this check ...

    Thanks Sigurd :)

Children
No Data
Related