stm32f4029 Disc Board I2C ACK not tracking

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
k_vijay
Posts: 20
Joined: Mon Apr 04, 2022 7:06 am

stm32f4029 Disc Board I2C ACK not tracking

Post by k_vijay »

Hello Team,

I am using STM32F429Disc-1 board as development for I2C to integrate an eeprom (AT24CS04-SSHM-T).
In DSO I am getting proper SDA and SCL line, i.e Slave address and read/write bit and ACK on 9th clock pulse but in code I am getting an i2c error as 4 (I2C-ACK_FAILURE). Here I am attaching DSO screen shot fyr.



Target Board : STM32F429Disc-1
I2c Used : I2C2
Chibios Version : 21.11.x

The voltage level of ACK bit is 1.65v So I think it is consider as NACK by the controller. am I right or anything else is issue ?
Attachments
I2c_Ack.png
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: stm32f4029 Disc Board I2C ACK not tracking

Post by Giovanni »

Hi,

Do you have external pull-up resistors connected at master VCC? are I2C pins programmed as open drain?

Giovanni
k_vijay
Posts: 20
Joined: Mon Apr 04, 2022 7:06 am

Re: stm32f4029 Disc Board I2C ACK not tracking

Post by k_vijay »

Hello Sir

We have tried with external pull up register with 4.7K as well as 10K connected with 3v of board in both the case results are same.
I2c pins are programmed as with alternate function 4.
palSetPadMode(GPIOF,0,PAL_MODE_ALTERNATE(4))
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: stm32f4029 Disc Board I2C ACK not tracking

Post by Giovanni »

Try adding PAL_STM32_OTYPE_OPENDRAIN to the mode but probably this is not it.

Anyway, the driver is sending the address, whatever is the problem is probably something else. You may also try lower resistors and a slower I2C speed.

Giovanni
k_vijay
Posts: 20
Joined: Mon Apr 04, 2022 7:06 am

Re: stm32f4029 Disc Board I2C ACK not tracking

Post by k_vijay »

Hello Sir,

We have lower the pull up registor value to 1K and the I2C speed is 100KHz. The result is same as the previous in waveform.

Do we need anything extra circuit need to add to make this eeprom work ?
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: stm32f4029 Disc Board I2C ACK not tracking

Post by Giovanni »

I never used that EEPROM. You may try asking on the discord server if anybody has experience with it.

https://discord.gg/s8b8v7VtrM

Giovanni
psyco
Posts: 21
Joined: Fri May 22, 2020 1:40 am
Been thanked: 11 times

Re: stm32f4029 Disc Board I2C ACK not tracking

Post by psyco »

It looks to me that or-ing PAL_STM32_OTYPE_OPENDRAIN with the alternate mode should be the solution. That ACK bit looks like the ST is pushing high while the eeprom is pulling low, especially with that spike at the end of it where the eeprom releases the bus.
Post Reply