T3.6 standby commands?

Status
Not open for further replies.

danixdj

Well-known member
Hi, i have a T3.2 that it goes to standby with this code:

Code:
#define SMC_PMPROT_AVLLS_MASK   0x2u
#define SMC_PMCTRL_STOPM_MASK   0x7u
#define SCB_SCR_SLEEPDEEP_MASK  0x4u
#define VLLS3 0x3
#define VLLS2 0x2
#define VLLS1 0x1
#define VLLS0 0x0
#define VLLS_MODE VLLS0

void gotoSleep(void)
{SMC_PMPROT = SMC_PMPROT_AVLLS_MASK; SMC_PMCTRL &= ~SMC_PMCTRL_STOPM_MASK; SMC_PMCTRL |= SMC_PMCTRL_STOPM(0x4); SMC_VLLSCTRL =  SMC_VLLSCTRL_VLLSM(VLLS_MODE);
(void) SMC_PMCTRL; SYST_CSR &= ~SYST_CSR_TICKINT; SCB_SCR |= SCB_SCR_SLEEPDEEP_MASK; asm volatile( "wfi" );}


but in T3.6 it makes a reboot of the teensy...

how can i have a totale power off (memory, cpu, and all the functions) of the teensy 3.6?

Thank you..
 
yeah, usually i rip out commands directly from the cpp file for direct access

The problem was the i2s that it wake up from hibernate... adding a mod (snooze audio) it works fine

Code:
#define SMC_PMPROT_AVLLS_MASK   0x2u
#define SMC_PMCTRL_STOPM_MASK   0x7u
#define SCB_SCR_SLEEPDEEP_MASK  0x4u
#define VLLS3 0x3
#define VLLS2 0x2
#define VLLS1 0x1
#define VLLS0 0x0
#define VLLS_MODE VLLS0
#define PDB_CONFIG (PDB_SC_TRGSEL( 15 ) | PDB_SC_PDBEN | PDB_SC_CONT | PDB_SC_PDBIE | PDB_SC_DMAEN)

void gotoSleep(void)
{SMC_PMPROT = SMC_PMPROT_AVLLS_MASK; SMC_PMCTRL &= ~SMC_PMCTRL_STOPM_MASK; SMC_PMCTRL |= SMC_PMCTRL_STOPM(0x4); SMC_VLLSCTRL =  SMC_VLLSCTRL_VLLSM(VLLS_MODE); PDB0_SC = PDB_CONFIG | PDB_SC_LDOK; PDB0_SC = PDB_CONFIG | PDB_SC_SWTRIG;
(void) SMC_PMCTRL; SYST_CSR &= ~SYST_CSR_TICKINT; SCB_SCR |= SCB_SCR_SLEEPDEEP_MASK; asm volatile( "wfi" );}
 
Status
Not open for further replies.
Back
Top