I am trying to use USART2 + DMA for Rx/Tx. Tx is working OK already.
For Rx, I would like to use DMA circular mode.
I use followings.
STM32CubeMX, STM32CubeL4 1.9.0.
After do workaround PLLM problem adding RCC_OscInitStruct.PLL.PLLM = 1;
HAL_StatusTypeDef HAL_UART_Receive_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
huart == &huart2
pData == &receive_str == 0x2000194c
Size == sizeof(receive_str) == 64
until 63rd character receive there is no problem. I typed 'a' 63 times.
However, when I type 64th character 'b' Hard Fault raised as following.
'b' exists at receive_str by DMA.
PRECISEERR is 1 , BFAR = 0x20018000.
It looks unwanted memory access to 0x200018000, did not such access.
DMAC is still transfers Rx data correctly.
I typed 'c' 3times, then the buffer is overwriten circulariy as expected.
At the time, I lookd stack.
Does anyone know my mistake, or how to workaround?