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

Two-wire interface does not work together with Bluetooth

Hi!

I am using nRF51822 evaluation kit and connecting it as a master to a pair of I2C-devices (using twi_hw_master.c). Everything works well, but when I integrated the TWI (I2C) example code with the Nordic example ble_app_hrs (hear rate monitor) the TWI stops working. The initialization function just blocks (twi_master_init()). However, if I remove ble_stack_init() and other BT-initializations it starts working. Adding back only the ble_stack_init() is enough to make the TWI to block again.

When debugging, the twi_hw_master initialization function twi_master_init() seems to block on this line:

NRF_PPI->CH[0].EEP        = (uint32_t)&NRF_TWI1->EVENTS_BB;

Questions: Q1: Is there some configuration issue in the examples so that TWI and BLE won't work together? Q2: Is there even some hardware related problem for that combination? Q3: In any case, do you have any ideas to solve the problem?

Related