How to designate ?
For example #define LED_PIN PB11
but as a #define RST_PIN ???
I need to do a reset using digitalWrite(RST_PIN, LOW);
If you simply want to reset the board from code, there is a way to do this (though it varies depending on which Core you are using)
e.g. in the LibMaple core you can use nvic_sys_reset()
There is also a HAL / CMSIS call you can use if you are using one of the HAL based cores
what are trying to reset, the stm32 or maybe a display
for the latter, fill in whichever pin the display rst pin is connected to, alternatively you can connect it to the main reset from the button.
for the stm32 itself, no idea
stephen
digitalWrite(RST_PIN, LOW);I neobhhodimo not only to reset the STM Board , but the modules connected to this Board and to the pin RESET (RST).
That is, I must do a low level on pin RST (RESET).
I just can’t tell the name of this pin : #define RST_PIN OR RESET_PIN OR ????
Is there already a designated name for a pin RESET ?
ARDUINO UNO EXAMPLE:
int resetPin = 12;
// the setup routine runs once when you press reset:
void setup() {
digitalWrite(resetPin, HIGH);
delay(200);
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
pinMode(resetPin, OUTPUT);
………….
}
// the loop routine runs over and over again forever:
void loop() {
…………………
digitalWrite(resetPin, LOW);
Serial.println(“this never happens”);
//this never happens because Arduino resets
}
STM32
how to make for STM32 ??
for ARDUINO UNO int resetPin = 12;
stm32f103 ?
You have to use extra wire from that chosen pin to RESET.
What you could do is to define a pin, for example “PB11”, configure PB11 as open_drain output, connect it to the RESET pin (R on BluePIll) , connect other reset inputs to this PB11 pin as well.
When you toggle the PB11 to “low” you will reset everything. Not tested yet, however.
Do I understand correctly that directly to the RST PIN can not handle ?
Only through an additional PIN. Is that so ?

- Reset.JPG (59.49 KiB) Viewed 438 times
The user must ensure that the level on the NRST pin can go below the VIL(NRST) max level 0.8V. Otherwise the reset will not be taken into account by the device
.. this may trip you up if you are using for example a silicone rubber/membrane type button which has a relatively high resistance, or using some other device (a PIR for example) which doesn’t drive the pin low enough. Also the cap is critical to debouncing the switch. It will sorta work without it.. mostly…. except when it doesn’t ![]()
EDIT: Some good advice here-> http://ibker.net/2017/05/07/stm32f103c8 … ic-guides/
#define RESET_PIN PB10
void setup() {
pinMode(LED_PIN, OUTPUT);
pinMode(RESET_PIN, OUTPUT);
digitalWrite(RESET_PIN, HIGH);
}
void loop() {
digitalWrite(LED_PIN, HIGH);
delay(1000);
digitalWrite(LED_PIN, LOW);
delay(1000);
delay (3000);
digitalWrite(RESET_PIN, LOW);
}
Unfortunately it doesn’t work.
I joined the PB10 PIN with a PIN RST (RESET)
Is it possible as in the case of unresponsiveness to send not only RESET the STM BOARD , but also the connected modules ?
To restart everything ?
How to implement it using
iwdg_init(IWDG_PRE_256, 1200);
iwdg_feed();
HELP
If you are retrying to reset the STM though its own reset line, this may not be possible. Just use the command I posted earlier or like you say, use the WDT etc
If you want to also reset other hardware, then only connect that pin to the external hardware not to the stm32
e.g. set the pin to logic zero (assuming thats the reset state). Then call the function to reset the STM32
If you need a system to synchronise the reset of both the STM32 and the external hardware, I’d suggest 2 things.
Use another device to do this e.g. 555 timer ?? Or another MCU.
AND… I think your whole system needs to be redesigned if it relies on lots of devices being reset at just the right time.
Thank you very much !
I understand you, I will try to do so.




