Skip to content

Commit e11c166

Browse files
Merge pull request #187 from azure-rtos/tizho/rx_update
Import RX port update for 6.1.11 release.
2 parents cef9cb2 + 408f9fa commit e11c166

File tree

90 files changed

+620
-182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+620
-182
lines changed

ports/rxv1/ccrx/inc/tx_port.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/* PORT SPECIFIC C INFORMATION RELEASE */
2727
/* */
2828
/* tx_port.h RXv1/CCRX */
29-
/* 6.1.10 */
29+
/* 6.1.11 */
3030
/* */
3131
/* AUTHOR */
3232
/* */
@@ -55,6 +55,8 @@
5555
/* added missing interrupt */
5656
/* control defines, */
5757
/* resulting in version 6.1.10 */
58+
/* 04-25-2022 William E. Lamie Modified comment(s), */
59+
/* resulting in version 6.1.11 */
5860
/* */
5961
/**************************************************************************/
6062

@@ -271,7 +273,7 @@ static void _tx_thread_system_return_inline(void)
271273

272274
#ifdef TX_THREAD_INIT
273275
CHAR _tx_version_id[] =
274-
"Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX RXv1/CCRX Version 6.1.10 *";
276+
"Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX RXv1/CCRX Version 6.1.11 *";
275277
#else
276278
extern CHAR _tx_version_id[];
277279
#endif

ports/rxv1/ccrx/readme_threadx.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ For generic code revision information, please refer to the readme_threadx_generi
150150
file, which is included in your distribution. The following details the revision
151151
information associated with this specific port of ThreadX:
152152

153+
04-25-2022 Release 6.1.11 changes:
154+
tx_thread_schedule.src Added low power support
155+
153156
01-31-2022 Release 6.1.10 changes:
154157
tx_port.h Removed system state macro, and added
155158
missing interrupt control defines

ports/rxv1/ccrx/src/tx_initialize_low_level.src

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
;/* FUNCTION RELEASE */
3535
;/* */
3636
;/* _tx_initialize_low_level RXv1/CCRX */
37-
;/* 6.1.10 */
37+
;/* 6.1.11 */
3838
;/* AUTHOR */
3939
;/* */
4040
;/* William E. Lamie, Microsoft Corporation */
@@ -72,6 +72,8 @@
7272
;/* resulting in version 6.1.9 */
7373
;/* 01-31-2022 William E. Lamie Modified comment(s), */
7474
;/* resulting in version 6.1.10 */
75+
;/* 04-25-2022 William E. Lamie Modified comment(s), */
76+
;/* resulting in version 6.1.11 */
7577
;/* */
7678
;/**************************************************************************/
7779

ports/rxv1/ccrx/src/tx_thread_context_restore.src

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
;/* FUNCTION RELEASE */
4646
;/* */
4747
;/* _tx_thread_context_restore RXv1/CCRX */
48-
;/* 6.1.10 */
48+
;/* 6.1.11 */
4949
;/* AUTHOR */
5050
;/* */
5151
;/* William E. Lamie, Microsoft Corporation */
@@ -84,6 +84,8 @@
8484
;/* resulting in version 6.1.9 */
8585
;/* 01-31-2022 William E. Lamie Modified comment(s), */
8686
;/* resulting in version 6.1.10 */
87+
;/* 04-25-2022 William E. Lamie Modified comment(s), */
88+
;/* resulting in version 6.1.11 */
8789
;/* */
8890
;/**************************************************************************/
8991
;VOID _tx_thread_context_restore(VOID)

