Spcomm control settings for the serial port parameters

Source: Internet
Author: User

For the serial port, we generally understand the baud rate, check code, data bits and other parameters. However, in the actual data transmission, some parameters will also affect the transmission of information. It is summarized as follows, so that we can inquire.
When the serial port is programmed, the serial port parameters can be tracked using Portman, which is indicated as follows:
0.00001006 ioctl_serial_set_baud_rate Serial0 SUCCESS rate:9600
0.00000531 ioctl_serial_clr_rts Serial0 SUCCESS
0.00000559 IOCTL_SERIAL_CLR_DTR Serial0 SUCCESS
0.00000447 Ioctl_serial_set_line_control Serial0 SUCCESS stopbits:1 parity:none wordlength:8
0.00000279 Ioctl_serial_set_char Serial0 SUCCESS eof:0 err:0 brk:0 evt:0 Xon:11 xoff:13
0.00000391 ioctl_serial_set_handflow Serial0 SUCCESS shake:0 replace:80000000 xonlimit:1000 xofflimit:1000
which
Rate:9600 refers to the baud rate.
Stopbits:1 Stop Bit
Parity:none Check digit
Wordlength:8 Data length
These are the main parameters, but often xon:11 xoff:13 shake:0 replace:80000000 xonlimit:1000 xofflimit:1000 These parameters also have an impact on the transmission. Therefore, the parameter setting of the Spcomm control is summarized as follows:
Shake:
SPCOMMR's Dsrsensitivity=true is 40.
The Dtrcontrol property of SPCOMMR
Dtrdisable=0
Dtrenable=1
dtrhandshake=2
SPCOMMR's outx_ctsflow=true is 8.
SPCOMMR's outx_dsrflow=true is 10.
Replace:
SPCOMMR's outx_xonxoffflow=true is 1.
SPCOMMR's inx_xonxoffflow=true is 2.
SPCOMMR's replacewhenparityerror=true is 4.
SPCOMMR's ignorenullchar=true is 8.
SPCOMMR's Txcontinueonxoff=true High is 8.
The Rtscontrol property of SPCOMMR
rtsdisable=00
Rtsenable=40
Rtshandshake=80
Rtstransmissionavailable=c0

Xonlimit:spcomm's Xonlimit
Xofflimit:spcomm's Xofflimit
Xoff:spcomm's XoffChar
Xon:spcomm's XonChar

Spcomm control settings for the serial port parameters

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.