kulve wrote:I guess it should be OK to use HSE as mentioned above and still use the 1Hz clock source as in the testhal RTC code?
No. Use LSI instead. And carefully read RTC part from reference manual.
kulve wrote: I need to solder that out to see how much it's without it
Not necessary. I think, your led connected through series resistor. Than you can measure voltage on resistor and calculate current using Ohm's law. Not very precise but works without soldering iron.
barthess wrote:It is hard to determine real reason of such behavior. Probably in EXTI cell. Try to look with memory browser what's exactly written to RTC registers. Are alarms and wakeups written in RTC correctly?
If I understand the TRM correctly, the f205 goes to StandBy mode with PDDS being set so setting the LPDS bit in the above code has no affect?
And in StandBy mode it shouldn't wake up by EXTI cell, that should happen only in Stop mode?
kulve wrote:And in StandBy mode it shouldn't wake up by EXTI cell, that should happen only in Stop mode?
Yes, you are correct.
kulve wrote:If I understand the TRM correctly, the f205 goes to StandBy mode with PDDS being set so setting the LPDS bit in the above code has no affect?
Probably you are correct. I have create that demo just for testing of RTC, not power saving.
It doesn't wake up without the call to rtcSetPeriodicWakeup_v2() so it doesn't wake to anything else.
Increasing the WUTR from 9 ("+1 seconds") to 500, it "sleeps" around 8 seconds. Does that mean that my ck_spre isn't 1 second? The WUKSEL is set to 0b100.
Sleeping works only once. After the wake-up, it doesn't seem to "sleep" at all.
Judging from the power consumption, it is actually in the stop mode when "sleeping" and not in the standby mode. It takes 5.5mA with a led and according to our calculations the led is taking something between 1-2 mA.
kulve wrote:Judging from the power consumption, it is actually in the stop mode when "sleeping" and not in the standby mode. It takes 5.5mA with a led and according to our calculations the led is taking something between 1-2 mA.
Actually I guess it should take much less even in the stop mode, so disregard that comment.
kulve wrote:Increasing the WUTR from 9 ("+1 seconds") to 500, it "sleeps" around 8 seconds. Does that mean that my ck_spre isn't 1 second? The WUKSEL is set to 0b100.
Enable calibration output (COE bit in RTC_CR register) and check frequency with oscilloscope.
kulve wrote:Sleeping works only once. After the wake-up, it doesn't seem to "sleep" at all.
Probably code from demo does not resets all flags in RTC_ISR register. Look in it with debugger.
kulve wrote:Increasing the WUTR from 9 ("+1 seconds") to 500, it "sleeps" around 8 seconds. Does that mean that my ck_spre isn't 1 second? The WUKSEL is set to 0b100.
Enable calibration output (COE bit in RTC_CR register) and check frequency with oscilloscope.
I checked and it was a bit over 500Hz which I guess is what is should with 32000Hz RTCLCK. I've double checked and double checked the PREDIV_A and PREDIV_S and I don't understand why my ck_spre isn't 1 Hz.
But I guess that doesn't have anything to do with the power consumption so I'm continuing to debug that next.