void USER_PROGRAM_task(void *arg) {
// 用户程序代码
TimerP_Params timerParams;
uint32_t count=0;
DebugP_log("USER PROGRAM START running---\r\n");
while(1)
{
main_loop_count++;
if(main_loop_count>5000000)
{
main_loop_count=0;
// DebugP_log("Timer0_count = %d \r\n", TimerP_getCount(timer0BaseAddr));
DebugP_log("USER PROGRAM is running--- %d \r\n",count++);
// vTaskDelay(1);
}
}
如果 vTaskDelay(1); 不执行,独占 M4 ,while 循环能达到每秒上千万次
执行 vTaskDelay(1),while 循环只能达到 每秒 1 千多次
说明void ipc_recv_task_main(void *args) ; 极耗处理器时间,有办法改进程序快速处理吗?
创建了 2 个 task
#if ((defined (SOC_AM62X) || defined (SOC_AM62AX)) && defined(CONFIG_UART_NUM_INSTANCES))
if( IpcNotify_getSelfCoreId() == gMcuCoreID )
{
/* create task to monitor MCU uart to wakeup main domain. */
// lpm_create_wakeup_task();
}
#endif
/* create message receive tasks, these tasks always run and never exit */
ipc_rpmsg_create_recv_tasks();
ipc_rpmsg_create_user_program_task();