Skip to content

Commit

Permalink
Fix issue in case of MBED_HEAP_STATS_ENABLED enabled
Browse files Browse the repository at this point in the history
Add a workaround in lp_ticker_init function for CI tests
  • Loading branch information
jeromecoutant committed Jan 13, 2017
1 parent 8adb393 commit 63c5c7d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions targets/TARGET_STM/lp_ticker.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ void lp_ticker_init(void)

rtc_init();
rtc_set_irq_handler((uint32_t) lp_ticker_irq_handler);

#ifdef MBED_HEAP_STATS_ENABLED
/* rtc_read is using mktime function which is calling at the first time __wrap__free_r */
/* __wrap__free_r needs to initialize Singleton not in ISR */
/* rtc_read is called at each ticker setup which call core_util_critical_section_enter */
/* so rtc_read is called once once before other calls */
rtc_read();
#endif /* MBED_HEAP_STATS_ENABLED */
}

uint32_t lp_ticker_read(void)
Expand Down

0 comments on commit 63c5c7d

Please sign in to comment.