ports/rxv1/ccrx/src/tx_thread_context_save.src

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
;/* FUNCTION RELEASE */
4141
;/* */
4242
;/* _tx_thread_context_save RXv1/CCRX */
43-
;/* 6.1.10 */
43+
;/* 6.1.11 */
4444
;/* AUTHOR */
4545
;/* */
4646
;/* William E. Lamie, Microsoft Corporation */
@@ -76,6 +76,8 @@
7676
;/* resulting in version 6.1.9 */
7777
;/* 01-31-2022 William E. Lamie Modified comment(s), */
7878
;/* resulting in version 6.1.10 */
79+
;/* 04-25-2022 William E. Lamie Modified comment(s), */
80+
;/* resulting in version 6.1.11 */
7981
;/* */
8082
;/**************************************************************************/
8183
;VOID _tx_thread_context_save(VOID)

ports/rxv1/ccrx/src/tx_thread_interrupt_control.src

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
;/* FUNCTION RELEASE */
3636
;/* */
3737
;/* _tx_thread_interrupt_control RXv1/CCRX */
38-
;/* 6.1.10 */
38+
;/* 6.1.11 */
3939
;/* AUTHOR */
4040
;/* */
4141
;/* William E. Lamie, Microsoft Corporation */
@@ -70,6 +70,8 @@
7070
;/* resulting in version 6.1.9 */
7171
;/* 01-31-2022 William E. Lamie Modified comment(s), */
7272
;/* resulting in version 6.1.10 */
73+
;/* 04-25-2022 William E. Lamie Modified comment(s), */
74+
;/* resulting in version 6.1.11 */
7375
;/* */
7476
;/**************************************************************************/
7577
;UINT _tx_thread_interrupt_control(UINT new_posture)

ports/rxv1/ccrx/src/tx_thread_schedule.src

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
.GLB __tx_thread_execute_ptr
3535
.GLB __tx_thread_current_ptr
3636
.GLB __tx_timer_time_slice
37+
.IF TX_LOW_POWER==1
38+
.GLB _tx_low_power_enter
39+
.GLB _tx_low_power_exit
40+
.GLB __tx_thread_preempt_disable
41+
.ENDIF
3742
;
3843
.SECTION P,CODE
3944

