free-pdk / easy-pdk-includes

Easy PDK Programmer specific include files for Padauk MCUs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PFS173 reset pin as PRSTB function

Vanbatai123 opened this issue · comments

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.

My guess is that EASY_PDK_INIT_SYSCLOCK_8MHZ() is overwriting CLKMD.PA5_PRSTB back to 0, thereby disabling the reset flag.

But, this issue/code example doesn't really have anything to do with this repo, and is also really old, so closing it.