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