Reputation: 147
This is the UARTEx_RxEventCallback()
function which should continue to receive bytes. Here you can see in Hercules screen, I sent 123456789
but it only receives the last byte. Why is it happening. My DMA settings are set Normal (not Circular), Periph to Memory, Byte. NVIC interrupt checkbox is enabled. Everything is set as it should be.
Upvotes: 1
Views: 1657
Reputation: 11
Your DMA is not working because of the initialization order, you have to initialize DMA before the UART/USART, like this:
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_DMA_Init();
MX_USART3_UART_Init();
Upvotes: 1
Reputation: 11
Looks like you don't increment memory address, so data always copied to the first element of the array. hdma_usart3_rx.Init.MemInc should be DMA_MINC_ENABLE
Upvotes: 0