From cf167db3059f2ebea5ad7041c3c539cbd06d0753 Mon Sep 17 00:00:00 2001 From: Maciej-Mudita Date: Wed, 31 Aug 2022 14:16:46 +0200 Subject: [PATCH] [MOS-91] Fix cellular DMA errors Fix "DMA is busy" errors when booting the GSM modem at the stage of finding the appropriate baudrate. --- module-bsp/board/rt1051/bsp/cellular/rt1051_cellular.cpp | 7 +++++++ pure_changelog.md | 1 + 2 files changed, 8 insertions(+) diff --git a/module-bsp/board/rt1051/bsp/cellular/rt1051_cellular.cpp b/module-bsp/board/rt1051/bsp/cellular/rt1051_cellular.cpp index 76db8d672105d36c7fea90ff14437276f35feba8..907cba1a70a03e96b0111b32bdea4e638e8e0007 100644 --- a/module-bsp/board/rt1051/bsp/cellular/rt1051_cellular.cpp +++ b/module-bsp/board/rt1051/bsp/cellular/rt1051_cellular.cpp @@ -230,6 +230,11 @@ namespace bsp if (!LPUART_IsEDMATxBusy(&uartDmaHandle)) { break; } + else if (i == maxTXCheckRetires - 1) { + LOG_ERROR("Cellular Uart error: EDMA is busy"); + LPUART_TransferAbortSendEDMA(CELLULAR_UART_BASE, &uartDmaHandle); + return -1; + } } } @@ -249,6 +254,7 @@ namespace bsp if (status != kStatus_Success) { LOG_ERROR("Cellular: TX Failed! , status: %d", static_cast(status)); + LPUART_TransferAbortSendEDMA(CELLULAR_UART_BASE, &uartDmaHandle); disableTx(); return -1; } @@ -258,6 +264,7 @@ namespace bsp if (ulNotificationValue == 0) { LOG_ERROR("Cellular Uart error: TX Transmission timeout"); + LPUART_TransferAbortSendEDMA(CELLULAR_UART_BASE, &uartDmaHandle); disableTx(); return -1; } diff --git a/pure_changelog.md b/pure_changelog.md index a7ede26e4b3aa5aca3ed8c5a40ff845c5dee9e3e..c8a3b34fdaa3dc99326ee5847339295846dea82c 100644 --- a/pure_changelog.md +++ b/pure_changelog.md @@ -7,6 +7,7 @@ * Separated system volume from Bluetooth device volume for A2DP ### Fixed +* Fixed cellular DMA errors * Fixed order of the services while closing system * Fixed crash of the E-ink service while restoring system data * Fixed removing wrong sentinels