Skip to content

Commit

Permalink
Fix On-Cip Data Retention RAM (ARMC6)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-kato committed Mar 10, 2020
1 parent f19f7d1 commit 022bc76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mbed-os.lib
@@ -1 +1 @@
https://github.com/d-kato/mbed-os/#916020468ea3448e352d46d2482c8b8f5040ab9b
https://github.com/d-kato/mbed-os/#0c260fccc251a9735d7667de033f9b64ba734703
7 changes: 6 additions & 1 deletion sample_programs/sample_21_deep_standby_alarm.cpp
Expand Up @@ -34,7 +34,12 @@
#include "DeepStandby.h"

// On-Chip Data Retention RAM
static int wake_up_cnt __attribute((section("NV_DATA")));
#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
#define DATA_RETENTION_RAM ".bss.NoInit"
#else
#define DATA_RETENTION_RAM "NV_DATA"
#endif
static int wake_up_cnt __attribute((section(DATA_RETENTION_RAM)));

int main() {
time_t seconds;
Expand Down

0 comments on commit 022bc76

Please sign in to comment.