2023-03-02 09:18 AM
I tried the same code on both microcontrollers, but STM32F103RET6 freezes with NVIC_SystemReset(); Can you help me please?
Solved! Go to Solution.
2023-03-05 05:24 PM
2023-03-05 11:29 PM
Thank you all, friends. I have added 10K resistor between 3.3V and RESET. It should solve the problem, shouldnt it?
2023-03-12 03:49 PM
No, it is not OK. We said "remove the R2". Did we also say "connect the NRST to..."? No! So are you capable of just removing the resistor and not doing anything else?
It was also said to read the AN2586. Why haven't you still done that?
2023-04-14 07:03 AM
When I changed board and not connecting 3.3V to RESET, board isnt working at all, cant boot. Here you can see, they use resistor to connect reset to 3.3V for example https://lupyuen.github.io/articles/super-blue-pill-like-stm32-blue-pill-but-better
2023-04-14 10:43 AM
The aforementioned Github website of a private user repeats the same mistakes that were made with the so-called Blue Pill Board.
However, the official documentation from STMicroelectronics is decisive for the correct connection of the pins, e.g. from NRST, here e.g. the already mentioned AN2586, where you can read on page 11:
The STM32F1xx does not require an external reset circuit to power-up correctly. Only a pull-down capacitor is recommended to improve EMS performance by protecting the device against parasitic resets. See Figure 5.
Charging and discharging a pull-down capacitor through an internal resistor increases the device power consumption. The capacitor recommended value (100nF) can be reduced to 10nF to limit this power consumption.
In addition, both AN2586 (section 4.1) and AN2606 (section 15.1 and bootloader pattern 1 in table 2) mention that to successfully boot into system memory you must set BOOT0 to 1 and BOOT1 to 0. However, this is only relevant a few clock cycles after RESET:
The values on the BOOT pins are latched on the fourth rising edge of SYSCLK after a reset. It is up to the user to set the BOOT1 and BOOT0 pins after reset to select the required boot mode.
The start in the user flash area is usually the normal case, which is why BOOT0 is pulled down to logical 0. Since booting into the SRAM is extremely rare, BOOT1 can also be set to logic 0, either with a pull-down or fixed to GND.
For the less frequent starting of the boot loader in the system memory, a logical 1 at BOOT0 and a following short pulse at NRST is then only necessary.
In your circuit excerpt above under BOOTx settings, both BOOT pins float, which leads to very mysterious effects and must not be realised in this way under any circumstances - both BOOT pins, i.e. BOOT0 and BOOT1, require a fixed logic level.
Regards
/Peter
2023-04-14 11:21 AM
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.
2023-04-14 11:48 AM
The resistor isn't quite the same thing as causing a VCC / GND short when the button is pressed.
The NRST pin should have an internal pull-up. An external 10K shouldn't cause an issue.
Make sure BOOT0 / BOOT1 are set appropriately.
Make sure VDDA / VSSA are 3.3V and GND respectively, even if you don't use the ADC/DAC
Can you connect via JTAG/SWD ?
If you scope NRST what level is it at?
2023-04-21 05:41 AM
You are not true, if you didnt connect nrst to 3.3V through 10k resistor or directly(not recommended), the board will not boot. nrst must be high to work, as soon at it falls to low, it stopped....
2023-04-21 08:37 AM
That suggests there's something in your design causing the NRST to go low, sure if you can overwhelm that with enough current to get it to a high state it may appear to work, and you'll probably burn on one of the transistors.
Your post complains that "NVIC_SystemReset()" doesn't work, and I said that's typical of systems where you're actively driving the pin high, and stopping the internal mechanisms that can briefly pulse it low can no longer succeed.
There's an internal pull-up of the order of around 40K on the NRST pin.
A button that shorts the supplies is not the answer to any of these issues.
2023-04-21 09:04 AM
Thank you, I tried to buy original bluepill, which has 3.3V connected to 10k and nrst (Their global board has this fault?). I will try to make new board with correct setup and I hope it will work.