cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f429t6, the uart8 dma rx function works on 3 out of 5 boards and does not work on 2

joseph05
Associate III

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 */

 

 

4 REPLIES 4
Sarra.S
ST Employee

Hello @joseph05 

This seems to be a hardware issue? 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

TDK
Guru

What does "not working" mean here exactly? You're the only one with the board and code, step through and understand what isn't happening and why. Use those results to guide your investigation.

Look at the hardware for any defects. In particular at the UART_RX pin for solder bridges or cold joints.

If you feel a post has answered your question, please click "Accept as Solution".

That would be a very odd state of affairs. Assume the problem is not with the DMA, but the reception of data.

Not working in the sense that the DMA or UART report some error or failure status you're not addressing? Check what info UART->ISR / SR reports in these conditions. Clear sticky errors preventing reception. Check manual.

Your code looks to ignore errors

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
joseph05
Associate III

The problem has not been resolved yet and the cause is being investigated. I will update any additional information found.