HAL_UART_RxCpltCallback not called in DMA
Hi Everybody,
- USART interrupt enabled
- DMA interrupt enabled
- USART2_RX circular
- USART2_TX normal
Simplifying code to the essential part here, code is receiving the bytes in the circular buffer but it does not jump to HAL_UART_RxCpltCallback. Could someone please give some hints, what am I missing here?
#define UART_BUFFER_SIZE 4
__IO uint8_t uartBuffer[UART_BUFFER_SIZE];
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_DMA_Init(void);
static void MX_USART2_UART_Init(void);
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
HAL_Delay(1000);
HAL_UARTEx_ReceiveToIdle_DMA(&huart2,(uint8_t *) &uartBuffer, UART_BUFFER_SIZE);
}
