This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to use EasyDMA when calling nrfx_twim_tx

Hi there,

I've got a situation when using TWI where an `NRF_ERROR_INVALID_ADDR` is returned having performed a call to `nrfx_twim_tx`. I understand that this relates to the data to be sent not being in an EasyDMA area of memory. My question is, how do I put data into the correct place? I've gone through the documentation and examples and cannot find any further guidance.

Here's my code thus far:

ret_code_t err_code = nrfx_twim_tx(&m_twim, &i2c_address, &data, sizeof(data), false);

It appears that where the size of the data is greater than 3, I get a NRF_ERROR_INVALID_ADDR in return. Specifically, I'm transferring 28 bytes when I get that error.

Thanks for any help.

Kind regards,
Christopher

Related