Hello everyone!
I am working on a project using 100 units of Teensy 3.2 to render and refresh content on a high brightness LED display.
To achieve high brightness the LEDs are overdriven to 120mA at 1/8 duty, which is fine as long as the Teensy does not hang or crash, causing the refresh cycle to stop - leaving some LEDs on at 120mA which will destroy them within seconds.
With NMI and rapid watchdog response - any programming error is handled quickly enough to not cause burn-outs.
However, when the Teensy is reprogrammed (standard Arduino IDE/USB method) there is a code execution stop that I am having trouble dealing with - outputs are for obvious reasons left "as is" and LEDs burn out.
Is there any event or standard way of detecting that a programming operation is about to execute, where I could set the pin that disables the LED driver?
As far as I understand, entry into programming mode is handled by the main processor, not the rescue/bootloader co-processor and should as such be detectable from somewhere within the USB stack?
I was hoping not to have to modify internal code to provide this functionality (since an update of the Teensyduino environment will later remove the changes), but if I have to then so be it.
If this is necessary - does anyone know off the top of their head where would be a good place to install this about-to-be-reprogrammed hook?
Thank you!
I am working on a project using 100 units of Teensy 3.2 to render and refresh content on a high brightness LED display.
To achieve high brightness the LEDs are overdriven to 120mA at 1/8 duty, which is fine as long as the Teensy does not hang or crash, causing the refresh cycle to stop - leaving some LEDs on at 120mA which will destroy them within seconds.
With NMI and rapid watchdog response - any programming error is handled quickly enough to not cause burn-outs.
However, when the Teensy is reprogrammed (standard Arduino IDE/USB method) there is a code execution stop that I am having trouble dealing with - outputs are for obvious reasons left "as is" and LEDs burn out.
Is there any event or standard way of detecting that a programming operation is about to execute, where I could set the pin that disables the LED driver?
As far as I understand, entry into programming mode is handled by the main processor, not the rescue/bootloader co-processor and should as such be detectable from somewhere within the USB stack?
I was hoping not to have to modify internal code to provide this functionality (since an update of the Teensyduino environment will later remove the changes), but if I have to then so be it.
If this is necessary - does anyone know off the top of their head where would be a good place to install this about-to-be-reprogrammed hook?
Thank you!