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

Twi Transfers Never Complete

I am attempting to use SDK15 with the nrf52832 to communicate with multiple sensors over I2C. However, in the twi_sensor and twi_master_using_nrf_twi_mngr examples, as well as my own code adapted from these examples, the first twi transfer is never completed. I have tried using blocking and non blocking modes of nrfx_twi, used both nrf_twi_mngr_perform and nrf_twi_mngr_schedule, clearing the bus before init, and disabling the internal pull-ups as my sensors have built in pull up resistors. This occurs with the sensors connected connected and when the sensors are disconnected pins floating. 

My understanding of the TWI modules is that if communication fails an error will be returned, but instead the application hangs after the first transfer call occurs. This leads me to believe there may be a problem with the initialization of the twi_modules or the queuing of transactions, however, the examples are equally non-functional on my board. Unfortunately, I do not have access to a digital logic analyzer to view the bus as I am working from home. I am unsure how to debug further, as all API calls return successfully up to the first transfer, and after that the program hangs. Do you have any suggestions as to how I could get the examples working? Because the issue occurs with the examples I have not included my own code, however, I would be happy to include it if it could provide more info. 

Related