5 posts / 0 new
Last post
showing
Offline
Last seen:5 years 5 months ago
加入:2015-09-24 01:57
RC16M

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:
showing
Offline
Last seen:5 years 5 months ago
加入:2015-09-24 01:57
RC16M Whether can be

RC16M Whether can be calibrated? Precision is whether enough used as "DSPS" project main clock ?

Thanks

YuanhangWu
Offline
Last seen:4 years 11 months ago
Expert
加入:2015-03-25 08:19
Hi,Joined

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

MT_dialog
Offline
Last seen:2 months 5 days ago
工作人员
加入:2015-06-08 11:34
Hi showing,

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

showing
Offline
Last seen:5 years 5 months ago
加入:2015-09-24 01:57
Hi MT_dialog,

Hi MT_dialog,

ok,got it . Thank you very much