2021-07-09 01:22 PM
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!
2021-07-09 01:38 PM
The NRST pin can't be disabled or repurposed on this chip.
2021-09-15 01:06 AM
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?
2021-09-21 06:35 AM
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
2021-09-21 07:04 AM
ST Link utility is replaced by CubeProgrammer tool.
2021-09-21 08:34 AM
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
2021-11-12 12:39 AM
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?
2021-11-15 12:27 AM
Yes, that is what you are looking for. Set it to 0x2 if you want to use the pin as gpio.
NRST 28:27
00: Reserved
01: Reset Input only: a low level on the NRST pin generates system reset, internal RESET
not propagated to the NSRT pin
10: GPIO: standard GPIO pad functionality, only internal RESET possible
11: Bidirectional reset: NRST pin configured in reset input/output mode (legacy mode)
2024-01-16 02:24 PM
2024-01-18 07:22 AM
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.