cancel
Showing results for 
Search instead for 
Did you mean: 

Facing trouble with SMBUS RX interrupt on STM32L4R9ZI.

Makarand
Associate II

Hello,

I am facing a strange issue. I have a SMBUS battery and a LTC4100 battery charger chip connected to the micro controllers I2C1 configured as SMBUS. The charger has address 0x12 and the battery has 0x16. All communication is going correctly and I am able to read and write required registers of the battery as well as the LTC4100 charger IC.

The problem however, is a case when the battery is not connected. In this case, triggering a read from the battery for some reason hits the RX interrupt and my flags are set.

I would expect that when the battery is disconnected, the RX interrupt for a SMBUS word read should not be triggered. And possibly, the TX interrupt should not be triggered either

I am following the below sequence for reading a word of data from the battery

  1. HAL_SMBUS_TRANSMIT_IT - with address of battery and SMBUS first frame
  2. Wait for TX interrupt
  3. HAL_SMBUS_RECEIVE_IT - with address of battery and SMBUS LAST FRAME NO PEC
  4. Wait for receive interrupt

Please let me know what I am missing here. I thank you in advance for the help.

Makarand Deshmukh

0 REPLIES 0