AnsweredAssumed Answered

STM32 HAL UART transmission

Question asked by kh.Mehran on Dec 8, 2016
Latest reply on Dec 9, 2016 by kh.Mehran

I'm trying to send data by STM32f103 to an Arduino board using UART. Data isn't received properly. The code is generated using STM32CUBEMX and here is the part I added:

uint8_t Test[] = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 \n"; //Data to send  HAL_UART_Transmit(&huart1,Test,sizeof(Test),1000);// Sending in normal mode HAL_Delay(1000); HAL_UART_Transmit_DMA(&huart1,Test,sizeof(Test));// Sending in DMA mode HAL_Delay(1000);

the received data is:

  {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1}

in both DMA and normal modes the received data is pretty similar. The UART baud rate is 115200.

What should I do?

Outcomes