This is a sample to make Software Standby using OS.

Files at this revision

API Documentation at this revision

Comitter:
dkato
Date:
Tue Oct 08 07:53:20 2019 +0000
Parent:
4:272e885e36a9
Commit message:
Changed interrupt disable function

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 272e885e36a9 -r 70870890e359 main.cpp
--- 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) {