2020-03-01 06:30 AM
Hi,
I am working on a project with Nucleo board 401 and the serial device SIM808, the communication is managed with CMSIS-RTOS2 APIs.
In my code there are two threads, the first (mainTask) that sends an AT command at the SIM808 and the second (StartDefaultTask) which waits for a flag to be set to perform some operations.
This flag is set in the UART callback HAL_UART_RxCpltCallback when the response to the AT command sent is received.
The problem occurs when the osThreadFlagsSet function is executed in the callback because the second thread doesn't exit from blocked state and nothing happens, the system is blocked.
I have found that the code blocks in the vPortValidateInterruptPriority function (file port.c) and it appears to be an issue with interrupt priority.
But in the project the priority of the DMA and UART interrupts is set to 6, therefore, lower than configMAX_SYSCALL_INTERRUPT_PRIORITY, which is equal to 5.
Could you help me to understand where the error is?
Attached you can find my code.
2020-10-13 08:18 PM
Can someone please answer this