Ported old project on For Arm 2.0 platform to S32DS 3.4 Platform, but found the scheduler not triggers the task on time.
xTaskCreate( InitJobTask, "IK", 512 , NULL, mainQUEUE_SEND_TASK_PRIORITY + 8, &Rt_InitTaskxHandle); // Init Task
xTaskCreate( DrvTask, "TH", 512 , NULL, mainQUEUE_SEND_TASK_PRIORITY + 11, &Rt_DrvTaskxHandle );
vTaskStartScheduler();
static void InitJobTask( void *pvParameters )
{
for( ;; )
{
SystemInit();
vTaskSuspend(Rt_InitTaskxHandle);
}
}
uint32_t drvt1 = 0;
uint32_t drvt2 = 0;
uint32_t drvDelt[32] = {0};
static void DrvTask( void *pvParameters )
{
static TickType_t xLastWakeTimeMs;
int i = 0;
xLastWakeTimeMs = xTaskGetTickCount();
for( ;; )
{
drvt2 = GetTimeStampTimeMs();
DrvTask();
drvDelt[i] = drvt2 - drvt1;
drvt1 = drvt2;
i += 1;
if (i >= 32 )
{
i = 0;
}
vTaskDelayUntil( &xLastWakeTimeMs, 5);
}
}
Debug result:
but the old project on For Arm 2.0, works well.
Did anyone meet similar issue before? i don't know how to fix it now.
Found the issue
I found in task.c , NXP SDK, /SDK/rtos/FreeRTOS/Source/tasks.c,
the macro defined in FreeRTOSConfig.h , seems not working,
for example,
While in FreeRTOSConfig.h:
Even i added the macro definition in task.c:
still the macro not works, why macro be defined, but it not works?
Hi,
I'm not sure if I get the point - you like to disable the RUN_TIME_STATS? Or you like to enable it? If you like to enable it - you need to set configGENERATE_RUN_TIME_STATS to 1 - like this:
#define configGENERATE_RUN_TIME_STATS 1
Jiri
it should be disabled, in fact, in task.c, all macros not working,need to check makefile, i think,
it's weird, even i define a new Macro in the file,
#define Configure_AAAAAA 0
#if (Configure_AAAAAA != 0)
still, it not works
Hi,
just for clarification (i'm little bit lost) - what behavior are you expecting from your code snippet
#define Configure_AAAAAA 0
#if (Configure_AAAAAA != 0)
do_something();
#endif
?