nixz wrote on Tuesday, November 14, 2017:
Hi All,
I’m using STM32F767 with CubeMX and open STM32 compiler. I have latest CubeMX is using FreeRTOS 9.0.0. I have 3 tasks (TaskA, TaskB, TaskC) every of these 3 task have same structure:
void StartTaskA(void const * argument)
{
uint32_t msg = 0;
for (;;)
{
while( xQueueReceive(TaskAudioInputQueueHandle, &msg, portMAX_DELAY) != pdTRUE )
//while( xQueueReceive(TaskAudioInputQueueHandle, &msg, 100) != pdTRUE )
;
switch(msg)
{
// message stuff
}
}
TaskA has Normal priority, TaskB has High priority and TaskC has Realtime priority.
TaskA is sending to the queue of TaskB, TaskB is waiting on xQueueReceive().
I’m sure that I send from TaskA:
xQueueSendToBack(TaskHandle, &msg, 0);
It seems that in TaskA “xQueueSendToBack(TaskHandle, &msg, 0);” return pdTRUE for the first N times (however it isn’t handled from the other task) and faild with subsequent calls (when queue is full besause TaskB is not returns from xQueueReceive).
Maybe I shall call some manual task reschedule/notify/etc procedure?
TaskA sending message to TaskB not from ISR.
Any Idea what can be wrong? It seems that situation is better when all task has Normal priority.
Lower priority task can’t Resume Higher priority task by adding elements to it’s queue?
Thx in advance for any comments and ideas to check!
best regards
Mik
