I am having issues with the UART Tx complete interrupt not triggering after a transmit. The UART is sending approximately 5 million packets a day without issue. The Tx complete interrupt will not trigger after a indeterminate period of time which locks up the UART and the UART stops working. The only way is to reset the fw.
I have setup the UART as follows
/* Initialise UART */
LPUART_Init(base, &LPUART_config, LPUART_CLOCK_SOURCE);
/* Create a callback function */
LPUART_TransferCreateHandle(base, &g_lpuartHandle, LPUART_UserCallback, NULL);
/* TX complete IRQ enable */
LPUART_EnableInterrupts(base, kLPUART_TransmissionCompleteInterruptEnable);
Data is sent using a non-blocking transmit function.
/* Send the data, Callback will notify us when done */
LPUART_TransferSendNonBlocking(base, &g_lpuartHandle, &xfer);
The Tx Interrupt gets triggered when the transfer is complete.
void LPUART_UserCallback(LPUART_Type *base, lpuart_handle_t *handle, status_t status, void *userData)
{
if (kStatus_LPUART_TxIdle == status)
{
/* Signal Tx transfer is complete */
uart_tx_complete();
}
}
Once this is triggered, I start the Rx Transfer.
LPUART_TransferStartRingBuffer(base, &g_lpuartHandle, ring_buffer, nBytes);
Once the Rx data has finished, the transfer is aborted.
/* Abort the Receive handler, all data received */
LPUART_TransferAbortReceive(base, &g_lpuartHandle);
/* Disable the ring Buffer */
LPUART_TransferStopRingBuffer(base, &g_lpuartHandle);
This process is repeated every Tx and Rx (the init is only done once). I have tried removing the Ring buffer from the process but the same thing happens. Unfortunately it can take up to two weeks before it happens so I cannot reproduce it easily. Is there something wrong with the way I am doing things?
Is there an issue with the Tx Interrupt configuration? I have updated the SDK to the latest version (2.7.6) and the issue remains.
Any help in this would be greatly appreciated.
fwguy
Thanks for the clarification.
I got informed someone else created an internal ticket regarding this query.
I will continue the support in the internal case.
Regards,
Daniel.