Added functions for entering l4 power modes

This commit is contained in:
andrewmcg1
2024-10-16 05:20:49 -04:00
committed by Piotr Esden-Tempski
parent 49e347923b
commit 3b892e4a18
4 changed files with 66 additions and 0 deletions

View File

@@ -58,6 +58,26 @@ void scb_reset_system(void)
while (1);
}
void scb_set_sleepdeep(void)
{
SCB_SCR |= SCB_SCR_SLEEPDEEP;
}
void scb_clear_sleepdeep(void)
{
SCB_SCR &= ~SCB_SCR_SLEEPDEEP;
}
void scb_set_sleeponexit(void)
{
SCB_SCR |= SCB_SCR_SLEEPONEXIT;
}
void scb_clear_sleeponexit(void)
{
SCB_SCR &= ~SCB_SCR_SLEEPONEXIT;
}
/* Those are defined only on CM3 or CM4 */
#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
void scb_set_priority_grouping(uint32_t prigroup)