Snooze icon indicating copy to clipboard operation
Snooze copied to clipboard

Snooze doesn't seem to work with any of my teensy 4.0

Open SIeeepy opened this issue 2 years ago • 2 comments

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.

SIeeepy avatar Mar 20 '22 12:03 SIeeepy

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;

savejeff avatar May 05 '22 14:05 savejeff

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?

dremeier avatar Dec 06 '23 22:12 dremeier