summaryrefslogtreecommitdiff
path: root/ports_module/cortex_m0+
diff options
context:
space:
mode:
Diffstat (limited to 'ports_module/cortex_m0+')
-rw-r--r--ports_module/cortex_m0+/ac6/module_manager/src/tx_thread_schedule.S18
-rw-r--r--ports_module/cortex_m0+/gnu/module_manager/src/tx_thread_schedule.S18
-rw-r--r--ports_module/cortex_m0+/iar/module_manager/src/tx_thread_schedule.S18
3 files changed, 51 insertions, 3 deletions
diff --git a/ports_module/cortex_m0+/ac6/module_manager/src/tx_thread_schedule.S b/ports_module/cortex_m0+/ac6/module_manager/src/tx_thread_schedule.S
index 0e0c8f67..84ba8ae6 100644
--- a/ports_module/cortex_m0+/ac6/module_manager/src/tx_thread_schedule.S
+++ b/ports_module/cortex_m0+/ac6/module_manager/src/tx_thread_schedule.S
@@ -30,7 +30,7 @@
/* FUNCTION RELEASE */
/* */
/* _tx_thread_schedule Cortex-M0+/AC6 */
-/* 6.1.12 */
+/* 6.2.0 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* 07-29-2022 Scott Larson Removed the code path to skip */
/* MPU reloading, */
/* resulting in version 6.1.12 */
+/* 10-31-2022 Scott Larson Added low power support, */
+/* resulting in version 6.2.0 */
/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
@@ -278,11 +280,25 @@ __tx_ts_wait:
LDR r1, [r2] // Pickup the next thread to execute pointer
CMP r1, #0
BNE __tx_ts_ready // If non-NULL, a new thread is ready!
+
+#ifdef TX_LOW_POWER
+ PUSH {r0-r3}
+ BL tx_low_power_enter // Possibly enter low power mode
+ POP {r0-r3}
+#endif
+
#ifdef TX_ENABLE_WFI
DSB // Ensure no outstanding memory transactions
WFI // Wait for interrupt
ISB // Ensure pipeline is flushed
#endif
+
+#ifdef TX_LOW_POWER
+ PUSH {r0-r3}
+ BL tx_low_power_exit // Exit low power mode
+ POP {r0-r3}
+#endif
+
CPSIE i // Enable interrupts
B __tx_ts_wait // Loop to continue waiting
diff --git a/ports_module/cortex_m0+/gnu/module_manager/src/tx_thread_schedule.S b/ports_module/cortex_m0+/gnu/module_manager/src/tx_thread_schedule.S
index 7e613c25..78493121 100644
--- a/ports_module/cortex_m0+/gnu/module_manager/src/tx_thread_schedule.S
+++ b/ports_module/cortex_m0+/gnu/module_manager/src/tx_thread_schedule.S
@@ -30,7 +30,7 @@
/* FUNCTION RELEASE */
/* */
/* _tx_thread_schedule Cortex-M0+/GNU */
-/* 6.1.12 */
+/* 6.2.0 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -68,6 +68,8 @@
/* 07-29-2022 Scott Larson Removed the code path to skip */
/* MPU reloading, */
/* resulting in version 6.1.12 */
+/* 10-31-2022 Scott Larson Added low power support, */
+/* resulting in version 6.2.0 */
/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
@@ -278,11 +280,25 @@ __tx_ts_wait:
LDR r1, [r2] // Pickup the next thread to execute pointer
CMP r1, #0
BNE __tx_ts_ready // If non-NULL, a new thread is ready!
+
+#ifdef TX_LOW_POWER
+ PUSH {r0-r3}
+ BL tx_low_power_enter // Possibly enter low power mode
+ POP {r0-r3}
+#endif
+
#ifdef TX_ENABLE_WFI
DSB // Ensure no outstanding memory transactions
WFI // Wait for interrupt
ISB // Ensure pipeline is flushed
#endif
+
+#ifdef TX_LOW_POWER
+ PUSH {r0-r3}
+ BL tx_low_power_exit // Exit low power mode
+ POP {r0-r3}
+#endif
+
CPSIE i // Enable interrupts
B __tx_ts_wait // Loop to continue waiting
diff --git a/ports_module/cortex_m0+/iar/module_manager/src/tx_thread_schedule.S b/ports_module/cortex_m0+/iar/module_manager/src/tx_thread_schedule.S
index af30dffa..1149757a 100644
--- a/ports_module/cortex_m0+/iar/module_manager/src/tx_thread_schedule.S
+++ b/ports_module/cortex_m0+/iar/module_manager/src/tx_thread_schedule.S
@@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _tx_thread_schedule Cortex-M0+/IAR */
-/* 6.1.12 */
+/* 6.2.0 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -75,6 +75,8 @@
/* 07-29-2022 Scott Larson Removed the code path to skip */
/* MPU reloading, */
/* resulting in version 6.1.12 */
+/* 10-31-2022 Scott Larson Added low power support, */
+/* resulting in version 6.2.0 */
/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
@@ -263,11 +265,25 @@ __tx_ts_wait:
LDR r1, [r2] // Pickup the next thread to execute pointer
CMP r1, #0
BNE __tx_ts_ready // If non-NULL, a new thread is ready!
+
+#ifdef TX_LOW_POWER
+ PUSH {r0-r3}
+ BL tx_low_power_enter // Possibly enter low power mode
+ POP {r0-r3}
+#endif
+
#ifdef TX_ENABLE_WFI
DSB // Ensure no outstanding memory transactions
WFI // Wait for interrupt
ISB // Ensure pipeline is flushed
#endif
+
+#ifdef TX_LOW_POWER
+ PUSH {r0-r3}
+ BL tx_low_power_exit // Exit low power mode
+ POP {r0-r3}
+#endif
+
CPSIE i // Enable interrupts
B __tx_ts_wait // Loop to continue waiting