The application discloses a dual-mode redundant communication
system and method based on a five-pin interface, relates to the technical field of communication, and comprises a host and a slave, and the method comprises access detection, low-speed
handshake negotiation, rate switching, dual-mode redundant transmission and link self-healing; the application can complete power supply, hot plug detection, low-speed protocol negotiation, high-speed full-duplex
data transmission and
wireless redundant
backup only by using VCC, GND, DET and two dynamically multiplexed
signal lines, and can realize runtime protocol
dynamic switching through a GPIO matrix, and reserves flexible space for expanding SPI, I2C and other protocols; in addition, a UART wired and ESP-NOW
wireless dual-mode hot
backup architecture is adopted, the slave simultaneously sends same data through two links, the host preferentially reads the wired link, can be seamlessly switched to the
wireless link within a preset
timeout threshold, automatically restores the wired priority after reinsertion, and realizes
millisecond-level link self-healing.