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: Rahix's avatarRahix <rahix@rahix.de>
parent adc8a8b6
......@@ -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" );
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment