This is a sample to make Software Standby using OS.
Diff: main.cpp
- Revision:
- 5:70870890e359
- Parent:
- 4:272e885e36a9
--- a/main.cpp Tue Oct 08 06:57:01 2019 +0000
+++ b/main.cpp Tue Oct 08 07:53:20 2019 +0000
@@ -15,7 +15,7 @@
volatile uint32_t dummy_32;
volatile uint8_t dummy_8;
- GIC_DisableIRQ(OSTMI0TINT_IRQn);
+ core_util_critical_section_enter();
// Set the standby_mode_en bit of the power control register in the PL310 to 1.
L2C.REG15_POWER_CTRL = 0x00000001uL;
@@ -31,7 +31,7 @@
__WFI();
- GIC_EnableIRQ(OSTMI0TINT_IRQn);
+ core_util_critical_section_exit();
}
static void interrupt_button(void) {