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
  • If you don't need to filter that UART but you would know when and for how long it should be pass-through then you can connect UART PINs as GPIOTE with PPI and simply let the mechanism to make the PINs high/low as they come into the device. That should have no timing penalty (runs outside main CPU) and doesn't consume even the UART peripheral on nRF5x side so you can reuse it for another real UART link to the chip at that time. However the whole thing might be problematic if you don't have enough GPIOTE and PPI channels (depends on the chip, if you use UART with flow control etc.)

    Other solution indeed is bitbanging GPIO ports in SW but that would work only if SD has no scheduled operation (or if your UART activity fits into some time-slot).

Reply
  • If you don't need to filter that UART but you would know when and for how long it should be pass-through then you can connect UART PINs as GPIOTE with PPI and simply let the mechanism to make the PINs high/low as they come into the device. That should have no timing penalty (runs outside main CPU) and doesn't consume even the UART peripheral on nRF5x side so you can reuse it for another real UART link to the chip at that time. However the whole thing might be problematic if you don't have enough GPIOTE and PPI channels (depends on the chip, if you use UART with flow control etc.)

    Other solution indeed is bitbanging GPIO ports in SW but that would work only if SD has no scheduled operation (or if your UART activity fits into some time-slot).

Children
No Data
Related