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?
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?
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".
The nrf52_1 in the PC <-- uart --> nrf52_1 <-- ble --> {your nrf52832} <-- uart --> {your GPS} can be a cheap nRF52 breakout board (< USD$9.00) and that's the setup I have used to "configure" my nRF52 board which is hooked up to a Telit module through the uart.
I also like the GPIOTE/PPI solution proposed by endnode; elegant and simple :)
As @Matt mentions, you can also look at the nRF52840. Not only does it have built in USB that you can use as a COM port, but it also has two UARTs, a feature that was requested by a lot of customers. It is also possible to do UART over BLE emulation as you suggest. It is probably one of our most used examples: BLE over UART emulation example.
If you're using a Segger debugger you could also try RTT, although it's not a direct UART-> UART bridge it should be able to emulate the functionality you want.
The GPS is from U-Blox and I wanted to attempt using their diagnostic software which requires a serial connection on the PC. I'd have to find a way to either emulate that from BLE or RTT.