Strange unexpected TaskNotifygive

delphes wrote on Monday, December 17, 2018:

Dear all,

I have a simple task like this :

void xyzIntTask(void const* argument)
{
for (;:wink: {
ulTaskNotifyTake(pdTRUE, pdMS_TO_TICKS(portMAX_DELAY));
/**** some processing ****/
printf("Get Task Notified ");
}
}

this task was created like this :

if (xTaskCreate((TaskFunction_t)xyzIntTask, "xyzTask", HEAP_STACK_256, NULL,3, &xyzIntTaskHandle) != pdPASS) {
    assert_param(0);
}

THE ONLY LINE where the task is notify is interrupt callback with this trace :

    case XYZ_INT2_PIN:
        SEGGER_RTT_WriteString(0, "INT XYZ");
        vTaskNotifyGiveFromISR(xyzIntTaskHandle, NULL);
        break;

What I am Certainly sure is no hardware interrupt are gnerated and that the debug line INT XYZ never appears.

On repeated time arround 4300000 millisecs (4300 secs) I got Get Task
Notified message so it means Task notify Take is notified, BUT there is NO Interrupt to do this and I have no message from IRQ call back routine.

MY Question : Is there any way to be notified in task without the vtasknotify called ?

ldb wrote on Monday, December 17, 2018:

For Block indefinitely I think you want

ulTaskNotifyTake(pdTRUE, portMAX_DELAY);

My guess is the macro conversion produces a value that isn’t indefinite and it eventually drops out.

delphes wrote on Monday, December 17, 2018:

Hi Leon

Thanks very much you was right the Macro return 4294966 not investigated why yet

rtel wrote on Monday, December 17, 2018:

To effect an indefinite delay INCLUDE_vTaskSuspend must be set to 1 in
FreeRTOSConfig.h, and the block time (as per previous post) must be set
to portMAX_DELAY - not pdMS_TO_TICKS( portMAX_DELAY ).