Skip to main content
zlomennypez
Associate II
March 2, 2023
Solved

NVIC_SystemReset(); works with STM32F103C but not with STM32F103R

  • March 2, 2023
  • 19 replies
  • 4466 views

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

This topic has been closed for replies.
Best answer by Tesla DeLorean

0693W00000aIDSmQAO.jpg

19 replies

waclawek.jan
Super User
March 2, 2023

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

JW

Tesla DeLorean
Guru
March 2, 2023
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Guru
March 2, 2023

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
zlomennypez
Associate II
March 2, 2023

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

Peter BENSCH
ST Technical Moderator
March 2, 2023

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.
Tesla DeLorean
Guru
March 2, 2023

The previous iteration/schematic had a pull-up

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

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

zlomennypez
Associate II
April 14, 2023

Thank you Peter for your answer. Boot pins are connected to jumpers like on bluepill board, to change logic 0 and 1. I will test it, where i s aproblem with booting.