2022-04-28 05:24 PM
Hello all,
I have a STM32L552MEY6P. I am using it as a slave and setting an address. Using the MX cube set the speed for 400kHz.
I have a Rasberry pi trying to do an address detect. Whenever I turn on the clock stretch, I get a read at address 0x50. Otherwise when the pi sends out 0x50, the data pin goes low on the ack bit and remains there.
The pi is set to 40kHz. It seems to be a timing issue. Any thougts?
2022-05-30 03:07 AM
Hello,
In I2C, when the master is reading 1 or x data, it is forcing the ack bit to low to inform slave device that it is the last data reading.
You can refer to I2C specification: 3.1.17 Device ID :The controller ends the reading sequence by NACKing the last byte, thus resetting the target device state machine and allowing the controller to send the STOP condition.
Feel free if you need more help.
Regards,
Simon
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.