I2C issue with update over the air

Hi,

We are using a TMD2636 proximity sensor on our board, connected via I²C on pins P0.18 (SDA) and P0.30 (SCL). The same I²C bus also contains a TMP117 temperature sensor and another device.

Before enabling OTA updates, all sensors work correctly. However, after enabling:

CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y

The proximity sensor (TMD2636) stops responding, while the TMP117 and the other sensor continue to operate normally on the same bus.

I checked the I²C pulses with a logic analyzer and confirmed that the TMD2636 no longer sends an ACK after OTA support is enabled.

These are two screenshots from Digital Analyzer, when I enable CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y, as you see, the proximity sensor doesn't send ACK:

But when I disable the CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=n, the proximity sensor starts to send ack,

Could you please advise on what might cause this issue or how I can resolve it?

Thanks,

Alireza

Parents
  •  Hi Hung Bui,

    I wrote another simple test program to simulate those two unwanted pulses. When the I2C peripheral is enabled, I lose direct control over the GPIOs on the I2C bus, so for testing, I used a basic GPIO library to manually generate similar pulses on P0.18 and P0.30.

    First, regarding the TMD2636 proximity sensor: it uses the very first I2C command only to configure its I2C address. It does not respond to that command; it only starts acknowledging from the second command. In other words, the first command is essentially a dummy write used for initialization.

    In the first screenshot (no extra pulses), the sensor behaves correctly — it sends an ACK right after the first dummy command, and it continues acknowledging from the second command as expected.

    In the second screenshot, I added two pulses identical to the ones generated when OTA is enabled. As you can see, when those two pulses occur, the sensor gets stuck and never sends any ACK.

    My question is: when OTA is enabled, how can I prevent those two pulses on the I2C lines during boot?

    Thanks,

    Alireza

  • SCL analog curve looks terrible - I am surprised that this works at all. SDA analog curve does not look anywhere close to the digital near those "spikes".

    Do you have external pullup resistors on the bus? The internal pullups in NRF chips are a little too small for proper I²C bus operation.

Reply Children
Related