cancel
Showing results for 
Search instead for 
Did you mean: 

Reset button of the Nucloe-G031K board does not work.

Ccui.1
Associate II

The NRST pin of Nucleo-G031K8 is always low. The reset button does not do anything. Should not it reset MCU?

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

The NRST pin on the STM32G031 can work in a number of different ways. As can be read in the RM0444, section 3.4.1, NRST_MODE[1:0], the NRST pin is per default set to be a:

Bidirectional reset: NRST pin configured in reset input/output mode (legacy mode)

(ST production value of the User and read protection option bytes: 0xFFFF FEAA)

But... at the NUCLEO-G031K8 these bits are programmed from 11 to 10, which RM0444 describes as

GPIO: standard GPIO pad functionality, only internal RESET possible.

(NUCLEO value of the User and read protection option bytes: 0xF7FF FEAA)

Of course you can change it to whatever setting you like.

[edit]Please verify the content of the register FLASH_OPTR at 0x40022020, as it definitely should contain 0xFFFFFEAA (thanks to @Community member​ for his effort)[/edit]

Good luck!

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

9 REPLIES 9
Peter BENSCH
ST Employee

The NRST pin on the STM32G031 can work in a number of different ways. As can be read in the RM0444, section 3.4.1, NRST_MODE[1:0], the NRST pin is per default set to be a:

Bidirectional reset: NRST pin configured in reset input/output mode (legacy mode)

(ST production value of the User and read protection option bytes: 0xFFFF FEAA)

But... at the NUCLEO-G031K8 these bits are programmed from 11 to 10, which RM0444 describes as

GPIO: standard GPIO pad functionality, only internal RESET possible.

(NUCLEO value of the User and read protection option bytes: 0xF7FF FEAA)

Of course you can change it to whatever setting you like.

[edit]Please verify the content of the register FLASH_OPTR at 0x40022020, as it definitely should contain 0xFFFFFEAA (thanks to @Community member​ for his effort)[/edit]

Good luck!

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

When board is switched off, do you measure low resistance between the pin and GND?

Did you reprogram the NRST pin to GPIO?

JW

Ccui.1
Associate II

Peter is right. I also had older version ST link utility that does not recognizes G031. After upgrading to v4.6, I could change the option byte, NRST works!

Hi @Peter BENSCH​ ,

> But... at the NUCLEO-G031K8 these bits are programmed from 11 to 10,

How do you mean this?

Do you mean that ST *programs* the option bytes on the Nucleo board to non-default value?

If so, where is this documented?

If so, are other such nonstandard option bytes around?

Thanks,

JW

@Community member​ I don't know where it is documented. I just read the value from my NUCLEO-G031K8 to help @Ccui.1​ on this thread.

If the respective NUCLEO is not protected, the option bytes can be read and changed freely. AFAIK for the NUCLEO boards it was never claimed to keep ST production values in their option bytes, was it?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

@Peter BENSCH​ ,

> AFAIK for the NUCLEO boards it was never claimed to keep ST production values in their option bytes, was it?

There are many things which are not claimed, which IMHO should go the path of least surprise. To me, NRST pin not functioning sounds surprising, especially after having a look into the only available G0-specific documentation, the RM, which, as you've said, explicitly documents option bytes being by default in the expected, "NRST functions as reset" state.

> I just read the value from my NUCLEO-G031K8

Was it a pristine NUCLEO? (Read: haven't it been you who rewrote the option bytes in it?)

Jan

@Community member​ Even if it was a previously untouched NUCLEO-G031K8, I checked a 2nd NUCLEO - and found the default value 0xFFFF FEAA at the address 0x40022020, i.e. Bidirectional reset: NRST pin configured in reset input/output mode (legacy mode). Perhaps the first NUCLEO was a preliminary one...

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thanks, Peter, for checking this.

Interesting.

Are there differences in the chips' marking, or any distinguishing labels on the boards?

I understand that as an ST insider, you might have received a pre-production board with nonstandard "past".

Is it possible that @Ccui.1​ received such a preliminary Nucleo board? He says, that the older STLink Utility did not recognize the chip, so I presume he attempted to program it through the bootloader; maybe that method changed the option bytes (but why would it?)

Jan

@Peter BENSCH​ 

@Community member​ The NUCLEO-32 are too small to put a sticker on. Probably the only way to mark them is with the inlay in the plastic box. There may be some "Engineering Samples" information on the back, sometimes with an additional "E" as the first character.

It is unlikely that @Ccui.1​ would have such a board as these are usually not publicly available.

However, @Ccui.1​ is the only one who could shed some light on how option bytes might have changed on his board.

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.