Why can one equal-priority FreeRTOS task repeatedly win a non-blocking UART write?
I am using FreeRTOS on an ATSAMC21 (single-core Cortex-M0+) with Harmony non-blocking/interrupt-driven UART (SERCOM4_USART_Write). I have two FreeRTOS tasks with the same priority trying to print using the same UART protected by a mutex. Task 2: (Same structure using msg2) (same code is working in blocking mode of execution) void APP_Tasks ( void ) { switch (appData.state) { case APP_STATE_INIT: appData.state = APP_STATE_SERVICE_TASKS; break; case APP_STATE_SERVICE_TASKS: xSemaphoreTake(xPrintMutex, portMAX_DELAY); // SERCOM4_USART_Write returns false if UART is still busy transmitting // beca
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.