cancel
Showing results for 
Search instead for 
Did you mean: 

I2C Repeated Start to put MB85RC512T to Sleep mode

NMath.1
Associate

Hi,

I am interfacing an FRAM driver from STM32L452RE using HAL lib. mem_read operation is not sufficient to put the FRAM chip to sleep mode. This requires a restart condition as follows:

[Start][0xF8][Ack][0xA0][Ack][Rep Start][0x86][Ack][Stop]

Here I tried to used the HAL_I2C_Master_Sequential_Transmit_IT API with XferOptions.

uint8_t i2cBuf[] = {0xA0};

HAL_I2C_Master_Sequential_Transmit_IT(&hi2c2, 0xF9, i2cBuf, 1,I2C_FIRST_FRAME);

while (HAL_I2C_GetState(&hi2c2) != HAL_I2C_STATE_READY);

HAL_I2C_Master_Sequential_Transmit_IT(&hi2c2, 0x86, i2cBuf, 0, I2C_LAST_FRAME);

while (HAL_I2C_GetState(&hi2c2) != HAL_I2C_STATE_READY);

Here the problem is after 1st HAL_I2C_Master_Sequential_Transmit_IT a stop condition is getting generated.

Please find the attached sleep mode command for MB85RC512T

I also tried other XferOptions, but nothing seems to work,

Can any one please help me on this.

Regards

NMathew

0 REPLIES 0