-
Notifications
You must be signed in to change notification settings - Fork 8
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
Unexpected code in SetSysClock #11
Comments
That comes from the official SDK The code seems to setup PD1 as GPIO input with activated pullup. Usuaully, PD1 is SWIO. Maybe it needs a pullup as soon as it turns on? Please ask WCH. It's their custom debug protocol (not equivalent to ARM's SWDIO SWCLK). It's a single wire protocol. |
Debug/SWIO seems to work fine without those lines when executing EVB. I don't know if it has a hardware pullup. If the code is in the official SDK, then it's probably best to leave it there. I found the code when trying to resolve a startup issue I haven't yet gotten a handle on. Thanks |
I've actually asked WCH technical support about this and am expecting an interesting response. |
I have received this response from WCH, but it makes no sense. By that logic, they would have to initialize every pin to prevent it from floating.
|
For completeness, I found the strange code while trying to resolve this problem, which still persists : The chip's interrupts (Systick, atleast) do not fire (on the EVB) for some indeterminate time after power up. I have seen it be anywhere from few minutes to a few hours. Once the interrupts do start firing, it continues to work fine even across resets until the chip is fully powered down. |
Oh, that seems like a really bad problem with the chip.. Or a broken chip. But the SysTick should be independent of that GPIO init. |
SetSysClock()
ofsystem_ch32v00x.c
starts with these lines :GPIOD seems to have nothing to do with the clock system. Commenting out this code does not seem to cause any issues. Why is this here? Can it be removed?
The text was updated successfully, but these errors were encountered: