I am using freeRTOS with Microchip Harmony V3.
I posted asking about serving an interrupt from an I2C port expander here: I2C port expander with interrupt
And this is related to that…
I have to have a task in wait/block until I receive a notification from either:
- vTaskNotifyGiveFromISR() because the interrupt from the I2C port expander
- a regular timeout from a timer
the code in the task stops and waits right at the line of ulTaskNotifyTake(). And all I need to do is use that function, i.e. no other separate function (before or after that one) to put the task into wait state. Are both statements correct?
can I that single ulTaskNotifyTake() function to put the task to wait and for it to be resumed again by EITHER the timer interrupt AND / OR the port expander pin interrupt?
what if they both occur at the same time or overlap each other in time somehow? When I receive either one of the notifications I carry out both port expander operations (check if the input changed and also update any outputs - reason for having the timer) so it doesn’t matter if I loose either one of the notifications. But I was wondering if I need to cater for it somehow.
Being a beginner with freeRTOS, I would appreciate very much simple solutions because have to deliver the software on a very tight timeline.
Thank you very much