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

Thread: Teensy 3.2 LED not blinking

  1. #1
    Junior Member
    Join Date
    Aug 2019
    Posts
    4

    Teensy 3.2 LED not blinking

    I purchased Teensy3.2 from Amazon and received it today. When I connected it to my computer, the LED on board was blinking. Then I uploaded the program using Arduino IDE, the LED light stopped suddenly and did not blink at all after.

    I thought the board is dead, so to test I uploaded the basic LED blinking program and connected LED on pin 13 of board and the program worked accordingly making the external LED on pin 13 blink, but the LED on Teensy3.2 is still not blinking.

    What does that mean? I am assuming board is okay as that program worked but why LED not lighting up at all when powered?

  2. #2
    Senior Member
    Join Date
    Mar 2015
    Location
    UK
    Posts
    301
    The schematic for Teensy 3.2 can be found here... https://www.pjrc.com/teensy/schematic.html

    As you can see on the right hand side of the diagram, there is nothing particularly special about the LED. It is a simple "supervisory" component to assist you by showing the state of that specific pin. Come to think, there is nothing special about the Blink program either.

    I would first check pin 13 with a magnifying glass to make sure that any solder was not shorting out. Then I would write my own little sketch, simply to put logic "high" to pin 13 - which should then put the LED on permanently. Use a statement like "pinMode(13, OUTPUT);" in setup and "digitalWriteFast(13, 1);" in the main loop. Once uploaded, if the on-board LED does not illuminate, then it looks as though it has failed as a component. That is not catastrophic. If it failed open circuit - the effect is only to lose that "supervisory" signal, and you use your off-board LED if you would still like to have one.

    It is unusual for a component to fail when it has been shown to be working, but not unheard of. This effect is known as the "bath tub" curve, where most failures - if they are going to happen - will either happen when newish, or much later after years of use.

    If you have a failure - and you did not cause it yourself - then maybe its "ask for money back" time?

  3. #3
    Junior Member
    Join Date
    Aug 2019
    Posts
    4
    Hello,

    Thanks for providing the details. I did run the code you gave and it made the LED stay on. So that means the board is okay to work with? and replacement not needed.

    Though the LED does not blink or be on otherwise (without coding), it did when i connected the board very first time to my computer but never later, so I thought it is dead.

  4. #4
    Senior Member
    Join Date
    Mar 2015
    Location
    UK
    Posts
    301
    Glad to help. Yes, it does mean that the board is OK to work with. You may wish to experiment with turning the LED on and off by writing your own code. You learn a great deal by such experiments.

    One of the very useful features of Teensy 3.2, 3.5 and 3.6 is an internal feature of the chip called a "FlexTimer" (FTM). There are four of these in total which all work independantly (FTM0, FTM1, FTM2 and FTM3). Its a good idea to look in the forum for examples and then try paste some code into your own experiments. You should also read the Freescale K20 Reference Manual for the chip, where much more detail is to be found.

    The FlexTimers are independant of the cpu (and therefore the "Main Loop"), but can call an "Interrupt Service Routine" (ISR) - which is a subroutine like other subroutines - but that code only runs when the timer times out. So you can make your own Blink program by arranging for the FlexTimer to call the ISR at fixed time intervals (configured in Setup), and then to "toggle" the state of the LED in the ISR code. Teensy is so fast that you may need to use a counter to count up to (say) 1000 inside the ISR before you change the LED state.

    Have fun with Teensy. Learn a little and it pays off in the pleasure of seeing it work as you intended. Teensy is probably the best microcontroller you can buy.

Posting Permissions

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