Skip to content
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

PC18 and PC19 not working as normal IOs #476

Open
thor171 opened this issue Dec 14, 2024 · 0 comments
Open

PC18 and PC19 not working as normal IOs #476

thor171 opened this issue Dec 14, 2024 · 0 comments

Comments

@thor171
Copy link

thor171 commented Dec 14, 2024

Hi,

I want to use PC18 and PC19 on a CH32x035 as normal IOs, but it seems as the debugging interface is still running on those pins. I can't control their behaviour.
This is the initialization, am I missing something?

`int main(void)
{
SystemInit();

funGpioInitAll();
//  GPIO C18 and C19 Push-Pull

GPIO_port_enable(GPIO_port_C);
GPIO_pinMode(GPIOv_from_PORT_PIN(GPIO_port_C, 18), GPIO_pinMode_O_pushPull, GPIO_Speed_10MHz);
GPIO_pinMode(GPIOv_from_PORT_PIN(GPIO_port_C, 19), GPIO_pinMode_O_pushPull, GPIO_Speed_10MHz);
GPIO_digitalWrite(GPIOv_from_PORT_PIN(GPIO_port_C, 18), low);
GPIO_digitalWrite(GPIOv_from_PORT_PIN(GPIO_port_C, 19), low);

}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant