summaryrefslogtreecommitdiff
path: root/ports/cortex_m23
diff options
context:
space:
mode:
Diffstat (limited to 'ports/cortex_m23')
-rw-r--r--ports/cortex_m23/ac5/inc/tx_port.h9
-rw-r--r--ports/cortex_m23/ac5/readme_threadx.txt2
-rw-r--r--ports/cortex_m23/ac6/inc/tx_port.h2
-rw-r--r--ports/cortex_m23/ac6/readme_threadx.txt6
-rw-r--r--ports/cortex_m23/ac6/src/tx_thread_schedule.s19
-rw-r--r--ports/cortex_m23/gnu/inc/tx_port.h4
-rw-r--r--ports/cortex_m23/gnu/readme_threadx.txt8
-rw-r--r--ports/cortex_m23/gnu/src/tx_thread_schedule.s19
-rw-r--r--ports/cortex_m23/iar/readme_threadx.txt7
-rw-r--r--ports/cortex_m23/iar/src/tx_thread_schedule.s23
10 files changed, 89 insertions, 10 deletions
diff --git a/ports/cortex_m23/ac5/inc/tx_port.h b/ports/cortex_m23/ac5/inc/tx_port.h
index 0ac7a7ff..7805b1eb 100644
--- a/ports/cortex_m23/ac5/inc/tx_port.h
+++ b/ports/cortex_m23/ac5/inc/tx_port.h
@@ -26,7 +26,7 @@
/* PORT SPECIFIC C INFORMATION RELEASE */
/* */
/* tx_port.h Cortex-M23/AC5 */
-/* 6.1 */
+/* 6.1.6 */
/* */
/* AUTHOR */
/* */
@@ -48,6 +48,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 Scott Larson Initial Version 6.1 */
+/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
+/* macro definition, */
+/* resulting in version 6.1.6 */
/* */
/**************************************************************************/
@@ -377,7 +380,7 @@ VOID _tx_thread_interrupt_restore(UIN
#else
-#define TX_INTERRUPT_SAVE_AREA unsigned int was_masked;
+#define TX_INTERRUPT_SAVE_AREA UINT was_masked;
#define TX_DISABLE was_masked = __disable_irq();
#define TX_RESTORE if (was_masked == 0) __enable_irq();
@@ -406,7 +409,7 @@ unsigned int was_masked;
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Cortex-M23/AC5 Version 6.1 *";
+ "Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Cortex-M23/AC5 Version 6.1.6 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m23/ac5/readme_threadx.txt b/ports/cortex_m23/ac5/readme_threadx.txt
index 7c60c2c4..1753a961 100644
--- a/ports/cortex_m23/ac5/readme_threadx.txt
+++ b/ports/cortex_m23/ac5/readme_threadx.txt
@@ -143,6 +143,8 @@ For generic code revision information, please refer to the readme_threadx_generi
file, which is included in your distribution. The following details the revision
information associated with this specific port of ThreadX:
+04-02-2021 Release 6.1.6 changes:
+ tx_port.h Updated macro definition
09-30-2020 Initial ThreadX 6.1 version for Cortex-M23 using AC5 tools.
diff --git a/ports/cortex_m23/ac6/inc/tx_port.h b/ports/cortex_m23/ac6/inc/tx_port.h
index 0781c2b0..0e3f401c 100644
--- a/ports/cortex_m23/ac6/inc/tx_port.h
+++ b/ports/cortex_m23/ac6/inc/tx_port.h
@@ -381,7 +381,7 @@ VOID _tx_thread_interrupt_restore(UIN
#else
-#define TX_INTERRUPT_SAVE_AREA unsigned int was_masked;
+#define TX_INTERRUPT_SAVE_AREA UINT was_masked;
#define TX_DISABLE was_masked = __disable_irq();
#define TX_RESTORE if (was_masked == 0) __enable_irq();
diff --git a/ports/cortex_m23/ac6/readme_threadx.txt b/ports/cortex_m23/ac6/readme_threadx.txt
index 66bf1636..45188e83 100644
--- a/ports/cortex_m23/ac6/readme_threadx.txt
+++ b/ports/cortex_m23/ac6/readme_threadx.txt
@@ -145,6 +145,12 @@ For generic code revision information, please refer to the readme_threadx_generi
file, which is included in your distribution. The following details the revision
information associated with this specific port of ThreadX:
+04-02-2021 Release 6.1.6 changes:
+ tx_port.h Updated macro definition
+ tx_thread_schedule.s Added low power support
+
+03-02-2021 The following files were changed/added for version 6.1.5:
+ tx_port.h Added ULONG64_DEFINED
09-30-2020 Initial ThreadX 6.1 version for Cortex-M23 using AC6 tools.
diff --git a/ports/cortex_m23/ac6/src/tx_thread_schedule.s b/ports/cortex_m23/ac6/src/tx_thread_schedule.s
index 442a0567..dfe83983 100644
--- a/ports/cortex_m23/ac6/src/tx_thread_schedule.s
+++ b/ports/cortex_m23/ac6/src/tx_thread_schedule.s
@@ -26,7 +26,7 @@
/* FUNCTION RELEASE */
/* */
/* _tx_thread_schedule Cortex-M23/AC6 */
-/* 6.1 */
+/* 6.1.6 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -59,6 +59,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 Scott Larson Initial Version 6.1 */
+/* 04-02-2021 Scott Larson Modified comment(s), added */
+/* low power code, */
+/* resulting in version 6.1.6 */
/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
@@ -253,11 +256,25 @@ __tx_ts_wait:
LDR r1, [r2] // Pickup the next thread to execute pointer
STR r1, [r0] // Store it in the current pointer
CBNZ r1, __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/cortex_m23/gnu/inc/tx_port.h b/ports/cortex_m23/gnu/inc/tx_port.h
index 47850b84..d09ff80b 100644
--- a/ports/cortex_m23/gnu/inc/tx_port.h
+++ b/ports/cortex_m23/gnu/inc/tx_port.h
@@ -416,7 +416,7 @@ unsigned int interrupt_save;
}
-#define TX_INTERRUPT_SAVE_AREA unsigned int interrupt_save;
+#define TX_INTERRUPT_SAVE_AREA UINT interrupt_save;
#define TX_DISABLE interrupt_save = __disable_interrupts();
#define TX_RESTORE __restore_interrupts(interrupt_save);
@@ -429,7 +429,7 @@ unsigned int interrupt_save;
#else
-#define TX_INTERRUPT_SAVE_AREA unsigned int interrupt_save;
+#define TX_INTERRUPT_SAVE_AREA UINT interrupt_save;
#define TX_DISABLE interrupt_save = _tx_thread_interrupt_control(TX_INT_DISABLE);
#define TX_RESTORE _tx_thread_interrupt_control(interrupt_save);
diff --git a/ports/cortex_m23/gnu/readme_threadx.txt b/ports/cortex_m23/gnu/readme_threadx.txt
index 357990cb..435e3cb9 100644
--- a/ports/cortex_m23/gnu/readme_threadx.txt
+++ b/ports/cortex_m23/gnu/readme_threadx.txt
@@ -128,10 +128,16 @@ For generic code revision information, please refer to the readme_threadx_generi
file, which is included in your distribution. The following details the revision
information associated with this specific port of ThreadX:
+04-02-2021 Release 6.1.6 changes:
+ tx_port.h Updated macro definition
+ tx_thread_schedule.s Added low power support
+
+03-02-2021 The following files were changed/added for version 6.1.5:
+ tx_port.h Added ULONG64_DEFINED
+
12-31-2020 The following files were
changed/added for port specific version 6.1.3:
-
tx_port.h Remove unneeded include files,
use builtin functions,
modified comments.
diff --git a/ports/cortex_m23/gnu/src/tx_thread_schedule.s b/ports/cortex_m23/gnu/src/tx_thread_schedule.s
index 9fefdb6e..24d64e64 100644
--- a/ports/cortex_m23/gnu/src/tx_thread_schedule.s
+++ b/ports/cortex_m23/gnu/src/tx_thread_schedule.s
@@ -26,7 +26,7 @@
/* FUNCTION RELEASE */
/* */
/* _tx_thread_schedule Cortex-M23/GNU */
-/* 6.1 */
+/* 6.1.6 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -59,6 +59,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 Scott Larson Initial Version 6.1 */
+/* 04-02-2021 Scott Larson Modified comment(s), added */
+/* low power code, */
+/* resulting in version 6.1.6 */
/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
@@ -253,11 +256,25 @@ __tx_ts_wait:
LDR r1, [r2] // Pickup the next thread to execute pointer
STR r1, [r0] // Store it in the current pointer
CBNZ r1, __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/cortex_m23/iar/readme_threadx.txt b/ports/cortex_m23/iar/readme_threadx.txt
index 7f454e17..11717ae3 100644
--- a/ports/cortex_m23/iar/readme_threadx.txt
+++ b/ports/cortex_m23/iar/readme_threadx.txt
@@ -136,6 +136,13 @@ For generic code revision information, please refer to the readme_threadx_generi
file, which is included in your distribution. The following details the revision
information associated with this specific port of ThreadX:
+04-02-2021 Release 6.1.6 changes:
+ tx_port.h Updated macro definition
+ tx_thread_schedule.s Added low power support
+
+03-02-2021 The following files were changed/added for version 6.1.5:
+ tx_port.h Added ULONG64_DEFINED
+
09-30-2020 Initial ThreadX 6.1 version for Cortex-M23 using IAR's ARM tools.
diff --git a/ports/cortex_m23/iar/src/tx_thread_schedule.s b/ports/cortex_m23/iar/src/tx_thread_schedule.s
index 53b92102..2acf2f77 100644
--- a/ports/cortex_m23/iar/src/tx_thread_schedule.s
+++ b/ports/cortex_m23/iar/src/tx_thread_schedule.s
@@ -32,6 +32,10 @@
EXTERN _tx_thread_secure_stack_context_save
EXTERN _tx_thread_secure_mode_stack_allocate
EXTERN _tx_thread_secure_mode_stack_free
+#ifdef TX_LOW_POWER
+ EXTERN tx_low_power_enter
+ EXTERN tx_low_power_exit
+#endif
;
;
SECTION `.text`:CODE:NOROOT(2)
@@ -41,7 +45,7 @@
;/* FUNCTION RELEASE */
;/* */
;/* _tx_thread_schedule Cortex-M23/IAR */
-;/* 6.1 */
+;/* 6.1.6 */
;/* AUTHOR */
;/* */
;/* Scott Larson, Microsoft Corporation */
@@ -74,6 +78,9 @@
;/* DATE NAME DESCRIPTION */
;/* */
;/* 09-30-2020 Scott Larson Initial Version 6.1 */
+;/* 04-02-2021 Scott Larson Modified comment(s), added */
+;/* low power code, */
+;/* resulting in version 6.1.6 */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
@@ -266,11 +273,25 @@ __tx_ts_wait:
LDR r1, [r2] ; Pickup the next thread to execute pointer
STR r1, [r0] ; Store it in the current pointer
CBNZ r1, __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
;