1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
void main (void)
{ /* Note MCU power on system clock is HIRC (11.0592MHz), so Fsys = 11.0592MHz */ Set_All_GPIO_Quasi_Mode(); //in Common.c #if DEBUG_PORT == 0 InitialUART0_Timer1_Type1(115200); /* 9600 Baud Rate*/ #elif DEBUG_PORT == 1 InitialUART1_Timer3(115200); /* 9600 Baud Rate*/ #endif Show_FW_Version_Number_To_PC(); printf ("\n*==================================================================="); printf ("\n* Name: N76E616 Watch Dog Timer Demo Code."); printf ("\n*===================================================================\n"); /* Change system closk source */ #if SYS_CLK_EN == 1 #if SYS_SEL == 0 System_Clock_Select(E_HXTEN); //Fosc = 2~16MHz XTAL #elif SYS_SEL == 1 System_Clock_Select(E_LXTEN); //Fosc = 32.768KHz XTAL #elif SYS_SEL == 2 System_Clock_Select(E_HIRCEN); //Fosc = 11.0592MHz Internal RC #elif SYS_SEL == 3 System_Clock_Select(E_LIRCEN); //Fosc = 10KHz Internal RC #elif SYS_SEL == 4 System_Clock_Select(E_OSCEN); //Fosc = OSC-In External OSC #endif #endif #if SYS_DIV_EN == 1 CKDIV = SYS_DIV; //Fsys = Fosc / (2* CLKDIV) = Fcpu #endif TA = 0x0AA; TA = 0x055; #if PRE_SCALAR == 0 WDCON = 0x00; #elif PRE_SCALAR == 1 WDCON = 0x01; #elif PRE_SCALAR == 2 WDCON = 0x02; #elif PRE_SCALAR == 3 WDCON = 0x03; #elif PRE_SCALAR == 4 WDCON = 0x04; #elif PRE_SCALAR == 5 WDCON = 0x05; #elif PRE_SCALAR == 6 WDCON = 0x06; #elif PRE_SCALAR == 7 WDCON = 0x07; #endif set_WDTEN; //WDT run while(1); } |
|
相关推荐
|
|
只有小组成员才能发言,加入小组>>
3314 浏览 9 评论
2995 浏览 16 评论
3494 浏览 1 评论
9059 浏览 16 评论
4088 浏览 18 评论
1178浏览 3评论
605浏览 2评论
const uint16_t Tab[10]={0}; const uint16_t *p; p = Tab;//报错是怎么回事?
599浏览 2评论
用NUC131单片机UART3作为打印口,但printf没有输出东西是什么原因?
2335浏览 2评论
NUC980DK61YC启动随机性出现Err-DDR是为什么?
1896浏览 2评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 07:25 , Processed in 1.080924 second(s), Total 77, Slave 58 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号