Using Serial1 with USB disconnected #4752
Replies: 1 comment
-
Posted at 2014-09-15 by @gfwilliams Well, I've just checked up on the logic for this, and it's:
Unfortunately there's no callback for when USB is connected or disconnected, so it might be best to just do something like:
Posted at 2014-09-15 by DrAzzy Okay, cool. Good to know what exactly the logic is. Posted at 2015-06-08 by net-tobi Can this cause problems when Serial1 is used for other purposes, e.g. to connect a WLAN module? What happens on console.logs, when another device is attached via USART to Serial1 ? Is the console.log string data then being sent to the device which is attached? Posted at 2015-06-08 by @gfwilliams Yes, that could cause you issues when the device is started when not connected to USB... It'll automatically move to Serial1 and while you can send data, no responses will be received by the data handler. Also, as you say any calls to Posted at 2015-06-08 by net-tobi Thank you. I'll try that tomorrow morning. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2014-09-15 by DrAzzy
As I understand it, if the USB is disconnected, the console will be moved to Serial1. How do I keep that from happening? I need the USB to have the console on it when plugged in, but serial 1 must be usable whether or not USB is plugged in, and I need to be able to plug in the USB while the system is running for maintenance.
I remember a thread about this this weekend, but I can't seem to find it to see your response.
Beta Was this translation helpful? Give feedback.
All reactions