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

Thread: Teensy Program Pin, what is it and what does it do?

  1. #1
    Junior Member
    Join Date
    Dec 2018
    Location
    UK
    Posts
    9

    Teensy Program Pin, what is it and what does it do?

    I am investigating the Program pin that exists on many of the Teensys as a solution to reprogram the Teensy when automatic programming doesn't go through (why does this happen?) and the button is inaccessible.

    I imagine it works something like the reset pin, but causing the Teensy to reprogram rather than restart. (I am working with Teensy 3.6/LC/3.2)

    After researching for a while to find out, I couldn't find what I was looking for, so I may be misinterpreting it's purpose, or just searching the wrong things.

    If anybody could explain or link me to this information, would be much appreciated.

    Thanks

  2. #2
    Senior Member
    Join Date
    Apr 2013
    Posts
    1,888
    Various threads on the topic but nothing all in one place. Basic idea is that the program pin connects to the separate bootloader CPU. When pressed it tells the bootloader IC to take control of the main chip, reset it, program it with a fresh copy of the basic bootloader and then restart it.

    The USB reprogram depends on a custom very slow baud rate being called on USB serial by the PC being recongnised by the Teensy USB stack and triggering a program download. So anything that disrupts USB or program execution (deep sleep, clock rates, interrupts overrunning, memory overwrites etc) will prevent that from working.

    The button bypasses all of that so as long as the actual hardware is OK and you have not hacked things to set the code protect bits it will work making them very hard to brick. As long as you can actually reach that button or associated pin in some way.

Posting Permissions

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