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

NRF51822 TWI Master (Software) results in BLE Disconnects

Hi

I've a reproducable behavior i'm not able to explain. I'm using the softdevice S110 6.0 on a nRF51822.

The firmware implements some BLE profiles and uses TWI Master with the software TWI master driver from the SDK. The reason for using the software TWI driver and not the hardware driver is, that we need a lower baudrate than 100kBit/s.

As everything for BLE happens in interrupt context and all operations of the software TWI driver in normal context i wouldn't expect TWI to have an influence on BLE. But when a BLE connection is established the TWI communication kicks in and in most cases the BLE connection disconnects with reason "BLE_HCI_CONNECTION_TIMEOUT". I wouldn't expect that, because the bitbanging TWI shouldn't have an influence on the BLE implementation, that runs in Interrupt context.To make things even more strang the misterious disconnects disappear if i'm connected to the debugger (that makes the debugging a bit difficult).

Any idea how to fix this problem or to get more information on the behavior?

Rgards Adrian

Related