I am using nrf51822, sdk version 11.0, sofdevice 130, i2c initialized in non-blocking mode. The read seems ok. The write is problematic for me.
I am using nrf51822, sdk version 11.0, sofdevice 130, i2c initialized in non-blocking mode. The read seems ok. The write is problematic for me.
If you get NRF_ERROR_BUSY error code, it means you are running the TWI driver in non-blocking mode. You should use flags that you set/clear in the TWI event handler to indicate when a transfer is completed. Using a "ranom" delay will not guarantee that the transfer will finish every time. You can also use the driver in blocking mode by setting the event_handler parameter to NULL when you initialize the driver using nrf_drv_twi_init.