stm32f4029 Disc Board I2C v1 Integration for AT24CS04-SSHM-T

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 v1 Integration for AT24CS04-SSHM-T

Post by k_vijay »

Hello Team,

I want to integrate I2C interface to use eeprom AT24CS04-SSHM-T. This eeprom's slave found in Arduino but not in this STM board by using I2C scanner program. I have anothe I2C device IMU6050 that address is found in this STM board.

Is there anything that I am missing.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: stm32f4029 Disc Board I2C v1 Integration for AT24CS04-SSHM-T

Post by Giovanni »

Hi,

Could it be a physical connection problem?

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

Re: stm32f4029 Disc Board I2C v1 Integration for AT24CS04-SSHM-T

Post by k_vijay »

Hello Sir,

All the connection has verified and the clock/data validated on DSO but stll ACK bit is not detected on SDA.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: stm32f4029 Disc Board I2C v1 Integration for AT24CS04-SSHM-T

Post by Giovanni »

Is the I2C address right? if there is no ACK then it is probably wrong.

You know, you have the debugger, I can just make random guesses.

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

Re: stm32f4029 Disc Board I2C v1 Integration for AT24CS04-SSHM-T

Post by k_vijay »

Hello Sir,

I2C slave address is right (0xA0). Anyway I am using I2C scanner in which I m polling the address from 1 to 511 but for none of the address ACK is receiving.

In chibios for I2C scanner how it is working ?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: stm32f4029 Disc Board I2C v1 Integration for AT24CS04-SSHM-T

Post by Giovanni »

Addresses in ChibiOS are just the 7 address bits, if the address byte is 0xA0 then the ChibiOS address is 0x50, the R/W bit is not considered.

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

Re: stm32f4029 Disc Board I2C v1 Integration for AT24CS04-SSHM-T

Post by psyco »

If the DSO showed the known correct address with a NACK, you are likely push-pulling instead of open-draining the I2C lines.

If you are using palSetLineMode, fix it by changing the SDA / SCL lines to something like

Code: Select all

palSetLineMode(x, PAL_MODE_ALTERNATE(n) | PAL_STM32_OTYPE_OPENDRAIN);

Alternatively, change the output type of the lines in the board.chcfg / board.h files to open-drain.
Post Reply