4098 views|2 replies

28

Posts

10

Resources
The OP
 

The highest bit of the byte of the serial port receiving data of GD32F350 is found to be invalid [Copy link]

This post was last edited by IoT Maker on 2018-9-29 13:44 It was found that the highest bit of the byte received by the serial port of GD32F350 is invalid. That is, the serial port receives a byte and finds that the serial port prints out the received data as follows: Send to the microcontroller serial port: 0x01 Print out: 0x01, send to the microcontroller: 0x80 Print out: 0x00; send to the microcontroller: 0x81 Print out: 0x01; send to the microcontroller: 0x91 Print out: 0x11; send to the microcontroller: 0xa1 Print out: 0x21; send to the microcontroller: 0xb1 Print out: 0x31; that is, as long as the highest bit is 1, the reception will be regarded as no such problem. Have you ever encountered this problem? It is puzzling

This post is from GD32 MCU

Latest reply

It should be a programming problem. You can write a simplest program first. After receiving the data, immediately send it back to the host computer through the serial port. Use the serial port debugging assistant software to test it in hexadecimal mode, sending only one byte at a time.  Details Published on 2018-9-29 15:32
 

1w

Posts

142

Resources
2
 
It should be a programming problem. You can write a simplest program first. After receiving the data, immediately send it back to the host computer through the serial port. Use the serial port debugging assistant software to test it in hexadecimal mode, sending only one byte at a time.
This post is from GD32 MCU
 
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 
 

28

Posts

10

Resources
3
 
chunyang posted on 2018-9-29 15:32 It should be a programming problem. You can first write a simple program to send the data back to the host computer through the serial port immediately after receiving it, and use the serial port debugging assistant software...
Yes, I found that there is a problem with the serial port receiving programming m6312_buf[m6312_cnt] = (usart_data_receive(EVAL_COM2) & 0x7f); This ox7f should be changed to 0xff. No wonder the highest bit is invalid, because I didn’t look carefully when transplanting other people’s programs!
This post is from GD32 MCU
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list