2024-08-05 07:45 AM
I'm using the STM32G030C8 for one of my projects and i realize that in some cases the RTC stops when the power supply is up. While in VBAT supply the resonator works well and provide the correct date and time, but when i use the power supply the resonator immediately stops to work. The oscilation signal disappears in osciloscope. It looks like the microcontroller does not switch the power for LSE properly.
The crystal i'm using is the ECS 32.768 KHz 6 pF +/-10 ppm (https://br.mouser.com/ProductDetail/ECS/ECS-.327-6-34B-C-TR?qs=eP2BKZSCXI77Gsmdv1lxlw%3D%3D) with 10pF for load capacitors. The LSE Drive Level Capability is set to high. I even tested it with medium low and medium high and it doesn't make difference.
In 8 boards assembled, the problem ocurred in 2. We are having some low temperatures over here ( < 10°C) and the problems appear mostly in low temperatures, but even in our lowest temperatures it doesnt get even closer to the lowest operation temperature for the microcontroller or the crystal.
After some point the RTC begins to work properly both on VBAT and by power supply, but when i power up the board the next morning the same occurs and the time is freezed at the exact time i power up the board.
Solved! Go to Solution.
2024-08-08 12:15 PM - edited 2024-08-14 06:03 AM
Hello,
I spent the whole day yesterday trying to figure out the problem with the LSE, attempting to isolate the issue. Then I realized that when I didn't initialize the GPIOs, the LSE worked fine. I'm using the PC13 pin, which has RTC functions and is physically close to the oscillator. Even though I'm using it only as an input, it may cause issues with the RTC.
Later I came across this errata sheet for STM32G030x6/x8 (https://www.st.com/resource/en/errata_sheet/es0486-stm32g030x6x8-device-errata-stmicroelectronics.pdf) that explain the strange behavior with my board.
Right now, I disabled PC13 and uploaded the firmware to several boards for testing. Tomorrow morning, I will test them and come back with the results.
Update:
I tested all the boards with PC13 disabled, and none of them exhibited the issue. Consequently, I modified my project to use a different pin instead of PC13. Multiple boards were tested afterward, and they all functioned correctly.
2024-08-05 09:58 AM
Are all VDD/VSS pins connected, including the analog ones?
> The oscilation signal disappears in osciloscope.
Unless you have ultralow capacitance (active) probe, loading the LSE by oscilloscope may stop the oscillator, too.
JW
2024-08-05 10:51 AM
Dear @gtimmen ,
Is that possible to know VDD and VBAT values ? and how the switching is managed from VBAT to VDD.
During the switching phase of VBAT domain to be powered by VDD the switch is connected to VBAT
STM32G0x0 advanced Arm®-based 32-bit MCUs - Reference manual
Hope it helps.
STOne-32.
2024-08-05 12:57 PM
@waclawek.jan Yes, VDD, VSS and VREF+ are connected.
I'm using a regular osciloscope probe, but in a non problematic board is possible to verify the crystal signal with both VBAT and VDD/VSS Power Supply.
@STOne-32 The VDD is about 3.290V and the VBAT is 3.245V. The tRSTTEMPO max is 400us and i have a 1uF capacitor on VBAT.
2024-08-06 03:48 AM
Is the above VBAT voltage stable, doesn't it drop when VDD is off, or at the moment of VDD startup?
Isn't this problem with software? Read out and check/post content of RCC_BDCR and RTC registers at the moment when LSE is not oscillating.
JW
2024-08-08 12:15 PM - edited 2024-08-14 06:03 AM
Hello,
I spent the whole day yesterday trying to figure out the problem with the LSE, attempting to isolate the issue. Then I realized that when I didn't initialize the GPIOs, the LSE worked fine. I'm using the PC13 pin, which has RTC functions and is physically close to the oscillator. Even though I'm using it only as an input, it may cause issues with the RTC.
Later I came across this errata sheet for STM32G030x6/x8 (https://www.st.com/resource/en/errata_sheet/es0486-stm32g030x6x8-device-errata-stmicroelectronics.pdf) that explain the strange behavior with my board.
Right now, I disabled PC13 and uploaded the firmware to several boards for testing. Tomorrow morning, I will test them and come back with the results.
Update:
I tested all the boards with PC13 disabled, and none of them exhibited the issue. Consequently, I modified my project to use a different pin instead of PC13. Multiple boards were tested afterward, and they all functioned correctly.