Send UART hex command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-07 10:07 PM
Hi
I'm trying use DFR0534 with STM32f446.
This module read uart command hex.
Ex. Command AA 07 02 00 08 BB
Im trying send like this
char play[6] = {0xAA, 0x07, 0x02, 0x00, 0x08, 0xBB};
HAL_UART_Transmit_IT(&huart4, play, 6);
But in uart monitor recive different command.
Could You help me?
- Labels:
-
STM32F4 Series
-
UART-USART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-07 10:48 PM
What is "UART monitor"? How different command does it receive? You are transmitting binary data, is your "UART monitor" capable of displaying binary data, and is it set to that mode of display? Does the baudrate match? Do you use any level conversion between your mcu and the "UART monitor"? Do you have grounds connected? Did you observe the data on the line using oscilloscope or logic analyzer?
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-07 10:58 PM
I change my code
char play[6] = {0xAA, 0x07, 0x02, 0x00, 0x08, 0xBB};
HAL_UART_Transmit_IT(&huart4, play, 6);
And now i get AA 03 00 20 08 BB instead AA 07 02 00 08 BB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-08 12:28 PM
Looks like physical connection/grounding problems.