@@ -42,7 +47,7 @@
4247
;/* FUNCTION RELEASE */
4348
;/* */
4449
;/* _tx_thread_schedule RXv1/CCRX */
45-
;/* 6.1.10 */
50+
;/* 6.1.11 */
4651
;/* AUTHOR */
4752
;/* */
4853
;/* William E. Lamie, Microsoft Corporation */
@@ -82,33 +87,58 @@
8287
;/* resulting in version 6.1.9 */
8388
;/* 01-31-2022 William E. Lamie Modified comment(s), */
8489
;/* resulting in version 6.1.10 */
90+
;/* 04-25-2022 William E. Lamie Modified comment(s), and */
91+
;/* added low power support, */
92+
;/* resulting in version 6.1.11 */
8593
;/* */
8694
;/**************************************************************************/
8795
;VOID _tx_thread_schedule(VOID)
8896
;{
8997
.GLB __tx_thread_schedule
9098
__tx_thread_schedule:
9199
;
92-
; /* Enable interrupts. */
93-
;
94-
SETPSW I
95100
;
96101
; /* Wait for a thread to execute. */
97102
; do
98103
; {
99104
MOV.L #__tx_thread_execute_ptr, R1 ; Address of thread to executer ptr
100105
__tx_thread_schedule_loop:
106+
SETPSW I ; Enable interrupts
107+
CLRPSW I ; Disable interrupts
101108
MOV.L [R1],R2 ; Pickup next thread to execute
102109
CMP #0,R2 ; Is it NULL?
103-
BEQ __tx_thread_schedule_loop ; Yes, idle system, keep checking
110+
BNE __tx_thread_thread_ready ; Not NULL, schedule the thread
111+
; Idle system - no thread is ready
112+
.IF TX_LOW_POWER==1
113+
MOV.L #__tx_thread_preempt_disable, R1 ; Load prempt disable flag.
114+
MOV.L [R1], R2
115+
ADD #1, R2 ; Disable preemption while enter/exit
116+
MOV.L R2, [R1]
117+
BSR _tx_low_power_enter ; Possibly enter low power mode
118+
.ENDIF
119+
120+
.IF TX_ENABLE_WAIT==1
121+
WAIT ; Wait for interrupt
122+
.ENDIF
123+
124+
.IF TX_LOW_POWER==1
125+
CLRPSW I ; Disable interrupts (because WAIT enables interrupts)
126+
BSR _tx_low_power_exit ; Possibly exit low power mode
127+
MOV.L #__tx_thread_preempt_disable, R1 ; Load prempt disable flag.
128+
MOV.L [R1], R2
129+
SUB #1, R2 ; Enable preemption
130+
MOV.L R2, [R1]
131+
MOV.L #__tx_thread_execute_ptr, R1 ; Address of thread to executer ptr
132+
.ENDIF
133+
134+
BRA __tx_thread_schedule_loop ; Idle system, keep checking
135+
136+
__tx_thread_thread_ready:
104137
;
105138
; }
106139
; while(_tx_thread_execute_ptr == TX_NULL);
107140
;
108-
; /* Yes! We have a thread to execute. Lockout interrupts and
109-
; transfer control to it. */
110-
;
111-
CLRPSW I ; Disable interrupts
141+
; /* Yes! We have a thread to execute. Note that interrupts are locked out at this point. */
112142
;
113143
; /* Setup the current thread pointer. */
114144
; _tx_thread_current_ptr = _tx_thread_execute_ptr;

ports/rxv1/ccrx/src/tx_thread_stack_build.src

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
;/* FUNCTION RELEASE */
3737
;/* */
3838
;/* _tx_thread_stack_build RXv1/CCRX */
39-
;/* 6.1.10 */
39+
;/* 6.1.11 */
4040
;/* AUTHOR */
4141
;/* */
4242
;/* William E. Lamie, Microsoft Corporation */
@@ -75,6 +75,8 @@
7575
;/* resulting in version 6.1.9 */
7676
;/* 01-31-2022 William E. Lamie Modified comment(s), */
7777
;/* resulting in version 6.1.10 */
78+
;/* 04-25-2022 William E. Lamie Modified comment(s), */
79+
;/* resulting in version 6.1.11 */
7880
;/* */
7981
;/**************************************************************************/
8082
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))

ports/rxv1/ccrx/src/tx_thread_system_return.src

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
;/* FUNCTION RELEASE */
4141
;/* */
4242
;/* _tx_thread_system_return RXv1/CCRX */
43-
;/* 6.1.10 */
43+
;/* 6.1.11 */
4444
;/* AUTHOR */
4545
;/* */
4646
;/* William E. Lamie, Microsoft Corporation */
@@ -78,6 +78,8 @@
7878
;/* resulting in version 6.1.9 */
7979
;/* 01-31-2022 William E. Lamie Modified comment(s), */
8080
;/* resulting in version 6.1.10 */
81+
;/* 04-25-2022 William E. Lamie Modified comment(s), */
82+
;/* resulting in version 6.1.11 */
8183
;/* */
8284
;/**************************************************************************/
8385
;VOID _tx_thread_system_return(VOID)

ports/rxv1/ccrx/src/tx_timer_interrupt.src

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
;/* FUNCTION RELEASE */
5757
;/* */
5858
;/* _tx_timer_interrupt RXv1/CCRX */
59-
;/* 6.1.10 */
59+
;/* 6.1.11 */
6060
;/* AUTHOR */
6161
;/* */
6262
;/* William E. Lamie, Microsoft Corporation */
@@ -99,6 +99,8 @@
9999
;/* added missing thread */
100100
;/* preemption logic, */
101101
;/* resulting in version 6.1.10 */
102+
;/* 04-25-2022 William E. Lamie Modified comment(s), */
103+
;/* resulting in version 6.1.11 */
102104
;/* */
103105
;/**************************************************************************/
104106
;VOID _tx_timer_interrupt(VOID)

0 commit comments

Comments
 (0)