-
Notifications
You must be signed in to change notification settings - Fork 7.6k
FeatherS2 USB CDC driver not working after uploading code in Arduino IDE #5078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Did you select in menu "Serial connected to: USB CDC"? |
@chegewara The device shows up with the
I will show the
In particular the line |
Here is the output of
|
UPDATE: adding Now when running
Is this a feature or a bug? Here is the updated code: Sketch:/*
Blink
Turns an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
the correct LED pin independent of which board is used.
If you want to know what pin the on-board LED is connected to on your Arduino
model, check the Technical Specs of your board at:
https://www.arduino.cc/en/Main/Products
modified 8 May 2014
by Scott Fitzgerald
modified 2 Sep 2016
by Arturo Guadalupi
modified 8 Sep 2016
by Colby Newman
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/Blink
*/
#define LED_BUILTIN 13
// the setup function runs once when you press reset or power the board
void setup() {
Serial.begin(); //FIXME this is necessary for the TinyUSB driver to export serial port interface
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
} |
Oh, thats interesting. Descriptor is broken. |
@chegewara |
Something is broken and descriptor seems to be not loaded. It is very weird because USB serial example works good, and as far as i know it should be used exactly the same code. @me-no-dev for some reason configuration descriptor length is only 9 bytes, and should be 75 (size of descriptor in USB serial example) |
Dear @me-no-dev and @chegewara, The same problem exist in Windows 10 OS with some similarities and some differences. USB CDC upload option is not working without "Serial.begin()" initialization. The COM port enumeration remains without any change, however the port is not working. If "Serial.begin()" is used or else the application code is wrapped by USB Serial example, USB CDC uploading is working with an exception; you have to push upload button twice. In the first run the bootloader mode is activated, and in the second the flashing is executed. |
Sorry for my mistake. Yes, of course you have to call My tests with upload over USB:
From my point of view it is finally working fine. |
It's weird, I have tried three different computers with Win 10 and all of them have same problem; Upload button should be pressed twice. |
Seperate to the Serial.begin() discussion, after flashing the board in download mode, the FeatherS2 CDC should appear as an enumerated device in the ports list for further flashing. This seems to be broken? @me-no-dev is this a bug or has the intended behaviour changes from what we originally spoke about and what was implemented? Right now I have to go into download mode every time I want to flash the board :( This is confusing a lot of people, especially because I posted a video showing how it used to work and that's what folks are expecting to happen. |
@UnexpectedMaker I have not investigated on Windows, but there generally should not be an issue, because persistance is not enabled, therefore the driver should reenumerate on each reboot. One possibility is that the chip does not properly enter download mode. Could you try selecting the general ESP32S2 Dev Board? |
Hi @me-no-dev and @UnexpectedMaker, I have selected "ESP32S2 Dev Board" up to now while doing my tests for our own custom development board and the problems still exist in Windows 10 OS. You can read my previous post describing the problem as follows.
I have faced this issue all the Windows machines (at least 3-4) that I have. |
In my previous tests i confirmed it is working, but i read that other users have problems with it, so i decided to repeat tests.
It seems like |
I don't know what you mean by "persistence is not enabled" ? is that what you call the functionality that used to be in the beta branch where the board once flashed in Arduino IDE would use the CDC from then on and see the USB when plugged in? Definitely not working as it used to in the beta branch - tested on Win10 and macOS. I've opened a new issue for this to not confuse it to the serial discussion,. |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. |
Can you please retry with this sketch and current master? |
[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future. |
Opening. @cversek Please take a look. |
@me-no-dev @VojtechBartoska
However to properly test this sketch, it looks like I will need to connect another serial dongle to the HW Serial0 port to see the ouput for USBSerial events, is that right? In that case, I will have to wait until Monday at the earliest to pick up my USB dongle at work. Thanks. |
@cversek yea, you need another dongle to see the debug output. If we try to push it over USB many things will be missed :) |
@me-no-dev same here, can we closed this? |
Sorry, I never got around to fully testing it on my end. I trust things should be working now. No need to hold it open for me! Thanks. |
Hardware:
Board: UM FeatherS2
Core Installation version: 2.0.0-alpha1
IDE name: Arduino IDE 1.8.7
Flash Frequency: 40Mhz
Serial Connected to: USB CDC
PSRAM enabled: yes
Upload Speed: 115200
Computer OS: 5.4.0-72-generic #80-Ubuntu SMP Mon Apr 12 17:35:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Description:
Use blink sketch as test of Arduino code uploading. First put device into firmware upload mode (hold BOOT button, push and release RST), serial port shows up as /dev/ttyACM0, then device can be flashed. Pushing RST is necessary to reset the board. Blink is working! However, /dev/ttyACM* is now missing :(
This the relevant
dmesg
output:Sketch:
Debug Messages:
Sorry, no serial output is visible because of the issue.
Here is the Arduino terminal output:
The text was updated successfully, but these errors were encountered: