void Periodic_timer_Init(void)
{
? ? //96/8=12MHz
? ? SysTick->CTLR = 0;
? SysTick->SR = 0;
? SysTick->CNT = 0;
? SysTick->CMP = 360000;//計(jì)數(shù)器比較值
? SysTick->CTLR = 0xB;//(1 << 5) | (1 << 3)|(1 << 1)|(1 << 0);//計(jì)數(shù)器初始值更新? ? 向上計(jì)數(shù)? ? ? HCLK/8做時(shí)基? ? 打開更新中斷? ? 使能計(jì)數(shù)器
? NVIC_SetPriority(SysTicK_IRQn, 1<<7);//無搶占優(yōu)先級(jí)? ?響應(yīng)優(yōu)先級(jí)1
? NVIC_EnableIRQ(SysTicK_IRQn);
}
void SysTick_Handler(void)
{
? ? static? u16 t2=0,t3=0,t4=0;
? ? printf("1231342432535\n");
? ? SysTick->SR = 0;
?
}