I am using a Particle Photon to update another MCU’s firmware over UART. The photon sets the MCU into bootload state and then transfers the firmware image over UART which is Serial1.
This process only works if the Tx pin of the Photon is connected to the ground using a resistor(pull-down). Without the pull-down resistor, the Tx and Rx pins go high after transmitting some data and stay high. With the pulldown resistor connected to Tx, and no resistor on the Rx pin, the transmission completes and Tx/Rx pins come low.
I am not sure what is causing the Tx pin to go high in the middle of UART transmission. I am using Serial1.write() to send data and Serial1.read() to read data.
Also, with the pulldown resistor in place, the communication works flawlessly for sometime. After that, during data transmission the Tx pin goes high again and requires a reboot to pull the Tx pin low again.
Not sure what’s causing this weird behaviour. Any ideas for the fix?