2024-08-20 10:34 PM
Hi everyone,
I started a project a few weeks ago, which for reasons of urgency I had to use a black pill board as an initial prototype, using STM32F401CCU6 (of uncertain origin). The project continued to develop almost completely until we assembled the official board with all the circuits and peripherals.
When we programmed the firmware on the new board, after some time debugging and evaluating the operation, we noticed that without the backup battery the system took about five seconds longer than the old one to show the first image on the screen. The restart process here is turn the power supply off, wait some seconds (30s to 60s) and turn it on again (repeated many times with and without the battery).
The RTC is working perfectly with the battery, it keeps the date and time as expected and loose them when the battery is removed.
We reviewed all the hardware (connections, cabling, pinout, etc.) and found no difference between the new board and the initial prototype. We are using exactly the same firmware in both.
Important points on the MCU:
- BOOT_1 on the datasheet says it doesn't matter, but I connected it to ground to test (no difference).
- The pins shown in the picture are identical to the black pill board.
- The other pins are connected to the peripheral circuits (IO, ADC, TFT and communication).
Any idea why these extra 5s?
Thank you and best regards!
Solved! Go to Solution.
2024-08-20 11:21 PM
LSE startup may be approx. 5sec. With VBAT it keeps running during powerdown; without VBAT it needs to start up upon each powerup, if you use it in RTC.
JW
2024-08-20 11:21 PM
LSE startup may be approx. 5sec. With VBAT it keeps running during powerdown; without VBAT it needs to start up upon each powerup, if you use it in RTC.
JW
2024-08-25 04:48 AM
Dear @Chuckero ,
Remove R73 and share with us the PC14 and PC15 schematics and 32,768KHz datasheet crystal. You need to have a crystal compatible with this part that means 6pF or 7pF and have oscillation margin > 5 . In general the startup of the crystal with our LSE is dependent.
Hope it helps ,
STOne-32
2024-08-25 07:01 AM
Hello,
Thanks for the accurate tip, this was exactly the problem, the oscillator took about 5s to start.
In fact, we were using 22pF capacitors, I don't remember why, so I replaced them with 4.7pF and now the circuit triggers immediately.
Thank you very much.
2024-08-25 07:22 AM
I also would like to add this application note as reference for the oscillator design, it helped me a lot:
AN2867: Guidelines for oscillator design on STM8AF/AL/S and STM32 MCUs/MPUs