STM32F QUESTIONS
-
- Valued Contributor
- Posts: 447
- http://meble-kuchenne.info.pl
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 81 times
- Been thanked: 243 times
Re: STM32F QUESTIONS
Btw. You might need to do a board power cycle for changes in this domain to take effect
Re: STM32F QUESTIONS
great LeighM
turned it off and on again and the LED started flashing and I get the date and time, I tried to change the date and time and everything works correctly
thanks
turned it off and on again and the LED started flashing and I get the date and time, I tried to change the date and time and everything works correctly
thanks
- Attachments
-
- Screenshot 2025-01-12 213101.png (225.96 KiB) Viewed 3754 times
Re: STM32F QUESTIONS
Hi LeighM
unfortunately I found another problem with the internal RTC whether it is configured as LSE or as LSI, I noticed that if the card is turned off for a while (a few hours) the RTC does not start and blocks the program, I do the initialization of the RTC first and only after several turns on and off it restarts, but if I turn it off for a few seconds when I turn it back on it resumes normally and the time has gone forward despite there being no external battery or large capacitors on the power line (probably the few uF of filter are enough to keep it active for a few seconds)
thanks
unfortunately I found another problem with the internal RTC whether it is configured as LSE or as LSI, I noticed that if the card is turned off for a while (a few hours) the RTC does not start and blocks the program, I do the initialization of the RTC first and only after several turns on and off it restarts, but if I turn it off for a few seconds when I turn it back on it resumes normally and the time has gone forward despite there being no external battery or large capacitors on the power line (probably the few uF of filter are enough to keep it active for a few seconds)
thanks
- Attachments
-
- Screenshot 2025-01-27 181406.png (167.45 KiB) Viewed 3313 times
Re: STM32F QUESTIONS
other info that maybe can help you
1) I wanted to write a few minutes and not hours
2) I lowered the Hclk to 25 Mhz (before it was 80Mhz) and the failure to restart has become more sporadic
3) I eliminated LSE as the main clock and set HSI RC and working at 16Mhz the problem occurs very very rarely
4) just now I realized that probably when the program seems blocked in reality it is greatly slowed down in the video that I managed to load you can see the LED flashing very fast while when it seems blocked the LED flashes very slowly
thanks
1) I wanted to write a few minutes and not hours
2) I lowered the Hclk to 25 Mhz (before it was 80Mhz) and the failure to restart has become more sporadic
3) I eliminated LSE as the main clock and set HSI RC and working at 16Mhz the problem occurs very very rarely
4) just now I realized that probably when the program seems blocked in reality it is greatly slowed down in the video that I managed to load you can see the LED flashing very fast while when it seems blocked the LED flashes very slowly
thanks
- Attachments
-
- OK.zip
- (818.68 KiB) Downloaded 15 times
-
- NOT OK.mp4.zip
- (2.4 MiB) Downloaded 16 times
-
- Valued Contributor
- Posts: 447
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 81 times
- Been thanked: 243 times
Re: STM32F QUESTIONS
It could be that startup times for the LSE oscillator are causing issues.
For the RTC to work properly you need a constant battery supply to VB pin.
The Battery backup domain section of the Reference manual RM0383 provides some useful information.
This can be downloaded from the st.com website.
For the RTC to work properly you need a constant battery supply to VB pin.
The Battery backup domain section of the Reference manual RM0383 provides some useful information.
This can be downloaded from the st.com website.
Re: STM32F QUESTIONS
ok LeighM thanks
now I added a 3V button battery between the Vbat and negative pins and this happens:
setting the main oscillator on HSE and the RTC oscillator on LSE (crystal exsternal screenshoot 2) 10 times out of 10 the program does not start
if I leave the main oscillator on HSE and the RTC oscillator on LSI ( LSI RC screenshoot 1) , the program always restarts even after several minutes but minutes and seconds in the time in which the main power was disconnected the time did not go forward, but restarts from the moment it was disconnected
now I added a 3V button battery between the Vbat and negative pins and this happens:
setting the main oscillator on HSE and the RTC oscillator on LSE (crystal exsternal screenshoot 2) 10 times out of 10 the program does not start
if I leave the main oscillator on HSE and the RTC oscillator on LSI ( LSI RC screenshoot 1) , the program always restarts even after several minutes but minutes and seconds in the time in which the main power was disconnected the time did not go forward, but restarts from the moment it was disconnected
- Attachments
-
- scr2.png (156.77 KiB) Viewed 3261 times
-
- scr1.png (175.3 KiB) Viewed 3261 times
Re: STM32F QUESTIONS
Hi, I've done a lot of tests and this configuration has never given me any problems with the program crashing.
- Attachments
-
- 2025-02-03.png (171.32 KiB) Viewed 3022 times
-
- Valued Contributor
- Posts: 447
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 81 times
- Been thanked: 243 times
Re: STM32F QUESTIONS
I've put the code into the CAL file (STARM_CAL_RTC.c)
this goes into directory...
C:\ProgramData\MatrixTSL\FlowcodeV10\CAL\STARM\
This will avoid the need for the extra C icon code.
Note that if you swap between LSI and LSE you need to cycle all power
this goes into directory...
C:\ProgramData\MatrixTSL\FlowcodeV10\CAL\STARM\
This will avoid the need for the extra C icon code.
Note that if you swap between LSI and LSE you need to cycle all power
- Attachments
-
- STARM_CAL_RTC.c
- (8.16 KiB) Downloaded 7 times