Skip to content
Snippets Groups Projects
Verified Commit 5054fdeb authored by rahix's avatar rahix
Browse files

fix(epicardium): Use SEV-on-pend instead of enabling IRQ


Hopefully fixes #5.

Signed-off-by: default avatarRahix <rahix@rahix.de>
parent adc8a8b6
No related branches found
No related tags found
No related merge requests found
Pipeline #954 passed
......@@ -57,6 +57,9 @@ int main(void)
card10_init();
card10_diag();
/* TODO: Move this to its own function */
SCB->SCR |= SCB_SCR_SEVONPEND_Msk;
pmic_set_button_callback(pmic_button);
cdcacm_init();
......
......@@ -24,14 +24,10 @@ void pre_idle_sleep(TickType_t xExpectedIdleTime)
* TODO: Ensure this is actually correct and does not have any
* race conditions.
*/
__asm volatile( "cpsie i" ::: "memory" );
__asm volatile( "dsb" ::: "memory" );
__asm volatile( "isb" );
__asm volatile( "sev" );
__asm volatile( "wfe" );
__asm volatile( "wfe" );
__asm volatile( "dsb" ::: "memory" );
__asm volatile( "isb" );
__asm volatile( "cpsid i" ::: "memory" );
__asm volatile( "dsb" );
__asm volatile( "isb" );
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment