This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

UART Forwarding/Passthrough

I have a GPS over UART to a nrf5283. For debugging the GPS, I'd like to passthrough UART from my PC to the GPS. I know the nrf5283 only has one UART. Is there a simple way to do this without creating a second UART in software?

Parents
  • Then you need just Tx and Rx to copy on one side of the chip what comes on the other, GPIOTE and PPI are ideal for this! The problem might be if at certain moment you will need to start listening to Tx in your main FW because host will stop sending commands to GPS but it will be targeting nRF FW. But if you are free to choose the protocol then you can do something like "First UART wired to nRF UART and commands are processed in BLE FW => once certain command arrives it will say how long the pass-through should be available now => nRF de-inits the UART and wires the PINs with GPIOTE and PPI => starts the counter => now PC talks to GPS => timer expires on nRF side so it will again cancels GPIOTE and PPI and reinits UART => scenario can repeat as many times as necessary".

    See SDK example for GPIOTE.

Reply
  • Then you need just Tx and Rx to copy on one side of the chip what comes on the other, GPIOTE and PPI are ideal for this! The problem might be if at certain moment you will need to start listening to Tx in your main FW because host will stop sending commands to GPS but it will be targeting nRF FW. But if you are free to choose the protocol then you can do something like "First UART wired to nRF UART and commands are processed in BLE FW => once certain command arrives it will say how long the pass-through should be available now => nRF de-inits the UART and wires the PINs with GPIOTE and PPI => starts the counter => now PC talks to GPS => timer expires on nRF side so it will again cancels GPIOTE and PPI and reinits UART => scenario can repeat as many times as necessary".

    See SDK example for GPIOTE.

Children
No Data
Related