Dear Paul and friends,
I am able to put Teensy++ 2.0 into SLEEP_MODE_PWR_DOWN and wake it up using an external interrupt. However, I do not fully understand the wake up process. I wonder if you could help me with the following questions. Thanks!
1. From my testing, it seems to me that (1) the attached interrupt function gets executed, then (2) the loop() function gets executed. Is this order correct?
2. The attached interrupt function seems to have bad timing. I have set a LED to be on for 5 seconds, but it stays on for only 1 second. Why is this?
3. Both the attached interrupt function and the loop() can finish execution successfully, if I only include digitalWrite to LED. If I include a digitalWrite to a PIN with load, then the execution stops there. What might have caused this? Is there a way to know the error message?
Finally, I'm running Teensy++ 2.0 at 2MHz with Sd card. I use Teensyduino 1.0.3. Please let me know if you need any more info.
Thanks!
Huan
I am able to put Teensy++ 2.0 into SLEEP_MODE_PWR_DOWN and wake it up using an external interrupt. However, I do not fully understand the wake up process. I wonder if you could help me with the following questions. Thanks!
1. From my testing, it seems to me that (1) the attached interrupt function gets executed, then (2) the loop() function gets executed. Is this order correct?
2. The attached interrupt function seems to have bad timing. I have set a LED to be on for 5 seconds, but it stays on for only 1 second. Why is this?
3. Both the attached interrupt function and the loop() can finish execution successfully, if I only include digitalWrite to LED. If I include a digitalWrite to a PIN with load, then the execution stops there. What might have caused this? Is there a way to know the error message?
Finally, I'm running Teensy++ 2.0 at 2MHz with Sd card. I use Teensyduino 1.0.3. Please let me know if you need any more info.
Thanks!
Huan
Last edited: