2020-12-30 08:33 AM
Hi everyone,
we have prototype with three STM32F030RC and with very strange behavior. All mcu has shared NRST (pulled up, for testing not externally driven) and BOOT0 (for testing pulled low permanently) pins.
For a testing purpose I created clean project in CubeIde (1.5.1), in MX was configured only GPIO and in main while loop was added one pin toggle after 1ms (just for doing anything). When I'm stepping debugger line after line ('step-into'), application works well, but when I hit 'resume' button (or the 'step-over' button is pressed a few time) MCU is resetted (OCD prints 'external reset detected') and after pausing the code is 'lost' somewhere around 1xffff... Address according to manual belongs to the bootloader. When I check RCC_OCR register, it says the 'software reset' occured. When I'm looking to BOOT pin with osciloscope the signal is rock stable low and NRST pin is truly dropped into reset for about 40us.
I really don't understand what is wrong here. How can application jump into bootloader after reset when boot0 pin is pulled low and application is loaded into flash?
Had anybody seen this strange behavior before and can give me any advice please?
Thank you in advance.
Solved! Go to Solution.
2020-12-30 05:09 PM
2020-12-30 09:25 AM
After first programming, try powering the chip down and up (i.e. perform power-on reset), and please report back if it makes any difference.
JW
2020-12-30 12:20 PM
Thank you. It seems to removing power from PCB was helped. Can you please advise me why the power cycle did the job?
For explanation, I mean - in the future we want to upgrade mcu firmware with bootloader, but if this "power-cycle problem" exists then I'm expecting the power cycle will be neccessary after any firmware upgrade. Or is it only fw uploading problem via debugger? It would be nice to have upgrades without power cycling :)
Thank you in advance for any response.
2020-12-30 05:09 PM
Read the Empty check subchapter in RM, that explains it.
JW
2024-05-24 08:21 PM
Sorry, I can't find the "Empty check" chapter.
When I search for "Empty check" there comes nothing.
2024-05-25 02:30 AM
The "empty check" mentioned above is related to the particular method of bootloader entry in STM32F0xx.
STM32F1xx has a different bootloader entry method, and does not have the "empty check" mechanism.
For details of bootloader entry methods, see AN2606.
If you want to discuss some issue you have, please start your own thread, describing the hardware and software you are using and the problem you encounter.
JW