EEVblog Electronics Community Forum

Electronics => Microcontrollers => Topic started by: kgavionics on July 06, 2024, 05:39:07 pm

Title: [Solved]-CH32V003 NOT RESETTING?
Post by: kgavionics on July 06, 2024, 05:39:07 pm
Hello
I have 2 boards based on the CH32V003, they are almost identical, except one has a push button and the other doesn't. I checked both boards pins PD7 (NRST) on the chip is connected to the PD7 on the board, but for some reason, on the first board (second board test start at 0:11 in the video) if I pull the PD7 down it resets and the second board doesn't. I flashed the same code on both, but I can't find any logical explanation why I can't have the external to work on the second board? Does someone have an idea what's going on here?
TIA
https://youtu.be/fu6yPqkV4j8
Title: Re: CH32V003 NOT RESETTING?
Post by: rhodges on July 06, 2024, 07:46:01 pm
Maybe one has the user option byte bits RST_MODE set to '11' to enable D7 as GPIO?

Look in the reference manual section 16.5
Title: Re: CH32V003 NOT RESETTING?
Post by: kgavionics on July 06, 2024, 10:57:31 pm
Thank you rhodges, I think you are right! Now, I'm digging how to   erase the user option bytes.
Update:
I successfully, configured NRST PIN as NRST function using minichlink (https://github.com/cnlohr/ch32v003fun).