初级会员
- 积分
- 54
- 金钱
- 54
- 注册时间
- 2011-5-13
- 在线时间
- 2 小时
|
#define configUSE_TICKLESS_IDLE 0
#define configUSE_QUEUE_SETS 1
#define configCPU_CLOCK_HZ ((unsigned long)72000000)
#define configTICK_RATE_HZ (( portTickType )1000)
#define configMAX_PRIORITIES (32)
#define configMINIMAL_STACK_SIZE ((unsigned short)130)
#define configMAX_TASK_NAME_LEN (16)
#define START_TASK_STACKSIZE (2*configMINIMAL_STACK_SIZE)
#define MSP_RX_TASK_STACKSIZE (configMINIMAL_STACK_SIZE)
#define MSP_TX_TASK_STACKSIZE (configMINIMAL_STACK_SIZE)
#define DRIVER_RX_TASK_STACKSIZE (configMINIMAL_STACK_SIZE)
#define DRIVER_TX_TASK_STACKSIZE (configMINIMAL_STACK_SIZE)
#define RADIOLINK_TASK_STACKSIZE (2*configMINIMAL_STACK_SIZE)
#define CONFIGPARAM_TASK_STACKSIZE (configMINIMAL_STACK_SIZE)
#define COMMANDERANL_TASK_STACKSIZE (8*configMINIMAL_STACK_SIZE)
static void startTask(void *arg)
{
taskENTER_CRITICAL(); /*½øèëáù½çÇø*/
xTaskCreate(radiolinkTask, RADIOLINK_TASK_NAME, RADIOLINK_TASK_STACKSIZE, NULL, 6,NULL);
xTaskCreate(mspTxTask, MSP_TX_TASK_NAME, MSP_TX_TASK_STACKSIZE, NULL, 3,NULL);
xTaskCreate(mspRxAnlTask, MSP_RX_TASK_NAME, MSP_RX_TASK_STACKSIZE, NULL, 8,NULL);
xTaskCreate(driversTxTask,DRIVER_TX_TASK_NAME,DRIVER_TX_TASK_STACKSIZE,NULL,4,NULL);
xTaskCreate(driversRxAnlTask,DRIVER_RX_TASK_NAME,DRIVER_RX_TASK_STACKSIZE,NULL,6,NULL);
// xTaskCreate(commanderAnlTask,COMMANDERANL_TASK_NAME,COMMANDERANL_TASK_STACKSIZE,NULL,5,NULL);
printf("Free heap: %d bytes\r\n", xPortGetFreeHeapSize());
vTaskDelete(startTaskHandle);
taskEXIT_CRITICAL();
}
void commanderAnlTask(void *param)
{
while(1)
{
vTaskDelay(8);
}
}
现在遇到了一个问题,当不创建commanderAnlTask任务时,可以执行printf且其他任务也在执行,但是不注释commanderAnlTask任务,则其他任务也不执行,printf也不执行了,
commanderAnlTask此任务内部就只有一个vTaskDelay(8);大家帮忙分析分析是怎么回事,困扰几天了---
|
|