Page 1 of 1
stm32f4029 Disc Board I2C v1 Integration for AT24CS04-SSHM-T
Posted: Fri Jul 22, 2022 5:46 am
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.
Re: stm32f4029 Disc Board I2C v1 Integration for AT24CS04-SSHM-T
Posted: Fri Jul 22, 2022 7:11 am
by Giovanni
Hi,
Could it be a physical connection problem?
Giovanni
Re: stm32f4029 Disc Board I2C v1 Integration for AT24CS04-SSHM-T
Posted: Fri Jul 22, 2022 9:25 am
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.
Re: stm32f4029 Disc Board I2C v1 Integration for AT24CS04-SSHM-T
Posted: Fri Jul 22, 2022 10:45 am
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
Re: stm32f4029 Disc Board I2C v1 Integration for AT24CS04-SSHM-T
Posted: Fri Jul 22, 2022 11:04 am
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 ?
Re: stm32f4029 Disc Board I2C v1 Integration for AT24CS04-SSHM-T
Posted: Fri Jul 22, 2022 12:25 pm
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
Re: stm32f4029 Disc Board I2C v1 Integration for AT24CS04-SSHM-T
Posted: Sat Jul 23, 2022 3:15 am
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.