-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hardware reset pin doesn't work on CH32X033 or CH32X035 #123
Comments
At first look your circuit seems fine. Reset is usually active low indeed. Those NRST/RST labels may cause some confusion. My one case where RST was not working was when I used the particular pin for something else. I see in your schematic that for the X035, the RST pin uses PC3. Are you sure your sketch doesn't use PC3 for something? Could it be that PC3 is already initialized for something else by the core? Unfortunately I don't have any X035 to test with... |
Thanks @maxint-rd for taking a look and for the suggestion. I can confirm my sketches don't have any handling of the PC3 pin. I will keep poking through the core's code to see if I can find anything that is initializing that to a non-default. |
And.. Did you find something? I finally got a bunch of CH32X033F8P6 (TSSOP20) chips and soldered a couple to breakout boards. I can confirm that for my X033 pin 4 RST doesn't reset the processor either. Using F12 in the Link Utility does successfully reset the processor. I could use pin 4 as output pin PB7. Once more I reviewed the datasheet. For pin 4 it lists PB7 as main function after reset with default alternate function RST/T1C2N/O2P2/RTS3. Comparing that to the CH32V003 datasheet lists pin 4 having PD7 as main function after reset with default alternate function NRST/T2CH4/OPP1. No help there... The reference manual may shed some more light. On page 246 It states for User Option Bytes [4:3] RST_MODE this:
Reading those option bytes with the Link Utility gave these values:
FYI: The V003 reference manual shows the same option byte, with these reset modes:
BTW. Stefan Wagner made a CH32X033 development board. It has a reset button that ties PB7 to GND with a 100n capacitor parallel to the button. Nothing special as a circuit I believe.
|
@zane-c - Got hardware reset pin working as reset on my CH32X033F8P6. See previous post... |
Sorry if this is the wrong repo to be asking this question. I have a few boards with the CH32 chips. My reset circuit works fine for the v003 chips, but doesn't work for the X03x chips. I am wondering if this is an issue with the defaults being set in the Arduino core for these chips or something else completely.
Both appear to have identical reset circuits in the datasheets. But I did find it odd that one is labeled RST and one is NRST.
Shouldn't RST be active high?My circuits for reference:
Sorry again for the noob question. I am not an embedded engineer.
The text was updated successfully, but these errors were encountered: