Associate
November 28, 2020
Solved
STM32F401RE: I2C code works only while single stepping in debug mode
- November 28, 2020
- 1 reply
- 923 views
Good day, I'm trying to interface the STM32F401RE with a DS3231 RTC module. The idea is to read from the time-keeping registers of the RTC module. Based on the code, I decided to set the 'hour' register to 6 and when the register is read, 6 is expected to be read. This code only works while single stepping in debug mode and not at runtime. I don't know why this is happening but if there's something I'm missing or getting wrong, I'd be glad to know.
The source code is in the attached file below.