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

Thread: Strange situation non recognition issue Windows 10 with a Teensy LC

  1. #1

    Strange situation non recognition issue Windows 10 with a Teensy LC

    OK so II sent a teensy to a client for a HID game controller..

    When he got the Teensy LC he installed it and it came up fine with my Programmed Creator and Part Number code but then the USB Cord seemed to fail and it became unrecognizable.

    I sent a new USB cable and now the Teensy LC is found by Windows but will not be recognized as a specific device..

    He Has asked if there are any drivers that he is missing but from what I understand all of the drivers are integrated into windows..

    I ave asked him to remove and try to have windows reinstall the drivers for the HID Device in hopes that it will be found..

    Is it possible that the USB cord failure caused the Programming to become corrupted, or does any one have any ideas of how to get it to recognize?

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    One quick - maybe not pointless test - with sound on to hear the USB device chime in: Plug in the T_LC and press the Button.

    Then unplug and Plug in again.

    Does the system recognize the device coming and going both times?

    I've not yet 'lost' a Teensy - Odd that the Cable died - though I have had that happen going bad. Unless the bad cable hurt the Teensy as it died?

  3. #3
    I wasn't able to have him do the test you mentioned above But He did on his own press the Program button and it does go into boot loader mode and then get recognized, So I am going to have him try reloading the program to see if it was possibly the program getting corrupted when the USB Cable Died as it still won't recognize it currently stand alone in run state.. I also find it hard to believe that the USB cable dining caused it to kill the board.. but I guess it is possible if it got some sort of a surge.

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Pressing the Program button was the key. Paul knows the secret in his bootloader - but I assume it puts RAM code on the MCU to run the USB for upload using the native T_LC MCU hardware for USB - and with it connecting shows T_LC should be functional to that degree. How the code would get wiped is odd - unless some other damage is keeping it from being able to run right using the installed code, so fresh code might not work in the same way? Perhaps supply a simple Blink.Hex as well for some nice indication it is running.

  5. #5
    Just an update.. a refresh of the program worked.. Not sure why the original instal got corrupted or how that might have happened but it did.. Everything is working fine now.

  6. #6
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Interesting ... odd things happen, something evil in the way that cable died? ... good thing is the PJRC bootloader was able to reprogram and return the unit to function.

  7. #7
    Quote Originally Posted by defragster View Post
    Interesting ... odd things happen, something evil in the way that cable died? ... good thing is the PJRC bootloader was able to reprogram and return the unit to function.
    Im totally guessing that when the cable died it might have sent some surge through the system corrupting the programming.. Though not knowing how the chip is laid out or being that knowledgeable about the interconnections i can't be sure that was the culprit.

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Every Teensy has a pushbutton dedicated to getting you back into programming mode, because loading a "bad" or corrupt program can do pretty much anything. A bad program can completely turn off the USB hardware and put the chip into a deep sleep mode without any way to wake up. Completely disabling interrupts also prevents responding to USB control messages. Once that sort of thing happens, pressing the button is the only way to return to programming mode. Nothing on your PC can tell Teensy to enter programming mode if the USB port is turned off and the chip is sleeping!

    Other confusing problems can come up. If you're connecting through a USB hub, or a hub that's built into something like a keyboard or monitor or inside a laptop, sometimes hot-plugging can crash the hub. The USB spec says all hubs are supposed to support hot plugging USB devices, but some of them aren't implemented perfect. I have a 7 port hub on the edge of my workbench which occasionally does this, needing to be fully unplugged before it will work again.

    On the newer Teensy models, we have a feature were holding the button for 15 seconds causes a full erase of all programmable memory. But I'm sad to say it's not implemented on Teensy LC & 3.2, and it's easy to use on Teensy 3.5 & 3.6. There's no visual feedback when the 15 second mark arrives, no way to tell if it's really doing the full erase, and once erased, no way to confirm. The upcoming Teensy 4.0 board will try to solve all those issues, with a small red LED which gives a quick blink at the 15 second mark, turns on bright to let you know it's actually doing the erase, and after fully erasing, it will write a known-good LED blink program so when the process finishes, you'll get an orange blinking LED to confirm your Teensy has been restored back to a usable state.

    In the future, I hope we'll manage to update LC and the 3.x boards to all have this 15 second erase, and also write a known-good blink program so you'll see the orange LED blink when the process finishes. I can magically add a red LED onto the older board designs, and I can't do anything about low quality USB hubs, bugs in systems like Windows 7, and other things that happen outside Teensy. But we're trying to build in ways to make these confusing situations easier for the future.

  9. #9
    Thank you for the information Paul it is good to know that can happen.. The weird thing with this situation was the program was good and working and then something went wrong, Not sure it was actually a USB cable failure or what.. But in any case being able to get back to the programming with the button and restoring the Program worked to bring it back.. It was just an oddity.. It is good to know on the hub front about the possible shutdowns though for being able to explain things at times or troubleshoot..

  10. #10
    OK UPDATE...

    Well it happened again and it appears to be a grounding issue.. The Board runs at close to a foot away from a Large Servo Motor and what was happening was the Electro Magnetic emissions from the Servo when powered was fouling the Programming, either by whiling it to corrupting it causing it not to run correctly.. Running a Ground from a ground pin on the board to the housing of the servo solved the issue..

    However that leads me to a question of is there any way to solve this issue in any other manner.. It appears that the USB Grounding via the shield is not enough to dissapate the issue.. Do I need to cage the Teensy LC?, external components that might be able to be used to reduce susceptibility? any information that could lead me to a good solution given I don't fully understand the engineering behind the Teensy board would be helpful.

    My guess is based on Pauls previous post is that the EMI was causing the Teensy to enter deep sleep.

    Thank you

Posting Permissions

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