I've done some research on the subject but I can't really find anything that seems to explain the problems I'm having.
I want to use the native USB port to do serial output as the programming port is just too slow and causes all kinds of timing issues in my application.
If I connect both ports to my computer, both do show up in the device manager (I'm running Win7 x64) and also in the Arduino IDE. I can also connect to the native port and do serial communication there. But when I try to upload a new sketch, I get the following message in the Arduino IDE:
Send auto-baud
Set binary mode
No device found on COM19
The only solution I've found is to disconnect the native USB port and then upload the new sketch, but that gets old real quick...
Should it be possible to have both ports hooked up at the same time and if so, any suggestions on how to fix this issue?
Hi,
just hit the same issue. before delving any deeper I thought I would ask if you found a solution.
Regards,
Mike G
You can upload a sketch containing Serial and SerialUSB printings, either from the programming port or the native USB port.
Open a first Arduino IDE, select Arduino Programming Port then connect your board with the programming port to your PC, select a Com port then upload a sketch like this one:
void setup() {
Serial.begin(250000);
SerialUSB.begin(250000);
}
void loop() {
Serial.println("Hello from programming port");
SerialUSB.println("Hello from native USB port");
delay(1000);
}
Then open your serial monitor with the correct baud rate, you will see:
Hello from programming port
Then right click in your short cut to open a new Arduino IDE, then right click open.
In your second Arduino IDE window, select Arduino Native USB port, then connect your board with a USB cable to your PC, select another Com port, then open Serial monitor and you will see:
Hello from native USB port
That's it.
Hi,
thanks for the input which I am sure will prove useful for anyone looking for info on using the "native" port.
The issue remains however as outlined by the original post. I am writing a long program that is going to require a lot of incremental additions and tests. The input and output for the program is coming from a terminal emulator (in this case PuTTY). As the Due has two USB ports I thought it would be great to be able to use the standard "programming" port to connect to the IDE and do the user interaction via the native USB port and the terminal emulator. However, this does not work as the IDE is unable (apparently) to upload program modifications while the other USB port is connected to anything.
My working hypothesis is that as the native port can also be used to upload programs there may be some board or chip resource that is effectively shared by both ports and this is causing the "blockage".
For the moment I am reduced to continuously disconnecting the native port for program changes and then reconnecting for testing. As the original post pointed out, this soon gets tiresome and inefficiant.
Cheers