2023-05-30 12:33 PM
Hi everyone,
I am working on a custom STM32F401 board and came across a strange problem. I have a coin battery connected o Vbat pin of the MCU and using custom bootloader with it. Everything works fine but once I remove the battery (no voltage in Vbat). The bootloader refuse to jump to firmware and get suck. I could not find any evidence that MCU need voltage on Vbat Pin all the time to work properly. Could anyone help me to figure out the issue? I shall be very thankful.
Solved! Go to Solution.
2023-05-31 08:01 AM
Hi @TALHA
To ensure proper operation of this product, we have to supply the VBAT with at least 1.65 V and maximum 3.6 V.
Regards
DianeP
2023-05-31 07:57 AM
Check for code where you might get stuck in a while(), or end up in ErrorHandler() or HardFault_Handler() instrument those so you'll know...
2023-05-31 08:01 AM
Hi @TALHA
To ensure proper operation of this product, we have to supply the VBAT with at least 1.65 V and maximum 3.6 V.
Regards
DianeP
2023-06-01 07:06 AM - edited 2023-11-20 04:19 AM
Hi Diane,
I understand your point but there is a PDR (power down reset) present in STM32F MCUs. It states that Vbat Voltage will be switched to Vbat external battery voltage if Battery is present, Otherwise it will use VDD (see the figure below). Please correct me if my understanding is wrong.
2023-06-01 07:08 AM
However, the problem I mentioned in my question is solved. The RCC interrupt reset routines were missing in system_init(); function. now the it is booting correctly even without the battery.
Kind regards,
Talha
2023-06-01 07:43 AM - edited 2023-11-20 04:20 AM
Hi @TALHA
It's not in this sense that it works the Back up domain can be powered by the VDD or the VBAT by default it's on the VDD. When the VDD drops below the selected VBOR threshold, the VBat takes over and feeds the domain backup. By leaving your VBat pin floating, you're in a configuration in which we can't guarantee the product's proper operation.
If you don't have anything to maintain in the backup domain, you can connect your VDD to your VBAT.
Regards
DianeP
2023-06-01 07:48 AM
Thanks a lot. I misunderstood it then. Thank you for the clarification. I have boards already designed with a battery on Vbat and no backup voltage if the Battery drains out. I think it needs a redesign to ensure proper operation.
2023-06-01 07:58 AM
@TALHA
I don't think it's necessary to redo your card, if the VBAT pin is not floating.The only imperative is that the VBAT pin is not floating, if it is connected to an external battery or even a VDD there is no problem
If your battery is empty you will just lose the contents of your backup domain.
Regards
Diane