求答疑,为什么32单片机在下载某些特定的程序后,掉电或复位,程序就会不完整,有点难受,在线等。这就是个简单的测频率程序,,实在搞不懂为啥。。
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;
}
}
}
|