Hi,dialog.
I am learning "DSPS"code .In my board ,XTAL 16M is supplied by another MCU ,i want to use RC16M as the sysclk.But it does not work.it stopped at rwip_init(error).
here is my code about it:
SetBits16(CLK_16M_REG, RC16M_ENABLE, 1); // enable RC 16MHz
for (volatile int i = 0; i < 20; i++);
SetBits16(CLK_CTRL_REG, SYS_CLK_SEL, 1); // switch to RC16
while( (GetWord16(CLK_CTRL_REG) & RUNNING_AT_RC16M) == 0 ); // wait for actual switch
SetBits16(CLK_CTRL_REG, XTAL16M_DISABLE, 1); // disable XTAL16
Where I went wrong ?
Thanks
Device:
RC16M Whether can be calibrated? Precision is whether enough used as "DSPS" project main clock ?
Thanks
Hi,Joined
XTAL 16M is supplied by another MCU,
这s is not recommend by official .
But i also want to know how to do it.
thanks YuanhangWu
Hi showing,
The systick uses the system clock in, if you choose the RC16 crystal for system clock the da wont be able to function properly it isn't accuarte enough, the xtal16 is mandatory for the da. Your configuration for activating the RC16 is correct.
Thanks MT_dialog
Hi MT_dialog,
ok,got it . Thank you very much