cancel
Showing results for 
Search instead for 
Did you mean: 

NVIC_SystemReset(); works with STM32F103C but not with STM32F103R

zlomennypez
Associate II

I tried the same code on both microcontrollers, but STM32F103RET6 freezes with NVIC_SystemReset(); Can you help me please?

1 ACCEPTED SOLUTION

Accepted Solutions

0693W00000aIDSmQAO.jpg

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

19 REPLIES 19

What hardware? How is NRST connected? How is BOOT0 connected?

JW

Reset can fail on these MCU's if the pin is driven HIGH externally.

It is both an input and output pin, and clamped to ground open-drain style but the NVIC_SystemReset() or the POR triggering on the VDDA threshold level.

External reset circuits are expected to clamp to ground to reset, but otherwise let it float, and have the on pin pull-up get it to the high state.

Make sure BOOT0 and BOOT1 aren't floating, these can cause other code to start, especially in circuits where the power supply has a slow rise time.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

If this, then BOOT pins via a 2x3 jumper/header block

https://community.st.com/s/question/0D53W00001vbbFNSAY/upload-works-well-code-isnt-running-on-custom-stm32f103

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
zlomennypez
Associate II

This is connection of reset pin. As I said, everything works perfectly, the only thing is software reset with NVIC_SystemReset(); 0693W00000aI4MuQAK.png0693W00000aI4M1QAK.png

zlomennypez
Associate II

I have tried take off jumpers, but it didnt help.

You definitely have a mistake in the RESET drawing, because when you press the reset button, it makes a fat short circuit between 3.3V and GND. Or do you really have Reset permanently connected to 3.3V?

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Reset can fail on these MCU's if the pin is driven HIGH externally.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

The previous iteration/schematic had a pull-up

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I guess after Peter's and my "remove the R2" the guy just connected the NRST to VDD and the button to GND didn't rise any suspicion...