This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
We are developing our own uart driver base on CSL driver.
The gps module data is massive over 10kbps at 468000.so we think the better way to do that is using dma.The driver layer only support fixed length uart dma read method, and if we want to continuous receive our data, we need to create a thread to polling data.that may losing some bytes; so we want to trigger the next dma receive when UART_dmaRxIsrHandler is called.so it can continuous trigger dma receive.
it's work well when the data is send in the low rate, the dma receive complete ISR will call dma receive again, but when we raise up the speed, uart will enter overflow state, which disables further reception, and no more UART_dmaRxIsrHandler will be call. we try to clear the overrun error according TRM 12.1.6.4.8.1.3.6, but after we clear the error, it still enter overflow state and the dma ring queue will fail if any further byte receive.
we want to know it's ok to call the next dma receive in UART_dmaRxIsrHandler, which will be call when dma reception completed.
also we find out there is the same problem with driver layer, we use the follow code:
when we send data faster, it will enter UART_procLineStatusErr and call UART_disableDmaChannel,but the udma driver return fail with :udma: [Error] RX ch teardown
static void uartRxTest(void)
{
uint32_t i;
uint32_t length;
int32_t realRxLen;
while(1)
{
if((realRxLen = UART_read(gUARTHandle,(void *)(uintptr_t)rxData,sizeof(rxData)))==sizeof(rxData))
{
CacheP_wbInv((void *)(uintptr_t)rxData, (int32_t)sizeof(rxData));
UART_write(gUARTHandle,(void *)(uintptr_t)rxData,realRxLen);
}
Osal_delay(1);
}
}