| 
 
中级会员  
 
	积分296金钱296 注册时间2016-5-10在线时间87 小时 | 
 
1金钱 
| 在原子的ucos ii 例程基础上 把浮点任务改成了RTC任务,为什么任务就不能正常运行了? 任务函数:
 void rtc_task(void *pdata)
 {
 OS_CPU_SR cpu_sr=0;
 while(1)
 {
 OS_ENTER_CRITICAL();
 printf("\r\n %0.2d:%0.2d:%0.2d \r\n",calendar.hour,calendar.min,calendar.sec);
 OS_EXIT_CRITICAL();
 delay_ms(500);
 }
 }
 
 RTC的中断函数:
 void RTC_IRQHandler(void)
 {
 OSIntEnter();
 if (RTC_GetITStatus(RTC_IT_SEC) != RESET)
 {
 RTC_Get();
 }
 RTC_WaitForLastTask();
 OSIntExit();
 }
 
 
 | 
 |