Skip to main content
AARTA.1
Associate
July 9, 2020
Solved

Disable NRST STM32G030J6

  • July 9, 2020
  • 4 replies
  • 3577 views

I have a design with a STM32G030J6 (SOIC8) controller. I don't need an external reset. I want to use the pin 4 as a GPIO (PA1). I connect a button to this input. I select the appropriate option in CubeMX, but when the button is clicked, the controller resets. How can I disable NRST from this pin?

0693W000001saHKQAY.png

This topic has been closed for replies.
Best answer by TDK

Connect with STM32CubeProgrammer and change the nBOOT_SEL=1 and nBOOT0=1 option bytes to boot to flash regardless of the state of that pin.

Edit: My eyes saw BOOT0 and my mind read NRST.

The STM32G0x1 has an NRST_MODE option byte. But I don't see that for the STM32G0x0 series. Seems like you can't use that pin.

There is this note in the datasheet which suggests it's not possible to have these in another other than input mode:

For the device in SO8N package, the PA0, PA1, and PA2 GPIOs are bonded with NRST on the pin 4. In order not to interfere with device functions, they must not be set in alternate function or in output but remain at all times in input configuration.

4 replies

TDK
TDKBest answer
Super User
July 9, 2020

Connect with STM32CubeProgrammer and change the nBOOT_SEL=1 and nBOOT0=1 option bytes to boot to flash regardless of the state of that pin.

Edit: My eyes saw BOOT0 and my mind read NRST.

The STM32G0x1 has an NRST_MODE option byte. But I don't see that for the STM32G0x0 series. Seems like you can't use that pin.

There is this note in the datasheet which suggests it's not possible to have these in another other than input mode:

For the device in SO8N package, the PA0, PA1, and PA2 GPIOs are bonded with NRST on the pin 4. In order not to interfere with device functions, they must not be set in alternate function or in output but remain at all times in input configuration.

"If you feel a post has answered your question, please click ""Accept as Solution""."
S.Ma
Principal
July 10, 2020

I was told that G0 family goes to small pincount packages and for example, BOOT pin is shared with SWDCLK, and Reset can turn as GPIO (like SWDCLK/IO if not debugging). Double or triple bonding is just short circuit multiple pads of the die to reduce package pincount In essence, we should focus only on RESET pin functionality. To my understanding, disabling RST to use it as GPIO requires to modify the option byte, which won't be set up by the source code, nor the bin file. You probably need to do something with cube programmer to access the option byte before you flash your code.

Also, in this case, make sure the STLink reset HW control is disconnected and configure it NOT to generate reset pulse when start debug session (make sense to think consequences of changes)

AARTA.1
AARTA.1Author
Associate
July 10, 2020

Thank you! This is true!

0693W000001sax1QAA.png

JDavisDD
Explorer
August 5, 2021

On the STM32CubeProgrammer you do it by selecting the option byte NRST_MODE and chose # 2 which is GPIO: standard GPIO functionality, only internal RESET possible0693W00000D1aJ3QAJ.png wji

TDK
Super User
August 5, 2021

Looks like you're using STM32F030 whereas the OP is using STM32G030. They do not share the same option bytes.

"If you feel a post has answered your question, please click ""Accept as Solution""."
JDavisDD
Explorer
August 5, 2021

You're mistaken.

If you look at the screenshot that I posted in detail you will notice that the device is an STM32G03x series. What you see as a F030R4 "BOARD"is the identification of a nucleo STLINK section of that nucleo board. That line identifies the programmer not the target device. You can separate a nucleo STLINK programmer and make a standalone STLINK programmer with any nucleo that has one.

0693W00000D1asSQAR.png0693W00000D1ayuQAB.jpg

0693W00000D1azTQAR.jpg

You can see how to do it here.