This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I2C with Softdevice nrf_drv_twi_enable hangs

Using SDK 12.1.0

I2C with SoftDevice works on PCA10040 Eval Board with nRF52832 but hangs in the nrf_drv_twi_enable function with TY module EBSGCNZWY which is an nRF51822 version F1. Running without the SoftDevice on the TY module, the I2C works fine.

Parents
  • There is no reason why the nrf_drv_twi_enable(..) function should hang unless the ASSERT macro is used. Can you check if this is the case? Right click on ASSERT and choose "go to definition", if it is defined as a while(1) or assert_nrf_callback(..) then this might be the reason it hangs.

    Then the problem is that you have not initialized the twi module before you called nrf_drv_twi_enable(..).

Reply
  • There is no reason why the nrf_drv_twi_enable(..) function should hang unless the ASSERT macro is used. Can you check if this is the case? Right click on ASSERT and choose "go to definition", if it is defined as a while(1) or assert_nrf_callback(..) then this might be the reason it hangs.

    Then the problem is that you have not initialized the twi module before you called nrf_drv_twi_enable(..).

Children
No Data
Related