해결된 질문
작성
·
303
0
Board: nucleo-f411re
env.: stm32cubeide 1.10.1
test source: 01_taskman
강의시 타 task가 모두 동작하지 않은 시점에 idel task가 수행되는것을 확인하기 위해서 아래와 같이 task3를 생성하였으나, idle task 수행시 증가하는 count가 0입니다.
debugging을 통해서 확인한 결과 idle task는 수행되나 vApplicationIdleHook 함수가 수행되지 않는 것으로 보입니다.
Hooking 함수를 enable 하려면 어떻게 하면 될까요?
수정사항:
static void Task3( const struct Param_types *Param)
{
while(1)
{
vTaskDelay(pdMS_TO_TICKS(5000));
printf("T1 %d, T2 %d, T3 %d, Idle %d\n", task1timer, task2timer, task3timer, idletimer);
fflush(stdout);
task3timer++;
}
}
/*-----------------------------------------------------------*/
void vApplicationIdleHook (void)
{
idletimer++;
printf (".");
fflush (stdout);
}
test log:
aaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaT1 2250, T2 225, T3 44, Idle 0
aaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaT1 2301, T2 230, T3 45, Idle 0
aaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaT1 2351, T2 235, T3 46, Idle 0
aaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaT1 2401, T2 240, T3 47, Idle 0
aaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaT1 2451, T2 245, T3 48, Idle 0
aaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaT1 2501, T2 250, T3 49, Idle 0
aaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaT1 2551, T2 255, T3 50, Idle 0
aaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaT1 2601, T2 260, T3 51, Idle 0
aaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaT1 2651, T2 265, T3 52, Idle 0
aaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaT1 2701, T2 270, T3 53, Idle 0
aaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaT1 2751, T2 275, T3 54, Idle 0
aaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaaaaaaaaabaaT1 2801, T2 280, T3 55, Idle 0
답변 1
0
freertosconfig.h에서 hooking 함수 enable하는 부분 찾아서 수행결과, vApplicationIdleHook() 정상적으로 호출됨을 확인했습니다.