Daiki Kato
/
Sleep_test_no_OS
This is a sample to make sleep without using OS.
Revision 1:ec156833bab2, committed 2016-11-18
- Comitter:
- dkato
- Date:
- Fri Nov 18 09:46:33 2016 +0000
- Parent:
- 0:19a3b76f6ca9
- Commit message:
- update
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 19a3b76f6ca9 -r ec156833bab2 main.cpp --- a/main.cpp Fri Nov 18 08:50:00 2016 +0000 +++ b/main.cpp Fri Nov 18 09:46:33 2016 +0000 @@ -15,7 +15,9 @@ while (true) { // Transition to Sleep Mode - __WFI(); + __SEV(); + __WFE(); + __WFE(); led1 = !led1; printf("%d\n", test_cnt++); }