Skip to main content
Visitor II
July 9, 2021
Question

Can the STM32G030 nRST pin disabled, or be used as GPIO?

  • July 9, 2021
  • 7 replies
  • 6301 views

Hi guys!

We are running a project using STM32G0 MCU-s. We used STM32G031 in the previous iteration, but, due to budget reasons, we now ended up with STM32G030-s, beleiving these are basically interchangeable for our purposes.

Due to some board error, we now need to disable the NRST pin (or, rather set it up to be a GPIO in this case). On the older G031 boards, we can perform this from code through the option bytes, but to our surprise, the G030 manual misses these bytes altogether.

Using the older STM ST-Link utility, we were able to program the bytes on a test device somehow, and set up proper functionality, but I have a bad feeling about this. We have quite a few production devices where the programming pins are not accessible anymore, and we can only disable NRST with a software update. If we brick them, there's no way of bringing them back.

So... is there any way to safely set up NRST as GPIO on G030s from software? Is it a supported feature at all?

Thanks for your help!

    This topic has been closed for replies.

    7 replies

    Super User
    July 9, 2021

    The NRST pin can't be disabled or repurposed on this chip.

    Visitor II
    September 15, 2021

    The device seems pretty useless without the functionallity to disable the reset. The SPI peripheral is not usable because the SCK AF is on the reset pin. Can we hear about this from STM directly? Is there really no way to use SPI on the STM32G030J6?

    ST Employee
    September 21, 2021

    Hello,

    Indeed NRST configuration cannot be disabled on this value line part. This option is only part of the G031 access line products.

    Regarding SPI, I think you can map SPI2_SCK on pin 1 - PB8, and MISO on pin 8 - PB6 and MOSI on pin 5 - PA11[PA9] after remapping it digitally to PA9.

    I hope it might help,

    Best regards,

    Antoine

    Visitor II
    September 21, 2021

    Hello Antoine

    Thanks a lot for your reply but it does indeed work. We managed to reconfigure the RESET pin as SPI-SCLK. We did it by modifying the flash config bit NRST in the STM32CubeProgrammer. The NRST bit is not visible in the option bits tab but in the memory table it is.

    Thanks anyway.

    Best regards,

    André Krummenacher

    Visitor II
    November 12, 2021

    I am trying to do the same thing. Where exactly did you find the NRST and what did you change it to?

    I can see something called "NRST_MODE" in the REG viewer, is that it? What did you change it to?

    Visitor II
    September 21, 2021

    ST Link utility is replaced by CubeProgrammer tool.

    Visitor II
    January 16, 2024

    Hello!

    I have tried to disable NRST pin to enable SPI communication.
    Using STM32 ST-LINK Utility I have changed NRST_MODE, but now i cannot even perform full chip erase.

    Did I bricked it?

    Visitor II
    January 18, 2024

    Hi, #meToo ;p

    I have done the same, one day after you @Gawron 

    STM32CubeProgrammer dont have this option, so I think this some bug/feature from ST, and it wasnt written or deleted from DS/RF.

    Graduate
    January 18, 2024

    Disabling NRST doesn't spoil anything as log as you don't reconfigure SWD pins. If your firmware uses SWD pins for some other functionality - then you have a problem. Still, there is a way to unbrick the chip.