Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 11 of 11

Thread: Teensy works after following guide but now arduinos don't

  1. #1
    Junior Member
    Join Date
    Jun 2022
    Posts
    5

    Teensy works after following guide but now arduinos don't

    After following the getting started guide and installing Teensyduino I was able to upload and run the two provided blink sketches with no problems. Unfortunately now when I try to upload the basic blink sketch to any of my Arduinos I get one of these errors:

    Code:
    avrdude: stk500_getsync() attempt 10 of 10: not in sync:
    Code:
    avrdude: ser_open(): can't set com-state
    I think the drivers are messed up, but I can't figure out how to get them working again. I have tried two Arduino Nanos, an Arduino Mega, and an Arduino Nano all with the same results. Which is strange because throughout all of this, the Teensy stuff works fine. I did make sure to set the port and the board appropriately.

    Another thing is that I now see an "unknown device" in my device manager. I think it showed up after installing the Teensy stuff, but I am not sure. It comes right back if I uninstall the device though.

    I'm a total beginner to Teensy, so I'm hoping I've overlooked something simple.


    Code:
    /*
      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.
    
      https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
    */
    
    // the setup function runs once when you press reset or power the board
    void setup() {
      // 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
    }

  2. #2
    Senior Member
    Join Date
    Mar 2017
    Location
    Oakland, CA, USA
    Posts
    482
    Have you tried using the regular Arduino IDE and not Teensyduino for the non-Teensy devices?

  3. #3
    Junior Member
    Join Date
    Jun 2022
    Posts
    5
    Quote Originally Posted by shawn View Post
    Have you tried using the regular Arduino IDE and not Teensyduino for the non-Teensy devices?
    I have. I tried Arduino IDE 2.0 and uninstalling teensyduino as well, but it made no difference. I was able to upload sketches to some offbrand arduinos that use the different drivers (CH340). I am also able to upload sketches and bootloaders to the official arduinos using one of the CH340 arduinos as an ISP, but still no luck getting them to accept sketches the normal way.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,568
    Is this Windows? Which version?

  5. #5
    Junior Member
    Join Date
    Jun 2022
    Posts
    5
    Windows 10 Pro 21H2.

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,568
    Well, my guess of Windows 7 wasn’t right.

    We don’t install any INF that could affect Windows behavior on Window 10 or 11, because Microsoft includes an INF. It’s only on Windows 8, 7, Vista and XP where an INF gets installed.

  7. #7
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,230
    Any chance these 'CH340 arduinos' are actually fitted with the CH9102F chip?

  8. #8
    Junior Member
    Join Date
    Jun 2022
    Posts
    5
    Quote Originally Posted by defragster View Post
    Any chance these 'CH340 arduinos' are actually fitted with the CH9102F chip?
    The amazon listing for the nanos claim they are CH340 and CH340G. I actually have two UNOs one genuine and one Elegoo brand that says it uses the 16U2.

  9. #9
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,230
    Quote Originally Posted by MrG View Post
    The amazon listing for the nanos claim they are CH340 and CH340G. I actually have two UNOs one genuine and one Elegoo brand that says it uses the 16U2.
    Just wondered as recently the CH9102F has come into use as it is available and cheaper. But it is just getting some real use and a new driver. AdaFruit made some devices using that and that may have prompted the attention it needed. The driver it uses I tried on one device was named as the CH340 and it almost worked on Win 11 but wholly failed to show as a known device on Win 10. And have not tried the new driver yet on either machine with the one device here.

  10. #10
    Junior Member
    Join Date
    Jun 2022
    Posts
    5
    Okay. After a lot of "throwing science at the wall to see what sticks" I have gotten the Arduinos to behave properly. I figured out what the "unknown device" was. It turned out to be my monitor which has a couple USB ports on it, which I have now unplugged. I also reinstalled FTDI drivers. After doing those two things, the Arduinos AND Teensy are behaving as expected. I'm not sure what was going on, but it seems to be resolved. Thanks to those who replied. If anyone can explain what was actually going on, I'm all ears.

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,568
    Glad it’s resolved. Can’t say I know why, but I do know Windows uses a combination of info it gets from USB devices and prior info stored in the Windows Registry to enumerate USB devices and load drivers. It makes for a pretty brittle system if that stored info isn’t right. Just installing Teensyduino shouldn’t change any of that info, especially on Windows 10 or 11… so it’s a real mystery. But glad it got worked out in the end.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •