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.

Moderators: RoccoMarco, barthess

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

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

Postby k_vijay » Fri Jul 22, 2022 5:46 am

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: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

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

Postby Giovanni » Fri Jul 22, 2022 7:11 am

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

Postby k_vijay » Fri Jul 22, 2022 9:25 am

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: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

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

Postby Giovanni » Fri Jul 22, 2022 10:45 am

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

Postby k_vijay » Fri Jul 22, 2022 11:04 am

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: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

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

Postby Giovanni » Fri Jul 22, 2022 12:25 pm

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

Postby psyco » Sat Jul 23, 2022 3:15 am

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.


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 71 guests