Hi All,
I've designed and built my own custom Teensy 3.2 and all appears to be working fine with it - been running many different sketches on it over the last few weeks.
However, I now have a problem. My power supply chip, an Infineon TLE73683EXUMA2 has a hardware watchdog that I'd like to take advantage of. I finally managed to enable the watchdog, but it has very specific timing requirements. It seems that I need to give it a "kick" within about 50ms of the processor being reset.
So - after much searching and trial and error I found the information about startup_early_hook, which sounded like just what I needed! The delays around bringing the USB up are about 400ms, which is too long for me to be able to kick the watchdog. Therefore, if the processor crashes, I just get endless resets triggered by the watchdog.
The challenge is that I can't get any of the sample code I have found for using startup_early_hook to work! It seems that the processor just hangs.
Even this test sketch, with no code at all within the startup_early_hook, causes the hang, and the LED (attached to Pin 7 on my board) does not illuminate:
Does anyone have any thoughts or suggestions? I'm using Teensyduino 1.53. Would really love to be able to get this to work ;-)
Also - another rather major issue I've just thought of - if we've got a 400ms delay during bringing the USB up, how might I kick the watchdog every 50ms during that delay? Interrupts/timers? And no - there's no way to disable the watchdog on the power supply chip once it's enabled, except to power cycle it. And that's rather hard, since it's powering the processor...
One more thing - I _could_ increase the watchdog window, but the maximum I can go to is about 250ms according to the specs. It uses a 1nF capacitor for 50ms, with a maximum of 4.7nF on the datasheet. It would probably work with a larger capacitor but I'm reluctant to go outside of its design specs.
Eek...
Thanks,
Andrew
I've designed and built my own custom Teensy 3.2 and all appears to be working fine with it - been running many different sketches on it over the last few weeks.
However, I now have a problem. My power supply chip, an Infineon TLE73683EXUMA2 has a hardware watchdog that I'd like to take advantage of. I finally managed to enable the watchdog, but it has very specific timing requirements. It seems that I need to give it a "kick" within about 50ms of the processor being reset.
So - after much searching and trial and error I found the information about startup_early_hook, which sounded like just what I needed! The delays around bringing the USB up are about 400ms, which is too long for me to be able to kick the watchdog. Therefore, if the processor crashes, I just get endless resets triggered by the watchdog.
The challenge is that I can't get any of the sample code I have found for using startup_early_hook to work! It seems that the processor just hangs.
Even this test sketch, with no code at all within the startup_early_hook, causes the hang, and the LED (attached to Pin 7 on my board) does not illuminate:
Code:
#ifdef __cplusplus
extern "C" {
#endif
void startup_early_hook() {
}
#ifdef __cplusplus
}
#endif
void setup() {
pinMode(7, OUTPUT);
digitalWrite(7, HIGH);
Serial.begin(115200);
delay(2000);
}
void loop() {
delay(100);
Serial.println("hi");
}
Does anyone have any thoughts or suggestions? I'm using Teensyduino 1.53. Would really love to be able to get this to work ;-)
Also - another rather major issue I've just thought of - if we've got a 400ms delay during bringing the USB up, how might I kick the watchdog every 50ms during that delay? Interrupts/timers? And no - there's no way to disable the watchdog on the power supply chip once it's enabled, except to power cycle it. And that's rather hard, since it's powering the processor...
One more thing - I _could_ increase the watchdog window, but the maximum I can go to is about 250ms according to the specs. It uses a 1nF capacitor for 50ms, with a maximum of 4.7nF on the datasheet. It would probably work with a larger capacitor but I'm reluctant to go outside of its design specs.
Eek...
Thanks,
Andrew
Last edited: