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 Alireza, 
    I suspect that my enabling CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU you may have enabled external flash which use pin P0.18 as CS pin. 

    Could you try a quick test to use other pins for the TMP117  ? 
    Also could you record a longer trace to see if there is other activity on SCL, SDA  when the chip boot up ? 

  • Hi Hung Bui,

    Thanks for your response, 

    Because the PCB is already designed and manufactured, we cannot change the GPIO routing on our board. However, I tested the same firmware on the Nordic development kit using different I²C pins, and it works correctly with those alternate pins. As I mentioned earlier, we have two other sensors on the same I²C bus, and they both work fine regardless of whether OTA is enabled or disabled.

    I will send you the SAL file that can be opened with Saleae Logic Analyzer, and I’ve also attached the screenshots. In case you cannot open the (.sal) file, the screenshots clearly show the issue:

    With OTA enabled, previous I²C transactions on the bus receive proper ACKs, but the proximity sensor (I²C address 0x39) does not acknowledge.

    With OTA disabled, the TMD2636 receives and returns the expected ACK.

    From my perspective, if this GPIO pin were actually being used or overridden by OTA, then all sensors on the bus should stop working. However, the other two sensors continue to communicate normally, which makes the issue more confusing.

    OTA enabled.salOTA disabled.sal

Reply
  • Hi Hung Bui,

    Thanks for your response, 

    Because the PCB is already designed and manufactured, we cannot change the GPIO routing on our board. However, I tested the same firmware on the Nordic development kit using different I²C pins, and it works correctly with those alternate pins. As I mentioned earlier, we have two other sensors on the same I²C bus, and they both work fine regardless of whether OTA is enabled or disabled.

    I will send you the SAL file that can be opened with Saleae Logic Analyzer, and I’ve also attached the screenshots. In case you cannot open the (.sal) file, the screenshots clearly show the issue:

    With OTA enabled, previous I²C transactions on the bus receive proper ACKs, but the proximity sensor (I²C address 0x39) does not acknowledge.

    With OTA disabled, the TMD2636 receives and returns the expected ACK.

    From my perspective, if this GPIO pin were actually being used or overridden by OTA, then all sensors on the bus should stop working. However, the other two sensors continue to communicate normally, which makes the issue more confusing.

    OTA enabled.salOTA disabled.sal

Children
No Data
Related