Jun 22, 2017
09:52 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 22, 2017
09:52 PM
System time is not updated upon exit from stm32f4xx stop mode until return from stop_mode_power_down_hook(). Global interrupts enable prior to return, so this can cause execution of IRQs before updating this system time.
This can cause IRQs that call host_rtos_get_time() to receive the wrong time.
In ThreadX, tx_time_get() is noted to be allowed from ISRs, so this is a very valid use case.
1 Reply
Jun 22, 2017
11:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 22, 2017
11:16 PM
workaround:
with threadx, one can call tx_time_increment() prior to returning from stop_mode_power_down_hook() and return 0 from this function.