|
求答疑,為什么32單片機(jī)在下載某些特定的程序后,掉電或復(fù)位,程序就會(huì)不完整,有點(diǎn)難受,在線等。這就是個(gè)簡(jiǎn)單的測(cè)頻率程序,,實(shí)在搞不懂為啥。。
u32 count_s;
u32 count_ms;
extern u32 count_i;
extern u32 count_over;
int main(void)
{ delay_init();
LCD_Init();
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); /
uart_init(9600); //
TIM3_External_Clock_CountingMode();
TIM4_timer_Init();
while(1)
{
if(count_i>1000)
{
count_ms = TIM3->CNT;
count_s = count_over*65536 + count_ms;
LCD_ShowxNum(100,100,count_s,8,16,0);
count_i=0;
count_over=0;
TIM3->CNT=0;
}
}
}
|
|