Snooze
Snooze copied to clipboard
Snooze doesn't seem to work with any of my teensy 4.0
Hi, I've tested most of the library examples with four different teensy 4..0. The examples compile without errors. But after the upload the code doesn't seem to work. The "program LED" (not the built in at pin 13) is blinking 9 times, pauses for 3 seconds and repeats this blinking pattern. What could be the issue? There's no periphery connected. I'm using Teensyduino 1.56 and Arduino 1.8.19.
same here. library seems to not maintained and not up to date.
But I have found the fix here https://forum.pjrc.com/threads/66707-Teensy-4-1-deep-sleep-and-watchdog
the last post is the solution.
add the line FLASHMEM
to TEENSY40\hal.c (Line 652)
like this
__asm__ volatile( "LDMIA R0!, {R4-R12, LR}" );
__asm__ volatile( "MOV R0, LR" );
__asm__ volatile( "ADD LR, LR, #12" );
__asm__ volatile( "MOV PC, LR" );*/
}
//----------------------------------------------------------------------------------
FLASHMEM
void startup_early_hook( void ) {
uint32_t OR_D_GPR = IOMUXC_GPR_GPR4 | IOMUXC_GPR_GPR7 | IOMUXC_GPR_GPR8 | IOMUXC_GPR_GPR12;
if ( OR_D_GPR > 0x0 ) {
IOMUXC_GPR_GPR1 &= ~IOMUXC_GPR_GPR1_GINT;
/*GPIO1_ISR = 0;//0xFFFFFFFF;
GPIO2_ISR = 0;//0xFFFFFFFF;
GPIO3_ISR = 0;//0xFFFFFFFF;
GPIO4_ISR = 0;//0xFFFFFFFF;
GPIO5_ISR = 0xFFFFFFFF;
Using the Teensy 4 and 4.1. I followed the suggestion and it works together with https://github.com/duff2013/Snooze/issues/108 Why the maintainer does not update the repro?