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

About PFS173 reset pin #8

Closed
Vanbatai123 opened this issue Jun 27, 2021 · 1 comment
Closed

About PFS173 reset pin #8

Vanbatai123 opened this issue Jun 27, 2021 · 1 comment

Comments

@Vanbatai123
Copy link

Hi everyone!
I have an issue that how to configure pin A5 as a PRSTB reset pin, i have read datasheet and try it like this but did not work.

uint8_t _sdcc_external_startup(void)
{
PAC &= ~(1<<5);
CLKMD |= (1<<0);
EASY_PDK_INIT_SYSCLOCK_8MHZ(); //use 8MHz sysclock
EASY_PDK_CALIBRATE_IHRC(F_CPU, 5000); //tune SYSCLK to 8MHz @ 4.000V
return 0; //perform normal initialization
}
thank in advance.

@serisman
Copy link
Collaborator

My guess is that EASY_PDK_INIT_SYSCLOCK_8MHZ() is overwriting CLKMD.PA5_PRSTB back to 0, thereby disabling the reset flag. Try moving CLKMD |= (1<<0); to right before return 0;.

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

2 participants