Question
DMA Ringbuffer UART circular mode
Posted on February 25, 2018 at 21:27
Hi,
i have a ringbuffer, for example an 2d Array of fixed uint8_t Bytes. It's possible that the chip at self or triggered in the Callback can update the DMA buffer address????
For example:
#define lines 8
#define bufferlinesize 36
uint8_t rxBuffer[lines][bufferlinesize]
unsigned nItrWrite=0;
.
.
.
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
nItrWrite= (nItrWrite+ 1) % lines;
huart->pRxBuffPtr = rxBuffer[nItrWriteRing];
}�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
#uart-dma #stm32-l4