Question
stm32f429t6, the uart8 dma rx function works on 3 out of 5 boards and does not work on 2
In stm32f429t6, the uart8 dma rx function works on 3 out of 5 boards and does not work on 2. The same firmware was applied to 5 boards, and if only the uart8 interrupt was used without using dma, the 5 boards mode operated normally. What is the cause of the problem of DMA RX not working on two boards and how to improve it?
const uint16_t UART8_RX_BUF_SIZE = 256;
uint8_t uart8RxBuf[UART8_RX_BUF_SIZE];
extern DMA_HandleTypeDef hdma_uart8_rx;
/* USER CODE END PV */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_DMA_Init();
MX_USART3_UART_Init();
MX_USART2_UART_Init();
MX_UART8_Init();
MX_LWIP_Init();
MX_ADC3_Init();
MX_USART1_UART_Init();
MX_TIM1_Init();
MX_TIM2_Init();
MX_TIM3_Init();
MX_TIM4_Init();
MX_TIM5_Init();
/* USER CODE BEGIN 2 */
ups.initializeRingBuffer();
HAL_UARTEx_ReceiveToIdle_DMA(&huart8, uart8RxBuf, UART8_RX_BUF_SIZE);
void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size)
{
if(huart->Instance == UART8)
{
ups.handleUartData(uart8RxBuf, Size);
HAL_UARTEx_ReceiveToIdle_DMA(&huart8, uart8RxBuf, UART8_RX_BUF_SIZE);
}
}
/* USER CODE END 4 */
