cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F030RC: a 'software reset' and 'outside the program code' after pressing debugger 'resume' button

JSist.1
Associate

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.

1 ACCEPTED SOLUTION

Accepted Solutions

Read the Empty check subchapter in RM, that explains it.

JW

View solution in original post

3 REPLIES 3

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

JSist.1
Associate

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.

Read the Empty check subchapter in RM, that explains it.

JW