Hi,
I have a scheduler problem when test affinity API on cortex-a32*2 aarch32.
The test code is as follows:
xTaskCreate(vTask1, "Task 1", 1000, NULL, 1, &xTask1);
xTaskCreate(vTask2, "Task 2", 1000, NULL, 2, &xTask2);
xTaskCreate(vTask3, "Task 3", 1000, NULL, 3, &xTask3);
uxTask1Mask = ( (1 << 1) );
vTaskCoreAffinitySet( xTask1, uxTask1Mask);
uxTask2Mask = ( (1 << 1) );
vTaskCoreAffinitySet( xTask2, uxTask2Mask );
uxTask3Mask = ( (1 << 0) );
vTaskCoreAffinitySet( xTask3, uxTask3Mask );
static void vTask1( void *pvParameters )
{
int i;
volatile uint32_t x = 0;
for( ;; )
{
printf("T1, Core 1, Prio 1\n" );
vTaskDelay(mainQUEUE_SEND_PERIOD_MS);
}
}
static void vTask2( void *pvParameters )
{
int i;
volatile uint32_t x = 0;
for( ;; )
{
printf("T2, Core 1, Prio 2\n");
vTaskDelay(mainQUEUE_SEND_PERIOD_MS);
}
}
static void vTask3( void *pvParameters )
{
int i;
volatile uint32_t x = 0;
for( ;; )
{
printf("T3, Core 0, Prio 3\n");
vTaskDelay(mainQUEUE_SEND_PERIOD_MS);
}
}
At the beginning the print is correct, but after running for a while task1 and task2 runing on core 1 are not scheduled. They both are removed from delay list and in ready list. Task3 can run on core0. I can not trace the problem.
pxReadyTaskList = {{uxNumberOfItems = 2, pxIndex = 0x8042135c <pxReadyTasksLists+8>, xListEnd = {xItemValue = 4294967295, pxNext = 0x80421874 <xIdleTCBBuffers.0+8>, pxPrevious = 0x80420278 <xIdleTaskTCB.3+8>}}, {
uxNumberOfItems = 1, pxIndex = 0x80421370 <pxReadyTasksLists+28>, xListEnd = {xItemValue = 4294967295, pxNext = 0x804229b8 <ucHeap+4036>, pxPrevious = 0x804229b8 <ucHeap+4036>}}, {
uxNumberOfItems = 1, pxIndex = 0x80421384 <pxReadyTasksLists+48>, xListEnd = {xItemValue = 4294967295, pxNext = 0x804239e0 <ucHeap+8172>, pxPrevious = 0x804239e0 <ucHeap+8172>}}, {
Can give some debugging suggestions, thank you very muchļ¼