-
Notifications
You must be signed in to change notification settings - Fork 37
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
baremetal-ch32v003 is not working after power off and resume. #76
Comments
Can you give more info like a picture of the board you're using and post the code here! |
Not reproducable at all for me. I tested this with my
Then unplugged the WCH-LinkE (to which the ch32v003 is connected to) and plugged it back in, the LED is still blinking! |
Thanks for you kind and prompt reply. Actually I was trying with a bare minimum board with a tssop adapter which is powered up using a AS1117 3v regulator. After your reply I took out the mini dev board which is a readymade development for CH32v003 and flashed the same code and it worked flawlessly. So the finding is that my bareminimum board is the culprit. I have redesigned a bareminimum board and now it's working perfectly, thanks again for your reply. |
if somehow the use of RAM can be reduced then it would be great. In case of CHFUN framework the usage of RAM is very less. |
Another issue which I am facing is while trying to make my own lib file like the one which is given below:- #ifndef _GPIO_CONIFG_H
#define _GPIO_CONIFG_H
#include "ch32v00x.h"
#define u8 uint8_t
#define GPIO_PORT GPIOD
#define GPIO_PIN 3
#define GPIO_PIN_1 2
void GPIO_INIT(uint8_t PIN);
#endif and corresponding source file GPIO_CONFIG.c- #include "GPIO_CONFIG.h"
void GPIO_INIT(u8 PIN)
{
RCC->APB2PCENR&=~(RCC_APB2Periph_GPIOD);
GPIO_PORT->CFGLR &= ~(0xf<<(4*PIN));
RCC->APB2PCENR|=(RCC_APB2Periph_GPIOD);
GPIO_PORT->CFGLR &= ~(0xf<<(4*PIN));
GPIO_PORT->CFGLR |=(GPIO_CNF_OUT_PP|GPIO_Speed_50MHz)<<(4*PIN);
} and then include #include "GPIO_CONFIG.h" in main.Now if I try building complier shows Error " "ch32v00x.h" No such file found. what's the issue? |
I build and flashed [baremetal-ch32v003]. Everything worked flawlessly, but as soon as I switched off the power and resumed everything stopped, no blink nothing. Please help.
The text was updated successfully, but these errors were encountered: