RS485 serial port configuration
RS485 belongs to master-salver mode, with Mater as the initiator and salver responder.In the network at the same time only one is sending data, other devices are in the listening state.
The main process is as follows: All actions need to wait for notification from the master side.When the host/master sends to the RS485 chip, first pull up the R/D.After sending the data, lower the R/D, enter the listening state of host/Master, and wait for Slaver to answer.
The configuration of DTS can be configured in accordance with ordinary serial port configuration. It is important to note that the pins connected to the R/D of the RS485 chip cannot be used as other reuse functions.
The app layer is used as follows,padding[0]=17 Represents the R/D of GPIO17 connected to RS485 chip