Serial debug and normal UART comms

I’d like to use COM1 on a G400 for wireless serial downloading and debug over Bluetooth, but my app needs all 6 UARTS for talking to sensors. Is it possible for me to wire the MODE line so it defaults low on power up and then after my program is downloaded and I’m done debugging, have my program set MODE high with a GPIO pin and have COM1 usable for regular comms?

Sounds like having my cake and eating it too which has never worked in the past but maybe this time.

@ Gene - The G400 itself cannot toggle MODE, but if you have an external source toggling it, what you described sounds possible. Is there a reason you don’t stay in USB mode the entire time? That way the COM port is always available to you.

@ John - seems like if I drive the the MODE input to the G400 with a digital mux or even a flip flop that defaults low on power up, the G400 will boot up in serial debug mode. I can use one of the GPIO lines to toggle the mux/flip flop between high and low when I want to switch out of download/debug mode. My understanding is that most of the GPIO lines on the G400 are set to inputs on power up so they should be floating on power up and the mux/flip flop will power up in its default state (low). After I download my program over the serial port and am finished debugging, my program can set the GPIO line controlling the mux/flip flop to output and use it to set the digital mux/flip flop driving the MODE line on the G400 to the high state.

The main reason I’d like to use serial debug is my system sits inside a sealed pressure housing we deploy in the ocean. Once the housing is sealed and leak tested, the only way to connect to the USB debug port is through oceanographic pressure rated connectors with a limited number of mate/demate cycles. Also, it is kind of a pain to be connecting/unconnecting to the housing on the back of a small boat pitching, rolling and heaving at sea. I use a SENA SD1000 serial to Bluetooth adapter module on one COM port now as a way to communicate with my program and it works fine with the module and antenna inside the housing. I’m hoping to use that COM port for both downloading and debugging programs and when I’m done with that use it the way I do now to send commands and get data through the pressure housing without any connectors or penetrations.

As long as you don’t see any fundamental problem with changing the state of the MODE line after a program is downloaded, I’ll give it a try when I get a chance.