cancel
Showing results for 
Search instead for 
Did you mean: 

A problem while using mcu STM32G031J6Mx

zhn.
Associate II

Hello,

I use STM32G031J6Mx pin4 as a output. But when I set this pin low, the mcu will be reset.

Somebody know why?

0690X00000BuygrQAB.png

6 REPLIES 6
KnarfB
Principal III

Doesn't happen to me on a STM32G0316-DISCO board. Maybe NRST is active? See NRST_MODE in flash option register.

Please try to set pin4 as PA0,PA1 or PA2's output. Not PF2's. And then set the pin low.Looking forward to your reply!

KnarfB
Principal III

What is the value of your NRST_MODE in flash option register? You may use STM32CubeProgrammer to find that out. The factory default is 3, which enables NRST IO. Set the NRST_MODE to 2, does the chip still reset?

Thx KnarfB,I have solved the problem according to your method.But I still have a question.Why I set this pin as PF2's output with the NRST_MODE=3, the chip will not reset?

KnarfB
Principal III

Pls. see RM0444 Reference manual section 5.1.2

Thank you,dude.