/* ------------ 操作说明------------------- 键寄存器IWDG_PR 寄存器地址0x40003000 初始值0X00000000 0X00005555 解除对IWDG_PR、IWDG_RLR和IWDG_WINR寄存器的写入访问保护 0X0000CCCC 启动独立看门狗 0X0000AAAA 喂狗 重装载寄存器IWDG_RLR 寄存器地址0x40003008 (12位) 初始值0X00000FFF 预分频器IWDG_PR 寄存器地址0x40003004 初始值0X00000000 0X00000000四分频 0X00000001八分频 0X00000002十六分频 0X00000003三十二分频 0X00000004六十四分频 0X00000005一百二十八分频 0X00000006二百五十六分频 0X00000007二百五十六分频 */ *(unsigned int*)0x40003000=0X0000CCCC; //启动独立看门狗 *(unsigned int*)0x40003000=0X00005555; //解除对IWDG_PR、IWDG_RLR和IWDG_WINR寄存器的写入访问保护 *(unsigned int*)0x40003004=0X00000004; //设置预分频器 *(unsigned int*)0x40003008=0X000003A9; //设置重装载寄存器数值(12位) *(unsigned int*)0x40003000=0X0000AAAA; //喂狗,把设置的重装载寄存器数值传送到计数器, //也会对IWDG_PR、IWDG_RLR和IWDG_WINR寄存器的写入访问保护
标签:PR,分频,IWDG,int,STM32F103C8T6,unsigned,笔记,看门狗,寄存器 From: https://www.cnblogs.com/wuwei001/p/18212766