After further debugging it turns out that the implementation in uart_imx.c contains a bug in the assertion of the argument. This change helped to fix the issue:
diff --git a/platform/drivers/src/uart_imx.c b/platform/drivers/src/uart_imx.c
index 3c5149d..f86d559 100644
--- a/platform/drivers/src/uart_imx.c
+++ b/platform/drivers/src/uart_imx.c
@@ -389,7 +389,7 @@ void UART_SetCtsPinLevel(UART_Type* base, bool active)
*END**************************************************************************/
void UART_SetModemMode(UART_Type* base, uint32_t mode)
{
- assert((uartModemModeDce & uartModemModeDce) || (uartModemModeDce & uartModemModeDte));
+ assert((mode == uartModemModeDce) || (mode == uartModemModeDte));
if (uartModemModeDce == mode)
UART_UFCR_REG(base) &= ~UART_UFCR_DCEDTE_MASK;
elseSince the issue is in the driver code provided by NXP, it would be nice if this issue will be fixed in the next FreeRTOS BSP release...