BLE transmission errors when i2c sensors read in interrupt

Hi, we have a device that reads two sensors on separate i2c buses consecutively and transmits these using ble_nus_data_send().

The i2c sensors are read on an interrupt timer 100 readings a second.

The problem is we are dropping a lot of packets especially at the beginning of the transmission.

When we switch off the i2c sensors reading and just transmit dummy packetst he problem goes away.

We use ble_nus_data_send() to send data which is called from main and polls for sensor data.

How can the interrupt routines interfere with BLE transmissions? Are they not on higher interrupt priority?

Is there anything we can do to stop the i2c reading in interrupt interfering with BLE transmissions?

Thanks

Related