2025-03-19 2:03 AM
We use M41ST87W as RTC module. We set the stop bit (ST) to 0. We can also observe the frequency at the F32K output. We constantly read the Second register but we do not see any change. What could be the reason for this?
2025-03-19 7:40 AM
welcome to the forum.
You need to give more details for people to be able to help
see: How to write your question to maximize your chances to find a solution
and: How to insert source code.
Are you using ST's provided code?
https://www.st.com/en/clocks-and-timers/m41st87w.html#tools-software
2025-03-24 7:56 AM
First of all, I agree with @Andrew Neil . More information is needed.
Secondly, I have made some guesses:
Since you can measure the 32768 Hz frequency, I will assume that the oscillator is running. If this is the case, and the contents of address 01h never changes, then my best guess is that your code isn't working probably. Or that there is a hardware problem, such as insufficient pull-up resistors, incorrect connections or something like that.
What do you read on address 01h? If you read 0 (zero) all the time, then you could try reading addresses 4, 5 or 6 instead, as these can never be zero. Especially address 06h is interesting, as it can only have 12 different values, 0 not being among the legal values. If you read something that doesn't fit with the values 1 - 12 in BCD, then your I²C code or connection is probably not working. But as we can't see your code, and don't know what you get from the RTC module, then it can't be more than mere guesswork.
If you are sure that the I²C connection is working, then check the flag address (0Fh). The BL and OF bits should read 0. If they don't, then you might have a hardware problem of a sort.