Spruii 0 e
Spruii 0 e
Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 3
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
4 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 5
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
6 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 7
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
8 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 9
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
10 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 11
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
12 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 13
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
14 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 15
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
16 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 17
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
18 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 19
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
20 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 21
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
22 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 23
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
24 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 25
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
List of Figures
Figure 1-1. F2838x Block Diagram.......................................................................................................................................... 134
Figure 3-1. Device Interrupt Architecture.................................................................................................................................146
Figure 3-2. Interrupt Propagation Path.................................................................................................................................... 147
Figure 3-3. System Error and CM Status Interrupt Sources.................................................................................................... 152
Figure 3-4. ERRORSTS Pin Diagram......................................................................................................................................163
Figure 3-5. Clocking System....................................................................................................................................................164
Figure 3-6. Single-ended 3.3V External Clock.........................................................................................................................165
Figure 3-7. External Crystal..................................................................................................................................................... 166
Figure 3-8. External Resonator................................................................................................................................................166
Figure 3-9. AUXCLKIN............................................................................................................................................................ 167
Figure 3-10. PLL/AUXPLL....................................................................................................................................................... 171
Figure 3-11. Missing Clock Detection Logic.............................................................................................................................175
Figure 3-12. Clock Configuration Semaphore (CLKSEM) State Transitions........................................................................... 176
Figure 3-13. CPU-Timers.........................................................................................................................................................177
Figure 3-14. CPU-Timer Interrupts Signals and Output Signal................................................................................................177
Figure 3-15. CPU Watchdog Timer Module............................................................................................................................. 178
Figure 3-16. Memory Architecture........................................................................................................................................... 182
Figure 3-17. Arbitration Scheme on Global Shared Memories................................................................................................ 185
Figure 3-18. Arbitration Scheme on Local Shared Memories..................................................................................................185
Figure 3-19. ROM Parity Checking Logic................................................................................................................................ 191
Figure 3-20. NMAVFLG Register............................................................................................................................................. 203
Figure 3-21. NMAVSET Register............................................................................................................................................. 205
Figure 3-22. NMAVCLR Register.............................................................................................................................................207
Figure 3-23. NMAVINTEN Register......................................................................................................................................... 209
Figure 3-24. NMCPURDAVADDR Register............................................................................................................................. 210
Figure 3-25. NMCPUWRAVADDR Register.............................................................................................................................211
Figure 3-26. NMCPUFAVADDR Register................................................................................................................................ 212
Figure 3-27. NMDMAWRAVADDR Register............................................................................................................................ 213
Figure 3-28. NMCLA1RDAVADDR Register............................................................................................................................214
Figure 3-29. NMCLA1WRAVADDR Register........................................................................................................................... 215
Figure 3-30. NMCLA1FAVADDR Register............................................................................................................................... 216
Figure 3-31. NMDMARDAVADDR Register.............................................................................................................................217
Figure 3-32. MAVFLG Register................................................................................................................................................218
Figure 3-33. MAVSET Register................................................................................................................................................219
Figure 3-34. MAVCLR Register............................................................................................................................................... 220
Figure 3-35. MAVINTEN Register............................................................................................................................................221
Figure 3-36. MCPUFAVADDR Register................................................................................................................................... 222
Figure 3-37. MCPUWRAVADDR Register............................................................................................................................... 223
Figure 3-38. MDMAWRAVADDR Register...............................................................................................................................224
Figure 3-39. CLKSEM Register............................................................................................................................................... 227
Figure 3-40. CLKCFGLOCK1 Register....................................................................................................................................228
Figure 3-41. CLKSRCCTL1 Register.......................................................................................................................................231
Figure 3-42. CLKSRCCTL2 Register.......................................................................................................................................233
Figure 3-43. CLKSRCCTL3 Register.......................................................................................................................................235
Figure 3-44. SYSPLLCTL1 Register........................................................................................................................................236
Figure 3-45. SYSPLLMULT Register....................................................................................................................................... 237
Figure 3-46. SYSPLLSTS Register......................................................................................................................................... 239
Figure 3-47. AUXPLLCTL1 Register....................................................................................................................................... 240
Figure 3-48. AUXPLLMULT Register.......................................................................................................................................241
Figure 3-49. AUXPLLSTS Register......................................................................................................................................... 243
Figure 3-50. SYSCLKDIVSEL Register................................................................................................................................... 244
Figure 3-51. AUXCLKDIVSEL Register...................................................................................................................................245
Figure 3-52. PERCLKDIVSEL Register...................................................................................................................................246
Figure 3-53. XCLKOUTDIVSEL Register................................................................................................................................ 247
Figure 3-54. CLBCLKCTL Register......................................................................................................................................... 248
Figure 3-55. LOSPCP Register............................................................................................................................................... 250
Figure 3-56. MCDCR Register.................................................................................................................................................251
26 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 27
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
28 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 29
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
30 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 31
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
32 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 33
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
34 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 35
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
36 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 37
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
38 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 39
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
40 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 41
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
42 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 43
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
44 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 45
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
46 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 47
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
48 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 49
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
Figure 26-41. PWM Chopper Submodule Waveforms Showing the Pulse Width (Duty Cycle) Control of Sustaining Pulses 2932
Figure 26-42. Trip-Zone Submodule......................................................................................................................................2933
Figure 26-43. Trip-Zone Submodule Mode Control Logic......................................................................................................2937
Figure 26-44. Trip-Zone Submodule Interrupt Logic..............................................................................................................2938
Figure 26-45. Event-Trigger Submodule................................................................................................................................2939
Figure 26-46. Event-Trigger Submodule Showing Event Inputs and Prescaled Outputs...................................................... 2940
Figure 26-47. Event-Trigger Interrupt Generator................................................................................................................... 2942
Figure 26-48. Event-Trigger SOCA Pulse Generator............................................................................................................ 2943
Figure 26-49. Event-Trigger SOCB Pulse Generator............................................................................................................ 2943
Figure 26-50. Digital-Compare Submodule High-Level Block Diagram.................................................................................2944
Figure 26-51. GPIO MUX-to-Trip Input Connectivity............................................................................................................. 2945
Figure 26-52. DCxEVT1 Event Triggering............................................................................................................................. 2948
Figure 26-53. DCxEVT2 Event Triggering............................................................................................................................. 2949
Figure 26-54. Event Filtering................................................................................................................................................. 2950
Figure 26-55. Blanking Window Timing Diagram...................................................................................................................2951
Figure 26-56. Valley Switching...............................................................................................................................................2953
Figure 26-57. ePWM X-BAR..................................................................................................................................................2954
Figure 26-58. Simplified ePWM Module................................................................................................................................ 2955
Figure 26-59. EPWM1 Configured as a Typical Master, EPWM2 Configured as a Slave .................................................... 2956
Figure 26-60. Control of Four Buck Stages. Here FPWM1≠ FPWM2≠ FPWM3≠ FPWM4 ............................................................. 2957
Figure 26-61. Buck Waveforms for Control of Four Buck Stages (Note: Only three bucks shown here).............................. 2958
Figure 26-62. Control of Four Buck Stages. (Note: FPWM2 = N x FPWM1).............................................................................. 2959
Figure 26-63. Buck Waveforms for Control of Four Buck Stages (Note: FPWM2 = FPWM1).................................................... 2960
Figure 26-64. Control of Two Half-H Bridge Stages (FPWM2 = N x FPWM1)............................................................................ 2961
Figure 26-65. Half-H Bridge Waveforms for Control of Two Half-H Bridge Stages (Note: Here FPWM2 = FPWM1)................. 2962
Figure 26-66. Control of Dual 3-Phase Inverter Stages as Is Commonly Used in Motor Control..........................................2963
Figure 26-67. 3-Phase Inverter Waveforms for Control of Dual 3-Phase Inverter Stages (Only One Inverter Shown)......... 2964
Figure 26-68. Configuring Two PWM Modules for Phase Control......................................................................................... 2965
Figure 26-69. Timing Waveforms Associated with Phase Control Between Two Modules....................................................2966
Figure 26-70. Control of 3-Phase Interleaved DC/DC Converter.......................................................................................... 2967
Figure 26-71. 3-Phase Interleaved DC/DC Converter Waveforms for Control of 3-Phase Interleaved DC/DC Converter....2968
Figure 26-72. Control of Full-H Bridge Stage (FPWM2 = FPWM1)............................................................................................ 2969
Figure 26-73. ZVS Full-H Bridge Waveforms........................................................................................................................ 2970
Figure 26-74. Peak Current Mode Control of Buck Converter...............................................................................................2971
Figure 26-75. Peak Current Mode Control Waveforms for Control of Buck Converter.......................................................... 2971
Figure 26-76. Control of Two Resonant Converter Stages....................................................................................................2972
Figure 26-77. H-Bridge LLC Resonant Converter PWM Waveforms.....................................................................................2972
Figure 26-78. HRPWM Block Diagram.................................................................................................................................. 2974
Figure 26-79. Resolution Calculations for Conventionally Generated PWM......................................................................... 2975
Figure 26-80. Operating Logic Using MEP............................................................................................................................ 2976
Figure 26-81. HRPWM Extension Registers and Memory Configuration.............................................................................. 2977
Figure 26-82. HRPWM System Interface.............................................................................................................................. 2978
Figure 26-83. HRPWM and HRCAL Source Clock................................................................................................................2979
Figure 26-84. Required PWM Waveform for a Requested Duty = 40.5%..............................................................................2982
Figure 26-85. Low % Duty Cycle Range Limitation Example (HRPCTL[HRPE] = 0)............................................................ 2985
Figure 26-86. High % Duty Cycle Range Limitation Example (HRPCTL[HRPE] = 0)............................................................2986
Figure 26-87. Up-Count Duty Cycle Range Limitation Example (HRPCTL[HRPE]=1)..........................................................2986
Figure 26-88. Up-Down Count Duty Cycle Range Limitation Example (HRPCTL[HRPE]=1)................................................2986
Figure 26-89. Simple Buck Controlled Converter Using a Single PWM................................................................................ 2993
Figure 26-90. PWM Waveform Generated for Simple Buck Controlled Converter................................................................ 2993
Figure 26-91. Simple Reconstruction Filter for a PWM-based DAC......................................................................................2995
Figure 26-92. PWM Waveform Generated for the PWM DAC Function................................................................................ 2995
Figure 26-93. TBCTL Register............................................................................................................................................... 3011
Figure 26-94. TBCTL2 Register.............................................................................................................................................3013
Figure 26-95. EPWMSYNCINSEL Register.......................................................................................................................... 3014
Figure 26-96. TBCTR Register.............................................................................................................................................. 3015
Figure 26-97. TBSTS Register.............................................................................................................................................. 3016
Figure 26-98. EPWMSYNCOUTEN Register........................................................................................................................ 3017
Figure 26-99. TBCTL3 Register.............................................................................................................................................3019
Figure 26-100. CMPCTL Register......................................................................................................................................... 3020
Figure 26-101. CMPCTL2 Register....................................................................................................................................... 3022
50 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 51
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
52 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 53
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
54 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 55
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
56 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 57
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
58 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 59
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
60 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 61
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
62 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 63
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
64 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 65
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
66 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 67
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
68 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 69
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
70 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 71
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
72 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 73
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
74 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 75
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
List of Tables
Table 2-1. C2000Ware Root Directories.................................................................................................................................. 136
Table 3-1. Reset Signals..........................................................................................................................................................142
Table 3-2. PIE Channel Mapping............................................................................................................................................. 150
Table 3-3. CPU Interrupt Vectors............................................................................................................................................. 153
Table 3-4. PIE Interrupt Vectors...............................................................................................................................................154
Table 3-5. Access to EALLOW-Protected Registers................................................................................................................161
Table 3-6. Clock Connections Sorted by Clock Domain.......................................................................................................... 169
Table 3-7. Clock Source (OSCCLK) Failure Detection............................................................................................................ 174
Table 3-8. Example Watchdog Key Sequences.......................................................................................................................179
Table 3-9. Local Shared RAM..................................................................................................................................................183
Table 3-10. Global Shared RAM.............................................................................................................................................. 183
Table 3-11. Error Handling in Different Scenarios....................................................................................................................189
Table 3-12. Mapping of ECC Bits in Read Data from ECC/Parity Address Map..................................................................... 190
Table 3-13. Mapping of Parity Bits in Read Data from ECC/Parity Address Map....................................................................190
Table 3-14. System Control Registers Impacted..................................................................................................................... 193
Table 3-15. SYSCTRL Base Address Table (C28).................................................................................................................. 200
Table 3-16. ACCESS_PROTECTION_REGS Registers......................................................................................................... 201
Table 3-17. ACCESS_PROTECTION_REGS Access Type Codes.........................................................................................201
Table 3-18. NMAVFLG Register Field Descriptions................................................................................................................. 203
Table 3-19. NMAVSET Register Field Descriptions................................................................................................................. 205
Table 3-20. NMAVCLR Register Field Descriptions.................................................................................................................207
Table 3-21. NMAVINTEN Register Field Descriptions............................................................................................................. 209
Table 3-22. NMCPURDAVADDR Register Field Descriptions................................................................................................. 210
Table 3-23. NMCPUWRAVADDR Register Field Descriptions.................................................................................................211
Table 3-24. NMCPUFAVADDR Register Field Descriptions.................................................................................................... 212
Table 3-25. NMDMAWRAVADDR Register Field Descriptions................................................................................................ 213
Table 3-26. NMCLA1RDAVADDR Register Field Descriptions................................................................................................214
Table 3-27. NMCLA1WRAVADDR Register Field Descriptions............................................................................................... 215
Table 3-28. NMCLA1FAVADDR Register Field Descriptions................................................................................................... 216
Table 3-29. NMDMARDAVADDR Register Field Descriptions.................................................................................................217
Table 3-30. MAVFLG Register Field Descriptions....................................................................................................................218
Table 3-31. MAVSET Register Field Descriptions....................................................................................................................219
Table 3-32. MAVCLR Register Field Descriptions................................................................................................................... 220
Table 3-33. MAVINTEN Register Field Descriptions................................................................................................................221
Table 3-34. MCPUFAVADDR Register Field Descriptions....................................................................................................... 222
Table 3-35. MCPUWRAVADDR Register Field Descriptions................................................................................................... 223
Table 3-36. MDMAWRAVADDR Register Field Descriptions...................................................................................................224
76 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 77
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
78 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 79
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
80 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 81
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
82 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 83
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
84 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 85
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
86 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 87
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
88 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 89
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
90 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 91
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
92 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 93
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
94 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 95
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
96 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 97
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
98 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 99
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
100 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 101
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
102 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 103
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
104 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 105
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
106 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 107
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
108 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 109
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
110 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
Table 34-26. Register Bits Used to Set the Receive Word Lengths.......................................................................................3758
Table 34-27. Register Bits Used to Set the Receive Frame Length...................................................................................... 3759
Table 34-28. How to Calculate the Length of the Receive Frame......................................................................................... 3759
Table 34-29. Register Bit Used to Enable/Disable the Receive Frame-Synchronization Ignore Function.............................3760
Table 34-30. Register Bits Used to Set the Receive Companding Mode.............................................................................. 3761
Table 34-31. Register Bits Used to Set the Receive Data Delay........................................................................................... 3763
Table 34-32. Register Bits Used to Set the Receive Sign-Extension and Justification Mode................................................3765
Table 34-33. Example: Use of RJUST Field With 12-Bit Data Value ABCh...........................................................................3765
Table 34-34. Example: Use of RJUST Field With 20-Bit Data Value ABCDEh......................................................................3765
Table 34-35. Register Bits Used to Set the Receive Interrupt Mode..................................................................................... 3766
Table 34-36. Register Bits Used to Set the Receive Frame Synchronization Mode..............................................................3767
Table 34-37. Select Sources to Provide the Receive Frame-Synchronization Signal and the Effect on the FSR Pin........... 3768
Table 34-38. Register Bit Used to Set Receive Frame-Synchronization Polarity.................................................................. 3768
Table 34-39. Register Bits Used to Set the SRG Frame-Synchronization Period and Pulse Width...................................... 3770
Table 34-40. Register Bits Used to Set the Receive Clock Mode..........................................................................................3771
Table 34-41. Receive Clock Signal Source Selection............................................................................................................3772
Table 34-42. Register Bit Used to Set Receive Clock Polarity...............................................................................................3772
Table 34-43. Register Bits Used to Set the Sample Rate Generator (SRG) Clock Divide-Down Value................................ 3774
Table 34-44. Register Bit Used to Set the SRG Clock Synchronization Mode...................................................................... 3774
Table 34-45. Register Bits Used to Set the SRG Clock Mode (Choose an Input Clock)....................................................... 3775
Table 34-46. Register Bits Used to Set the SRG Input Clock Polarity................................................................................... 3775
Table 34-47. Register Bits Used to Place Transmitter in Reset Field Descriptions............................................................... 3777
Table 34-48. Register Bit Used to Enable/Disable the Digital Loopback Mode..................................................................... 3778
Table 34-49. Receive Signals Connected to Transmit Signals in Digital Loopback Mode.....................................................3778
Table 34-50. Register Bits Used to Enable/Disable the Clock Stop Mode.............................................................................3778
Table 34-51. Effects of CLKSTP, CLKXP, and CLKRP on the Clock Scheme....................................................................... 3779
Table 34-52. Register Bits Used to Enable/Disable Transmit Multichannel Selection........................................................... 3779
Table 34-53. Use of the Transmit Channel Enable Registers................................................................................................ 3780
Table 34-54. Register Bit Used to Choose 1 or 2 Phases for the Transmit Frame................................................................ 3782
Table 34-55. Register Bits Used to Set the Transmit Word Lengths......................................................................................3782
Table 34-56. Register Bits Used to Set the Transmit Frame Length......................................................................................3783
Table 34-57. How to Calculate Frame Length....................................................................................................................... 3783
Table 34-58. Register Bit Used to Enable/Disable the Transmit Frame-Synchronization Ignore Function............................3784
Table 34-59. Register Bits Used to Set the Transmit Companding Mode..............................................................................3785
Table 34-60. Register Bits Used to Set the Transmit Data Delay.......................................................................................... 3786
Table 34-61. Register Bit Used to Set the Transmit DXENA (DX Delay Enabler) Mode....................................................... 3788
Table 34-62. Register Bits Used to Set the Transmit Interrupt Mode.....................................................................................3788
Table 34-63. Register Bits Used to Set the Transmit Frame-Synchronization Mode.............................................................3789
Table 34-64. How FSXM and FSGM Select the Source of Transmit Frame-Synchronization Pulses................................... 3789
Table 34-65. Register Bit Used to Set Transmit Frame-Synchronization Polarity..................................................................3790
Table 34-66. Register Bits Used to Set SRG Frame-Synchronization Period and Pulse Width............................................ 3791
Table 34-67. Register Bit Used to Set the Transmit Clock Mode...........................................................................................3792
Table 34-68. How the CLKXM Bit Selects the Transmit Clock and the Corresponding Status of the MCLKX pin.................3792
Table 34-69. Register Bit Used to Set Transmit Clock Polarity..............................................................................................3792
Table 34-70. McBSP Emulation Modes Selectable with FREE and SOFT Bits of SPCR2....................................................3794
Table 34-71. Reset State of Each McBSP Pin.......................................................................................................................3794
Table 34-72. Receive Interrupt Sources and Signals.............................................................................................................3799
Table 34-73. Transmit Interrupt Sources and Signals............................................................................................................3800
Table 34-74. Error Flags........................................................................................................................................................ 3800
Table 34-75. McBSP Mode Selection.................................................................................................................................... 3801
Table 34-76. MCBSP Base Address Table (C28).................................................................................................................. 3806
Table 34-77. MCBSP_REGS Registers.................................................................................................................................3807
Table 34-78. McBSP_REGS Access Type Codes................................................................................................................. 3807
Table 34-79. DRR2 Register Field Descriptions.................................................................................................................... 3809
Table 34-80. DRR1 Register Field Descriptions.................................................................................................................... 3810
Table 34-81. DXR2 Register Field Descriptions.....................................................................................................................3811
Table 34-82. DXR1 Register Field Descriptions.................................................................................................................... 3812
Table 34-83. SPCR2 Register Field Descriptions.................................................................................................................. 3813
Table 34-84. SPCR1 Register Field Descriptions.................................................................................................................. 3816
Table 34-85. RCR2 Register Field Descriptions.................................................................................................................... 3819
Table 34-86. RCR1 Register Field Descriptions.................................................................................................................... 3821
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 111
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
112 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 113
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
114 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 115
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
116 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 117
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
118 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 119
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
120 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 121
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
122 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 123
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
124 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 125
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
126 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 127
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
128 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Table of Contents
Table 49-12. Channel Control Word Configuration for Peripheral Ping-Pong Receive Example...........................................5444
Table 49-13. UDMA Base Address Table (CM)..................................................................................................................... 5446
Table 49-14. UDMAREGS Registers..................................................................................................................................... 5447
Table 49-15. UDMAREGS Access Type Codes.................................................................................................................... 5447
Table 49-16. DMASTAT Register Field Descriptions............................................................................................................. 5449
Table 49-17. DMACFG Register Field Descriptions.............................................................................................................. 5450
Table 49-18. DMACTLBASE Register Field Descriptions......................................................................................................5451
Table 49-19. DMAALTBASE Register Field Descriptions...................................................................................................... 5452
Table 49-20. DMASWREQ Register Field Descriptions........................................................................................................ 5453
Table 49-21. DMAUSEBURSTSET Register Field Descriptions........................................................................................... 5454
Table 49-22. DMAUSEBURSTCLR Register Field Descriptions........................................................................................... 5455
Table 49-23. DMAREQMASKSET Register Field Descriptions............................................................................................. 5456
Table 49-24. DMAREQMASKCLR Register Field Descriptions.............................................................................................5457
Table 49-25. DMAENASET Register Field Descriptions........................................................................................................5458
Table 49-26. DMAENACLR Register Field Descriptions....................................................................................................... 5459
Table 49-27. DMAALTSET Register Field Descriptions.........................................................................................................5460
Table 49-28. DMAALTCLR Register Field Descriptions.........................................................................................................5461
Table 49-29. DMAPRIOSET Register Field Descriptions...................................................................................................... 5462
Table 49-30. DMAPRIOCLR Register Field Descriptions...................................................................................................... 5463
Table 49-31. DMAERRCLR Register Field Descriptions....................................................................................................... 5464
Table 49-32. DMACHMAP0 Register Field Descriptions....................................................................................................... 5465
Table 49-33. DMACHMAP1 Register Field Descriptions....................................................................................................... 5466
Table 49-34. DMACHMAP2 Register Field Descriptions....................................................................................................... 5467
Table 49-35. DMACHMAP3 Register Field Descriptions....................................................................................................... 5468
Table 49-36. DMAPeriphID4 Register Field Descriptions...................................................................................................... 5469
Table 49-37. DMAPeriphID0 Register Field Descriptions...................................................................................................... 5470
Table 49-38. DMAPeriphID1 Register Field Descriptions...................................................................................................... 5471
Table 49-39. DMAPeriphID2 Register Field Descriptions...................................................................................................... 5472
Table 49-40. DMAPeriphID3 Register Field Descriptions...................................................................................................... 5473
Table 49-41. DMAPCellID0 Register Field Descriptions........................................................................................................5474
Table 49-42. DMAPCellID1 Register Field Descriptions........................................................................................................5475
Table 49-43. DMAPCellID2 Register Field Descriptions........................................................................................................5476
Table 49-44. DMAPCellID3 Register Field Descriptions........................................................................................................5477
Table 49-45. UDMACHDES Registers...................................................................................................................................5478
Table 49-46. UDMACHDES Access Type Codes.................................................................................................................. 5478
Table 49-47. DMASRCENDP Register Field Descriptions.................................................................................................... 5479
Table 49-48. DMADSTENDP Register Field Descriptions.....................................................................................................5480
Table 49-49. DMACHCTL Register Field Descriptions.......................................................................................................... 5481
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 129
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Table of Contents www.ti.com
130 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Read This First
Preface
Read This First
Support Resources
TI E2E™ support forums are an engineer's go-to source for fast, verified answers and design help — straight
from the experts. Search existing answers or ask your own question to get the quick design help you need.
Linked content is provided "AS IS" by the respective contributors. They do not constitute TI specifications and do
not necessarily reflect TI's views; see TI's Terms of Use.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 131
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Read This First www.ti.com
Trademarks
TI E2E™, C2000™, Code Composer Studio™, and Texas Instruments™ are trademarks of Texas Instruments.
Xilinx™ is a trademark of Advanced Micro Devices, Inc.
USB Specification Revision 2.0™ is a trademark of Compaq Computer Corp.
EtherCAT® and Beckhoff ® are registered trademarks of Beckhoff Automation GmbH.
Arm®, Cortex®, and Arm7® are registered trademarks of Arm Limited (or its subsidiaries).
All trademarks are the property of their respective owners.
132 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ► C28x SYSTEM RESOURCES
Chapter 1
► C28x SYSTEM RESOURCES
The following chapters describe the C28x Configuration and System Resources.
1.1 Technical Reference Manual Overview
The block diagram for the F2838x device is shown in Figure 1-1. This Technical Reference Manual is organized
into five major sections:
• C28x SYSTEM RESOURCES
These chapters describe the C28x CPU subsystem, C28x Boot ROM, device configuration, and other system
peripherals.
• ANALOG PERIPHERALS
These chapters describe the Analog-to-Digital Converter (ADC), Buffered Digital-to-Analog Converter (DAC),
Comparator Subsystem (CMPSS), and general analog subsystem configuration.
• CONTROL PERIPHERALS
These chapters describe the Enhanced Capture (eCAP), High Resolution Capture (HRCAP), Enhanced
Pulse Width Modulator (ePWM), Enhanced Quadrature Encoder Pulse (eQEP), and Sigma Delta Filter
Module (SDFM) peripherals.
• COMMUNICATION PERIPHERALS
These chapters describe the communication peripherals available to the C28x subsystem such as the I2C,
SCI, FSI, McBSP, PMBUS, and SPI. The CAN, EtherCAT, and USB peripherals are also described in this
section and can be assigned to the CM subsystem.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 133
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
► C28x SYSTEM RESOURCES www.ti.com
CM Bus
Matrix
PF3 PF1 PF9 PF2 PF5 PF6 PF10 PF4 MUX MUX MUX MUX
Result 8x CMPSS 2x I2C 8x FSIRX EMIF1 EMIF2 8x CLB Data 2x CAN 1x USB 1x CAN FD 1x EtherCAT DMA
3x DAC 4x SCI 2x FSITX 169x GPIO (2 Ports) 1x Ethernet
4x ADC
(16-bit / 12-bit) 7x eCAP 2x McBSP INPUT XBAR 1x CM-I2C
(2 Hi-Res) 1x PMBUS OUTPUT XBAR 1x CM-UART
32x ePWM 4x SPI ePWM XBAR 1x SSI
Channels
CLB XBAR
(16 Hi-Res)
CLB INPUT XBAR
3x eQEP
8x SD Filters CLB OUTPUT XBAR
134 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C2000™ Microcontrollers Software Support
Chapter 2
C2000™ Microcontrollers Software Support
This chapter discusses the C2000Ware for the C2000™ microcontrollers. The C2000Ware can be downloaded
from: www.ti.com/tool/C2000WARE
2.1 Introduction...............................................................................................................................................................136
2.2 C2000Ware Structure............................................................................................................................................... 136
2.3 Documentation..........................................................................................................................................................136
2.4 Devices...................................................................................................................................................................... 136
2.5 Libraries.................................................................................................................................................................... 136
2.6 Code Composer Studio™ Integrated Development Environment (IDE)..............................................................136
2.7 SysConfig and PinMUX Tool....................................................................................................................................137
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 135
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C2000™ Microcontrollers Software Support www.ti.com
2.1 Introduction
C2000Ware for the C2000™ microcontrollers is a cohesive set of development software and documentation
designed to minimize software development time. From device-specific drivers and libraries to device peripheral
examples, C2000Ware provides a solid foundation to begin development and evaluation of your product.
C2000Ware can be downloaded from: www.ti.com/tool/C2000WARE
2.2 C2000Ware Structure
The C2000Ware software package is organized into the following directory structure as shown in Table 2-1.
Table 2-1. C2000Ware Root Directories
Directory Name Description
boards Contains the hardware design schematics, BOM, Gerber files, and documentation for C2000 controlCARDS.
device_support Contains all device-specific support files, bit field headers and device development user's guides.
docs Contains the C2000Ware package user's guides and the HTML index page of all package documentation.
driverlib Contains the device-specific driver library and driver-based peripheral examples.
libraries Contains the device-specific and core libraries.
2.3 Documentation
Within C2000Ware, there is an extensive amount of development documentation ranging from board design
documentation, to library user's guides, to driver API documentation. The "boards" directory contains all the
hardware design, BOM, Gerber files, and more for controlCARDs. To assist with locating the necessary
documentation, an HTML page is provided that contains a full list of all the documents in the C2000Ware
package. Locate this page in the "docs" directory.
2.4 Devices
C2000Ware contains the necessary software and documentation to jumpstart development for C2000™
microcontrollers. Each device includes device-specific common source files, peripheral example projects, bit
field headers, and if available, a device peripheral driver library. Additionally, documentation is provided for each
device on how to set up a CCS project, as well as give an overview of all the included example projects and
assist with troubleshooting. For devices with a driver library, documentation is also included that details all the
peripheral APIs available.
To learn more about C2000™ microcontrollers, visit: www.ti.com/c2000.
2.5 Libraries
The libraries included in C2000Ware range from fixed-point and floating-point math libraries, to specialized DSP
libraries, as well as calibration libraries. Each library includes documentation and examples, where applicable.
Additionally, the Flash API files and boot ROM source code are located in the "libraries" directory.
2.6 Code Composer Studio™ Integrated Development Environment (IDE)
Code Composer Studio™ is an integrated development environment (IDE) that supports TI's microcontroller and
embedded processors portfolio. The Code Composer Studio™ IDE comprises a suite of tools used to develop
and debug embedded applications. The latest version of Code Composer Studio™ IDE can be obtained at:
www.ti.com/ccstudio
All projects and examples in C2000Ware are built for and tested with the Code Composer Studio™ IDE.
Although the Code Composer Studio™ IDE is not included with the C2000Ware installer, Code Composer
Studio™ IDE is easily obtainable in a variety of versions.
136 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C2000™ Microcontrollers Software Support
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 137
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C2000™ Microcontrollers Software Support www.ti.com
138 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Chapter 3
C28x System Control and Interrupts
This chapter explains system control and interrupts for the C28x cores found on this MCU. The system control
module configures and manages the overall operation of the device, and provides information about the device
status. Configurable features in system control include reset control, NMI operation, peripheral interrupts, power
control, clock control, and low-power modes.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 139
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
Foundational Materials
• C2000 MCU JTAG Connectivity Debug Application Report
Expert Materials
• C2000 CPU Memory Built-In Self-Test Application Report
• C2000 Memory Power-On Self-Test (M-POST) Application Report
• Programming of External Nonvolatile Memory Using SDFlash for TMS320C28x Devices Application Report
• Software Phased-Locked Loop (PLL) Design Using C2000 Microcontrollers Application Report
140 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 141
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
3.3 Resets
This section explains the types and effects of the different resets on this device.
3.3.1 Reset Sources
Table 3-1 summarizes the various reset signals and their effect on the device. CM subsystem resets are
described in Section 41.2.
Table 3-1. Reset Signals
Reset Source CPU1 Core CPU1 CPU2 Core CPU2 and CPU2 and JTAG / IOs XRSn
Reset Peripheral Reset CM CM Held In Debug Output
(C28x, Reset (C28x, Peripheral Reset Logic Reset
TMU, FPU, TMU, FPU, Reset
VCRC) VCRC)
POR Yes Yes Yes Yes Yes Yes Hi-Z Yes
XRSn Pin Yes Yes Yes Yes Yes - Hi-Z -
CPU1.SIMRESET.XRSn Yes Yes Yes Yes Yes - Hi-Z Yes
CPU1.WDRS Yes Yes Yes Yes Yes - Hi-Z Yes
CPU1.NMIWDRS Yes Yes Yes Yes Yes - Hi-Z Yes
CPU1.SYSRS Yes Yes Yes Yes Yes - Hi-Z -
(Debugger Reset)
CPU1.SIMRESET.CPU1RSn Yes Yes Yes Yes Yes - Hi-Z -
CPU1.SCCRESET Yes Yes Yes Yes Yes - Hi-Z -
CPU1.HWBISTRS Yes - - - - - - -
CPU2.SYSRS - - Yes Yes - - - -
(Debugger Reset)
CPU2.WDRS - - Yes Yes - - - -
CPU2.NMIWDRS - - Yes Yes - - - -
CPU2.SCCRESET - - Yes Yes - - - -
CPU2.HWBISTRS - - Yes - - - - -
ECAT_RESET_OUT Yes Yes Yes Yes Yes - Hi-Z Yes
TRSTn - - - - - Yes - -
Note
After a reset, the reset cause register (RESC) is updated with the reset cause. The bits in this register
maintain their state across multiple resets. These can only be cleared by a power-on reset (POR) or
by writing 1 to the corresponding bit in RESCCLR register (status can be cleared by writing 1 to RESC
register bits also). Each CPU has a RESC register, referred to as CPU1.RESC and CPU2.RESC.
142 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
After a POR the boot ROMs clear all of the system and message RAMs on both CPUs.
3.3.2 External Reset (XRSn)
The external reset (XRS) is the main chip-level reset for the device. XRS resets both C28x CPUs , the CM
subsystem, all peripherals and I/O pin configurations, and most of the system control registers. XRS also holds
CPU2 and the CM subsystem in reset. There is a dedicated open-drain pin for XRSn. This pin can be used to
drive reset pins for other ICs in the application, and can be driven by an external source. The XRSn is driven
internally during watchdog, NMI, and power-on resets.
The XRSn bit in the RESC register is set whenever XRS is driven low for any reason. This bit is then cleared by
the boot ROM.
3.3.3 Simulate External Reset
In some cases, there can be a need to simulate the external reset (XRS) in software. This can be done by
setting XRSn bit to 1 in SIMRESET register by CPU1 software. This toggles XRS pin; hence, resets full device
(just like external reset).
After this reset SIMRESET_XRSn bit in the RESC register is set. Software can read this bit to know the cause of
reset and clear the status by writing 1 into corresponding bit in RESCCLR register.
3.3.4 Power-On Reset (POR)
The power-on reset (POR) circuit creates a clean reset throughout the device during power-up, suppressing
glitches on the GPIOs. The XRS pin is held low for the duration of the POR. In most applications, XRS is held
low long enough to reset other system ICs, but some applications may require a longer pulse. In these cases,
XRS can be driven low externally to provide the correct reset duration. A POR resets everything that XRS does,
along with a few other registers – the reset cause register (RESC), the NMI shadow flag register (NMISHDFLG).
After a POR, the POR and XRSn bits in RESC are set. These bits are then cleared by the boot ROM.
3.3.5 Debugger Reset (SYSRS)
During development, it is sometimes necessary to reset the CPU and the peripherals without disconnecting the
debugger or disrupting the system-level configuration. To facilitate this, each CPU has a subsystem reset, which
can be triggered by a debugger using Code Composer Studio IDE. CPU2 subsystem reset (CPU2.SYSRS)
resets only CPU2, the peripherals owned by it, clock gating and LPM configuration. It does not hold CPU2 in
reset. CPU1 subsystem reset (CPU1.SYSRS) resets CPU1, the peripherals owned by it, many system control
registers (including its clock gating and LPM configuration and the peripherals' CPU ownership), and all I/O pin
configurations. It also produces a CPU2.SYSRS and CM.RESETn and holds both, CPU2 and CM, in reset (CCS
Gel file has code to release CPU2 and CM out of reset on CPU1 debug reset).
Neither SYSRS resets the ICEPick debug module, the device capability registers, the clock source and PLL
configurations, the missing clock detection state, the PIE vector fetch error handler address, the NMI flags, the
analog trims, or anything reset only by a POR (see Section 3.3.4).
3.3.6 Simulate CPU1 Reset
In some cases, there can be a need to simulate the CPU1 reset (CPU1.SYSRS) in software. This can be done
by setting CPU1RSn bit to 1 in SIMRESET register by CPU1 software. This toggles CPU1.SYSRS signals;
hence, resetting CPU1 as well as CPU2 and CM subsystem (just like the debugger reset).
After this reset SIMRESET_CPU1RSn bit in the RESC register is set. Software can read this bit to know the
cause of reset and clear the status by writing 1 into corresponding bit in RESCCLR register.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 143
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
144 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 145
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
CM_STATUS
SYS_ERR
CPU1.CRC
CPU1.CLA1.CRC
CPU1.TINT0
CPU1.TIMER0
CPU1.LPMINT CPU1.NMIWD
LPM Logic CPU1.WAKEINT
CPU1.WD NMI
CPU1.WDINT CMNMIWDRSn CPU1
CPU1
ePIE
Peripherals
CPU2.NMIWD NMI
CPU2
CPU2.XINT1 Control
CPU2.XINT2 Control INT1
To
CPU2.XINT3 Control INT12
CPU2.XINT4 Control
CPU2.XINT5 Control CPU2
ePIE CPU2.TINT1
CPU2.LPMINT CPU2.TIMER1 INT13
LPM Logic CPU2.WAKEINT
CPU2.TINT2
CPU2.WD CPU2.TIMER2 INT14
CPU2.WDINT
CPU2.TINT0
CPU2.TIMER0
CPU2.CRC
CPU2.CLA1.CRC
SYS_ERR
146 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
PIEIERx.2
Peripheral 0 Set
PIEIFRx.2 1 PIEACK.x IER.x ST1.INTM
Interrupt
Latch 1 0 1
CPU
B 0 IFR.x 1 0
Interrupt
Latch
Logic
PIEIERx.16
0
Peripheral
PIEIFRx.16 1
Interrupt
Latch
P
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 147
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
When a peripheral generates an interrupt (on PIE group x, channel y), it triggers the following sequence of
events:
1. The interrupt is latched in PIEIFRx.y.
2. If PIEIERx.y is set, the interrupt propagates.
3. If PIEACK.x is clear, the interrupt propagates and PIEACK.x is set.
4. The interrupt is latched in IFR.x.
5. If IER.x is set, the interrupt propagates.
6. If INTM is clear, the CPU receives the interrupt.
7. Any instructions in the D2 or later stage of the pipeline are run to completion. Instructions in earlier stages
are flushed.
8. The CPU saves its context on the stack.
9. IFR.x and IER.x are cleared. INTM is set. EALLOW is cleared.
10. The CPU fetches the ISR vector from the PIE. PIEIFRx.y is cleared.
11. The CPU branches to the ISR.
The interrupt latency is the time between PIEIFRx.y latching the interrupt and the first ISR instruction entering
the execution stage of the CPU pipeline. The minimum interrupt latency is 14 SYSCLK cycles. Wait states on
the ISR or stack memories will add to the latency. External interrupts add a minimum of two SYSCLK cycles
for GPIO synchronization plus extra time for input qualification (if used). Loops created using the C28x RPT
instruction cannot be interrupted.
3.4.4 Configuring and Using Interrupts
At power-up, no interrupts are enabled by default. The PIEIER and IER registers are cleared and INTM is set.
The application code is responsible for configuring and enabling all peripheral interrupts.
3.4.4.1 Enabling Interrupts
To enable a peripheral interrupt, perform the following steps:
1. Disable interrupts globally (DINT or SETC INTM).
2. Enable the PIE by setting the ENPIE bit of the PIECTRL register.
3. Write the ISR vector for each interrupt to the appropriate location in the PIE vector table, which is found in
Table 3-2.
4. Set the appropriate PIEIERx bit for each interrupt. The PIE group and channel assignments are found in
Table 3-2.
5. Set the CPU IER bit for any PIE group containing enabled interrupts.
6. Enable the interrupt in the peripheral.
7. Enable interrupts globally (EINT or CLRC INTM).
Step 4 does not apply to the Timer1 and Timer2 interrupts, which connect directly to the CPU.
3.4.4.2 Handling Interrupts
ISRs are similar to normal functions, but must do the following:
1. Save and restore the state of certain CPU registers (if used).
2. Clear the PIEACK bit for the interrupt group.
3. Return using the IRET instruction.
Requirements 1 and 3 are handled automatically by the TMS320C28x C compiler if the function is defined
using the __interrupt keyword. For information on this keyword, see the Keywords section of the TMS320C28x
Optimizing C/C++ Compiler v6.2.4 User's Guide. For information on writing assembly code to handle interrupts,
see the Standard Operation for Maskable Interrupts section of the TMS320C28x CPU and Instruction Set
Reference Guide.
The PIEACK bit for the interrupt group must be cleared manually in user code. This is normally done at the end
of the ISR. If the PIEACK bit is not cleared, the CPU will not receive any further interrupts from that group. This
does not apply to the Timer1 and Timer2 interrupts, which do not go through the PIE.
148 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 149
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
Note
Cells marked "-" are Reserved. CPUx is CPU1 for CPU1 PIE and CPU2 for CPU2 PIE.
150 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 151
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
152 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 153
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
154 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 155
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
156 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 157
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
158 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
CPU Suspended: When the CPU is suspended, the NMI watchdog counter is suspended.
Run-Free Mode: When the CPU is placed in run-free mode, the NMI watchdog counter resumes
operation as normal.
Real-Time Single-Step Mode: When the CPU is in real-time single-step mode, the NMI watchdog counter is
suspended. The counter remains suspended even within real-time interrupts.
Real-Time Run-Free Mode: When the CPU is in real-time run-free mode, the NMI watchdog counter
operates as normal.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 159
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
Note
A RAM fetch access violation will trigger an ITRAP in addition to the normal peripheral interrupt for
RAM access violations. The CPU will handle the ITRAP first.
160 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
(1) The EALLOW bit is overridden via the JTAG port, allowing full access of protected registers during debug from the Code Composer
Studio IDE.
At reset, the EALLOW bit is cleared, enabling EALLOW protection. While protected, all writes to protected
registers by the CPU are ignored and only CPU reads, JTAG reads, and JTAG writes are allowed. If this bit
is set, by executing the EALLOW instruction, the CPU is allowed to write freely to protected registers. After
modifying registers, the registers can once again be protected by executing the EDIS instruction to clear the
EALLOW bit.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 161
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
162 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
CPU1.NMIWD.NMISHDFLG.Bit-0
CPU1.NMIWD.NMISHDFLG.Bit-1
CPU1.NMIWD.NMISHDFLG.Bit-15
CPU2.NMIWD.NMISHDFLG.Bit-0
CPU2.NMIWD.NMISHDFLG.Bit-1
CPU2.NMIWD.NMISHDFLG.Bit-15
3.7 Clocking
This section explains the clock sources and clock domains on this device, and how to configure them for
application use. Figure 3-5 provides an overview of the device's clocking system.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 163
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
PLLCLKEN AUXPLLDIV
AUXOSCCLKSRCSEL
SYS
SYS PLL PLLRAWCLK Divider
AUXPLLRAWCLK
USBBITCLK
CMPCLKCRx.PERx
PLLSYSCLK CMDIVSRCSEL
WDCLK
CMCLK CMCLK
DIVSRCSEL
DIVIDER
NMIWDs
Watch Dog GSx RAMs
Timers GPIOs CPU1 CPU2 ETHERCATCLK
MSG RAMs CM.PERx.SYSCLK
IPC
XBARs ECATDIV ETHERCATCLK
CPU2.CPUCLK Divider
AnalogSubsys
SystemControl CM.PERx.SYSCLK
EMIF1 FPU
CPU1.CPUCLK TMU PHYCLKEN
VCRC
CPU1.SYSCLK Flash
FPU
DCSM /4
TMU
CPU2.SYSCLK MxRAM
VCRC CPUTIMERx DxRAM ETHERCAT PALLOCATE0
Flash DMA ETHERCATPHYCLK
CPU1.PERx.SYSCLK
CPUTIMERx BootROM .USB
DCSM CLA1
DMA HWBIST
HWBIST XINT CPU1.PCLKCRx
CLA1 USB
PIE
XINT
LSx RAM
PIE
MSG RAMs CPU1/CPU2/CM
LSx RAM
MxRAM .PERx.SYSCLK
MSG RAMs
DxRAM CPU2.PCLKCRx
BGCRC
BootROM
ERAD CPU2.PERx.SYSCLK
BGCRC
ERAD CANx
EMIF2 PALLOCATE0.CANx
WD
CPUSELx.CANx
CPU1.SYSCLK
CPU2.SYSCLK
X1 (XTAL)
One per SYSCLK peripheral
CPU2.PCLKCRx CPUSELx AUXCLKIN
One per LSPCLK peripheral
CANxBITCLK
CPUSELx CPU1.PCLKCRx
CANxBIT Clock
LSP CPU1.PCLKCRx
LSPCLKDIV PERx.SYSCLK
Divider
PLLSYSCLK
CPU2.PCLKCRx
PERx.SYSCLK
EPWMCLKDIV
/1 HRCAL
PERx.LSPCLK ECAPx
/2
EQEPx
One per ePWM peripheral SDFMx
McBSPx Bit CPU1.PCLKCRx SPIx
SPIx Bit Clock SCIx Bit Clock CPUSELx
Clock SCIx
McBSPx
EPWMCLK ADC
CMPSSx
DACx
CPU2.PCLKCRx ePWM FSIx
HRPWM I2C
HRCAL PMBUS
CPU1.PCLKCRx DCCx
HRCALCLK
CLB
CLB TILEx
CLBCLK TILECLK Clock
AUX PLL Divider
Divider
CLBCLKCTL.CLKMODECLBx
CLBx Register
Clock
164 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Note
INTOSC2's frequency tolerance is too loose to meet the timing requirements for some peripherals
such as CAN and USB, so an external clock must be used to support those features.
VDDOSC X1 VSSOSC X2
3.3V NC
3.3V
Clk
VDD OUT
GND
3.3V Oscillator
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 165
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
• An external crystal. The crystal should be connected across X1 and X2 with its load capacitors connected to
VSSOSC as shown in Figure 3-7.
VDDOSC X1 VSSOSC X2
3.3V
Crystal
RD CL2 CL1
• An external resonator. The resonator should be connected across X1 and X2 with its ground connected to
VSSOSC as shown in Figure 3-8.
VDDOSC X1 VSSOSC X2
3.3V
Resonator
166 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Device
GPIO133_AUXCLKIN
CLK
3.3V
VDD OUT
GND
3.3V OSCILLATOR
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 167
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
Note
Application needs to wait for 5 SYSCLK cycles after enabling clock to the peripherals when using
PCLKCRx.
168 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 169
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
170 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
3.7.6 PLL/AUXPLL
The PLL/AUXPLL is responsible for synthesizing an output frequency from the input clock (from the oscillator);
Figure 3-10 shows a simple block diagram of the PLL/AUXPLL. The PLL/AUXPLL divides the reference input
for a lower frequency input into the PLL/AUXPLL by (REFDIV+1). Then multiplies this internal frequency by
IMULT to get the VCO output clock. The PLL/AUXPLL output is divided by (ODIV+1) to generate PLLRAWCLK/
AUXPLLRAWCLK which is further divided by SYSCLKDIVSEL.PLLSYSCLKDIV/AUXCLKDIVSEL.AUXPLLDIV
to generate PLLSYSCLK/AUXCLK
SYSPLL / AUXPLL
÷
IMULT
B15%%.- +/7.6
fPLLRAWCLK = ×
(4'(&+8 +1) (1&+8 +1)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 171
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
Note
The system clock frequency (PLLSYSCLK) may not exceed the limit specified in the datasheet. This
limit does not allow for oscillator tolerance.
The clock source and PLL configuration registers are shared between the two CPUs (CPU1 and CPU2).
Register access is controlled by way of a semaphore, which is described in the Interprocessor Communication
(IPC) chapter.
3.7.6.2 System Clock Setup
Once the application requirements are understood, a specific clock configuration can be determined. The default
configuration is for INTOSC2 to be used as the system clock (PLLSYSCLK) with a divider of 1. The following
procedure should be used to set up the desired application configuration:
Refer to your device SysCtl_setClock() function inside C2000Ware installation for an example.
Recommended sequence to set up the system PLL:
1. Bypass the PLL by clearing SYSPLLCTL1[PLLCLKEN] and wait for at least 120 CPU clock cycles by adding
120 NOP instructions.
2. Power down the PLL by writing to SYSPLLCTL1.PLLEN = 0 and wait for at least 60 CPU clock cycles by
adding 60 NOP instructions.
3. Select the reference clock source (OSCCLK) by writing to CLKSRCCTL1.OSCCLKSRCSEL and wait for at
least 300 CPU clock cycles by adding 300 NOP instructions.
4. Set the system clock divider to "/1" to ensure the fastest PLL configuration by clearing
SYSCLKDIVSEL[ PLLSYSCLKDIV].
5. Set the IMULT, REFDIV & ODIV simultaneously by writing 32-bit value in SYSPLLMULT at once. This will
automatically enable the PLL. Be sure the settings for multiplier and dividers do not violate the frequency
specifications as defined in the data sheet.
6. Wait for PLL to lock by polling for lock status bit to go high, that is, SYSPLLSTS.LOCKS = 1
7. Configure DCC with reference clock as OSCCLK and clock under measurement as PLLRAWCLK, and verify
the frequency of the PLL. If the frequency is out of range, do not enable PLLRAWCLK as SYSCLK, stop
here and troubleshoot. Refer to DCC chapter for more information on its configuration and usage.
8. If the PLLRAWCLK is within the valid range, then set the system clock divider one setting higher than the
final desired value. For example ClkCfgRegs.SYSCLKDIVSEL.bit.PLLSYSCLKDIV = divsel + 1. This limits
the current increase when switching to the PLL.
9. Switch to the PLL as the system clock by setting SYSPLLCTL1[PLLCLKEN] and wait for 200 PLLSYSCLK
cycles for current to stabilize by adding 200 NOP instructions.
10. Change the system clock divider (PLLSYSCLKDIV) to the appropriate value.
172 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Note
1. SYSPLL must be bypassed and powered down manually before changing the OSCCLK source.
2. At least 120 CPU clock cycles delay is needed after bypassing PLL, that is,
SYSPLLCTL1.PLLCLKEN=0.
3. At least 60 CPU clock cycles delay is needed after PLL is powered down, that is,
SYSPLLCTL1.PLLEN=0.
4. At least 300 CPU clock cycles delay is needed after OSSCLK source is changed.
5. PLL SLIP bit is not supported. DCC should be used to check the validity of the PLL clock. This
feature is included as part of SysCtl_setClock() function inside C2000Ware.
Note
1. AUXPLL must be bypassed and powered down manually before changing the AUXOSCCLK
source.
2. At least 120 CPU clock cycles delay is needed after bypassing PLL, that is,
AUXPLLCTL1.PLLCLKEN = 0.
3. At least 60 CPU clock cycles delay is needed after PLL is powered down, that is,
AUXPLLCTL1.PLLEN = 0.
4. At least 60 CPU clock cycles delay is needed after AUXOSSCLK source is changed.
5. AUXPLL SLIP bit is not supported. DCC should be used to check the validity of the AUXPLL
clock. This feature is included as part of SysCtl_setAuxClock() function inside C2000Ware.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 173
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
174 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
CLKSRCCTL1.OSCCLRSRCSEL /1,
Switch
SYSPLL /2,
Ckt
/4
Mux
PLLRAWCLK ..
(glitch- PLLSYSCLK
/124
PLL Locking free)
/126
Registers Control
Ckt
Clock Dividers
Note
On a complete clock failure when OSCCLK is dead, it may take a maximum time of 8192 INTOSC1
cycles (that is, 0.8192 ms) before CLOCKFAIL signal goes high, after which:
• NMI is generated
• OSCCLK is switched to INTOSC1
• PWM Trip happens
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 175
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
00 or 11 Either CPU writes to the semaphore. CPU1 has control of the clock configuration registers by
default. 00 is the reset state.
01 CPU2 has exclusive control of the clock configuration registers and exclusive write access to
the semaphore.
10 CPU1 has exclusive control of the clock configuration registers and exclusive write access to
the semaphore.
Each CPU is only allowed to take control of the clock configuration registers for itself. However, CPU1 can force
both semaphores into the default state (00) at any time by putting CPU2 into reset. Figure 3-12 shows the
allowed states and state transitions.
CPU1 should write 10 to gain CPU2 should write 01 to gain
mastership of the clock configuration Semaphore state 00 or 11 mastership of the clock configuration
registers. registers.
Clock configuration registers
are controlled by CPU1
CPU1 should write 00 to relinquish
Default at reset CPU2 should write 00 to relinquish
mastership once configuration is
mastership once configuration is
complete.
complete.
CPU2 cannot take control of the pump in this CPU1 cannot take control of the pump in this
state state
176 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Reset
Timer reload
Borrow
TINT
INT1 TINT0
to PIE TIMER0
INT12
28x
CPU
TINT1
INT13 TIMER1
TINT2
INT14 TIMER2
A. The timer registers are connected to the memory bus of the C28x processor.
B. The CPU Timers are synchronized to SYSCLKOUT.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 177
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
WDCNTR
WDCLK 8-bit
(INTOSC1) WDCLK Watchdog Watchdog Overflow 1-count
Divider Prescaler Counter delay
SYSRSn
Clear
Count
WDWCR.MIN
WDKEY (7:0)
Out of Window Watchdog
Watchdog Good Key
Window
Key Detector Detector
WDCR(WDCHK(2:0))
55 + AA
Bad Key
WDRSTn Generate
1 0 1 512-WDCLK Watchdog Time-out
WDINTn Output Pulse
SCSR.WDENINT
178 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Step 3 in Table 3-8 is the first action that enables the WDCNTR to be reset. The WDCNTR is not actually reset
until step 6. Step 8 again re-enables the WDCNTR to be reset and step 9 resets the WDCNTR. Step 10 again
re-enables the WDCNTR to be reset. Writing the wrong key value to the WDKEY in step 11 causes no action,
however the WDCNTR is no longer enabled to be reset and the 0xAA in step 12 now has no effect.
If the watchdog is configured to reset the device, then a WDCNTR overflow or writing the incorrect value to the
WDCR[WDCHK] bits resets the device and sets the watchdog flag (WDRSn) in the reset cause register (RESC).
After a reset, the program can read the state of this flag to determine whether the reset was caused by the
watchdog. After doing this, the program must clear WDRSn to allow subsequent watchdog resets to be detected.
Watchdog resets are not prevented when the flag is set.
3.10.2 Minimum Window Check
To complement the timeout mechanism, the watchdog also contains an optional "windowing" feature that
requires a minimum delay between counter resets. This can help protect against error conditions that bypass
large parts of the normal program flow but still include watchdog handling.
To set the window minimum, write the desired minimum watchdog count to the WDWCR register. This value will
take effect after the next WDKEY sequence. From then on, any attempt to service the watchdog when WDCNTR
is less than WDWCR will trigger a watchdog interrupt or reset. When WDCNTR is greater than or equal to
WDWCR, the watchdog can be serviced normally.
At reset, the window minimum is zero, which disables the windowing feature.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 179
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
CPU Suspended: When the CPU is suspended, the watchdog clock (WDCLK) is suspended
Run-Free Mode: When the CPU is placed in run-free mode, then the watchdog module resumes
operation as normal.
Real-Time Single-Step Mode: When the CPU is in real-time single-step mode, the watchdog clock (WDCLK)
is suspended. The watchdog remains suspended even within real-time
interrupts.
Real-Time Run-Free Mode: When the CPU is in real-time run-free mode, the watchdog operates as normal.
180 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 181
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
The CPU is now out of STANDBY mode and can resume normal execution.
If CPU2 is in STANDBY mode, writing a 1 to the RESET bit of the CPU2RESCTL register has no effect. CPU2
can be reset by any chip-level reset (POR, XRSn, CPU1.WDRSn, or CPU1.NMIWDRSn). Alternately, CPU2 can
be woken up by any configured wake-up event.
If CPU2 is in STANDBY mode and the debugger is connected, executing a debug reset on CPU2 has no effect.
To wake up the CPU2 with the debugger, Click Run, Single Step, or Step over in the Debug toolbar. CCS IDE
prompts the user requesting to bring the CPU out of the low-power mode. Click Yes. This wakes up CPU2 from
STANDBY and continues execution.
3.12 Memory Controller Module
This device has CPU1 subsystem, CPU2 subsystem, and CM subsystem. This section describes the memory
controller used for CPU1 and CPU2 subsystem.
The different RAMs available on CPU1 and CPU2 subsystem have different characteristics. Some are:
• Dedicated to each CPU (M0, M1, and Dx RAMs),
• Shared between the CPU and a CLA (LSx RAM),
• Shared between the CPU and DMA of both subsystems (GSx RAM), and
• Used to send and receive messages between processors (MSGRAM).
• Used to exchange data between CLA and DMA
All these RAMs are highly configurable to achieve control for write access and fetch access from different
masters. There are also RAMs - called IPC MSGRAMs - that are used for interprocessor communication. All
RAMs are enabled with the ECC or parity feature (both data and address). Some of the dedicated memories
are secure memory as well. Refer to Chapter 6 for more details. Each RAM has a controller that takes care
of the access protection/security related checks and ECC/Parity features for that RAM. Figure 3-16 shows the
configuration of these RAMs.
CPU1 To CPU2 To
CPU1 CLA1 CPU1 CLA1 CPU2 CLA1 CPU2 CLA1
MSGRAM MSGRAM
CPU1 TO CPU2
MSGRAM
CPU1 Dx RAM CPU2 Dx RAM
Note
All RAMs on these devices are SRAMs.
182 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 183
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
Note
Emulation/Debugger access is allowed from both the CPUs, irrespective of the GSxMSEL setting.
Like other shared RAMs, these RAMs also have different levels of access protection that can be enabled or
disabled by configuring specific bits in the GSxACCPROT registers mapped in each subsystem.
Master select and access protection configuration for each GSx RAM block can be individually locked by the
user to prevent further update to these bit fields. The user can also choose to permanently lock the configuration
to individual bit fields by setting the specific bit fields in the GSxCOMMIT register (refer to the register description
for more details). Once configuration is committed for a particular GSx RAM block, it can not be changed further
until CPUx.SYSRS is issued. Only the CPU1 software can change the master select configuration by writing
into the GSxMSEL register, mapped on the CPU1. The GSxMSEL register, which is mapped to the CPU2
subsystem, is a status register that can only be used by CPU2 software to know the master ownership for each
GSx RAM block.
3.12.1.4 CPU Message RAM (CPU MSG RAM)
These RAM blocks can be used to share data between CPU1 and CPU2. Since these RAMs are used for
interprocessor communication, they are also called IPC RAMs. The CPU MSGRAMs have CPU and DMA
read and write access from its own CPU subsystem, and has CPU and DMA read only access from the other
subsystem.
This RAM has parity.
3.12.1.5 CLA Message RAM (CLA MSGRAM)
These RAM blocks can be used to share data between the CPU and CLA. The CLA has read and write access
to the "CLA to CPU MSGRAM." The CPU has read and write access to the "CPU to CLA MSGRAM." The CPU
and CLA both have read access to both MSGRAMs.
This RAM has parity.
3.12.1.6 CLA-DMA MSG RAM
These RAMs blocks can be used to share data between CLA and DMA. The CLA has read and write access to
the "CLA to DMA MSGRAM." The DMA has read and write access to the "DMA to CLA MSGRAM." The CLA
and DMA both have read access to both MSGRAMs.
3.12.1.7 Access Arbitration
For a shared RAM, multiple accesses can happen at a given time. The maximum number of accesses to any
shared RAM at any given time depends on the type of shared RAM. On this device, a combination of a fixed and
round robin scheme is followed to arbitrate multiple access at any given time. Accesses from the same masters
are arbitrated in a fixed priority manner, but the accesses from different masters are arbitrated using the round
robin scheme.
The following is the order of fixed priority for CPU accesses:
1. Data Write/Program Write
2. Data Read
3. Program Read/Program Fetch
The following is the order of fixed priority for CLA accesses:
1. Data Write
2. Data Read/Program Fetch
Figure 3-17 represents the arbitration scheme on global shared memories:
184 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
CPU1.DMA READ/WRITE
RR-CPU2.DMA RR-CPU1.DMA
CPU2-DWRITE
CPU2
CPU2-DREAD Fixed Granted CPU2 Access
Priority
CPU2-PREAD/FETCH Arbiter
RR-CPU2
CPU2.DMA READ/WRITE
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 185
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
186 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Note 1: All access protections are ignored during debug accesses. Write access to a protected
memory go through when the write access is done by way of the debugger, irrespective of
the write protection configuration for that memory.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 187
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
Note 2: In the case of local shared RAM, if memory is shared between the CPU and the CLA, the
CPU only has access if the memory is configured as data RAM for the CLA. If the memory
is programmed as program RAM, all the access from the CPU (including read) and data
access from the CLA is blocked, and the violation is considered as a non-master access
violation. If the memory is configured as dedicated to the CPU, all access from the CLA is
blocked and the violation is considered a non-master access violation.
Note
ECC/Parity for address is calculated for address offset only (based on RAM block size) of
corresponding 32-bit aligned address. In case of LSx RAM which are 4KB RAM block, only 11 LSB of
32-bit aligned address are used. So if address is 0x8F8F, address ECC (or Parity) will be calculated
for address 0x78E (11-bit offset of 32-bit aligned address). Similarly for 8KB RAM block,12-bit address
offset will be used.
188 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Note
In the case of an uncorrectable error during fetch on the CPU, there is the possibility of getting an
ITRAP before an NMI exception, since garbage instructions enter into the CPU pipeline before the
NMI gets generated.
During debug accesses, correctable as well as uncorrectable errors are masked.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 189
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
Note
The memory-map for ECC/Parity bits and data bits are the same. Choose a different test mode (10) to
access ECC/Parity bits.
The following tables show the bit mapping for the ECC and Parity bits when the bits are read in RAMTEST mode
using their respective addresses.
Table 3-12. Mapping of ECC Bits in Read Data from ECC/Parity Address Map
Data Bits Location in Read Data Content (ECC Memory)
6:0 ECC Code for lower 16 bits of data
7 Not Used
14:8 ECC Code for upper 16 bits of data
15 Not Used
22:16 ECC Code for address
31:23 Not Used
Table 3-13. Mapping of Parity Bits in Read Data from ECC/Parity Address Map
Data Bits Location in Read Data Content (Parity Memory)
0 Parity for lower 16 bits of data
7:1 Not Used
8 Parity for upper 16 bits of data
15:9 Not Used
16 Parity for address
31:17 Not Used
Following is the sequence that must be followed to test the ecc/parity logic.
• Set the test mode to 01 or 10, depending on whether data field or ecc/parity field needs to be written.
• Write the data pattern into the memory.
• Set the test mode to 11 to read from memory and exercise the ecc/parity logic.
• Check the test log registers to verify the correctness of the logic.
• The above sequence can be repeated for any number of data patterns.
• Once the test is complete, re-initialize the locations used in test, and set the test mode to 00 that changes the
RAM block back into functional mode.
190 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Addr Parity Checker Addr Parity Checker Data[31:16] Parity Data[31:16] Parity Data[15:0] Parity Data[15:0] Parity
2 1 Checker 2 Checker 1 Checker 2 Checker 1
Parity Error Parity Error Parity Error Parity Error Parity Error Parity Error
p1
p1 p3 p5 p3
0
p5
p2 Uncorrectable error
p2 p4 p6 p4
1
p6
ForceError
Note
The INIT bit must not be set again until the INITDONE bit for the corresponding RAM block has been
polled to be set.
None of the masters must access the memory while initialization is taking place. If memory is
accessed before RAMINITDONE is set, the memory read/write as well as initialization does not
happen correctly.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 191
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
3.13 JTAG
Gel files perform certain initialization tasks. This helps the users in a debug environment. However, when
executed standalone (without the emulator connected) the application could potentially not work as expected,
since there is no gel file to perform those initializations. For example, gel file disables watchdog. If user code
does not service the watchdog in the application (or fails to disable the watchdog), there would be a difference in
how the application behaves with the debugger and without the debugger.
Common tasks performed by the gel files (but not boot-ROM):
• On Reset:
– Disable Flash ECC on some devices.
• Disabling ECC only when using Flash API functions, see the Flash API User Guide for details.
Otherwise, TI suggests to always program ECC and enable ECC-check.
– Disable Watchdog
– Enable CLA clock
– Select real-time mode or C28x mode
• On Restart:
– Select real-time mode or C28x mode
– Clear IER and IFR
• On Target Connect:
– Select real-time mode or C28x mode
192 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 193
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
3.15 Software
3.15.1 SYSCTL Examples
NOTE: These examples are located in the C2000Ware installation at the following location:
C2000Ware_VERSION#/driverlib/DEVICE_GPN/examples/CORE_IF_MULTICORE/sysctl
Cloud access to these examples is available at the following link: dev.ti.com C2000Ware Examples.
3.15.1.1 Missing clock detection (MCD)
FILE: sysctl_ex1_missing_clock_detection.c
This example demonstrates the missing clock detection functionality and the way to handle it. Once the MCD is
simulated by disconnecting the OSCCLK to the MCD module an NMI would be generated. This NMI determines
that an MCD was generated due to a clock failure which is handled in the ISR.
Before an MCD the clock frequency would be as per device initialization (200Mhz). Post MCD the frequency
would move to 10Mhz or INTOSC1.
The example also shows how we can lock the PLL after missing clock, detection, by first explicitly switching the
clock source to INTOSC1, resetting the missing clock detect circuit and then re-locking the PLL. Post a re-lock
the clock frequency would be 200Mhz but using the INTOSC1 as clock source.
External Connections
• None.
Watch Variables
• fail - Indicates that a missing clock was either not detected or was not handled correctly.
• mcd_clkfail_isr - Indicates that the missing clock failure caused an NMI to be triggered and called an the ISR
to handle it.
• mcd_detect - Indicates that a missing clock was detected.
• result - Status of a successful handling of missing clock detection
3.15.1.2 XCLKOUT (External Clock Output) Configuration
FILE: sysctl_ex2_xclkout_config.c
This example demonstrates how to configure the XCLKOUT pin for observing internal clocks through an external
pin, for debugging and testing purposes.
In this example, we are using INTOSC1 as the XCLKOUT clock source and configuring the divider as 8.
Expected frequency of XCLKOUT = (INTOSC1 freq)/8 = 10/8 = 1.25MHz
View the XCLKOUT on GPIO73 using an oscilloscope.
3.15.2 MEMCFG Examples
NOTE: These examples are located in the C2000Ware installation at the following location:
C2000Ware_VERSION#/driverlib/DEVICE_GPN/examples/CORE_IF_MULTICORE/memcfg
Cloud access to these examples is available at the following link: dev.ti.com C2000Ware Examples.
3.15.2.1 Correctable & Uncorrectable Memory Error Handling
FILE: memcfg_ex1_error_handling.c
This example demonstrates error handling in case of various erroneous memory read/write operations.
Error handling in case of CPU read/write violations, correctable & uncorrectable memory errors has been
demonstrated. Correctable memory errors & violations can generate SYS_INT interrupt to CPU while
uncorrectable errors lead to NMI generation.
External Connections
• None
194 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Watch Variables
• testStatusGlobal - Equivalent to TEST_PASS if test finished correctly, else the value is set to TEST_FAIL
• errCountGlobal - Error counter
3.15.2.2 Shared RAM Management (CPU1) - C28X_DUAL
FILE: memcfg_ex1_ram_management_cpu1.c
This example shows how to assign shared RAM for use by both the CPU2 and CPU1 core. Shared RAM regions
are defined in both the CPU2 and CPU1 linker files. In this example GS0 and GS14 are assigned to/owned by
CPU2. The remaining shared RAM regions are owned by CPU1.
In this example, a pattern is written to cpu1RWArray and then an IPC flag is sent to notify CPU2 that data is
ready to be read. CPU2 then reads the data from cpu2RArray and writes a modified pattern to cpu2RWArray.
Once CPU2 acknowledges the IPC flag, CPU1 reads the data from cpu1RArray and compares with expected
result.
A timer ISR is also serviced in both CPUs. The ISRs are copied into the shared RAM region owned by the
respective CPUs. Each ISR toggles a GPIO. Watch the GPIOs on an oscilloscope, or if using the controlCARD,
watch LED1 and LED2 blink at different rates.
Following are the memory allocation details of CPU Timer interrupt ISRs & read(R)/read write(RW) arrays in
CPU1 & CPU2 as configured in the example.
• cpu1RWArray[] is mapped to shared RAM GS1
• cpu1RArray[] is mapped to shared RAM GS0
• cpu2RArray[] is mapped to shared RAM GS1
• cpu2RWArray[] is mapped to shared RAM GS0
• cpuTimer0ISR in CPU2 is copied to shared RAM GS14, toggles LED1
• cpuTimer0ISR in CPU1 is copied to shared RAM GS15, toggles LED2
Watch Variables
• error Indicates that the data written is not correctly received by the other CPU.
3.15.2.3 Shared RAM Management (CPU2) - C28X_DUAL
FILE: memcfg_ex1_ram_management_cpu2.c
This example shows how to assign shared RAM for use by both the CPU2 and CPU1 core. Shared RAM regions
are defined in both the CPU2 and CPU1 linker files. In this example GS0 and GS14 are assigned to/owned by
CPU2. The remaining shared RAM regions are owned by CPU1.
In this example, a pattern is written to cpu1RWArray and then an IPC flag is sent to notify CPU2 that data is
ready to be read. CPU2 then reads the data from cpu2RArray and writes a modified pattern to cpu2RWArray.
Once CPU2 acknowledges the IPC flag, CPU1 reads the data from cpu1RArray and compares with expected
result.
A timer ISR is also serviced in both CPUs. The ISRs are copied into the shared RAM region owned by the
respective CPUs. Each ISR toggles a GPIO. Watch the GPIOs on an oscilloscope, or if using the controlCARD,
watch LED1 and LED2 blink at different rates.
Following are the memory allocation details of CPU Timer interrupt ISRs & read(R)/read write(RW) arrays in
CPU1 & CPU2 as configured in the example.
• cpu1RWArray[] is mapped to shared RAM GS1
• cpu1RArray[] is mapped to shared RAM GS0
• cpu2RArray[] is mapped to shared RAM GS1
• cpu2RWArray[] is mapped to shared RAM GS0
• cpuTimer0ISR in CPU2 is copied to shared RAM GS14, toggles LED1
• cpuTimer0ISR in CPU1 is copied to shared RAM GS15, toggles LED2
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 195
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
196 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Following are the memory allocation details of CPU Timer interrupt ISRs & read(R)/read write(RW) arrays in
CPU1 & CPU2 as configured in the example.
• cpu1RWArray[] is mapped to shared RAM GS1
• cpu1RArray[] is mapped to shared RAM GS0
• cpu2RArray[] is mapped to shared RAM GS1
• cpu2RWArray[] is mapped to shared RAM GS0
• cpuTimer0ISR in CPU2 is copied to shared RAM GS14, toggles LED1
• cpuTimer0ISR in CPU1 is copied to shared RAM GS15, toggles LED2
3.15.3 NMI Examples
NOTE: These examples are located in the C2000Ware installation at the following location:
C2000Ware_VERSION#/driverlib/DEVICE_GPN/examples/CORE_IF_MULTICORE/nmi
Cloud access to these examples is available at the following link: dev.ti.com C2000Ware Examples.
3.15.3.1 NMI handling - C28X_DUAL
FILE: nmi_ex1_cpu1handling.c
This example demonstrates how to handle an NMI.
The watchdog of CPU2 is configured to reset the core once the watchdog overflows and in the CPU1 the NMI is
triggered. The NMI status is read and is verified to be due to CPU2 Watchdog reset. The NMI ISR reboots the
CPU2 core and the process is repeated.
Watch Variables
• nmi_isr_count Indicates the number of times the NMI ISR was hit because of CPU2 watchdog reset.
3.15.3.2 Watchdog Reset - C28X_DUAL
FILE: nmi_ex1_cpu2wdreset.c
This example shows how to configure the watchdog to reset CPU2 which will trigger an NMI in CPU1. LED1 is
toggled at the start of main indicating CPU reset.
External Connections
• None.
Watch Variables
• loopCount - The number of loops performed while not in ISR
3.15.3.3 NMI handling - C28X_DUAL
FILE: nmi_ex2_sysconfig_cpu1.c
This example demonstrates how to handle an NMI.
The watchdog of CPU2 is configured to reset the core once the watchdog overflows and in the CPU1 the NMI is
triggered. The NMI status is read and is verified to be due to CPU2 Watchdog reset. The NMI ISR reboots the
CPU2 core and the process is repeated.
Watch Variables
• nmi_isr_count Indicates the number of times the NMI ISR was hit because of CPU2 watchdog reset.
3.15.3.4 Watchdog Reset - C28X_DUAL
FILE: nmi_ex2_sysconfig_cpu2.c
This example shows how to configure the watchdog to reset CPU2 which will trigger an NMI in CPU1. LED1 is
toggled at the start of main indicating CPU reset.
External Connections
• None.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 197
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
Watch Variables
• loopCount - The number of loops performed while not in ISR
3.15.4 TIMER Examples
NOTE: These examples are located in the C2000Ware installation at the following location:
C2000Ware_VERSION#/driverlib/DEVICE_GPN/examples/CORE_IF_MULTICORE/timer
Cloud access to these examples is available at the following link: dev.ti.com C2000Ware Examples.
3.15.4.1 CPU Timers
FILE: timer_ex1_cputimers.c
This example configures CPU Timer0, 1, and 2 and increments a counter each time the timer asserts an
interrupt.
External Connections
• None
Watch Variables
• cpuTimer0IntCount
• cpuTimer1IntCount
• cpuTimer2IntCount
3.15.4.2 CPU Timers - CM
FILE: timer_ex1_cputimers.c
This example configures CPU Timer0, 1, and 2 and increments a counter each time the timer asserts an
interrupt.
Before running this example, please run the cm_common_config_c28x Example from the c28x folder. It will
initialize the clock and configure the GPIOs.
External Connections
• None
Watch Variables
• cpuTimer0IntCount
• cpuTimer1IntCount
• cpuTimer2IntCount
3.15.4.3 CPU Timers
FILE: timer_ex1_cputimers_sysconfig.c
This example configures CPU Timer0, 1, and 2 and increments a counter each time the timer asserts an
interrupt.
External Connections
• None
Watch Variables
• cpuTimer0IntCount
• cpuTimer1IntCount
• cpuTimer2IntCount
3.15.5 WATCHDOG Examples
NOTE: These examples are located in the C2000Ware installation at the following location:
C2000Ware_VERSION#/driverlib/DEVICE_GPN/examples/CORE_IF_MULTICORE/watchdog
Cloud access to these examples is available at the following link: dev.ti.com C2000Ware Examples.
198 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
3.15.5.1 Watchdog
FILE: watchdog_ex1_service.c
This example shows how to service the watchdog or generate a wakeup interrupt using the watchdog. By default
the example will generate a Wake interrupt. To service the watchdog and not generate the interrupt, uncomment
the SysCtl_serviceWatchdog() line in the main for loop.
External Connections
• None.
Watch Variables
• wakeCount - The number of times entered into the watchdog ISR
• loopCount - The number of loops performed while not in ISR
3.15.5.2 Windowed watchdog expiry with NMI handling - CM
FILE: watchdog_ex1_nmi_handling.c
This program demonstrates an NMI generation to the CM4 core when the Windowed watchdog ( WWD ) expires.
A delay is provided after enabling the WWD to make the watchdog count up from 0 to 0xFF. Once 0 is reached,
an NMI is triggered. Currently on triggering an NMI, a status flag is set indicating if the NMI was handled after the
WWD expired.
External Connections
• None
Watch Variables
• wdstatus - Indicates if the WWD caused an NMI on expiry.
• cmnmi - Indicates if the NMI was handled after the WWD expired
• fail - Status if the Windowed watchdog expired generating an NMI with proper NMI handling
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 199
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
ACCESS_PROTECTION ACCESSPROTECTION_
AccessProtectionRegs 0x0005_F500 YES YES - - YES
_REGS BASE
ClkCfgRegs CLK_CFG_REGS CLKCFG_BASE 0x0005_D200 YES YES - - YES
CmConfRegs CM_CONF_REGS CMCONF_BASE 0x0005_DC00 YES - - - YES
CpuIdRegs CPU_ID_REGS CPUID_BASE 0x0007_0223 YES YES - - -
CpuSysRegs CPU_SYS_REGS CPUSYS_BASE 0x0005_D300 YES YES - - YES
CpuTimer0Regs CPUTIMER_REGS CPUTIMER0_BASE 0x0000_0C00 YES YES - - -
CpuTimer1Regs CPUTIMER_REGS CPUTIMER1_BASE 0x0000_0C08 YES YES - - -
CpuTimer2Regs CPUTIMER_REGS CPUTIMER2_BASE 0x0000_0C10 YES YES - - -
DevCfgRegs DEV_CFG_REGS DEVCFG_BASE 0x0005_D000 YES - - - YES
DMA_CLA_SRC_SEL_R DMACLASRCSEL_BAS
DmaClaSrcSelRegs 0x0000_7980 YES YES - - YES
EGS E
MemCfgRegs MEM_CFG_REGS MEMCFG_BASE 0x0005_F400 YES YES - - YES
MEMORY_ERROR_RE MEMORYERROR_BAS
MemoryErrorRegs 0x0005_F540 YES YES - - YES
GS E
NmiIntruptRegs NMI_INTRUPT_REGS NMI_BASE 0x0000_7060 YES YES - - YES
PieCtrlRegs PIE_CTRL_REGS PIECTRL_BASE 0x0000_0CE0 YES YES - - -
PieVectTable PIE_VECT_TABLE PIEVECTTABLE_BASE 0x0000_0D00 YES YES - - -
ROM_PREFETCH_REG
RomPrefetchRegs ROMPREFETCH_BASE 0x0005_F588 YES YES - - YES
S
ROM_WAIT_STATE_RE
RomWaitStateRegs ROMWAITSTATE_BASE 0x0005_F580 YES YES - - YES
GS
SyncSocRegs SYNC_SOC_REGS SYNCSOC_BASE 0x0000_7940 YES - - - YES
CPU1_PERIPH_AC_RE
SysPeriphAcRegs PERIPHAC_BASE 0x0005_D500 YES - - - YES
GS
CPU2_PERIPH_AC_RE
SysPeriphAcRegs PERIPHAC_BASE 0x0005_D500 - YES - - YES
GS
SysStatusRegs SYS_STATUS_REGS SYSSTAT_BASE 0x0005_D400 YES YES - - YES
TestErrorRegs TEST_ERROR_REGS TESTERROR_BASE 0x0005_F590 YES YES - - YES
UidRegs UID_REGS UID_BASE 0x0007_0200 YES YES - - -
WdRegs WD_REGS WD_BASE 0x0000_7000 YES YES - - YES
XintRegs XINT_REGS XINT_BASE 0x0000_7070 YES YES - - YES
200 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-17 shows the codes that are used for
access types in this section.
Table 3-17. ACCESS_PROTECTION_REGS Access
Type Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
W1S W Write
1S 1 to set
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 201
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
202 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED DMAREAD RESERVED RESERVED
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
RESERVED CLA1FETCH CLA1WRITE CLA1READ DMAWRITE CPUFETCH CPUWRITE CPUREAD
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 203
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
204 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED DMAREAD RESERVED RESERVED
R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
7 6 5 4 3 2 1 0
RESERVED CLA1FETCH CLA1WRITE CLA1READ DMAWRITE CPUFETCH CPUWRITE CPUREAD
R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 205
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
206 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED DMAREAD RESERVED RESERVED
R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
7 6 5 4 3 2 1 0
RESERVED CLA1FETCH CLA1WRITE CLA1READ DMAWRITE CPUFETCH CPUWRITE CPUREAD
R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 207
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
208 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED DMAREAD RESERVED RESERVED
R-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED CLA1FETCH CLA1WRITE CLA1READ DMAWRITE CPUFETCH CPUWRITE CPUREAD
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 209
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
210 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 211
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
212 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 213
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
214 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 215
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
216 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 217
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED DMAWRITE CPUWRITE CPUFETCH
R-0h R-0h R-0h R-0h
218 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED DMAWRITE CPUWRITE CPUFETCH
R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 219
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED DMAWRITE CPUWRITE CPUFETCH
R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
220 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED DMAWRITE CPUWRITE CPUFETCH
R-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 221
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
222 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 223
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
224 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-38 shows the codes that are used for
access types in this section.
Table 3-38. CLK_CFG_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
W1S W Write
1S 1 to set
WSonce W Write
Sonce Set once
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 225
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
226 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED SEM
R-0-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 227
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED CMCLKCTL ETHERCATCL XTALCR
KCTL
R-0-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
15 14 13 12 11 10 9 8
LOSPCP CLBCLKCTL PERCLKDIVSE AUXCLKDIVSE SYSCLKDIVSE AUXPLLMULT RESERVED RESERVED
L L L
R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R-0-0h R-0-0h
7 6 5 4 3 2 1 0
AUXPLLCTL1 SYSPLLMULT SYSPLLCTL3 SYSPLLCTL2 SYSPLLCTL1 CLKSRCCTL3 CLKSRCCTL2 CLKSRCCTL1
R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
228 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 229
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
230 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED XTALOFF INTOSC2OFF_ RESERVED OSCCLKSRCSEL
NOTSUPPORT
ED
R-0-0h R/W-0h R/W-0h R/W-0h R-0-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 231
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
232 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED MCANABITCLKSEL RESERVED
R-0-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED CANBBCLKSEL CANABCLKSEL AUXOSCCLKSRCSEL
R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 233
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
234 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED XCLKOUTSEL
R-0-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 235
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED RESERVED PLLCLKEN PLLEN
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
236 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED ODIV
R-0-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED RESERVED
R-0-0h R/W-0h R-0-0h R/W-0h
7 6 5 4 3 2 1 0
IMULT
R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 237
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
238 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED SLIPS_NOTSU LOCKS
PPORTED
R-0-0h R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 239
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED RESERVED PLLCLKEN PLLEN
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
240 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED ODIV
R-0-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED RESERVED
R-0-0h R/W-0h R-0-0h R/W-0h
7 6 5 4 3 2 1 0
IMULT
R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 241
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
242 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED SLIPS_NOTSU LOCKS
PPORTED
R-0-0h R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 243
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED PLLSYSCLKDIV
R-0-0h R/W-0h
244 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED MCANCLKDIV RESERVED AUXPLLDIV
R-0-0h R/W-13h R-0-0h R/W-1h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 245
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED EMIF2CLKDIV RESERVED EMIF1CLKDIV RESERVED EPWMCLKDIV
R-0-0h R/W-1h R-0-0h R/W-1h R/W-0h R/W-1h
246 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED XCLKOUTDIV
R-0-0h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 247
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
CLKMODECLB CLKMODECLB CLKMODECLB CLKMODECLB CLKMODECLB CLKMODECLB CLKMODECLB CLKMODECLB
8 7 6 5 4 3 2 1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED TILECLKDIV RESERVED CLBCLKDIV
R-0-0h R/W-0h R-0-0h R/W-7h
248 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 249
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED LSPCLKDIV
R-0-0h R/W-2h
250 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED OSCOFF MCLKOFF MCLKCLR MCLKSTS
R-0-0h R/W-0h R/W-0h R-0/W1S-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 251
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED X1CNT
R-0-0h R-0h
252 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED SE OSCOFF
R-0-0h R/W-1h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 253
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED PHYCLKEN
R-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED ECATDIV DIVSRCSEL
R-0-0h R/W-7h R/W-0h
254 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
ETHDIV ETHDIVSRCSE CMCLKDIV CMDIVSRCSEL
L
R/W-7h R/W-0h R/W-3h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 255
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 3-62 shows the codes that are used for
access types in this section.
Table 3-62. CM_CONF_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
WSonce W Write
Sonce Set once
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
256 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
KEY
R-0/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED RESETSTS RESET
R-0h R-0h R/W-1h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 257
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED CMNMIWDRST RESERVED RESERVED
R-0h R/W-0h R/W-0h R/W-0h
258 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED CMNMIWDRST SYSRESETRE VECTRESET
Q
R-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 259
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED MCAN_A CAN_B CAN_A ETHERCAT USB_A
R-0h R/W-1h R/W-0h R/W-0h R/W-0h R/W-0h
260 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 261
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED LOCK
R-0h R/WSonce-0h
262 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-69 shows the codes that are used for
access types in this section.
Table 3-69. CPU_SYS_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 263
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
264 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
GPIOLPMSEL1 GPIOLPMSEL0 LPMCR RESERVED PCLKCR16 RESERVED PCLKCR14 PCLKCR13
R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
15 14 13 12 11 10 9 8
RESERVED PCLKCR11 PCLKCR10 PCLKCR9 PCLKCR8 PCLKCR7 PCLKCR6 RESERVED
R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
7 6 5 4 3 2 1 0
PCLKCR4 PCLKCR3 PCLKCR2 PCLKCR1 PCLKCR0 PIEVERRADDR RESERVED RESERVED
R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 265
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
266 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 267
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED ETHERCATCTL
R-0h R/WSonce-0h
268 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 269
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED GTBCLKSYNC TBCLKSYNC RESERVED HRCAL
R-0-0h R/W-0h R/W-0h R-0-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED CLA1BGCRC CPUBGCRC RESERVED
R/W-0h R/W-0h R/W-0h R-0-0h
7 6 5 4 3 2 1 0
RESERVED CPUTIMER2 CPUTIMER1 CPUTIMER0 DMA RESERVED CLA1
R-0-0h R/W-1h R/W-1h R/W-1h R/W-0h R/W-0h R/W-0h
270 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 271
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED EMIF2 EMIF1
R-0-0h R/W-0h R/W-0h
272 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
EPWM16 EPWM15 EPWM14 EPWM13 EPWM12 EPWM11 EPWM10 EPWM9
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
EPWM8 EPWM7 EPWM6 EPWM5 EPWM4 EPWM3 EPWM2 EPWM1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 273
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
274 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED ECAP7 ECAP6 ECAP5 ECAP4 ECAP3 ECAP2 ECAP1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 275
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
276 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED EQEP3 EQEP2 EQEP1
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 277
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED RESE RESE RESE RESE RESE RESE SD2 SD1
RVED RVED RVED RVED RVED RVED
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
278 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED SCI_D SCI_C SCI_B SCI_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 279
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED RESERVED
R-0-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED SPI_D SPI_C SPI_B SPI_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
280 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED I2C_B I2C_A
R-0-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 281
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED MCAN_A RESERVED RESERVED CAN_B CAN_A
R-0-0h R-0-0h R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
282 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED RESERVED USB_A
R-0-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED McBSP_B McBSP_A
R-0-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 283
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED ADC_D ADC_C ADC_B ADC_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
284 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
CMPSS8 CMPSS7 CMPSS6 CMPSS5 CMPSS4 CMPSS3 CMPSS2 CMPSS1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 285
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
286 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED RESERVED DAC_C DAC_B DAC_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED
R-0-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 287
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
CLB8 CLB7 CLB6 CLB5 CLB4 CLB3 CLB2 CLB1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
288 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 289
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
FSIRX_H FSIRX_G FSIRX_F FSIRX_E FSIRX_D FSIRX_C FSIRX_B FSIRX_A
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED FSITX_B FSITX_A
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
290 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 291
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED PMBUS_A
R-0-0h R/W-0h R/W-0h
292 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DCC2 DCC1 DCC0
R-0-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 293
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED MPOSTCLK
R-0-0h R/W-0h
294 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED ETHERCAT
R-0-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 295
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
KEY
R-0/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED XRSn CPU1RSn
R-0h R-0/W1S-0h R-0/W1S-0h
296 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED RESERVED
R-0-0h R/W-0h
15 14 13 12 11 10 9 8
WDINTE RESERVED
R/W-0h R-0-0h
7 6 5 4 3 2 1 0
QUALSTDBY LPM
R/W-3Fh R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 297
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
GPIO23 GPIO22 GPIO21 GPIO20 GPIO19 GPIO18 GPIO17 GPIO16
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
GPIO15 GPIO14 GPIO13 GPIO12 GPIO11 GPIO10 GPIO9 GPIO8
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
GPIO7 GPIO6 GPIO5 GPIO4 GPIO3 GPIO2 GPIO1 GPIO0
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
298 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 299
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
300 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
GPIO55 GPIO54 GPIO53 GPIO52 GPIO51 GPIO50 GPIO49 GPIO48
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
GPIO47 GPIO46 GPIO45 GPIO44 GPIO43 GPIO42 GPIO41 GPIO40
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
GPIO39 GPIO38 GPIO37 GPIO36 GPIO35 GPIO34 GPIO33 GPIO32
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 301
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
302 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 303
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED TMR2CLKPRESCALE TMR2CLKSRCSEL
R-0-0h R/W-0h R/W-0h
304 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED SIMRESET_XR SIMRESET_CP ECAT_RESET_ SCCRESETn
Sn U1RSn OUT
R-0-0h W1C-0h W1C-0h W1C-0h W1C-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED HWBISTn RESERVED NMIWDRSn WDRSn XRSn POR
R-0-0h W1C-0h W1C-0h R-0-0h W1C-0h W1C-0h W1C-0h W1C-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 305
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
306 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED SIMRESET_XR SIMRESET_CP ECAT_RESET_ SCCRESETn
Sn U1RSn OUT
R-0-0h R/W1C-0h R/W1C-0h R/W1C-0h R/W1C-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED HWBISTn RESERVED NMIWDRSn WDRSn XRSn POR
R-0-0h R/W1C-0h R/W1C-0h R-0-0h R/W1C-0h R/W1C-0h R/W1C-1h R/W1C-1h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 307
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
308 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED WAKE
R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 309
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED WAKE
R-0h R-0/W1S-0h
310 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-103 shows the codes that are used for
access types in this section.
Table 3-103. CPU_ID_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 311
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
CPUID
R-X
312 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 313
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 3-106 shows the codes that are used for
access types in this section.
Table 3-106. CPU1_PERIPH_AC_REGS Access Type
Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
314 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 315
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
316 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 317
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
318 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 319
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
320 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 321
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
322 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 323
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
324 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 325
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
326 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 327
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
328 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 329
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
330 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 331
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
332 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 333
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
334 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 335
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
336 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 337
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
338 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 339
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
340 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 341
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
342 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 343
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
344 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 345
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
346 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 347
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
348 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 349
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
350 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 351
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
352 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 353
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
354 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 355
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
356 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 357
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
358 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 359
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
360 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 361
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
362 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 363
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
364 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 365
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
366 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 367
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
368 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 369
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
370 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 371
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC RESERVED CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
372 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC RESERVED CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 373
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
374 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 375
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC RESERVED CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
376 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 377
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
378 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC RESERVED CPU1_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 379
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
380 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 381
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
382 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 383
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
384 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 385
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
386 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 387
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
388 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC CLA1_ACC CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 389
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMA1_ACC RESERVED CPUx_ACC
R-0-0h R/W-3h R/W-3h R/W-3h
390 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED LOCK_AC_WR
R-0-0h R/WSonce-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 391
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 3-183 shows the codes that are used for
access types in this section.
Table 3-183. CPUTIMER_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
Write Type
W W Write
W1C W Write
1C 1 to clear
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
392 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 393
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
394 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
RESERVED TRB TSS RESERVED
R-0h R/W-0h R/W-0h R-1h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 395
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
396 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
TDDR
R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 397
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
TDDRH
R/W-0h
398 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 399
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 3-190 shows the codes that are used for
access types in this section.
Table 3-190. DEV_CFG_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
W1S W Write
1S 1 to set
WOnce W Write
Once Write once
WSonce W Write
Sonce Set once
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
400 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED CPUSEL18 RESERVED CPUSEL16
R-0-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
15 14 13 12 11 10 9 8
CPUSEL15 CPUSEL14 RESERVED CPUSEL12 CPUSEL11 RESERVED CPUSEL9 CPUSEL8
R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
7 6 5 4 3 2 1 0
CPUSEL7 CPUSEL6 CPUSEL5 CPUSEL4 RESERVED CPUSEL2 CPUSEL1 CPUSEL0
R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 401
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
402 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED
R-0-0h R/WSonce-0h R/WSonce-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 403
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
FLASH_SIZE
R/W-7h
15 14 13 12 11 10 9 8
RESERVED INSTASPIN RESERVED RESERVED PIN_COUNT
R-0h R/W-1h R/W-0h R/W-0h R/W-X
7 6 5 4 3 2 1 0
QUAL RESERVED RESERVED RESERVED
R/W-X R-0h R/W-0h R/W-0h
404 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 405
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FAMILY RESERVED RESERVED
R/W-X R-0h R-0h
406 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 407
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED USB_A_PHY
R-0-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED ADC_D_MODE ADC_C_MODE ADC_B_MODE ADC_A_MODE
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
408 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED ERR ALERR
R-0-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 409
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED CPU2_CLA1BG CPU2_CPUBG
CRC CRC
R-0-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED CPU1_CLA1BG CPU1_CPUBG RESERVED
CRC CRC
R/W-0h R/W-0h R/W-0h R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED CPU2_CLA1 RESERVED CPU1_CLA1
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
410 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 411
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED EMIF2 EMIF1
R-0-0h R/W-0h R/W-0h
412 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
EPWM16 EPWM15 EPWM14 EPWM13 EPWM12 EPWM11 EPWM10 EPWM9
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
EPWM8 EPWM7 EPWM6 EPWM5 EPWM4 EPWM3 EPWM2 EPWM1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 413
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
414 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED ECAP7 ECAP6 ECAP5 ECAP4 ECAP3 ECAP2 ECAP1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 415
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED EQEP3 EQEP2 EQEP1
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
416 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED RESE RESE RESE RESE RESE RESE SD2 SD1
RVED RVED RVED RVED RVED RVED
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 417
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED SCI_D SCI_C SCI_B SCI_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
418 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED RESERVED RESERVED
R-0-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED SPI_D SPI_C SPI_B SPI_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 419
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED I2C_B I2C_A
R-0-0h R/W-0h R/W-0h
420 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED MCAN_A RESERVED RESERVED CAN_B CAN_A
R-0-0h R/W-0h R/W-0h R-0-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 421
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED USB_A
R-0-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED McBSP_B McBSP_A
R-0-0h R/W-0h R/W-0h
422 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED ADC_D ADC_C ADC_B ADC_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 423
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
CMPSS8 CMPSS7 CMPSS6 CMPSS5 CMPSS4 CMPSS3 CMPSS2 CMPSS1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
424 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED RESERVED DAC_C DAC_B DAC_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED
R-0-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 425
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
CLB8 CLB7 CLB6 CLB5 CLB4 CLB3 CLB2 CLB1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
426 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
FSIRX_H FSIRX_G FSIRX_F FSIRX_E FSIRX_D FSIRX_C FSIRX_B FSIRX_A
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED
R/W-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED FSITX_B FSITX_A
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 427
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
428 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED PMBUS_A
R-0-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 429
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DCC2 DCC1 DCC0
R-0-0h R/W-0h R/W-0h R/W-0h
430 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED ETHERCAT
R-0h R/W-1h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 431
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
EPWM16 EPWM15 EPWM14 EPWM13 EPWM12 EPWM11 EPWM10 EPWM9
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
EPWM8 EPWM7 EPWM6 EPWM5 EPWM4 EPWM3 EPWM2 EPWM1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
432 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 433
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED ECAP7 ECAP6 ECAP5 ECAP4 ECAP3 ECAP2 ECAP1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
434 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED EQEP3 EQEP2 EQEP1
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 435
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED RESE RESE RESE RESE RESE RESE SD2 SD1
RVED RVED RVED RVED RVED RVED
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
436 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED SCI_D SCI_C SCI_B SCI_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 437
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED RESERVED
R-0-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED SPI_D SPI_C SPI_B SPI_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
438 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED I2C_B I2C_A
R-0-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 439
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED MCAN_A RESERVED RESERVED CAN_B CAN_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
440 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED McBSP_B McBSP_A
R-0-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 441
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED ADC_D ADC_C ADC_B ADC_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
442 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
CMPSS8 CMPSS7 CMPSS6 CMPSS5 CMPSS4 CMPSS3 CMPSS2 CMPSS1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 443
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED DAC_C DAC_B DAC_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED
R-0-0h
444 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R/W-0h
15 14 13 12 11 10 9 8
RESERVED
R/W-0h
7 6 5 4 3 2 1 0
CLB8 CLB7 CLB6 CLB5 CLB4 CLB3 CLB2 CLB1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 445
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
FSIRX_H FSIRX_G FSIRX_F FSIRX_E FSIRX_D FSIRX_C FSIRX_B FSIRX_A
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED FSITX_B FSITX_A
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
446 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 447
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED PMBUS_A
R-0h R/W-0h R/W-0h
448 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED HRCAL_A
R-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 449
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
KEY
R-0/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESET
R-0-0h R/W-1h
450 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
RESERVED CPU2HWBISTRST CPU2NMIWDR CPU2RES
ST
R-0-0h R/W1S-0h R/W1S-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 451
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
RESERVED CPU2LPMSTAT
R-0-0h R-0h
452 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
RESERVED TYPE
R-0-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 453
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
RESERVED TYPE
R-0-0h R/W-0h
454 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
RESERVED TYPE
R-0-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 455
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
RESERVED TYPE
R-0-0h R/W-0h
456 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-241 shows the codes that are used for
access types in this section.
Table 3-241. DMA_CLA_SRC_SEL_REGS Access
Type Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
WSonce W Write
Sonce Set once
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 457
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED CLA1TASKSRC CLA1TASKSRC
SEL2 SEL1
R-0-0h R/WSonce-0h R/WSonce-0h
458 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED DMACHSRCSE DMACHSRCSE
L2 L1
R-0-0h R/WSonce-0h R/WSonce-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 459
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
460 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 461
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
462 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 463
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
464 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-249 shows the codes that are used for
access types in this section.
Table 3-249. MEM_CFG_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
W1S W Write
1S 1 to set
WSonce W Write
Sonce Set once
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 465
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED LOCK_D1 LOCK_D0 LOCK_M1 LOCK_M0
R-0h R/W-0h R/W-0h R/W-0h R/W-0h
466 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED COMMIT_D1 COMMIT_D0 COMMIT_M1 COMMIT_M0
R-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 467
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED CPUWRPROT_ FETCHPROT_
D0 D0
R-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED CPUWRPROT_ FETCHPROT_
M1 M1
R-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED CPUWRPROT_ FETCHPROT_
M0 M0
R-0h R/W-0h R/W-0h
468 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 469
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
TEST_D1 TEST_D0 TEST_M1 TEST_M0
R/W-0h R/W-0h R/W-0h R/W-0h
470 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED INIT_D1 INIT_D0 INIT_M1 INIT_M0
R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 471
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED INITDONE_D1 INITDONE_D0 INITDONE_M1 INITDONE_M0
R-0h R-0h R-0h R-0h R-0h
472 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED D1 D0 M1 M0
R-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 473
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
LOCK_LS7 LOCK_LS6 LOCK_LS5 LOCK_LS4 LOCK_LS3 LOCK_LS2 LOCK_LS1 LOCK_LS0
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
474 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 475
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
COMMIT_LS7 COMMIT_LS6 COMMIT_LS5 COMMIT_LS4 COMMIT_LS3 COMMIT_LS2 COMMIT_LS1 COMMIT_LS0
R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
476 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 477
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
MSEL_LS7 MSEL_LS6 MSEL_LS5 MSEL_LS4
R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
MSEL_LS3 MSEL_LS2 MSEL_LS1 MSEL_LS0
R/W-0h R/W-0h R/W-0h R/W-0h
478 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 479
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
CLAPGM_LS7 CLAPGM_LS6 CLAPGM_LS5 CLAPGM_LS4 CLAPGM_LS3 CLAPGM_LS2 CLAPGM_LS1 CLAPGM_LS0
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
480 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 481
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED CPUWRPROT_ FETCHPROT_L
LS2 S2
R-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED CPUWRPROT_ FETCHPROT_L
LS1 S1
R-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED CPUWRPROT_ FETCHPROT_L
LS0 S0
R-0h R/W-0h R/W-0h
482 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 483
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED CPUWRPROT_ FETCHPROT_L
LS6 S6
R-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED CPUWRPROT_ FETCHPROT_L
LS5 S5
R-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED CPUWRPROT_ FETCHPROT_L
LS4 S4
R-0h R/W-0h R/W-0h
484 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 485
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
TEST_LS7 TEST_LS6 TEST_LS5 TEST_LS4
R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
TEST_LS3 TEST_LS2 TEST_LS1 TEST_LS0
R/W-0h R/W-0h R/W-0h R/W-0h
486 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 487
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
INIT_LS7 INIT_LS6 INIT_LS5 INIT_LS4 INIT_LS3 INIT_LS2 INIT_LS1 INIT_LS0
R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
488 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 489
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
INITDONE_LS7 INITDONE_LS6 INITDONE_LS5 INITDONE_LS4 INITDONE_LS3 INITDONE_LS2 INITDONE_LS1 INITDONE_LS0
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
490 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 491
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED LS7 LS6 LS5 LS4 LS3 LS2 LS1 LS0
R-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
492 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
LOCK_GS15 LOCK_GS14 LOCK_GS13 LOCK_GS12 LOCK_GS11 LOCK_GS10 LOCK_GS9 LOCK_GS8
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
LOCK_GS7 LOCK_GS6 LOCK_GS5 LOCK_GS4 LOCK_GS3 LOCK_GS2 LOCK_GS1 LOCK_GS0
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 493
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
494 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
COMMIT_GS15 COMMIT_GS14 COMMIT_GS13 COMMIT_GS12 COMMIT_GS11 COMMIT_GS10 COMMIT_GS9 COMMIT_GS8
R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
7 6 5 4 3 2 1 0
COMMIT_GS7 COMMIT_GS6 COMMIT_GS5 COMMIT_GS4 COMMIT_GS3 COMMIT_GS2 COMMIT_GS1 COMMIT_GS0
R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 495
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
496 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 497
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
MSEL_GS15 MSEL_GS14 MSEL_GS13 MSEL_GS12 MSEL_GS11 MSEL_GS10 MSEL_GS9 MSEL_GS8
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
MSEL_GS7 MSEL_GS6 MSEL_GS5 MSEL_GS4 MSEL_GS3 MSEL_GS2 MSEL_GS1 MSEL_GS0
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
498 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 499
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED DMAWRPROT_ CPUWRPROT_ FETCHPROT_
GS2 GS2 GS2
R-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED DMAWRPROT_ CPUWRPROT_ FETCHPROT_
GS1 GS1 GS1
R-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED DMAWRPROT_ CPUWRPROT_ FETCHPROT_
GS0 GS0 GS0
R-0h R/W-0h R/W-0h R/W-0h
500 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 501
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED DMAWRPROT_ CPUWRPROT_ FETCHPROT_
GS6 GS6 GS6
R-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED DMAWRPROT_ CPUWRPROT_ FETCHPROT_
GS5 GS5 GS5
R-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED DMAWRPROT_ CPUWRPROT_ FETCHPROT_
GS4 GS4 GS4
R-0h R/W-0h R/W-0h R/W-0h
502 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 503
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED DMAWRPROT_ CPUWRPROT_ FETCHPROT_
GS10 GS10 GS10
R-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED DMAWRPROT_ CPUWRPROT_ FETCHPROT_
GS9 GS9 GS9
R-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED DMAWRPROT_ CPUWRPROT_ FETCHPROT_
GS8 GS8 GS8
R-0h R/W-0h R/W-0h R/W-0h
504 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 505
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED DMAWRPROT_ CPUWRPROT_ FETCHPROT_
GS14 GS14 GS14
R-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED DMAWRPROT_ CPUWRPROT_ FETCHPROT_
GS13 GS13 GS13
R-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED DMAWRPROT_ CPUWRPROT_ FETCHPROT_
GS12 GS12 GS12
R-0h R/W-0h R/W-0h R/W-0h
506 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 507
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
TEST_GS11 TEST_GS10 TEST_GS9 TEST_GS8
R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
TEST_GS7 TEST_GS6 TEST_GS5 TEST_GS4
R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
TEST_GS3 TEST_GS2 TEST_GS1 TEST_GS0
R/W-0h R/W-0h R/W-0h R/W-0h
508 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 509
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
510 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 511
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
INIT_GS15 INIT_GS14 INIT_GS13 INIT_GS12 INIT_GS11 INIT_GS10 INIT_GS9 INIT_GS8
R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
7 6 5 4 3 2 1 0
INIT_GS7 INIT_GS6 INIT_GS5 INIT_GS4 INIT_GS3 INIT_GS2 INIT_GS1 INIT_GS0
R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
512 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 513
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
INITDONE_GS INITDONE_GS INITDONE_GS INITDONE_GS INITDONE_GS INITDONE_GS INITDONE_GS INITDONE_GS
15 14 13 12 11 10 9 8
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
INITDONE_GS INITDONE_GS INITDONE_GS INITDONE_GS INITDONE_GS INITDONE_GS INITDONE_GS INITDONE_GS
7 6 5 4 3 2 1 0
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
514 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 515
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
KEY
R-0/W-0h
15 14 13 12 11 10 9 8
GS15 GS14 GS13 GS12 GS11 GS10 GS9 GS8
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
GS7 GS6 GS5 GS4 GS3 GS2 GS1 GS0
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
516 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 517
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED LOCK_DMATO LOCK_CLA2TO LOCK_CPUTO LOCK_CPUTO
CLA2 DMA CM_MSGRAM1 CM_MSGRAM0
R-0h R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
LOCK_CPUTO LOCK_DMATO LOCK_CLA1TO RESERVED RESERVED LOCK_CLA1TO LOCK_CPUTO LOCK_CPUTO
CPU_MSGRAM CLA1 DMA CPU CLA1 CPU_MSGRAM
1 0
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
518 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 519
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED COMMIT_DMA COMMIT_CLAT COMMIT_CPU COMMIT_CPU
TOCLA_MSGR ODMA_MSGRA TOCM_MSGRA TOCM_MSGRA
AM1 M0 M1 M0
R-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
7 6 5 4 3 2 1 0
COMMIT_CPU COMMIT_DMA COMMIT_CLA1 RESERVED RESERVED COMMIT_CLA1 COMMIT_CPU COMMIT_CPU
TOCPU_MSGR TOCLA1 TODMA TOCPU TOCLA1 TOCPU_MSGR
AM1 AM0
R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
520 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 521
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED RESERVED RESERVED
R-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED RESERVED
R-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED DMAWRPROT_ CPUWRPROT_ RESERVED
CPUTOCPU_M CPUTOCPU_M
SGRAM0 SGRAM0
R-0h R/W-0h R/W-0h R/W-0h
522 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED RESERVED RESERVED RESERVED
R-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED RESERVED
R-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED RESERVED
R-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 523
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED RESERVED RESERVED
R-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED DMAWRPROT_ CPUWRPROT_ RESERVED
CPUTOCM_MS CPUTOCM_MS
GRAM1 GRAM1
R-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED DMAWRPROT_ CPUWRPROT_ RESERVED
CPUTOCM_MS CPUTOCM_MS
GRAM0 GRAM0
R-0h R/W-0h R/W-0h R/W-0h
524 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 525
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED TEST_CPUTOCM_MSGRAM1 TEST_CPUTOCM_MSGRAM0
R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
TEST_CPUTOCPU_MSGRAM1 TEST_DMATOCLA1 TEST_CLA1TODMA RESERVED
R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED TEST_CLA1TOCPU TEST_CPUTOCLA1 TEST_CPUTOCPU_MSGRAM0
R/W-0h R/W-0h R/W-0h R/W-0h
526 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 527
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED INIT_CPUTOC INIT_CPUTOC
M_MSGRAM1 M_MSGRAM0
R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
7 6 5 4 3 2 1 0
INIT_CPUTOC INIT_DMATOCL INIT_CLA1TOD RESERVED RESERVED INIT_CLA1TOC INIT_CPUTOCL INIT_CPUTOC
PU_MSGRAM1 A1 MA PU A1 PU_MSGRAM0
R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
528 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 529
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED INITDONE_CP INITDONE_CP
UTOCM_MSGR UTOCM_MSGR
AM1 AM0
R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
INITDONE_CP INITDONE_DM INITDONE_CL RESERVED RESERVED INITDONE_CL INITDONE_CP INITDONE_CP
UTOCPU_MSG ATOCLA1 A1TODMA A1TOCPU UTOCLA1 UTOCPU_MSG
RAM1 RAM0
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
530 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 531
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
KEY
R-0/W-0h
15 14 13 12 11 10 9 8
RESERVED DMATOCLA2 CLA2TODMA CPUTOCM_MS CPUTOCM_MS
GRAM1 GRAM0
R-0h R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
CPUTOCPU_M DMATOCLA1 CLA1TODMA CLA2TOCPU CPUTOCLA2 CLA1TOCPU CPUTOCLA1 CPUTOCPU_M
SGRAM1 SGRAM0
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
532 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 533
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
KEY
R-0/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED LOCK_CLADAT LOCK_SECUR LOCK_BOOTR
AROM EROM OM
R-0h R/W-0h R/W-0h R/W-0h
534 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED TEST_CLADATAROM TEST_SECUREROM TEST_BOOTROM
R-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 535
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED FORCE_CLAD FORCE_SECU FORCE_BOOT
ATAROM_ERR REROM_ERRO ROM_ERROR
OR R
R-0h R/W-0h R/W-0h R/W-0h
536 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
KEY
R-0/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED LOCK_PERI_M
EM_TEST_CO
NTROL
R-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 537
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED EtherCAT_MEM EtherCAT_TES RESERVED RESERVED RESERVED RESERVED
_FORCE_ERR T_ENABLE
OR
R-0h R/W-0h R/W-0h R-0h R-0h R-0h R-0h
538 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-293 shows the codes that are used for
access types in this section.
Table 3-293. MEMORY_ERROR_REGS Access Type
Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
W1S W Write
1S 1 to set
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 539
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
540 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED ECATRAMRDE RESERVED CLA1RDERR DMARDERR CPURDERR
RR
R-0h R-0h R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 541
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED ECATRAMRDE RESERVED CLA1RDERR DMARDERR CPURDERR
RR
R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
542 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED ECATRAMRDE RESERVED CLA1RDERR DMARDERR CPURDERR
RR
R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 543
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
544 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 545
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
546 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 547
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED CLA1RDERR DMARDERR CPURDERR
R-0h R-0h R-0h R-0h R-0h
548 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED CLA1RDERR DMARDERR CPURDERR
R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 549
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED CLA1RDERR DMARDERR CPURDERR
R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
550 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 551
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
552 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 553
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
554 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED CEINTFLAG
R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 555
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED CEINTCLR
R-0h R-0/W1S-0h
556 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED CEINTSET
R-0h R-0/W1S-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 557
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED CEINTEN
R-0h R/W-0h
558 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-313 shows the codes that are used for
access types in this section.
Table 3-313. NMI_INTRUPT_REGS Access Type
Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
W1S W Write
1S 1 to set
WSonce W Write
Sonce Set once
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 559
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
RESERVED NMIE
R-0-0h R/W1S-0h
560 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
ERADNMI PIEVECTERR CPU2HWBISTE CPU1HWBISTE FLUNCERR RAMUNCERR CLOCKFAIL NMIINT
RR RR
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 561
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
562 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 563
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
ERADNMI PIEVECTERR CPU2HWBISTE CPU1HWBISTE FLUNCERR RAMUNCERR CLOCKFAIL NMIINT
RR RR
R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
564 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 565
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
566 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
ERADNMI PIEVECTERR CPU2HWBISTE CPU1HWBISTE FLUNCERR RAMUNCERR CLOCKFAIL RESERVED
RR RR
R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 567
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
568 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
NMIWDCNT
R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 569
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
NMIWDPRD
R/W-FFFFh
570 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
ERADNMI PIEVECTERR CPU2HWBISTE CPU1HWBISTE FLUNCERR RAMUNCERR CLOCKFAIL RESERVED
RR RR
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 571
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
572 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 573
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
RESERVED PINSTS ERROR
R-0-0h R-1h R-0h
574 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
RESERVED ERROR
R-0-0h R-0/W1S-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 575
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
RESERVED ERROR
R-0-0h R-0/W1S-0h
576 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
RESERVED ERRORPOLSE
L
R-0-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 577
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
RESERVED ERRORCTL
R-0-0h R/WSonce-0h
578 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-327 shows the codes that are used for
access types in this section.
Table 3-327. PIE_CTRL_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
W1S W Write
1S 1 to set
Reset or Default Value
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 579
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
580 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
PIEVECT ENPIE
R-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 581
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
ACK8 ACK7 ACK6 ACK5 ACK4 ACK3 ACK2 ACK1
R/W1S-0h R/W1S-0h R/W1S-0h R/W1S-0h R/W1S-0h R/W1S-0h R/W1S-0h R/W1S-0h
582 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 583
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
584 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 585
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
586 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 587
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
588 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 589
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
590 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 591
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
592 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 593
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
594 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 595
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
596 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 597
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
598 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 599
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
600 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 601
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
602 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 603
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
604 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 605
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
606 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 607
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
608 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 609
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
610 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 611
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
612 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 613
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
614 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 615
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
616 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
INTx8 INTx7 INTx6 INTx5 INTx4 INTx3 INTx2 INTx1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 617
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
618 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-355 shows the codes that are used for
access types in this section.
Table 3-355. ROM_PREFETCH_REGS Access Type
Codes
Access Type Code Description
Read Type
R R Read
Write Type
W W Write
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 619
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED PFENABLE
R-0h R/W-1h
620 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-358 shows the codes that are used for
access types in this section.
Table 3-358. ROM_WAIT_STATE_REGS Access Type
Codes
Access Type Code Description
Read Type
R R Read
Write Type
W W Write
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 621
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED WSDISABLE
R-0h R/W-0h
622 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-361 shows the codes that are used for
access types in this section.
Table 3-361. SYNC_SOC_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
WSonce W Write
Sonce Set once
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 623
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED
R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED RESERVED
R-0-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED
R/W-0h R/W-0h R/W-0h
624 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 625
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
PWM8SOCBEN PWM7SOCBEN PWM6SOCBEN PWM5SOCBEN PWM4SOCBEN PWM3SOCBEN PWM2SOCBEN PWM1SOCBEN
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
PWM16SOCAE PWM15SOCAE PWM14SOCAE PWM13SOCAE PWM12SOCAE PWM11SOCAE PWM10SOCAE PWM9SOCAEN
N N N N N N N
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
PWM8SOCAEN PWM7SOCAEN PWM6SOCAEN PWM5SOCAEN PWM4SOCAEN PWM3SOCAEN PWM2SOCAEN PWM1SOCAEN
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
626 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 627
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
628 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED ADCSOCOUTS SYNCSELECT
ELECT
R-0-0h R/WSonce-0h R/WSonce-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 629
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 3-366 shows the codes that are used for
access types in this section.
Table 3-366. SYS_STATUS_REGS Access Type
Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
W1S W Write
1S 1 to set
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
630 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED CMVECTRESE CMSYSRESET CMNMIWDRST GINT
T REQ
R-0h R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 631
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED CMVECTRESE CMSYSRESET CMNMIWDRST GINT
T REQ
R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
632 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
KEY
R-0/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED CMVECTRESE CMSYSRESET CMNMIWDRST RESERVED
T REQ
R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 633
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
KEY
R-0/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED CMVECTRESE CMSYSRESET CMNMIWDRST RESERVED
T REQ
R-0h R/W-0h R/W-0h R/W-0h R-0h
634 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED DCC2 DCC1
R-0h R-0h R-0h
7 6 5 4 3 2 1 0
DCC0 AUX_PLL_SLIP SYS_PLL_SLIP RAM_ACC_VIO FLASH_CORR RAM_CORREC EMIF_ERR GINT
_NOTSUPPOR _NOTSUPPOR L ECTABLE_ERR TABLE_ERR
TED TED
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 635
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
636 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED DCC2 DCC1
R-0h R-0/W1S-0h R-0/W1S-0h
7 6 5 4 3 2 1 0
DCC0 AUX_PLL_SLIP SYS_PLL_SLIP RAM_ACC_VIO FLASH_CORR RAM_CORREC EMIF_ERR GINT
_NOTSUPPOR _NOTSUPPOR L ECTABLE_ERR TABLE_ERR
TED TED
R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 637
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
638 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
KEY
R-0/W-0h
15 14 13 12 11 10 9 8
RESERVED DCC2 DCC1
R-0h R-0/W1S-0h R-0/W1S-0h
7 6 5 4 3 2 1 0
DCC0 AUX_PLL_SLIP SYS_PLL_SLIP RAM_ACC_VIO FLASH_CORR RAM_CORREC EMIF_ERR RESERVED
_NOTSUPPOR _NOTSUPPOR L ECTABLE_ERR TABLE_ERR
TED TED
R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 639
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
640 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
KEY
R/W-0h
15 14 13 12 11 10 9 8
RESERVED DCC2 DCC1
R-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
DCC0 AUX_PLL_SLIP SYS_PLL_SLIP RAM_ACC_VIO FLASH_CORR RAM_CORREC EMIF_ERR RESERVED
L ECTABLE_ERR TABLE_ERR
R/W-0h R/W-1h R/W-1h R/W-0h R/W-0h R/W-0h R/W-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 641
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
642 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-376 shows the codes that are used for
access types in this section.
Table 3-376. TEST_ERROR_REGS Access Type
Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W1S W Write
1S 1 to set
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 643
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED UNC_ERROR COR_ERROR
R-0h R-0h R-0h
644 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED UNC_ERROR COR_ERROR
R-0h R-0/W1S-0h R-0/W1S-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 645
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
646 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-381 shows the codes that are used for
access types in this section.
Table 3-381. UID_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 647
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
648 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 649
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
650 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 651
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
652 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 653
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
654 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 655
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 3-391 shows the codes that are used for
access types in this section.
Table 3-391. WD_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
W1C W Write
1C 1 to clear
W1S W Write
1S 1 to set
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
656 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
RESERVED WDINTS WDENINT WDOVERRIDE
R-0-0h R-1h R/W-0h R/W1C-1h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 657
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
WDCNTR
R-0h
658 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
WDKEY
R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 659
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
WDFLG WDDIS WDCHK WDPS
R/W1S-0h R/W-0h R-0/W-0h R/W-0h
660 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 661
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
MIN
R/W-0h
662 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-398 shows the codes that are used for
access types in this section.
Table 3-398. XINT_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 663
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
RESERVED POLARITY RESERVED ENABLE
R-0-0h R/W-0h R-0-0h R/W-0h
664 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
RESERVED POLARITY RESERVED ENABLE
R-0-0h R/W-0h R-0-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 665
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
RESERVED POLARITY RESERVED ENABLE
R-0-0h R/W-0h R-0-0h R/W-0h
666 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
RESERVED POLARITY RESERVED ENABLE
R-0-0h R/W-0h R-0-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 667
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
RESERVED POLARITY RESERVED ENABLE
R-0-0h R/W-0h R-0-0h R/W-0h
668 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
INTCTR
R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 669
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
INTCTR
R-0h
670 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
7 6 5 4 3 2 1 0
INTCTR
R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 671
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
672 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 673
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
674 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 675
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
676 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 677
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
678 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 679
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
680 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 681
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
682 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 683
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
684 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 685
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
686 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 687
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
688 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 689
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
690 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 691
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
692 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 693
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
694 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x System Control and Interrupts
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 695
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x System Control and Interrupts www.ti.com
696 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x Processor
Chapter 4
C28x Processor
This chapter contains a short description of the C28x processor and extended instruction sets.
Further information can be found in the following documents:
• TMS320C28x CPU and Instruction Set Reference Guide
• TMS320C28x Extended Instruction Sets Technical Reference Manual
• Accelerators: Enhancing the Capabilities of the C2000 MCU Family Technical Brief
• TMS320C28x FPU Primer Application Report
4.1 Introduction...............................................................................................................................................................698
4.2 C28X Related Collateral........................................................................................................................................... 698
4.3 Features.....................................................................................................................................................................698
4.4 Floating-Point Unit....................................................................................................................................................698
4.5 Trigonometric Math Unit (TMU)............................................................................................................................... 699
4.6 VCRC Unit..................................................................................................................................................................699
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 697
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x Processor www.ti.com
4.1 Introduction
The C28x CPU is a 32-bit fixed-point processor. This device draws from the best features of digital signal
processing, reduced instruction set computing (RISC), microcontroller architectures, firmware, and tool sets.
For more information on CPU architecture and instruction set, see the TMS320C28x CPU and Instruction Set
Reference Guide.
4.2 C28X Related Collateral
Foundational Materials
• C2000 Academy - C28x
• C2000 C28x Optimization Guide
• C2000 Software Guide
• Enhancing the Computational Performance of the C2000™ Microcontroller Family Application Report
Expert Materials
• Fast Integer Division - A Differentiated Offering From C2000 Product Family Application Report
4.3 Features
The CPU features include a modified Harvard architecture and circular addressing. The RISC features
are single-cycle instruction execution, register-to-register operations, and modified Harvard architecture. The
microcontroller features include ease of use through an intuitive instruction set, byte packing and unpacking,
and bit manipulation. The modified Harvard architecture of the CPU enables instruction and data fetches to be
performed in parallel. The CPU can read instructions and data while it writes data simultaneously to maintain the
single-cycle instruction operation across the pipeline.
4.4 Floating-Point Unit
The C28x plus floating-point (C28x+FPU64) processor extends the capabilities of the C28x fixed-point CPU by
adding registers and instructions to support IEEE single-precision and double-precision floating point operations.
Devices with the C28x+FPU64 include the standard C28x register set plus an additional set of floating-point unit
registers. The additional floating-point unit registers are the following:
• Eight floating-point result registers, RnH (where n = 0–7)
• Floating-point Status Register (STF)
• Repeat Block Register (RB)
All of the floating-point registers, except the repeat block register, are shadowed. This shadowing can be used in
high-priority interrupts for fast context save and restore of the floating-point registers.
For more information, see the TMS320C28x Extended Instruction Sets Technical Reference Manual.
698 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com C28x Processor
No changes have been made to existing instructions, pipeline or memory bus architecture. All TMU instructions
use the existing FPU register set (R0H to R7H) to carry out their operations.
For more information, see the TMS320C28x Extended Instruction Sets Technical Reference Manual.
4.6 VCRC Unit
Cyclic redundancy check (CRC) algorithms provide a straightforward method for verifying data integrity over
large data blocks, communication packets, or code sections. The C28x+VCRC can perform 8-bit, 16-bit, 24-bit,
and 32-bit CRCs. A CRC result register contains the current CRC, which is updated whenever a CRC instruction
is executed.
The following are the CRC polynomials used by the CRC calculation logic of VCRC:
• CRC8 polynomial = 0x07
• CRC16 polynomial1 = 0x8005
• CRC16 polynomial2 = 0x1021
• CRC24 polynomial = 0x5d6dcb
• CRC32 polynomial1 = 0x04c11db7
• CRC32 polynomial2 = 0x1edc6f41
This module can calculate CRCs for a byte of data in a single cycle. The CRC calculation for CRC8, CRC16,
CRC24 and CRC32 is done byte-wise (instead of computing on a complete 16-bit or 32-bit data read by the
C28x core) to match the byte-wise computation requirement mandated by various standards.
The VCRC Unit also allows the user to provide the size (1b-32b) and value of any polynomial to fit custom CRC
requirements. The CRC execution time increases to 3 cycles when using a custom polynomial.
For more information, see the TMS320C28x Extended Instruction Sets Technical Reference Manual.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 699
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
C28x Processor www.ti.com
700 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Chapter 5
ROM Code and Peripheral Booting
This chapter describes the boot flow and functionality of the CPU1, CPU2, and Connectivity Manager (CM)
subsystems.
5.1 Introduction...............................................................................................................................................................702
5.2 Device Boot Sequence.............................................................................................................................................703
5.3 Device Boot Modes.................................................................................................................................................. 704
5.4 Device Boot Configurations.................................................................................................................................... 705
5.5 Device Boot Flow Diagrams.....................................................................................................................................711
5.6 Device Reset and Exception Handling................................................................................................................... 716
5.7 Boot ROM Description............................................................................................................................................. 718
5.8 Application Notes for Using the Bootloaders........................................................................................................758
5.9 Software.................................................................................................................................................................... 762
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 701
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
5.1 Introduction
The purpose of this chapter is to explain the boot read-only memory (ROM) code functionality for CPU1, CPU2,
and CM cores, including the boot procedure. It also discusses the functions and features of the boot ROM
code, and provides details about the ROM memory map contents. On every reset, the device executes a boot
sequence in the ROM depending on the reset type and boot configuration. This sequence will initialize the
device to run the application code. For CPU1, the boot ROM also contains peripheral bootloaders which can be
used to load an application into RAM. These bootloaders can be disabled for safety or security purposes.
Refer to Table 5-1 for details on available boot features across CPU1, CPU2, and CM. Additionally, Table 5-2
shows the sizes of the various ROMs on the device.
Table 5-1. Boot System Overview
Boot Feature CPU1 (Master) CPU2 CM
Initiate boot process Device Reset CPU1 Application CPU1 Application
Boot mode selection GPIOs IPC Register IPC Register
Supported boot modes:
• Flash boot
• Secure Flash boot Yes Yes Yes
• RAM boot
Foundational Materials
• Bootloading 101 (Video)
Expert Materials
• C2000 Software Controlled Firmware Update Process Application Report
702 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 703
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
(1) SCI boot mode can be used as a wait boot mode as long as SCI continues to wait for an 'A' or 'a' during the SCI autobaud lock
process.
(2) On an unprogrammed device, selecting Flash boot when the default Flash entry address is unprogrammed switches the boot mode
from Flash boot to USB boot. See Table 5-7 for more details.
Note
The switch of Flash boot mode to USB boot mode when Flash is not programmed is only available
as part of the default boot mode table on an unprogrammed device. Once a custom boot table is
programmed in OTP or RAM, a selection of Flash boot mode does not switch to USB boot even when
Flash is unprogrammed.
704 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Note
All the peripheral boot modes that are supported use the first instance of the peripheral module (SCIA,
SPIA, I2CA, CANA, and so forth). Whenever these boot modes are referred to in this chapter, such as
SCI boot, it is actually referring to the first module instance, which means the SCI boot on the SCIA
port. The same applies to the other peripheral boots.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 705
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
Note
When using Z2-BOOTPINCONFIG, the configurations programmed in this location will take priority
over the configurations in Z1-BOOTPINCONFIG. It is recommended to use Z1-BOOTPINCONFIG
first and then if OTP configurations need to be altered, switch to using Z2-BOOTPINCONFIG.
Note
The following GPIOs cannot be used as a BMSP. If selected for a particular BMSP, the boot ROM
automatically selects the factory default GPIO (the factory default for BMSP2 is 0xFF, which disables
the BMSP).
• GPIO 42 and GPIO 43
• GPIO 169 to 255
706 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Note
When decoding the boot mode, BMSP0 is the least-significant-bit and BMSP2 is the most-significant-
bit of the boot table index value. It is recommended when disabling BMSPs to start with disabling
BMSP2. For example, in an instance when only using BMSP2 (BMSP1 and BMSP0 are disabled),
then only the boot table indexes of 0 and 4 will be selectable. In the instance when using only BMSP0,
then the selectable boot table indexes are 0 and 1.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 707
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
Note
The locations Z2-BOOTDEF-LOW and Z2-BOOTDEF-HIGH will be used instead of Z1-BOOTDEF-
LOW and Z1-BOOTDEF-HIGH locations when Z2-BOOTPINCONFIG is configured. Refer to Section
5.4.1 for more details on BOOTPIN_CONFIG usage.
708 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 709
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
710 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
HWBIST
Branch to Application Reset Cause
All Other
Resets
Disable Watchdog
XRS
Clear boot ROM Stack to zero Reset Cause
POR
RAM Initialization
Enable NMI
(all CPU1 RAMS)
DCSM Initialization
Device
Calibration
No Yes
Is Debugger
Standalone Boot Emulation Boot
Connected?
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 711
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
Unsupported
(=0xA5) Check Key
Emulate Wait
EMU_BOOTPIN_
Standalone Boot Boot
CONFIG_KEY
(=0x5A)
Supported Unsupported
Boot Mode Decode Boot Mode
BOOTDEF options for Wait Boot
boot mode
No
Enable
Watchdog
Branch to Application
Code
712 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Any Other
Check Z2 Value Read OTP loaded registers:
OTP_BOOTPIN_
Z1-BOOTPINCONFIG
CONFIG_KEY
Any Other
Check Z1 Value Read factory default two boot mode
OTP_BOOTPIN_
select GPIO pins
(=0x5A) CONFIG_KEY
Yes
Is flash boot?
No
Unsupported Boot
Mode Decode
BOOTDEF table
for boot mode Set boot mode to USB boot
Enable
Watchdog
Enable
Watchdog
Branch to Application
Code
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 713
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
CPU2
HWBIST Held in Reset
Reset
Software Release Request
Application Releases from CPU1
CPU2 from Reset
Debugger
CPU2 Boot Start
Reset
All other
Brand to HWBIST resets
Reset Cause
Application
Disable Watchdog
Yes
POR or
XRS
Reset Cause Flash Power Up
POR
RAM Initialization
Clear POR reset cause Enable NMI
(CPU2 RAMs)
Other boot
Failed
mode Send IPC notification to CPU1
No
Is Yes No
Copy length
IPC RAM Copy
Is valid?
Boot?
No Yes
714 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
CM
CM NMI Watchdog Held in Reset
Reset (XRS)
Software Release Request
Application Releases from CPU1
CM from Reset
CM Software Reset
CM Boot Start
(SYSRESETREQ)
Disable Watchdog
Read
CPU1TOCMIPCBOOTMODE
Register
Yes
All other
resets
Reset Cause Flash Power Up
VECTRESET
All other
resets
Clear boot ROM Stack to zero Reset Cause
POR
RAM Initialization
Clear POR reset cause Enable NMI
(all CM RAMS)
Other boot
Failed
mode Send IPC notification to CPU1
No
Is Yes No
Copy length
IPC RAM Copy
Is valid?
Boot?
No Yes
Branch to Application
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 715
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
716 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
(1) For CPU1, a RAM uncorrectable error or ROM parity error will clear the boot status information stored in RAM because a RAM
initialization is performed to attempt to correct the error. Since the boot status information is erased, this exception can be identified in
that a NMIWD reset occurred and all the RAMs are erased.
(2) A PIE vector mismatch in one core (such as CPU1 or CPU2) will trigger the PIE vector mismatch interrupt in other cores.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 717
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
Note
All boot configurations for CPU2 and CM are set through CPU1TOCPU2IPCBOOTMODE and
CPU1TOCMIPCBOOTMODE registers. See more details in Section 5.7.2.
718 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
(1) If MPOST is configured to run with PLL enabled and the PLL fails to lock, then the MPOST run is skipped. This does not apply if
MPOST is configured to use INTOSC2 with PLL disabled.
(2) Note that EtherCAT gets de-asserted and released from reset using the EtherCATs peripheral software reset register during MPOST.
The EtherCAT state is not restored back into the reset state.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 719
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
Note
Regardless of reset source, CPU2 and CM each require their respective IPCFLG0 to be set by CPU1
on every reset in order to confirm the contents of IPCBOOTMODE are valid and continue their boot
process.
(1) CPU2 will ACK and clear this IPC flag during boot up.
(1) CM will ACK and clear this IPC flag during boot up.
720 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Note
If any of the bit-fields of CPU1TOCPU2IPCBOOTMODE or CPU1TOCMIPCBOOTMODE registers are
set with invalid values, an error IPC command is sent to CPU1. CPU2/CM then enter a wait loop
where CPU2/CM wait for CPU1 to re-configure the IPCBOOTMODE register correctly and issue a
reset to the respective core.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 721
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
722 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Note
After CPU2 or CM sends the error IPC command to CPU1, CPU2/CM will set
CPU2TOCPU1IPCFLG0/CMTOCPU1IPCFLG0.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 723
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
724 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 725
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
(1) Check the data manual to determine if these are available for your device part number. If not available, treat these sections as
reserved.
(1) Check the data manual to determine if these are available for your device part number. If not available, treat these sections as
reserved.
726 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Note
Load refers to the memory addresses where the C28x CPU can view the data. Run refers to the CLA
memory addresses that the CLA uses to access the data.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 727
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
728 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 729
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
Note
• User must make sure that the Flash sector that encompasses the configured Flash entry point and
the first 16KB of Flash is assigned to Zone 1 for any cores setup to use secure Flash boot.
• Recommended to use device JTAGLOCK when using secure Flash boot.
• If only using secure Flash boot for CPU2/CM, then the CPU1 application must first dummy load
the Z1 OTP CMACKEY before releasing CPU2/CM from reset. When dummy loading, CPU1
application must first disable Flash data caching, then perform the dummy load, and then the
application can re-enable Flash data caching.
730 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
MEMORY
{
/* Code Start branch to _c_int00 */
BEGIN : origin = 0x80000, length = 0x0002
/* User calculated golden CMAC tag for Flash Sector 0 */
GOLDEN_CMAC_TAG : origin = 0x80002, length = 0x0008
/* Flash Sector 0 containing application code */
FLASH_SECTOR_0 : origin = 0x8000A, length = 0x1FF6
.
.
.
}
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 731
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
(1) This memory must be allocated and reserved in the CPU2/CM application linker command file when using this boot mode.
5.7.7.2 Bootloaders
This section details the available boot modes that use a peripheral boot loader. For more specific details on the
supported data stream structure used by the following bootloaders, refer to Section 5.8.1.
Note
These are only available on CPU1.
SCIRXDA
Control Host
Subsystem (Data and program
boot ROM SCITXDA source)
The device communicates with the external host by communication through the SCI-A peripheral. The autobaud
feature of the SCI port is used to lock baud rates with the host. For this reason the SCI loader is very flexible and
you can use a number of different baud rates to communicate with the device.
After each data transfer, the bootloader echoes back the 8-bit character received to the host. This allows the
host to check that each character was received by the bootloader.
732 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
At higher baud rates, the slew rate of the incoming data bits can be affected by transceiver and connector
performance. While normal serial communications can work well, this slew rate can limit reliable auto-baud
detection at higher baud rates (typically beyond 100 kbaud) and cause the auto-baud lock feature to fail. To
avoid this, the following is recommended:
1. Achieve a baud-lock between the host and SCI bootloader using a lower baud rate.
2. Load the incoming application or custom loader at this lower baud rate.
3. The host can then handshake with the loaded application to set the SCI baud rate register to the desired
high baud rate.
SCI_Boot
Valid No
Setup SCI-A for KeyValue Jump to Flash
1 stop, 8-bit character, (0x08AA)
no parity, use internal ?
SC clock, no loopback,
disable Rx/Tx interrupts
Yes
No Autobaud
lock
?
Return
Yes EntryPoint
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 733
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
Serial SPI
EEPROM
SPIA_SIMO
DIN
Control SPIA_SOMI
DOUT
subsystem SPIA_CLK CLK
SPIA_STE CS
The SPI boot ROM loader initializes the SPI module to interface to a serial SPI EEPROM or Flash. Devices
of this type include, but are not limited to, the Xicor X25320 (4Kx8) and Xicor X25256 (32Kx8) SPI serial SPI
EEPROMs and the Atmel AT25F1024A serial Flash.
The SPI boot ROM loader initializes the SPI with the following settings: FIFO enabled, 8-bit character, internal
SPICLK master mode and talk mode, clock phase = 1, polarity = 0, using the slowest baud rate.
If the download is to be performed from an SPI port on another device, then that device must be set up to
operate in the slave mode and mimic a serial SPI EEPROM. Immediately after entering the SPI_Boot function,
the pin functions for the SPI pins are set to primary and the SPI is initialized. The initialization is done at the
slowest speed possible. Once the SPI is initialized and the key value read, specify a change in baud rate or
low-speed peripheral clock.
Table 5-47. SPI 8-Bit Data Stream
Byte Contents
1 LSB: AA (KeyValue for memory width = 8-bits)
2 MSB: 08h (KeyValue for memory width = 8-bits)
3 LSB: LOSPCP
4 MSB: SPIBRR
5 LSB: reserved for future use
6 MSB: reserved for future use
... ...
... Reserved
...
17 LSB: reserved for future use
18 MSB: reserved for future use
19 LSB: Upper half (MSW) of Entry point PC[23:16]
20 MSB: Upper half (MSW) of Entry point PC[31:24] (Note: Always 0x00)
21 LSB: Lower half (LSW) of Entry point PC[7:0]
22 MSB: Lower half (LSW) of Entry point PC[15:8]
... ....
... Data for this section.
...
... Blocks of data in the format size/destination address/data as shown in the generic
data stream description
... ...
... Data for this section.
...
n LSB: 00h
n+1 MSB: 00h - indicates the end of the source
734 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
The data transfer is done in "burst" mode from the serial SPI EEPROM. The transfer is carried out entirely in
byte mode (SPI at 8 bits/character). A step-by-step description of the sequence follows:
1. The SPI-A port is initialized.
2. The GPIO pin, as defined by SPI option configured from Table 5-61, is used as a chip-select for the serial
SPI EEPROM or Flash.
3. The SPI-A outputs a read command for the serial SPI EEPROM or Flash.
4. The SPI-A sends the serial SPI EEPROM an address 0x0000; that is, the host requires that the EEPROM or
Flash must have the downloadable packet starting at address 0x0000 in the EEPROM or Flash. The loader
is compatible with both 16-bit addresses and 24-bit addresses.
5. The next word fetched must match the key value for an 8-bit data stream (0x08AA). The least significant
byte of this word is the byte read first and the most significant byte is the next byte fetched. This is true of
all word transfers on the SPI. If the key value does not match, then the load is aborted and the bootloader
jumps to Flash.
6. The next two bytes fetched can be used to change the value of the low speed peripheral clock register
(LOSPCP) and the SPI baud rate register (SPIBRR). The first byte read is the LOSPCP value and the
second byte read is the SPIBRR value. The next seven words are reserved for future enhancements. The
SPI bootloader reads these seven words and discards them.
7. The next two words makeup the 32-bit entry point address where execution continues after the boot load
process is complete. This is typically the entry point for the program being downloaded through the SPI port.
8. Multiple blocks of code and data are then copied into memory from the external serial SPI EEPROM through
the SPI port. The blocks of code are organized in the standard data stream structure presented earlier. This
is done until a block size of 0x0000 is encountered. At that point in time the entry point address is returned to
the calling routine that then exits the bootloader and resumes execution at the address specified.
SPI_Boot
Enable EEPROM
Send read command and Read and discard 7
start at EEPROM address reserved words
0x0000
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 735
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
I2CA_SDA
Control
subsystem
I2CA_SCL
I2C
SDA EEPROM
If the download is to be performed from a device other than an EEPROM, then that device must be set up to
operate in the slave mode and mimic the I2C EEPROM. Immediately after entering the I2C boot function, the
GPIO pins are configured for I2C-A operation and the I2C is initialized. The following requirements must be met
when booting from the I2C module:
• The input frequency to the device must be in the appropriate range.
• The EEPROM must be at slave address 0x50.
The bit-period prescalers (I2CCLKH and I2CCLKL) are configured by the bootloader to run the I2C at a 50
percent duty cycle at 100-kHz bit rate (standard I2C mode) when the system clock is 10 MHz. These registers
can be modified after receiving the first few bytes from the EEPROM. This allows the communication to be
increased up to a 400-kHz bit rate (fast I2C mode) during the remaining data reads.
Arbitration, bus busy, and slave signals are not checked. Therefore, no other master is allowed to control the bus
during this initialization phase. If the application requires another master during I2C boot mode, that master must
be configured to hold off sending any I2C messages until the application software signals that the application is
past the bootloader portion of initialization.
The non-acknowledgment bit is checked only during the first message sent to initialize the EEPROM base
address. This is to make sure that an EEPROM is present at address 0x50 before continuing. If an EEPROM is
not present, the non-acknowledgment bit is not checked during the address phase of the data read messages
(I2C_Get Word). If a non-acknowledgment is received during the data read messages, the I2C bus hangs. Table
5-48 shows the 8-bit data stream used by the I2C.
736 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
NACK Yes
I2C_Boot
received Jump to Flash
?
Enable I2CA_SDA and
I2CA_SCL pins No
Enable pullups on
I2CA_SDA and I2CA_SCL Read KeyValue
Read EntryPoint
address
Return
EntryPoint
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 737
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
The I2C EEPROM protocol required by the I2C bootloader is shown in Figure 5-12 and Figure 5-13. The first
communication, which sets the EEPROM address pointer to 0x0000 and reads the KeyValue (0x08AA), is shown
in Figure 5-12. All subsequent reads are shown in Figure 5-13 and are read two bytes at a time.
RESTART
NO ACK
START
WRITE
READ
STOP
MSB
MSB
ACK
ACK
ACK
ACK
ACK
LSB
LSB
SDA LINE
1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 1 01 0 0 0 0 1 0
READ
STOP
ACK
ACK
SDA LINE
1 01 0 0 0 0 1 0
738 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
The control subsystem communicates with the external host device by polling/driving the GPIO92 and GPIO91
lines. The handshake protocol shown in Figure 5-15 must be used to successfully transfer each word using
GPIO[88, 62:58, 90:89]. This protocol is very robust and allows for a slower or faster host to communicate with
the master subsystem.
Two consecutive 8-bit words are read to form a single 16-bit word. The least significant byte (LSB) is read first
followed by the most significant byte (MSB). In this case, data is read from GPIO[88, 62:58, 90:89].
The 8-bit data stream is shown in Table 5-49.
Table 5-49. Parallel GPIO Boot 8-Bit Data Stream
Bytes GPIO[88,62:58,90:89] GPIO[88,62:58,90:89] Description
(Byte 1 of 2) (Byte 2 of 2)
1 2 AA 08 0x08AA (KeyValue for memory width = 16 bits)
3 4 00 00 8 reserved words (words 2 - 9)
... ... ... ... ...
17 18 00 00 Last reserved word
19 20 BB 00 Entry point PC[22:16]
21 22 DD CC Entry point PC[15:0] (PC = 0x00BBCCDD)
23 24 NN MM Block size of the first block of data to load = 0xMMNN words
25 26 BB AA Destination address of first block Addr[31:16]
27 28 DD CC Destination address of first block Addr[15:0] (Addr = 0xAABBCCDD)
29 30 BB AA First word of the first block in the source being loaded = 0xAABB
... ...
... Data for this section.
...
. BB AA Last word of the first block of the source being loaded = 0xAABB
. NN MM Block size of the 2nd block to load = 0xMMNN words
. BB AA Destination address of second block Addr[31:16]
. DD CC Destination address of second block Addr[15:0]
. BB AA First word of the second block in the source being loaded
. …
n n+1 BB AA Last word of the last block of the source being loaded
(More sections if required)
n+2 n+3 00 00 Block size of 0000h - indicates end of the source program
The device first signals the host that the device is ready to begin data transfer by pulling the GPIO91 pin low.
The host load then initiates the data transfer by pulling the GPIO92 pin low. The complete protocol is shown in
Figure 5-15.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 739
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
1 2 3 4 5 6
Host control
GPIO92
Device control
GPIO91
1. The device indicates the device is ready to start receiving data by pulling the GPIO91 pin low.
2. The bootloader waits until the host puts data on GPIO [88,62:58,90:89]. The host signals to the device that
data is ready by pulling the GPIO92 pin low.
3. The device reads the data and signals the host that the read is complete by pulling GPIO91 high.
4. The bootloader waits until the host acknowledges the device by pulling GPIO92 high.
5. The device again indicates the device is ready for more data by pulling the GPIO91 pin low.
This process is repeated for each data value to be sent.
Figure 5-16 shows an overview of the Parallel GPIO bootloader flow.
Figure 5-17 shows the transfer flow from the host side. The operating speed of the CPU and host are not critical
in this mode, as the host waits for the device and the device waits for the host. In this manner, the protocol works
with both a host running faster and a host running slower than the device.
740 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Parallel_Boot
Call
CopyData
Valid
No KeyValue
Return Flash EntryPoint (0x08AA)
?
Return
Yes EntryPoint
Start transfer
No Device ready
(GPIO91=0)
?
Yes
Signal that data
is ready Acknowledge device
(GPIO92=0) (GPIO92=1)
More Yes
data
?
No
End transfer
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 741
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
Figure 5-18 shows the flow used to read a single word of data from the parallel port.
• 8-bit data stream
The 8-bit routine, shown in Figure 5-18, discards the upper eight bits of the first read from the port and treats
the lower eight bits masked with GPIO89 in bit position 7 and GPIO90 in bit position 6 as the least-significant
byte (LSB) of the word to be fetched. The routine then performs a second read to fetch the most-significant
byte (MSB). The routine then combines the MSB and LSB into a single 16-bit value to be passed back to the
calling routine.
Parallel_GetWordData A
8 bit
Data Data
ready No ready No
(GPIO92 = 0) (GPIO92 = 0)
? ?
Yes Yes
Host
ack No
(GPIO92 = 1)
? Host
ack No
Yes (GPIO92 = 1)
?
Yes
WordData = MSB:LSB
A
Return WordData
742 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
28x
CAN bus
CAN
host
28x
The bit timing registers are programmed in such a way that a 100-kbps bit rate is achieved with a 20-MHz
external oscillator, a shown in Table 5-50.
Table 5-50. Bit-Rate Value for Internal Oscillators
OSCCLK SYSCLK Bit Rate
20 MHz 10 MHz 100 kbps
The SYSCLKOUT values shown are the reset values with the default PLL setting. The BRP and bit-time values
are hard-coded to 10 and 20, respectively.
Note
The CPU1 CAN boot loader uses XTAL as the bit clock source and INTOSC2 as the system clock
source.
Mailbox 1 is programmed with a standard MSGID of 0x1 for boot-loader communication. The CAN host must
transmit only two bytes at a time, LSB first and MSB next. For example, to transmit the word 0x08AA to
the device, transmit AA first, followed by 08. The program flow of the CAN bootloader is identical to the SCI
bootloader. The data sequence for the CAN bootloader is shown in Table 5-51.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 743
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
744 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Enumerate to host
PC with ID 1cbe:00ff Valid key
Jump to flash
(0x08AA)?
Host PC installs
drivers
MCU loads data into
RAM
MCU waits
for data MCU disconnects
from the USB bus
Return EntryPoint
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 745
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
Implementing PC-side USB software is not trivial. It is recommended to use the TI-provided tools and drivers to
load data in USB boot mode. Hex and binary files for loader tools can be generated from COFF (.out) files using
the hex2000 tool. To produce a plain binary file in the boot loader format, use the following command line:
hex2000 -boot -b Program_to_Load.out -o Binary_Loader_Data.dat
For more information on hex2000, see the TMS320C28x Assembly Language Tools User's Guide.
Note
INTOSC2 must be enabled before invoking the USB boot loader. If INTOSC2 is not enabled, the
boot loader hangs. A debugger reset or SCC reset does not enable INTOSC2, if INTOSC2 has been
disabled by the application.
746 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Note
These configurations only apply to CPU1. Refer to Section 5.7.2 for details on configuring CPU2 and
CM boot modes.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 747
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
748 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 749
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
Note
The application must disable interrupts before calling one of the EXEONLY function APIs.
If a vector fetch request is given by the CPU (C28 or CM, depending on the subsystem) while the
corresponding program counter (PC) is within the EXEONLY function API code of the Secure ROM,
a reset occurs (RSN, if from C28; SYSRESETn, if from CM). The consequence of this is if an NMI,
ITRAP, or Bus Fault occurs while the PC is executing one of the EXEONLY API functions, the NMI/
ITRAP/Fault cannot be serviced because a reset occurs to that subsystem.
The secure copy code zone 1 and zone 2 functions allow EXEONLY Flash to be copied to EXEONLY RAM
in a secure manner. The source must be from EXEONLY Flash and the destination to EXEONLY RAM. There is
no support to copy EXEONLY ROM or EXEONLY RAM to RAM. Both Flash and RAM must be set to EXEONLY
and configured for the same zone. Additionally, the copy size must not cross over the Flash sector boundary.
Any violations of these requirements results in a failure status returned. Upon successful copy of the data, the
number of 16-bit words copied is returned.
Table 5-63. Secure Copy Code Function
CPU Function Prototype Function Parameters Function Return Value
Uint16 SecureCopyCodeZ1(Uint32 size : The number of 16-bit words to 0xXXXX : Returns the number of 16-
size, Uint16 *dst, Uint16 *src) copy bit words copied
The secure CRC calculation zone 1 and zone 2 functions allow a safety CRC check of EXEONLY memory
in a secure manner. The CRC length provided must be a value from 1 to 8 where 1 represents a CRC size
of 32 16-bit words and 8 represents a CRC size of 4096 16-bit words. The source address specifies the
starting address for the CRC and the destination address is the location that the resulting CRC value is stored.
The source and destination memories must be configured for the same zone. Additionally, the CRC length
must not cross over the Flash sector or RAM block boundary. On the CM, there is an additional requirement
that CRCLOCK is not enabled. Any violations of these requirements results in a failure status returned. Upon
successful CRC, the number of 16-bit words CRC'd is returned.
Table 5-64. Secure CRC Calculation Function
CPU Function Prototype Function Parameters Function Return Value
750 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
The calculate CMAC (Cipher-based Message Authentication Code) function calculates a CMAC tag for a
specified memory range using the user-set CMAC key in OTP and returns pass or failure depending if the
calculated tag matches the golden tag. The memory address range provided must align to a 128-bit boundary
(split evenly into 128-bit blocks). If this requirement is not met, the function returns a status indicating a boundary
violation. When using the CM CMAC function, there is an additional requirement that the CM must be running in
privileged mode.
For generating the secure Flash golden CMAC tag for CPU1 or CPU2, refer to the section "Using Secure Flash
Boot on TMS320F2838x Devices" in the TMS320C28x Assembly Language Tools User’s Guide for instructions.
For generating the secure Flash golden CMAC tag for CM, refer to the ARM Assembly Language Tools
v19.6.0.STS, within section "Using Secure Flash Boot on TMS320F2838x Devices" for instructions.
The 128-bit golden CMAC tag:
• Must be stored inside of the memory address range that the calculation is performed on.
• Another golden CMAC tag (from a different memory address range that is being authenticated) can not be
nested inside a different CMAC authentication memory address range. (For example, a CMAC on addresses
0x1000 to 0x2000 can not contain the golden CMAC tag for memory address ranges 0x4000 to 0x5000).
• The starting address of the golden CMAC tag must align to a 32-bit boundary, such as 0x80002 on CPU1/
CPU2 or 0x200004 on the CM.
• The CMAC calculation treats the memory addresses containing the golden tag as all ones.
Note
If calling this function, without running the secure Flash boot mode, then a dummy load must
be performed for the Z1 OTP CMACKEY before calling the function. Additionally, the Flash data
caching can be disabled before performing the dummy load and then the Flash data caching can be
re-enabled after the dummy load.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 751
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
752 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Note
Only CPU1 performs clock configurations during boot up. CPU1 application configures clocks for
CPU2 and CM before releasing them from reset. Refer to Section 5.7.2 for more details.
If the PLL is used during the CPU1 boot process, it will be bypassed by the boot ROM code before
branching to the user application.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 753
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
754 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 755
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
756 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 757
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
758 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 759
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
760 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
The linker -m option can be used to generate a map file. This map file shows all of the sections that were
created, their location in memory, and their length. It can be useful to check this file to make sure that the
initialized sections are where you expect them to be.
The linker -w option configures the linker to show if the linker assigned a section to a memory region
automatically. For example, if you have a section in your code called .TI.ramfunc.
3. Run the hex conversion utility.
Choose the appropriate options for the desired boot mode and run the hex conversion utility to convert the
ELF file produced by the linker to a boot table.
See the TMS320C28x Assembly Language Tools User's Guide and the TMS320C28x Optimizing C/C++
Compiler User's Guide for more information on the compiling and linking process.
Table 5-79 summarizes the hex conversion utility options available for the bootloader. See the TMS320C28x
Assembly Language Tools User's Guide for a detailed description of the hex2000 operations used to generate a
boot table. Updates are made to support the I2C boot. See the Codegen release notes for the latest information.
Table 5-79. Boot Loader Options
Option Description
-boot Convert all sections into bootable form (use instead of a SECTIONS directive)
-sci8 Specify the source of the bootloader table as the SCI-A port, 8-bit mode
-spi8 Specify the source of the bootloader table as the SPI-A port, 8-bit mode
-gpio8 Specify the source of the bootloader table as the GPIO port, 8-bit mode
-bootorg value Specify the source address of the bootloader table
-lospcp value Specify the initial value for the LOSPCP register. This value is used only for the spi8 boot table format and
ignored for all other formats. If the value is greater than 0x7F, the value is truncated to 0x7F.
-spibrr value Specify the initial value for the SPIBRR register. This value is used only for the spi8 boot table format and
ignored for all other formats. If the value is greater than 0x7F, the value is truncated to 0x7F.
-e value Specify the entry point at which to begin execution after boot loading. The value can be an address or a global
symbol. This value is optional. The entry point can be defined at compile time using the linker -e option to assign
the entry point to a global symbol. The entry point for a C program is normally _c_int00 unless defined otherwise
by the -e linker option.
-i2c8 Specify the source of the bootloader table as the I2C-A port, 8-bit
-i2cpsc value Specify the value for the I2CPSC register. This value is loaded and takes effect after all I2C options are loaded,
prior to reading data from the EEPROM. This value is truncated to the least-significant eight bits and must be set
to maintain an I2C module clock of 7-12 MHz.
-i2cclkh value Specify the value for the I2CCLKH register. This value is loaded and takes effect after all I2C options are loaded,
prior to reading data from the EEPROM.
-i2cclkl value Specify the value for the I2CCLKL register. This value is loaded and takes effect after all I2C options are loaded,
prior to reading data from the EEPROM.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 761
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
5.9 Software
5.9.1 BOOT Examples
NOTE: These examples are located in the C2000Ware installation at the following location:
C2000Ware_VERSION#/driverlib/DEVICE_GPN/examples/CORE_IF_MULTICORE/boot
Cloud access to these examples is available at the following link: dev.ti.com C2000Ware Examples.
5.9.1.1 CM Secure Flash Boot
FILE: boot_ex1_cpu1_cpu2_cm_secure_flash_cm.c
This example demonstrates how to use the secure flash boot mode for CM. (Requires CPU1 example
application)
Secure flash boot performs a CMAC authentication on the entry sector of flash upon device boot up. If
authentication passes, the application will begin execution. Learn more on the secure flash boot mode in the
device technical reference manual.
This project shows how to use the C2000 HEX Utility to generate a CMAC Tag based on a user CMAC key and
embed the value into the flash application. Additionally, the example details the method to call the CMAC API
from the user application to calculate CMAC on other flash sectors beyond the the application entry flash sector.
Determining Pass/Fail without debugger connected: CM - ControlCARD LED3.
• LED off = Secure Boot failed
• LED On (Solid) = Secure Boot Passed, Full Flash CMAC failed
• LED Blinking = Secure Boot Passed and Full Flash CMAC passed
External Connections
• None.
Watch Variables
• None.
5.9.1.2 CPU1 Secure Flash Boot
FILE: boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.c
This example demonstrates how to use the secure flash boot mode for CPU1 as well as release CPU2 and CM
for secure flash boot.
Secure flash boot performs a CMAC authentication on the entry sector of flash upon device boot up. If
authentication passes, the application will begin execution. Learn more on the secure flash boot mode in the
device technical reference manual.
This project shows how to use the C2000 HEX Utility to generate a CMAC Tag based on a user CMAC key and
embed the value into the flash application. Additionally, the example details the method to call the CMAC API
from the user application to calculate CMAC on other flash sectors beyond the the application entry flash sector.
How to Run:
• Load application into CPU1 flash (as well as CPU2 and CM applications)
• Disconnect and reconnect to only CPU1
• In memory window, set address 0xD00/D01 to 0x5AFFFFFF and address 0xD04 to 0x000A (This sets
emulation boot to secure flash boot)
• Reset CPU1 via CCS and click resume
• Observe the LEDs
Determining Pass/Fail without debugger connected: CPU1 - ControlCARD LED1.
• LED off = Secure Boot failed
• LED On (Solid) = Secure Boot Passed, Full Flash CMAC failed
• LED Blinking = Secure Boot Passed and Full Flash CMAC passed CPU2 - ControlCARD LED2.
• LED off = Secure Boot failed
762 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 763
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
764 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
Chapter 6
Dual Code Security Module (DCSM)
6.1 Introduction...............................................................................................................................................................766
6.2 Functional Description.............................................................................................................................................766
6.3 Flash and OTP Erase/Program................................................................................................................................774
6.4 Secure Copy Code....................................................................................................................................................774
6.5 SecureCRC................................................................................................................................................................775
6.6 CSM Impact on Other On-Chip Resources.............................................................................................................775
6.7 Incorporating Code Security in User Applications................................................................................................777
6.8 Software.................................................................................................................................................................... 782
6.9 DCSM Registers........................................................................................................................................................784
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 765
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.1 Introduction
The dual code security module (DCSM) is a security feature incorporated in this device. It prevents access and
visibility to on-chip secure memories (and other secure resources) by unauthorized persons. It also prevents
duplication and reverse-engineering of proprietary code. The term “secure” means that access to on-chip secure
memories and resources is blocked. The term “unsecure” means that access is allowed; that is, the contents
of the memory could be read by any means (for example, through a debugging tool such as Code Composer
Studio™ IDE.
There are two security zones, Zone1 (Z1) and Zone2 (Z2). Unlike earlier C2000 devices where each CPU
subsystem had two security zones, on this device, both security zones are shared by each CPU subsystem.
This means secure resources from each CPU subsystem are allocated to Zone1 or Zone2. All the security
configurations are controlled by the CPU1 subsystem only (programmed in CPU1 USER OTP). Other CPU
subsystems have only read access to these configurations via their own memory map registers.
6.1.1 DCSM Related Collateral
766 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
(1) Zone1 must be unsecure. Assumption in this case is that user is not using Zone1 so none of the fields, including passwords, in Zone1
USER OTP are programmed by user hence Zone1 will always be unsecure.
(2) Zone2 must be unsecure. Assumption in this case is that user is not using Zone2 so none of the fields, including passwords, in Zone2
USER OTP are programmed by user hence Zone2 will always be unsecure.
Note
You should never program any other values in these fields. Failing any these conditions for a RAM
block/Flash sector will make that RAM block/Flash sector inaccessible.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 767
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
768 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 769
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
Note
Password unlock only makes password locations non-secure. All other secure memories remains
secure as per security settings. Since password locations are non-secure, anyone can read the
password and make the zone un-secure by running through PMF, user must program PSWDLOCK
locations to lock the password before sending the device in field.
770 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.2.6 JTAGLOCK
Sometimes you want to disable the JTAG access on a device to avoid any debug access to it. This can be done
by using the JTAGLOCK feature on this device. You need to follow a two step process to enable the JTAGLOCK
feature (both steps can be performed at the same time).
1. Program the JTAG passwords. This device has a 128-bit JTAG password that needs to be programmed
in Z1 USER OTP of CPU1. JTAG passwords are split into two parts, JTAGPSWDH and JTAGPSWDL.
JTAGPSWDH is part of the Z1 USER OTP header and JTAGPSWDL is part of the Z1 Zone Select Block
(ZSB). What this means is program JTAGPSWDH once and change the JTAGPSWDL multiple times, if
needed. The Code Composer Studio™ IDE has an integrated tool that you need to use to unlock the
JTAGLOCK on the device.
2. After programming the JTAG passwords, you need to enable the JTAGLOCK module (JLM) by programming
bit [3:0] of Z1OTP_JLM_ENABLE with any value other than 0xF. It is recommended to program all four bits
with a value 0x0.
For more details on how to enable and disable the JTAGLOCK feature, refer to the Enhancing Device Security
by Using JTAGLOCK Feature Application Report.
6.2.7 Link Pointer and Zone Select
For each of the two security zones, a dedicated OTP block exists on CPU1 that holds the configuration related to
zone’s security. The following are user programmable configurations:
• ZxOTP_LINKPOINTER1 • ZxOTP_CSMPSWD1
• ZxOTP_LINKPOINTER2 • ZxOTP_CSMPSWD2
• ZxOTP_LINKPOINTER3 • ZxOTP_CSMPSWD3
• Z1OTP_JLM_ENABLE • ZxOTP_GRABSECT1
• ZxOTP_GPREG1 • ZxOTP_GRABSECT2
• ZxOTP_GPREG2 • ZxOTP_GRABSECT3
• ZxOTP_GPREG3 • ZxOTP_GRABRAM1
• ZxOTP_GPREG4 • ZxOTP_GRABRAM2
• ZxOTP_PSWDLOCK • ZxOTP_GRABRAM3
• ZxOTP_CRCLOCK • ZxOTP_EXEONLYSECT1
• Z1OTP_JTAGPSWDH • ZxOTP_EXEONLYSECT2
• Z1OTP_CMACKEY • ZxOTP_EXEONLYRAM1
• ZxOTP_CSMPSWD0 • Z1OTP_JTAGPSWDL
Since OTP cannot be erased, the following configurations are placed in zone select blocks of each zone’s OTP
Flash of both the banks:
• ZxOTP_CSMPSWD0 • ZxOTP_GRABRAM1
• ZxOTP_CSMPSWD1 • ZxOTP_GRABRAM2
• ZxOTP_CSMPSWD2 • ZxOTP_GRABRAM3
• ZxOTP_CSMPSWD3 • ZxOTP_EXEONLYSECT1
• ZxOTP_GRABSECT1 • ZxOTP_EXEONLYSECT2
• ZxOTP_GRABSECT2 • ZxOTP_EXEONLYRAM1
• ZxOTP_GRABSECT3 • Z1OTP_JTAGPSWDL
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 771
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
The location of the valid zone select block in OTP is decided based on the value of three 14-bit link pointers
(Zx-LINKPOINTERx) programmed in the OTP of each zone. All OTP locations except link pointers and
Z1OTP_JLM_ENABLE locations are protected with ECC. Since the link pointer locations are not protected
with ECC, three link pointers are provided that need to be programmed with the same value. The final value of
the link pointer is resolved in hardware, when a dummy read is done to all the link pointers, by comparing all
the three values (bit-wise voting logic). Since in OTP, a ‘1’ can be flipped by the user to ‘0’ but ‘0’ can not be
flipped to ‘1’ (no erase operation for OTP), the most significant bit position in the resolved link pointer which is
‘0’, defines the valid base address for the zone select block. While generating the final link pointer value, if the bit
pattern is not one of those listed in Figure 6-1, the final link pointer value becomes All_1 (0xFFFF_FFFF), which
selects the Zone-Select-Block1 (also known as the default zone select block).
Selected Zone1 ZSB Zone2 ZSB
Zx-LINKPOINTER
ZSB Address Address
Note
Address locations for other security settings that are not part of Zone Select blocks can be
programmed only once; therefore, you can program the blocks towards the end of the development
cycle.
772 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
0x18 ZxOTP_EXEONLYRAM1
Zone Select Block 15
Zone Select Block 15 0x783E0
0x781E0 (32x16 Bits)
(32x16 Bits) 0x1a Reserved
0x1c ZxOTP_JTAGPSWDL0
0x1e ZxOTP_JTAGPSWDL1
CAUTION
USER OTP is ECC protected. You must program the ECC value while programming the security
setting in USER OTP. Failing to program the correct ECC value causes the device to be blocked
permanently and you have to replace the device.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 773
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.2.8 C Code Example to Get Zone Select Block Addr for Zone1
774 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.5 SecureCRC
Since reads from EXEONLY memories are not allowed, you cannot calculate the CRC on content in EXEONLY
memories using the CRC engine available on this device (for example, VCRC, GCRC) or software. In some
safety-critical applications, the user may have to calculate the CRC even on these memories. To enable this
without compromising on security, TI provides specific “SecureCRC” library functions for each zone. These
functions do the CRC calculation in highly secure environment and allow a CRC calculation to be performed only
when the following conditions are met:
• The source address should be modulo the number of words (based on length_id) for which the CRC needs to
be calculated.
• The destination address should belong to the same zone as the source address.
For further usage of these library functions, see the device-specific Boot ROM documentation.
Note
You must disable all the interrupts before calling the secure functions in ROM. If there is a vector fetch
during secure function execution, the CPU gets reset immediately.
Disclaimer: The Code Security Module (CSM) included on this device was designed to password protect the
data stored in the associated memory and is warranted by Texas Instruments (TI), in accordance with its
standard terms and conditions, to conform to TI's published specifications for the warranty period applicable
for this device. TI DOES NOT, HOWEVER, WARRANT OR REPRESENT THAT THE CSM CANNOT BE
COMPROMISED OR BREACHED OR THAT THE DATA STORED IN THE ASSOCIATED MEMORY CANNOT
BE ACCESSED THROUGH OTHER MEANS. MOREOVER, EXCEPT AS SET FORTH ABOVE, TI MAKES
NO WARRANTIES OR REPRESENTATIONS CONCERNING THE CSM OR OPERATION OF THIS DEVICE,
INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE. IN NO EVENT SHALL TI BE LIABLE FOR ANY CONSEQUENTIAL, SPECIAL, INDIRECT,
INCIDENTAL, OR PUNITIVE DAMAGES, HOWEVER CAUSED, ARISING IN ANY WAY OUT OF YOUR USE
OF THE CSM OR THIS DEVICE, WHETHER OR NOT TI HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES. EXCLUDED DAMAGES INCLUDE, BUT ARE NOT LIMITED TO LOSS OF DATA, LOSS OF
GOODWILL, LOSS OF USE OR INTERRUPTION OF BUSINESS OR OTHER ECONOMIC LOSS.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 775
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
Note
Security Initialization is done by CPU1 BOOTROM code on all the resets (as part of device
initialization) which assert CPU1 SYSRSn. This will not be part of user application code
The order of initialization matters hence if a memory watch window with the USER OTP address is
opened in the debugger (CCS) the security initialization could occur in an incorrect order, locking the
device down. To avoid this, user should not keep a memory window with USER OTP address opened
in the debugger(CCS) when performing a reset.
776 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 777
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
START
NO
Correct
Password ?
YES
Zone Unsecure
778 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
volatile long int *CSM = (volatile long int *)5F010; //CSM register file volatile
long int *CSMPWL = (volatile long int *)0x78020; //CSM Password location (assuming default Zone
select block)
volatile int tmp;
int I;
// Read the 128-bits of the CSM password locations (PWL)
//
for (I=0;I<4; I++) tmp = *CSMPWL++;
// Write the 128-bit password to the CSMKEY registers
// If this password matches that stored in the
// CSLPWL then the CSM will become unsecure. If it does not
// match, then the zone will remain secure.
// An example password of: // 0x11112222333344445555666677778888 is used.
*CSM++ = 0x22221111; // Register Z1_CSMKEY0 at 0x5F010
*CSM++ = 0x44443333; // Register Z1_CSMKEY1 at 0x5F012
*CSM++ = 0x66665555; // Register Z1_CSMKEY2 at 0x5F014
*CSM++ = 0x88887777; // Register Z1_CSMKEY3 at 0x5F016
Note
User must use the FORCESEC feature to resecure the zone from same subsystem that has unlocked
the zone. For example, if CM subsystem has unlocked the Zone1 by entering the CSM password in
CSMKEYx ,then only CM subsystem should resecure the Zone1 using FORCESEC feature.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 779
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
START
NO
Correct
Password ?
YES
780 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
volatile long int *ECSL = (volatile int *)0x5F010; //ECSL register file
volatile long int *ECSLPWL = (volatile int *)0x78028; //ECSL Password location (assuming default
Zone sel block)
volatile int tmp;
int I;
// Read the 64-bits of the password locations (PWL).
for (I=0;I<2; I++) tmp = *ECSLPWL++;
// Write the 64-bit password to the CSMKEYx registers
// If this password matches that stored in the
// CSMPWL then ECSL will get disable. If it does not
// match, then the zone will remain secure.
// An example password of: // 0x1111222233334444 is used.
*ECSL++ = 0x22221111; // Register Z1_CSMKEY0 at 0x5F010
*ECSL++ = 0x44443333; // Register Z1_CSMKEY1 at 0x5F012
Note
If the CM subsystem is out of reset when ECSL is unlocked by any of the subsystem, one must reset
the CM before trying to lock the ECSL again. Unless CM is reset, ECSL can not be locked again by
entering the incorrect KEY or using the FORCESEC.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 781
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.8 Software
6.8.1 DCSM Examples
NOTE: These examples are located in the C2000Ware installation at the following location:
C2000Ware_VERSION#/driverlib/DEVICE_GPN/examples/CORE_IF_MULTICORE/dcsm
Cloud access to these examples is available at the following link: dev.ti.com C2000Ware Examples.
6.8.1.1 Empty DCSM Tool Example
FILE: dcsm_security_tool.c This example is an empty project setup for DCSM Tool and Driverlib development.
For guidance refer to: C2000 DCSM Security Tool
6.8.1.2 DCSM Memory Access control by master CPU1 - C28X_CM
FILE: dcsm_ex1_cpu_access_control.c
This example demonstrates how to configure the 1st Zone Select Block in the OTP to allocate CM's C0RAM
to zone 1 & CM's C1RAM to zone 2, later accessed by CM. Zone1 | Zone2 | CM's C0RAM | CM's C1RAM
| In this example, zoning of memories is done by the OTP programming whose values are configured in
dcsm_ex1_f2838x_dcsm_zxotp.asm while the securing functionalities are done through this file. It demonstrates
how to control the access of the memories which would later be accessed by CM. This would even do a dummy
read of the password needed by CM to unsecure the memory. The communication between the 2 CPUs are
done using IPC ( Inter process communication) through a synch function. This enables the CPU Core to wait
until the expected task is completed on the other core.
External Connections
• None.
Watch Variables
• result - Status of Memory Access control by CPU1
• set_error - Count of errors occurring during the execution of the example.
Before running the example, the below configuration is expected to be done through the
dcsm_ex1_f2838x_dcsm_zxotp.asm :
• Allocate CM's C0RAM to zone 1 , C1RAM to zone 2 ZSBx_Z1_GRABRAM2R 0x0AAAAA09
ZSBx_Z2_GRABRAM2R 0x0AAAAA06
• Password of zone 1 is 0xFFFFFFFF4D7FFFFFFFFFFFFFFFFFFFFF
• Password of zone 2 is 0xFFFFFFFF1F7FFFFFFFFFFFFFFFFFFFFF
6.8.1.3 DCSM Memory Access by CPU2 - C28X_DUAL
FILE: dcsm_ex1_cpu2_memory_access.c
This example demonstrates how the access of the memory is affected when the memories are secured by
CPU1. CPU1 allocate CPU2's LS4-LS5 to zone 1 & CPU2's LS6-LS7 to zone 2 using the 1st Zone Select Block.
Zone1 | Zone2 | CPU2's LS4-LS5 | CPU2's LS6-LS7 | It writes some data in the zones and checks after the
CPU1 does a memory locking and matches with the data set . Further, once the CPU2 unlocks the memories, it
matches with the data set written before CPU1 lock. Ideally after locking, zone1 should not be readable(or reads
a 0 value) and zone2 that is not secured matches the written data set. It demonstrates how to lock and and
unlock zone by showing where to put the password and how to check if it is secured or unsecured.
The communication between the 2 CPUs are handled using IPC (Inter process communication) through a synch
function. This enables the CPU Core to wait until the expected task is completed on the other core.
External Connections
• None.
Watch Variables
• result - Status of CPU2's secure memory access
782 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
• set_error, error_not_locked ,error_not_unlocked ,error1 - Count of errors occurring during the execution of
the example.
• Zone1_Locked_Array - Array demonstrating secured memory
• Unsecure_mem_Array - Array demonstrating Unsecured memory
6.8.1.4 DCSM Memory Access control by CPU1 - C28X_DUAL
FILE: dcsm_ex1_cpu1_access_control.c
This example demonstrates how to configure the 1st Zone Select Block in the OTP needed to allocate CPU2's
LS4-LS5 to zone 1 & CPU2's LS6-LS7 to zone 2, later accessed by CPU2. Zone1 | Zone2 | CPU2's LS4-LS5
| CPU2's LS6-LS7 | In this example, zoning of memories is done by the OTP programming whose values are
configured in dcsm_ex1_f2838x_dcsm_zxotp.asm while the securing functionalities are done through this file. It
demonstrates how to control the access of the memories which would later be accessed by CPU2. This would
even do a dummy read of the password needed by CPU2 to unsecure the memory. The communication between
the 2 CPUs are done using IPC ( Inter process communication) through a sync function. This enables the CPU
Core to wait until the expected task is completed on the other core.
External Connections
• None.
Watch Variables
• result - Status of Memory Access control by CPU1
• set_error - Count of errors occurring during the execution of the example.
Before running the example, the below configuration is expected to be done through the
dcsm_ex1_f2838x_dcsm_zxotp.asm :
• Allocate CPU2's LS4-LS5 to zone 1 , LS6-LS7 to zone 2 ZSBx_Z1_GRABRAM3R 0x0000A500
ZSBx_Z2_GRABRAM3R 0x00005A00
• Password of zone 1 is 0xFFFFFFFF4D7FFFFFFFFFFFFFFFFFFFFF
• Password of zone 2 is 0xFFFFFFFF1F7FFFFFFFFFFFFFFFFFFFFF
6.8.1.5 DCSM Memory partitioning Example
FILE: dcsm_ex1_secure_memory_partition.c
This example demonstrates how to configure and use DCSM. It configures the 1st Zone Select Block in the
OTP to change the zone passwords and allocates LS0-LS3 to zone 1 & LS4-LS7 to zone 2. Zone1 | Zone2 |
LS0-LS3 | LS4-LS7 | In this example, zoning of memories is done by the OTP programming whose values are
configured in dcsm_ex1_f2838x_dcsm_zxotp.asm while the securing functionalities are done through this file.
It writes some data in the zones and checks before locking and after locking and matches with the data set .
Ideally after locking zone1, the data set stored in zone1 should not be readable( or reads a 0 value) and
zone2 that is not secured matches the written data set. It demonstrates how to lock and and unlock zones by
showing where to put the password and how to check if it is secured or unsecured.
External Connections
• None.
Watch Variables
• result - Status of Secure memory partitioning done through OTP programming.
• set_error, error_not_locked ,error_not_unlocked ,error1 - Count of errors occurring during the execution of
the example.
• Zone1_Locked_Array - Array demonstrating secured memory
• Unsecure_mem_Array - Array demonstrating Unsecured memory
Before running the example, the below configuration is expected to be done through the
dcsm_ex1_f2838x_dcsm_zxotp.asm :
• Allocate LS0-LS3 to zone 1 , LS4-LS7 to zone 2 ZSBx_Z1_GRABRAM1R 0x000AAA55
ZSBx_Z2_GRABRAM1R 0x000A55AA
• Password of zone 1 is 0xFFFFFFFF4D7FFFFFFFFFFFFFFFFFFFFF
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 783
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
Note
Except for the SECERRSTAT, SECERRCLR, and SECERRFRC registers, all other registers (non-
OTP space) are mapped on all three subsystems. For the CM subsystem, a x8 offset needs to be
used.
784 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
Complex bit access types are encoded to fit into small table cells. Table 6-7 shows the codes that are used for
access types in this section.
Table 6-7. DCSM_Z1_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 785
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
786 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.3.1 Z1_LINKPOINTER Register (Offset (x8) = 0h, Offset (x16) = 0h) [Reset = FFFFC000h]
Z1_LINKPOINTER is shown in Figure 6-5 and described in Table 6-8.
Return to the Summary Table.
Zone 1 Link Pointer
Figure 6-5. Z1_LINKPOINTER Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED LINKPOINTER
R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 787
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.3.2 Z1_OTPSECLOCK Register (Offset (x8) = 4h, Offset (x16) = 2h) [Reset = 1h]
Z1_OTPSECLOCK is shown in Figure 6-6 and described in Table 6-9.
Return to the Summary Table.
Zone 1 OTP Secure Lock
Figure 6-6. Z1_OTPSECLOCK Register
31 30 29 28 27 26 25 24
RESERVED
R-0h
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED CRCLOCK
R-0h R-0h
7 6 5 4 3 2 1 0
PSWDLOCK RESERVED JTAGLOCK
R-0h R-0h R-1h
788 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.3.3 Z1_JLM_ENABLE Register (Offset (x8) = 8h, Offset (x16) = 4h) [Reset = Fh]
Z1_JLM_ENABLE is shown in Figure 6-7 and described in Table 6-10.
Return to the Summary Table.
Zone 1 JTAGLOCK Enable Register
Figure 6-7. Z1_JLM_ENABLE Register
31 30 29 28 27 26 25 24
RESERVED
R-0h
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED Z1_JLM_ENABLE
R-0h R-Fh
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 789
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.3.4 Z1_LINKPOINTERERR Register (Offset (x8) = Ch, Offset (x16) = 6h) [Reset = 0h]
Z1_LINKPOINTERERR is shown in Figure 6-8 and described in Table 6-11.
Return to the Summary Table.
Link Pointer Error
Figure 6-8. Z1_LINKPOINTERERR Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED Z1_LINKPOINTERERR
R-0h R-0h
790 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.3.5 Z1_GPREG1 Register (Offset (x8) = 10h, Offset (x16) = 8h) [Reset = 0h]
Z1_GPREG1 is shown in Figure 6-9 and described in Table 6-12.
Return to the Summary Table.
Zone 1 General Purpose Register-1
Figure 6-9. Z1_GPREG1 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPREG1
R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 791
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.3.6 Z1_GPREG2 Register (Offset (x8) = 14h, Offset (x16) = Ah) [Reset = 0h]
Z1_GPREG2 is shown in Figure 6-10 and described in Table 6-13.
Return to the Summary Table.
Zone 1 General Purpose Register-2
Figure 6-10. Z1_GPREG2 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPREG2
R-0h
792 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.3.7 Z1_GPREG3 Register (Offset (x8) = 18h, Offset (x16) = Ch) [Reset = 0h]
Z1_GPREG3 is shown in Figure 6-11 and described in Table 6-14.
Return to the Summary Table.
Zone 1 General Purpose Register-3
Figure 6-11. Z1_GPREG3 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPREG3
R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 793
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.3.8 Z1_GPREG4 Register (Offset (x8) = 1Ch, Offset (x16) = Eh) [Reset = 0h]
Z1_GPREG4 is shown in Figure 6-12 and described in Table 6-15.
Return to the Summary Table.
Zone 1 General Purpose Register-4
Figure 6-12. Z1_GPREG4 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPREG4
R-0h
794 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.3.9 Z1_CSMKEY0 Register (Offset (x8) = 20h, Offset (x16) = 10h) [Reset = 0h]
Z1_CSMKEY0 is shown in Figure 6-13 and described in Table 6-16.
Return to the Summary Table.
Zone 1 CSM Key 0
Figure 6-13. Z1_CSMKEY0 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z1_CSMKEY0
R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 795
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.3.10 Z1_CSMKEY1 Register (Offset (x8) = 24h, Offset (x16) = 12h) [Reset = 0h]
Z1_CSMKEY1 is shown in Figure 6-14 and described in Table 6-17.
Return to the Summary Table.
Zone 1 CSM Key 1
Figure 6-14. Z1_CSMKEY1 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z1_CSMKEY1
R/W-0h
796 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.3.11 Z1_CSMKEY2 Register (Offset (x8) = 28h, Offset (x16) = 14h) [Reset = 0h]
Z1_CSMKEY2 is shown in Figure 6-15 and described in Table 6-18.
Return to the Summary Table.
Zone 1 CSM Key 2
Figure 6-15. Z1_CSMKEY2 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z1_CSMKEY2
R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 797
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.3.12 Z1_CSMKEY3 Register (Offset (x8) = 2Ch, Offset (x16) = 16h) [Reset = 0h]
Z1_CSMKEY3 is shown in Figure 6-16 and described in Table 6-19.
Return to the Summary Table.
Zone 1 CSM Key 3
Figure 6-16. Z1_CSMKEY3 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z1_CSMKEY3
R/W-0h
798 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.3.13 Z1_CR Register (Offset (x8) = 30h, Offset (x16) = 18h) [Reset = 00080000h]
Z1_CR is shown in Figure 6-17 and described in Table 6-20.
Return to the Summary Table.
Zone 1 CSM Control Register
Figure 6-17. Z1_CR Register
31 30 29 28 27 26 25 24
FORCESEC RESERVED
R-0/W-0h R-0h
23 22 21 20 19 18 17 16
RESERVED ARMED UNSECURE ALLONE ALLZERO RESERVED
R-0h R-0h R-0h R-0h R-1h R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED RESERVED RESERVED
R-0h R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 799
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.3.14 Z1_GRABSECT1R Register (Offset (x8) = 34h, Offset (x16) = 1Ah) [Reset = 0h]
Z1_GRABSECT1R is shown in Figure 6-18 and described in Table 6-21.
Return to the Summary Table.
Zone 1 Grab Flash Status Register 1
Figure 6-18. Z1_GRABSECT1R Register
31 30 29 28 27 26 25 24
RESERVED GRAB_SECT13 GRAB_SECT12
R-0h R-0h R-0h
23 22 21 20 19 18 17 16
GRAB_SECT11 GRAB_SECT10 GRAB_SECT9 GRAB_SECT8
R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
GRAB_SECT7 GRAB_SECT6 GRAB_SECT5 GRAB_SECT4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
GRAB_SECT3 GRAB_SECT2 GRAB_SECT1 GRAB_SECT0
R-0h R-0h R-0h R-0h
800 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 801
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
802 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.3.15 Z1_GRABSECT2R Register (Offset (x8) = 38h, Offset (x16) = 1Ch) [Reset = 0h]
Z1_GRABSECT2R is shown in Figure 6-19 and described in Table 6-22.
Return to the Summary Table.
Zone 1 Grab Flash Status Register 2
Figure 6-19. Z1_GRABSECT2R Register
31 30 29 28 27 26 25 24
RESERVED GRAB_SECT13 GRAB_SECT12
R-0h R-0h R-0h
23 22 21 20 19 18 17 16
GRAB_SECT11 GRAB_SECT10 GRAB_SECT9 GRAB_SECT8
R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
GRAB_SECT7 GRAB_SECT6 GRAB_SECT5 GRAB_SECT4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
GRAB_SECT3 GRAB_SECT2 GRAB_SECT1 GRAB_SECT0
R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 803
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
804 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 805
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.3.16 Z1_GRABSECT3R Register (Offset (x8) = 3Ch, Offset (x16) = 1Eh) [Reset = 0h]
Z1_GRABSECT3R is shown in Figure 6-20 and described in Table 6-23.
Return to the Summary Table.
Zone 1 Grab Flash Status Register 3
Figure 6-20. Z1_GRABSECT3R Register
31 30 29 28 27 26 25 24
RESERVED GRAB_SECT13 GRAB_SECT12
R-0h R-0h R-0h
23 22 21 20 19 18 17 16
GRAB_SECT11 GRAB_SECT10 GRAB_SECT9 GRAB_SECT8
R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
GRAB_SECT7 GRAB_SECT6 GRAB_SECT5 GRAB_SECT4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
GRAB_SECT3 GRAB_SECT2 GRAB_SECT1 GRAB_SECT0
R-0h R-0h R-0h R-0h
806 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 807
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
808 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.3.17 Z1_GRABRAM1R Register (Offset (x8) = 40h, Offset (x16) = 20h) [Reset = 0h]
Z1_GRABRAM1R is shown in Figure 6-21 and described in Table 6-24.
Return to the Summary Table.
Zone 1 Grab RAM Status Register 1
Figure 6-21. Z1_GRABRAM1R Register
31 30 29 28 27 26 25 24
RESERVED
R-0h
23 22 21 20 19 18 17 16
RESERVED GRAB_RAM9 GRAB_RAM8
R-0h R-0h R-0h
15 14 13 12 11 10 9 8
GRAB_RAM7 GRAB_RAM6 GRAB_RAM5 GRAB_RAM4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
GRAB_RAM3 GRAB_RAM2 GRAB_RAM1 GRAB_RAM0
R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 809
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
810 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.3.18 Z1_GRABRAM2R Register (Offset (x8) = 44h, Offset (x16) = 22h) [Reset = 0h]
Z1_GRABRAM2R is shown in Figure 6-22 and described in Table 6-25.
Return to the Summary Table.
Zone 1 Grab RAM Status Register 2
Figure 6-22. Z1_GRABRAM2R Register
31 30 29 28 27 26 25 24
GRAB_RAM15 GRAB_RAM14 GRAB_RAM13 GRAB_RAM12
R-0h R-0h R-0h R-0h
23 22 21 20 19 18 17 16
GRAB_RAM11 GRAB_RAM10 GRAB_RAM9 GRAB_RAM8
R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
GRAB_RAM7 GRAB_RAM6 GRAB_RAM5 GRAB_RAM4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
RESERVED GRAB_RAM1 GRAB_RAM0
R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 811
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
812 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 813
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.3.19 Z1_GRABRAM3R Register (Offset (x8) = 48h, Offset (x16) = 24h) [Reset = 0h]
Z1_GRABRAM3R is shown in Figure 6-23 and described in Table 6-26.
Return to the Summary Table.
Zone 1 Grab RAM Status Register 3
Figure 6-23. Z1_GRABRAM3R Register
31 30 29 28 27 26 25 24
RESERVED
R-0h
23 22 21 20 19 18 17 16
RESERVED GRAB_RAM9 GRAB_RAM8
R-0h R-0h R-0h
15 14 13 12 11 10 9 8
GRAB_RAM7 GRAB_RAM6 GRAB_RAM5 GRAB_RAM4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
GRAB_RAM3 GRAB_RAM2 GRAB_RAM1 GRAB_RAM0
R-0h R-0h R-0h R-0h
814 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 815
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.3.20 Z1_EXEONLYSECT1R Register (Offset (x8) = 4Ch, Offset (x16) = 26h) [Reset = 0h]
Z1_EXEONLYSECT1R is shown in Figure 6-24 and described in Table 6-27.
Return to the Summary Table.
Zone 1 Execute Only Flash Status Register 1
Figure 6-24. Z1_EXEONLYSECT1R Register
31 30 29 28 27 26 25 24
RESERVED EXEONLY_CM EXEONLY_CM EXEONLY_CM EXEONLY_CM EXEONLY_CM EXEONLY_CM
_SECT13 _SECT12 _SECT11 _SECT10 _SECT9 _SECT8
R-0h R-0h R-0h R-0h R-0h R-0h R-0h
23 22 21 20 19 18 17 16
EXEONLY_CM EXEONLY_CM EXEONLY_CM EXEONLY_CM EXEONLY_CM EXEONLY_CM EXEONLY_CM EXEONLY_CM
_SECT7 _SECT6 _SECT5 _SECT4 _SECT3 _SECT2 _SECT1 _SECT0
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
RESERVED EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP
U1_SECT13 U1_SECT12 U1_SECT11 U1_SECT10 U1_SECT9 U1_SECT8
R-0h R-0h R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP
U1_SECT7 U1_SECT6 U1_SECT5 U1_SECT4 U1_SECT3 U1_SECT2 U1_SECT1 U1_SECT0
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
816 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 817
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
818 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 819
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.3.21 Z1_EXEONLYSECT2R Register (Offset (x8) = 50h, Offset (x16) = 28h) [Reset = 0h]
Z1_EXEONLYSECT2R is shown in Figure 6-25 and described in Table 6-28.
Return to the Summary Table.
Zone 1 Execute Only Flash Status Register 2
Figure 6-25. Z1_EXEONLYSECT2R Register
31 30 29 28 27 26 25 24
RESERVED
R-0h
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP
U2_SECT13 U2_SECT12 U2_SECT11 U2_SECT10 U2_SECT9 U2_SECT8
R-0h R-0h R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP
U2_SECT7 U2_SECT6 U2_SECT5 U2_SECT4 U2_SECT3 U2_SECT2 U2_SECT1 U2_SECT0
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
820 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 821
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
822 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.3.22 Z1_EXEONLYRAM1R Register (Offset (x8) = 54h, Offset (x16) = 2Ah) [Reset = 0h]
Z1_EXEONLYRAM1R is shown in Figure 6-26 and described in Table 6-29.
Return to the Summary Table.
Zone 1 Execute Only RAM Status Register 1
Figure 6-26. Z1_EXEONLYRAM1R Register
31 30 29 28 27 26 25 24
EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA
M31 M30 M29 M28 M27 M26 M25 M24
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
23 22 21 20 19 18 17 16
EXEONLY_RA EXEONLY_RA RESERVED EXEONLY_RA EXEONLY_RA
M23 M22 M17 M16
R-0h R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
RESERVED EXEONLY_RA EXEONLY_RA
M9 M8
R-0h R-0h R-0h
7 6 5 4 3 2 1 0
EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA
M7 M6 M5 M4 M3 M2 M1 M0
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 823
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
824 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 825
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
826 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.3.23 Z1_JTAGKEY0 Register (Offset (x8) = 5Ch, Offset (x16) = 2Eh) [Reset = 0h]
Z1_JTAGKEY0 is shown in Figure 6-27 and described in Table 6-30.
Return to the Summary Table.
JTAG Unlock Key Register 0
Figure 6-27. Z1_JTAGKEY0 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
KEY0
R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 827
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.3.24 Z1_JTAGKEY1 Register (Offset (x8) = 60h, Offset (x16) = 30h) [Reset = 0h]
Z1_JTAGKEY1 is shown in Figure 6-28 and described in Table 6-31.
Return to the Summary Table.
JTAG Unlock Key Register 1
Figure 6-28. Z1_JTAGKEY1 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
KEY1
R-0h
828 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.3.25 Z1_JTAGKEY2 Register (Offset (x8) = 64h, Offset (x16) = 32h) [Reset = 0h]
Z1_JTAGKEY2 is shown in Figure 6-29 and described in Table 6-32.
Return to the Summary Table.
JTAG Unlock Key Register 2
Figure 6-29. Z1_JTAGKEY2 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
KEY2
R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 829
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.3.26 Z1_JTAGKEY3 Register (Offset (x8) = 68h, Offset (x16) = 34h) [Reset = 0h]
Z1_JTAGKEY3 is shown in Figure 6-30 and described in Table 6-33.
Return to the Summary Table.
JTAG Unlock Key Register 3
Figure 6-30. Z1_JTAGKEY3 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
KEY3
R-0h
830 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.3.27 Z1_CMACKEY0 Register (Offset (x8) = 6Ch, Offset (x16) = 36h) [Reset = 0h]
Z1_CMACKEY0 is shown in Figure 6-31 and described in Table 6-34.
Return to the Summary Table.
Secure Boot CMAC Key Status Register 0
Figure 6-31. Z1_CMACKEY0 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
KEY0
R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 831
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.3.28 Z1_CMACKEY1 Register (Offset (x8) = 70h, Offset (x16) = 38h) [Reset = 0h]
Z1_CMACKEY1 is shown in Figure 6-32 and described in Table 6-35.
Return to the Summary Table.
Secure Boot CMAC Key Status Register 1
Figure 6-32. Z1_CMACKEY1 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
KEY1
R-0h
832 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.3.29 Z1_CMACKEY2 Register (Offset (x8) = 74h, Offset (x16) = 3Ah) [Reset = 0h]
Z1_CMACKEY2 is shown in Figure 6-33 and described in Table 6-36.
Return to the Summary Table.
Secure Boot CMAC Key Status Register 2
Figure 6-33. Z1_CMACKEY2 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
KEY2
R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 833
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.3.30 Z1_CMACKEY3 Register (Offset (x8) = 78h, Offset (x16) = 3Ch) [Reset = 0h]
Z1_CMACKEY3 is shown in Figure 6-34 and described in Table 6-37.
Return to the Summary Table.
Secure Boot CMAC Key Status Register 3
Figure 6-34. Z1_CMACKEY3 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
KEY3
R-0h
834 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
Complex bit access types are encoded to fit into small table cells. Table 6-39 shows the codes that are used for
access types in this section.
Table 6-39. DCSM_Z2_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 835
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
836 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.4.1 Z2_LINKPOINTER Register (Offset (x8) = 0h, Offset (x16) = 0h) [Reset = FFFFC000h]
Z2_LINKPOINTER is shown in Figure 6-35 and described in Table 6-40.
Return to the Summary Table.
Zone 2 Link Pointer
Figure 6-35. Z2_LINKPOINTER Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED LINKPOINTER
R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 837
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.4.2 Z2_OTPSECLOCK Register (Offset (x8) = 4h, Offset (x16) = 2h) [Reset = 1h]
Z2_OTPSECLOCK is shown in Figure 6-36 and described in Table 6-41.
Return to the Summary Table.
Zone 2 OTP Secure Lock
Figure 6-36. Z2_OTPSECLOCK Register
31 30 29 28 27 26 25 24
RESERVED
R-0h
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED CRCLOCK
R-0h R-0h
7 6 5 4 3 2 1 0
PSWDLOCK RESERVED JTAGLOCK
R-0h R-0h R-1h
838 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.4.3 Z2_LINKPOINTERERR Register (Offset (x8) = Ch, Offset (x16) = 6h) [Reset = 0h]
Z2_LINKPOINTERERR is shown in Figure 6-37 and described in Table 6-42.
Return to the Summary Table.
Link Pointer Error
Figure 6-37. Z2_LINKPOINTERERR Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED Z2_LINKPOINTERERR
R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 839
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.4.4 Z2_GPREG1 Register (Offset (x8) = 10h, Offset (x16) = 8h) [Reset = 0h]
Z2_GPREG1 is shown in Figure 6-38 and described in Table 6-43.
Return to the Summary Table.
Zone 2 General Purpose Register-1
Figure 6-38. Z2_GPREG1 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPREG1
R-0h
840 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.4.5 Z2_GPREG2 Register (Offset (x8) = 14h, Offset (x16) = Ah) [Reset = 0h]
Z2_GPREG2 is shown in Figure 6-39 and described in Table 6-44.
Return to the Summary Table.
Zone 2 General Purpose Register-2
Figure 6-39. Z2_GPREG2 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPREG2
R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 841
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.4.6 Z2_GPREG3 Register (Offset (x8) = 18h, Offset (x16) = Ch) [Reset = 0h]
Z2_GPREG3 is shown in Figure 6-40 and described in Table 6-45.
Return to the Summary Table.
Zone 2 General Purpose Register-3
Figure 6-40. Z2_GPREG3 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPREG3
R-0h
842 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.4.7 Z2_GPREG4 Register (Offset (x8) = 1Ch, Offset (x16) = Eh) [Reset = 0h]
Z2_GPREG4 is shown in Figure 6-41 and described in Table 6-46.
Return to the Summary Table.
Zone 2 General Purpose Register-4
Figure 6-41. Z2_GPREG4 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPREG4
R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 843
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.4.8 Z2_CSMKEY0 Register (Offset (x8) = 20h, Offset (x16) = 10h) [Reset = 0h]
Z2_CSMKEY0 is shown in Figure 6-42 and described in Table 6-47.
Return to the Summary Table.
Zone 2 CSM Key 0
Figure 6-42. Z2_CSMKEY0 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z2_CSMKEY0
R/W-0h
844 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.4.9 Z2_CSMKEY1 Register (Offset (x8) = 24h, Offset (x16) = 12h) [Reset = 0h]
Z2_CSMKEY1 is shown in Figure 6-43 and described in Table 6-48.
Return to the Summary Table.
Zone 2 CSM Key 1
Figure 6-43. Z2_CSMKEY1 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z2_CSMKEY1
R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 845
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.4.10 Z2_CSMKEY2 Register (Offset (x8) = 28h, Offset (x16) = 14h) [Reset = 0h]
Z2_CSMKEY2 is shown in Figure 6-44 and described in Table 6-49.
Return to the Summary Table.
Zone 2 CSM Key 2
Figure 6-44. Z2_CSMKEY2 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z2_CSMKEY2
R/W-0h
846 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.4.11 Z2_CSMKEY3 Register (Offset (x8) = 2Ch, Offset (x16) = 16h) [Reset = 0h]
Z2_CSMKEY3 is shown in Figure 6-45 and described in Table 6-50.
Return to the Summary Table.
Zone 2 CSM Key 3
Figure 6-45. Z2_CSMKEY3 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z2_CSMKEY3
R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 847
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.4.12 Z2_CR Register (Offset (x8) = 30h, Offset (x16) = 18h) [Reset = 00080000h]
Z2_CR is shown in Figure 6-46 and described in Table 6-51.
Return to the Summary Table.
Zone 2 CSM Control Register
Figure 6-46. Z2_CR Register
31 30 29 28 27 26 25 24
FORCESEC RESERVED
R-0/W-0h R-0h
23 22 21 20 19 18 17 16
RESERVED ARMED UNSECURE ALLONE ALLZERO RESERVED
R-0h R-0h R-0h R-0h R-1h R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED RESERVED RESERVED
R-0h R-0h R-0h R-0h R-0h
848 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.4.13 Z2_GRABSECT1R Register (Offset (x8) = 34h, Offset (x16) = 1Ah) [Reset = 0h]
Z2_GRABSECT1R is shown in Figure 6-47 and described in Table 6-52.
Return to the Summary Table.
Zone 2 Grab Flash Status Register 1
Figure 6-47. Z2_GRABSECT1R Register
31 30 29 28 27 26 25 24
RESERVED GRAB_SECT13 GRAB_SECT12
R-0h R-0h R-0h
23 22 21 20 19 18 17 16
GRAB_SECT11 GRAB_SECT10 GRAB_SECT9 GRAB_SECT8
R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
GRAB_SECT7 GRAB_SECT6 GRAB_SECT5 GRAB_SECT4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
GRAB_SECT3 GRAB_SECT2 GRAB_SECT1 GRAB_SECT0
R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 849
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
850 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 851
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.4.14 Z2_GRABSECT2R Register (Offset (x8) = 38h, Offset (x16) = 1Ch) [Reset = 0h]
Z2_GRABSECT2R is shown in Figure 6-48 and described in Table 6-53.
Return to the Summary Table.
Zone 2 Grab Flash Status Register 2
Figure 6-48. Z2_GRABSECT2R Register
31 30 29 28 27 26 25 24
RESERVED GRAB_SECT13 GRAB_SECT12
R-0h R-0h R-0h
23 22 21 20 19 18 17 16
GRAB_SECT11 GRAB_SECT10 GRAB_SECT9 GRAB_SECT8
R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
GRAB_SECT7 GRAB_SECT6 GRAB_SECT5 GRAB_SECT4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
GRAB_SECT3 GRAB_SECT2 GRAB_SECT1 GRAB_SECT0
R-0h R-0h R-0h R-0h
852 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 853
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
854 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.4.15 Z2_GRABSECT3R Register (Offset (x8) = 3Ch, Offset (x16) = 1Eh) [Reset = 0h]
Z2_GRABSECT3R is shown in Figure 6-49 and described in Table 6-54.
Return to the Summary Table.
Zone 2 Grab Flash Status Register 3
Figure 6-49. Z2_GRABSECT3R Register
31 30 29 28 27 26 25 24
RESERVED GRAB_SECT13 GRAB_SECT12
R-0h R-0h R-0h
23 22 21 20 19 18 17 16
GRAB_SECT11 GRAB_SECT10 GRAB_SECT9 GRAB_SECT8
R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
GRAB_SECT7 GRAB_SECT6 GRAB_SECT5 GRAB_SECT4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
GRAB_SECT3 GRAB_SECT2 GRAB_SECT1 GRAB_SECT0
R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 855
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
856 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 857
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.4.16 Z2_GRABRAM1R Register (Offset (x8) = 40h, Offset (x16) = 20h) [Reset = 0h]
Z2_GRABRAM1R is shown in Figure 6-50 and described in Table 6-55.
Return to the Summary Table.
Zone 2 Grab RAM Status Register 1
Figure 6-50. Z2_GRABRAM1R Register
31 30 29 28 27 26 25 24
RESERVED
R-0h
23 22 21 20 19 18 17 16
RESERVED GRAB_RAM9 GRAB_RAM8
R-0h R-0h R-0h
15 14 13 12 11 10 9 8
GRAB_RAM7 GRAB_RAM6 GRAB_RAM5 GRAB_RAM4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
GRAB_RAM3 GRAB_RAM2 GRAB_RAM1 GRAB_RAM0
R-0h R-0h R-0h R-0h
858 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 859
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.4.17 Z2_GRABRAM2R Register (Offset (x8) = 44h, Offset (x16) = 22h) [Reset = 0h]
Z2_GRABRAM2R is shown in Figure 6-51 and described in Table 6-56.
Return to the Summary Table.
Zone 2 Grab RAM Status Register 2
Figure 6-51. Z2_GRABRAM2R Register
31 30 29 28 27 26 25 24
GRAB_RAM15 GRAB_RAM14 GRAB_RAM13 GRAB_RAM12
R-0h R-0h R-0h R-0h
23 22 21 20 19 18 17 16
GRAB_RAM11 GRAB_RAM10 GRAB_RAM9 GRAB_RAM8
R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
GRAB_RAM7 GRAB_RAM6 GRAB_RAM5 GRAB_RAM4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
RESERVED GRAB_RAM1 GRAB_RAM0
R-0h R-0h R-0h
860 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 861
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
862 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.4.18 Z2_GRABRAM3R Register (Offset (x8) = 48h, Offset (x16) = 24h) [Reset = 0h]
Z2_GRABRAM3R is shown in Figure 6-52 and described in Table 6-57.
Return to the Summary Table.
Zone 2 Grab RAM Status Register 3
Figure 6-52. Z2_GRABRAM3R Register
31 30 29 28 27 26 25 24
RESERVED
R-0h
23 22 21 20 19 18 17 16
RESERVED GRAB_RAM9 GRAB_RAM8
R-0h R-0h R-0h
15 14 13 12 11 10 9 8
GRAB_RAM7 GRAB_RAM6 GRAB_RAM5 GRAB_RAM4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
GRAB_RAM3 GRAB_RAM2 GRAB_RAM1 GRAB_RAM0
R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 863
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
864 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.4.19 Z2_EXEONLYSECT1R Register (Offset (x8) = 4Ch, Offset (x16) = 26h) [Reset = 0h]
Z2_EXEONLYSECT1R is shown in Figure 6-53 and described in Table 6-58.
Return to the Summary Table.
Zone 2 Execute Only Flash Status Register 1
Figure 6-53. Z2_EXEONLYSECT1R Register
31 30 29 28 27 26 25 24
RESERVED EXEONLY_CM EXEONLY_CM EXEONLY_CM EXEONLY_CM EXEONLY_CM EXEONLY_CM
_SECT13 _SECT12 _SECT11 _SECT10 _SECT9 _SECT8
R-0h R-0h R-0h R-0h R-0h R-0h R-0h
23 22 21 20 19 18 17 16
EXEONLY_CM EXEONLY_CM EXEONLY_CM EXEONLY_CM EXEONLY_CM EXEONLY_CM EXEONLY_CM EXEONLY_CM
_SECT7 _SECT6 _SECT5 _SECT4 _SECT3 _SECT2 _SECT1 _SECT0
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
RESERVED EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP
U1_SECT13 U1_SECT12 U1_SECT11 U1_SECT10 U1_SECT9 U1_SECT8
R-0h R-0h R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP
U1_SECT7 U1_SECT6 U1_SECT5 U1_SECT4 U1_SECT3 U1_SECT2 U1_SECT1 U1_SECT0
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 865
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
866 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 867
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
868 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.4.20 Z2_EXEONLYSECT2R Register (Offset (x8) = 50h, Offset (x16) = 28h) [Reset = 0h]
Z2_EXEONLYSECT2R is shown in Figure 6-54 and described in Table 6-59.
Return to the Summary Table.
Zone 2 Execute Only Flash Status Register 2
Figure 6-54. Z2_EXEONLYSECT2R Register
31 30 29 28 27 26 25 24
RESERVED
R-0h
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP
U2_SECT13 U2_SECT12 U2_SECT11 U2_SECT10 U2_SECT9 U2_SECT8
R-0h R-0h R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP EXEONLY_CP
U2_SECT7 U2_SECT6 U2_SECT5 U2_SECT4 U2_SECT3 U2_SECT2 U2_SECT1 U2_SECT0
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 869
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
870 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 871
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.4.21 Z2_EXEONLYRAM1R Register (Offset (x8) = 54h, Offset (x16) = 2Ah) [Reset = 0h]
Z2_EXEONLYRAM1R is shown in Figure 6-55 and described in Table 6-60.
Return to the Summary Table.
Zone 2 Execute Only RAM Status Register 1
Figure 6-55. Z2_EXEONLYRAM1R Register
31 30 29 28 27 26 25 24
EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA
M31 M30 M29 M28 M27 M26 M25 M24
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
23 22 21 20 19 18 17 16
EXEONLY_RA EXEONLY_RA RESERVED EXEONLY_RA EXEONLY_RA
M23 M22 M17 M16
R-0h R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
RESERVED EXEONLY_RA EXEONLY_RA
M9 M8
R-0h R-0h R-0h
7 6 5 4 3 2 1 0
EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA EXEONLY_RA
M7 M6 M5 M4 M3 M2 M1 M0
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
872 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 873
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
874 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 875
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 6-62 shows the codes that are used for
access types in this section.
Table 6-62. DCSM_COMMON_REGS Access Type
Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
W1S W Write
1S 1 to set
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
876 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.5.1 FLSEM Register (Offset (x8) = 0h, Offset (x16) = 0h) [Reset = 0h]
FLSEM is shown in Figure 6-56 and described in Table 6-63.
Return to the Summary Table.
Flash Wrapper Semaphore Register
Figure 6-56. FLSEM Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
KEY RESERVED SEM
R-0/W-0h R-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 877
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.5.2 SECTSTAT1 Register (Offset (x8) = 10h, Offset (x16) = 8h) [Reset = 0h]
SECTSTAT1 is shown in Figure 6-57 and described in Table 6-64.
Return to the Summary Table.
Flash Sectors Status Register 1
Figure 6-57. SECTSTAT1 Register
31 30 29 28 27 26 25 24
RESERVED STATUS_SECT13 STATUS_SECT12
R-0h R-0h R-0h
23 22 21 20 19 18 17 16
STATUS_SECT11 STATUS_SECT10 STATUS_SECT9 STATUS_SECT8
R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
STATUS_SECT7 STATUS_SECT6 STATUS_SECT5 STATUS_SECT4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
STATUS_SECT3 STATUS_SECT2 STATUS_SECT1 STATUS_SECT0
R-0h R-0h R-0h R-0h
878 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 879
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
880 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.5.3 SECTSTAT2 Register (Offset (x8) = 14h, Offset (x16) = Ah) [Reset = 0h]
SECTSTAT2 is shown in Figure 6-58 and described in Table 6-65.
Return to the Summary Table.
Flash Sectors Status Register 2
Figure 6-58. SECTSTAT2 Register
31 30 29 28 27 26 25 24
RESERVED STATUS_SECT13 STATUS_SECT12
R-0h R-0h R-0h
23 22 21 20 19 18 17 16
STATUS_SECT11 STATUS_SECT10 STATUS_SECT9 STATUS_SECT8
R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
STATUS_SECT7 STATUS_SECT6 STATUS_SECT5 STATUS_SECT4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
STATUS_SECT3 STATUS_SECT2 STATUS_SECT1 STATUS_SECT0
R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 881
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
882 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 883
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.5.4 SECTSTAT3 Register (Offset (x8) = 18h, Offset (x16) = Ch) [Reset = 0h]
SECTSTAT3 is shown in Figure 6-59 and described in Table 6-66.
Return to the Summary Table.
Flash Sectors Status Register 3
Figure 6-59. SECTSTAT3 Register
31 30 29 28 27 26 25 24
RESERVED STATUS_SECT13 STATUS_SECT12
R-0h R-0h R-0h
23 22 21 20 19 18 17 16
STATUS_SECT11 STATUS_SECT10 STATUS_SECT9 STATUS_SECT8
R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
STATUS_SECT7 STATUS_SECT6 STATUS_SECT5 STATUS_SECT4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
STATUS_SECT3 STATUS_SECT2 STATUS_SECT1 STATUS_SECT0
R-0h R-0h R-0h R-0h
884 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 885
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
886 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.5.5 RAMSTAT1 Register (Offset (x8) = 20h, Offset (x16) = 10h) [Reset = 0h]
RAMSTAT1 is shown in Figure 6-60 and described in Table 6-67.
Return to the Summary Table.
RAM Status Register 1
Figure 6-60. RAMSTAT1 Register
31 30 29 28 27 26 25 24
RESERVED
R-0h
23 22 21 20 19 18 17 16
RESERVED STATUS_RAM9 STATUS_RAM8
R-0h R-0h R-0h
15 14 13 12 11 10 9 8
STATUS_RAM7 STATUS_RAM6 STATUS_RAM5 STATUS_RAM4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
STATUS_RAM3 STATUS_RAM2 STATUS_RAM1 STATUS_RAM0
R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 887
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
888 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.5.6 RAMSTAT2 Register (Offset (x8) = 24h, Offset (x16) = 12h) [Reset = 0h]
RAMSTAT2 is shown in Figure 6-61 and described in Table 6-68.
Return to the Summary Table.
RAM Status Register 2
Figure 6-61. RAMSTAT2 Register
31 30 29 28 27 26 25 24
STATUS_RAM15 STATUS_RAM14 STATUS_RAM13 STATUS_RAM12
R-0h R-0h R-0h R-0h
23 22 21 20 19 18 17 16
STATUS_RAM11 STATUS_RAM10 STATUS_RAM9 STATUS_RAM8
R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
STATUS_RAM7 STATUS_RAM6 STATUS_RAM5 STATUS_RAM4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
RESERVED STATUS_RAM1 STATUS_RAM0
R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 889
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
890 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 891
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.5.7 RAMSTAT3 Register (Offset (x8) = 28h, Offset (x16) = 14h) [Reset = 0h]
RAMSTAT3 is shown in Figure 6-62 and described in Table 6-69.
Return to the Summary Table.
RAM Status Register 3
Figure 6-62. RAMSTAT3 Register
31 30 29 28 27 26 25 24
RESERVED
R-0h
23 22 21 20 19 18 17 16
RESERVED STATUS_RAM9 STATUS_RAM8
R-0h R-0h R-0h
15 14 13 12 11 10 9 8
STATUS_RAM7 STATUS_RAM6 STATUS_RAM5 STATUS_RAM4
R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
STATUS_RAM3 STATUS_RAM2 STATUS_RAM1 STATUS_RAM0
R-0h R-0h R-0h R-0h
892 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 893
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.5.8 SECERRSTAT Register (Offset (x8) = 30h, Offset (x16) = 18h) [Reset = 0h]
SECERRSTAT is shown in Figure 6-63 and described in Table 6-70.
Return to the Summary Table.
Security Error Status Register
Figure 6-63. SECERRSTAT Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED ERR
R-0h R-0h
894 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.5.9 SECERRCLR Register (Offset (x8) = 34h, Offset (x16) = 1Ah) [Reset = 0h]
SECERRCLR is shown in Figure 6-64 and described in Table 6-71.
Return to the Summary Table.
Security Error Clear Register
Figure 6-64. SECERRCLR Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED ERR
R-0h R-0/
W1S-0
h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 895
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.5.10 SECERRFRC Register (Offset (x8) = 38h, Offset (x16) = 1Ch) [Reset = 0h]
SECERRFRC is shown in Figure 6-65 and described in Table 6-72.
Return to the Summary Table.
Security Error Force Register
Figure 6-65. SECERRFRC Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
KEY
R-0/W-0h
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED ERR
R-0h R-0/
W1S-0
h
896 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
Complex bit access types are encoded to fit into small table cells. Table 6-74 shows the codes that are used for
access types in this section.
Table 6-74. DCSM_Z1_OTP Access Type Codes
Access Type Code Description
Read Type
R R Read
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 897
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.6.1 Z1OTP_LINKPOINTER1 Register (Offset (x8) = 0h, Offset (x16) = 0h) [Reset = FFFFFFFFh]
Z1OTP_LINKPOINTER1 is shown in Figure 6-66 and described in Table 6-75.
Return to the Summary Table.
Zone 1 Link Pointer1
Figure 6-66. Z1OTP_LINKPOINTER1 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z1OTP_LINKPOINTER1
R-FFFFFFFFh
898 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.6.2 Z1OTP_LINKPOINTER2 Register (Offset (x8) = 4h, Offset (x16) = 2h) [Reset = FFFFFFFFh]
Z1OTP_LINKPOINTER2 is shown in Figure 6-67 and described in Table 6-76.
Return to the Summary Table.
Zone 1 Link Pointer2
Figure 6-67. Z1OTP_LINKPOINTER2 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z1OTP_LINKPOINTER2
R-FFFFFFFFh
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 899
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.6.3 Z1OTP_LINKPOINTER3 Register (Offset (x8) = 8h, Offset (x16) = 4h) [Reset = FFFFFFFFh]
Z1OTP_LINKPOINTER3 is shown in Figure 6-68 and described in Table 6-77.
Return to the Summary Table.
Zone 1 Link Pointer3
Figure 6-68. Z1OTP_LINKPOINTER3 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z1OTP_LINKPOINTER3
R-FFFFFFFFh
900 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.6.4 Z1OTP_JLM_ENABLE Register (Offset (x8) = Ch, Offset (x16) = 6h) [Reset = FFFFFFFFh]
Z1OTP_JLM_ENABLE is shown in Figure 6-69 and described in Table 6-78.
Return to the Summary Table.
Zone 1 JTAGLOCK Enable Register
Figure 6-69. Z1OTP_JLM_ENABLE Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z1OTP_JLM_ENABLE
R-FFFFFFFFh
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 901
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.6.5 Z1OTP_GPREG1 Register (Offset (x8) = 10h, Offset (x16) = 8h) [Reset = FFFFFFFFh]
Z1OTP_GPREG1 is shown in Figure 6-70 and described in Table 6-79.
Return to the Summary Table.
Zone 1 General Purpose Register 1
Figure 6-70. Z1OTP_GPREG1 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z1OTP_GPREG1
R-FFFFFFFFh
902 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.6.6 Z1OTP_GPREG2 Register (Offset (x8) = 14h, Offset (x16) = Ah) [Reset = FFFFFFFFh]
Z1OTP_GPREG2 is shown in Figure 6-71 and described in Table 6-80.
Return to the Summary Table.
Zone 1 General Purpose Register 2
Figure 6-71. Z1OTP_GPREG2 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z1OTP_GPREG2
R-FFFFFFFFh
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 903
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.6.7 Z1OTP_GPREG3 Register (Offset (x8) = 18h, Offset (x16) = Ch) [Reset = FFFFFFFFh]
Z1OTP_GPREG3 is shown in Figure 6-72 and described in Table 6-81.
Return to the Summary Table.
Zone 1 General Purpose Register 3
Figure 6-72. Z1OTP_GPREG3 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z1OTP_GPREG3
R-FFFFFFFFh
904 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.6.8 Z1OTP_GPREG4 Register (Offset (x8) = 1Ch, Offset (x16) = Eh) [Reset = FFFFFFFFh]
Z1OTP_GPREG4 is shown in Figure 6-73 and described in Table 6-82.
Return to the Summary Table.
Zone 1 General Purpose Register 4
Figure 6-73. Z1OTP_GPREG4 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z1OTP_GPREG4
R-FFFFFFFFh
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 905
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.6.9 Z1OTP_PSWDLOCK Register (Offset (x8) = 20h, Offset (x16) = 10h) [Reset = FFFFFFFFh]
Z1OTP_PSWDLOCK is shown in Figure 6-74 and described in Table 6-83.
Return to the Summary Table.
Secure Password Lock
Figure 6-74. Z1OTP_PSWDLOCK Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z1OTP_PSWDLOCK
R-FFFFFFFFh
906 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.6.10 Z1OTP_CRCLOCK Register (Offset (x8) = 24h, Offset (x16) = 12h) [Reset = FFFFFFFFh]
Z1OTP_CRCLOCK is shown in Figure 6-75 and described in Table 6-84.
Return to the Summary Table.
Secure CRC Lock
Figure 6-75. Z1OTP_CRCLOCK Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z1OTP_CRCLOCK
R-FFFFFFFFh
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 907
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.6.11 Z1OTP_JTAGPSWDH0 Register (Offset (x8) = 28h, Offset (x16) = 14h) [Reset = FFFFFFFFh]
Z1OTP_JTAGPSWDH0 is shown in Figure 6-76 and described in Table 6-85.
Return to the Summary Table.
JTAG Lock Permanent Password 0
Figure 6-76. Z1OTP_JTAGPSWDH0 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
JTAGPSWDH0
R-FFFFFFFFh
908 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.6.12 Z1OTP_JTAGPSWDH1 Register (Offset (x8) = 2Ch, Offset (x16) = 16h) [Reset = FFFFFFFFh]
Z1OTP_JTAGPSWDH1 is shown in Figure 6-77 and described in Table 6-86.
Return to the Summary Table.
JTAG Lock Permanent Password 1
Figure 6-77. Z1OTP_JTAGPSWDH1 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
JTAGPSWDH1
R-FFFFFFFFh
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 909
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.6.13 Z1OTP_CMACKEY0 Register (Offset (x8) = 30h, Offset (x16) = 18h) [Reset = FFFFFFFFh]
Z1OTP_CMACKEY0 is shown in Figure 6-78 and described in Table 6-87.
Return to the Summary Table.
Secure Boot CMAC Key 0
Figure 6-78. Z1OTP_CMACKEY0 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CMACKEY0
R-FFFFFFFFh
910 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.6.14 Z1OTP_CMACKEY1 Register (Offset (x8) = 34h, Offset (x16) = 1Ah) [Reset = FFFFFFFFh]
Z1OTP_CMACKEY1 is shown in Figure 6-79 and described in Table 6-88.
Return to the Summary Table.
Secure Boot CMAC Key 1
Figure 6-79. Z1OTP_CMACKEY1 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CMACKEY1
R-FFFFFFFFh
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 911
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.6.15 Z1OTP_CMACKEY2 Register (Offset (x8) = 38h, Offset (x16) = 1Ch) [Reset = FFFFFFFFh]
Z1OTP_CMACKEY2 is shown in Figure 6-80 and described in Table 6-89.
Return to the Summary Table.
Secure Boot CMAC Key 2
Figure 6-80. Z1OTP_CMACKEY2 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CMACKEY2
R-FFFFFFFFh
912 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.6.16 Z1OTP_CMACKEY3 Register (Offset (x8) = 3Ch, Offset (x16) = 1Eh) [Reset = FFFFFFFFh]
Z1OTP_CMACKEY3 is shown in Figure 6-81 and described in Table 6-90.
Return to the Summary Table.
Secure Boot CMAC Key 3
Figure 6-81. Z1OTP_CMACKEY3 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CMACKEY3
R-FFFFFFFFh
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 913
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 6-92 shows the codes that are used for
access types in this section.
Table 6-92. DCSM_Z2_OTP Access Type Codes
Access Type Code Description
Read Type
R R Read
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
914 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.7.1 Z2OTP_LINKPOINTER1 Register (Offset (x8) = 0h, Offset (x16) = 0h) [Reset = FFFFFFFFh]
Z2OTP_LINKPOINTER1 is shown in Figure 6-82 and described in Table 6-93.
Return to the Summary Table.
Zone 2 Link Pointer1
Figure 6-82. Z2OTP_LINKPOINTER1 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z2OTP_LINKPOINTER1
R-FFFFFFFFh
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 915
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.7.2 Z2OTP_LINKPOINTER2 Register (Offset (x8) = 4h, Offset (x16) = 2h) [Reset = FFFFFFFFh]
Z2OTP_LINKPOINTER2 is shown in Figure 6-83 and described in Table 6-94.
Return to the Summary Table.
Zone 2 Link Pointer2
Figure 6-83. Z2OTP_LINKPOINTER2 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z2OTP_LINKPOINTER2
R-FFFFFFFFh
916 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.7.3 Z2OTP_LINKPOINTER3 Register (Offset (x8) = 8h, Offset (x16) = 4h) [Reset = FFFFFFFFh]
Z2OTP_LINKPOINTER3 is shown in Figure 6-84 and described in Table 6-95.
Return to the Summary Table.
Zone 2 Link Pointer3
Figure 6-84. Z2OTP_LINKPOINTER3 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z2OTP_LINKPOINTER3
R-FFFFFFFFh
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 917
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.7.4 Z2OTP_GPREG1 Register (Offset (x8) = 10h, Offset (x16) = 8h) [Reset = FFFFFFFFh]
Z2OTP_GPREG1 is shown in Figure 6-85 and described in Table 6-96.
Return to the Summary Table.
Zone 2 General Purpose Register 1
Figure 6-85. Z2OTP_GPREG1 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z2OTP_GPREG1
R-FFFFFFFFh
918 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.7.5 Z2OTP_GPREG2 Register (Offset (x8) = 14h, Offset (x16) = Ah) [Reset = FFFFFFFFh]
Z2OTP_GPREG2 is shown in Figure 6-86 and described in Table 6-97.
Return to the Summary Table.
Zone 2 General Purpose Register 2
Figure 6-86. Z2OTP_GPREG2 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z2OTP_GPREG2
R-FFFFFFFFh
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 919
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.7.6 Z2OTP_GPREG3 Register (Offset (x8) = 18h, Offset (x16) = Ch) [Reset = FFFFFFFFh]
Z2OTP_GPREG3 is shown in Figure 6-87 and described in Table 6-98.
Return to the Summary Table.
Zone 2 General Purpose Register 3
Figure 6-87. Z2OTP_GPREG3 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z2OTP_GPREG3
R-FFFFFFFFh
920 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.7.7 Z2OTP_GPREG4 Register (Offset (x8) = 1Ch, Offset (x16) = Eh) [Reset = FFFFFFFFh]
Z2OTP_GPREG4 is shown in Figure 6-88 and described in Table 6-99.
Return to the Summary Table.
Zone 2 General Purpose Register 4
Figure 6-88. Z2OTP_GPREG4 Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z2OTP_GPREG4
R-FFFFFFFFh
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 921
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
6.9.7.8 Z2OTP_PSWDLOCK Register (Offset (x8) = 20h, Offset (x16) = 10h) [Reset = FFFFFFFFh]
Z2OTP_PSWDLOCK is shown in Figure 6-89 and described in Table 6-100.
Return to the Summary Table.
Secure Password Lock
Figure 6-89. Z2OTP_PSWDLOCK Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z2OTP_PSWDLOCK
R-FFFFFFFFh
922 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
6.9.7.9 Z2OTP_CRCLOCK Register (Offset (x8) = 24h, Offset (x16) = 12h) [Reset = FFFFFFFFh]
Z2OTP_CRCLOCK is shown in Figure 6-90 and described in Table 6-101.
Return to the Summary Table.
Secure CRC Lock
Figure 6-90. Z2OTP_CRCLOCK Register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Z2OTP_CRCLOCK
R-FFFFFFFFh
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 923
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
924 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
Chapter 7
Background CRC-32 (BGCRC)
The Background CRC (BGCRC) module that helps to identify memory faults and corruption, is discussed in this
chapter.
7.1 Introduction...............................................................................................................................................................926
7.2 Functional Description.............................................................................................................................................928
7.3 Application of the BGCRC....................................................................................................................................... 930
7.4 Software.................................................................................................................................................................... 935
7.5 BGCRC Registers..................................................................................................................................................... 936
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 925
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
7.1 Introduction
The Background CRC (BGCRC) module computes a CRC-32 on a configurable block of memory. It
accomplishes this by fetching the specified block of memory during idle cycles (when the CPU, CLA, or DMA
is not accessing the memory block). The calculated CRC-32 value is compared against a golden CRC-32 value
to indicate a pass or fail. In essence, the BGCRC helps identify memory faults and corruption. There are two
BGCRC modules (CPU_CRC and CLA_CRC) per CPU subsystem. The two BGCRC modules differ only in the
memories they test.
7.1.1 BGCRC Related Collateral
926 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 927
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
928 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 929
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
930 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
CFG1 registers are expected to be locked and committed after initial configuration. It is recommended to lock the
CFG2 and CFG3 registers after configuration. Figure 7-5 shows the BGCRC execution sequence.
Table 7-1. BGCRC Register Groups
CFG1 - One Time CFG2 - Periodic CFG3 - Registers Used for Test and Error
Configuration Registers Configuration Registers Management
BGCRC_CTRL1 BGCRC_EN BGCRC_NMICLR
BGCRC_WD_CFG BGCRC_CTRL2 BGCRC_INTCLR
BGCRC_INTEN BGCRC_START_ADDR BGCRC_NMIFRC
BGCRC_SEED BGCRC_GOLDEN BGCRC_INTFRC
BGCRC_WD_MIN
BGCRC_WD_MAX
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 931
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
932 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 933
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
The BGCRC order of byte calculations of the above example is 0x78, 0x56, 0x34, 0x12 and yields 0x6A330D2D.
The 32-bit polynomial 0x04C11DB7 is used with an initialization vector of 0x00000000. The following code
snippet shows the effective bit processing. Processing for all 32-bits within a word occurs in a single cycle within
the BGCRC hardware.
crc32 = byteSwappedData^crc32;
for(j=0; j<32; j++)
{
if(crc32 & 0x80000000) crc32 = (crc32 << 1)^poly;
else crc32 = crc32 << 1;
A second example (Table 7-3) with two 32-bit words, 0x12345678 and 0x9ABCDEF0 at address 0x100 and
0x102 successively, would calculate the bytes in the order 0x78, 0x56, 0x34, 0x12, 0xDE, 0xBC, and 0x9A and
yield 0x7E0B4164.
Table 7-3. Data Address Location Example 2
Address 0x100 0x101 0x102 0x103
Data 0x5678 0x1234 0xDEF0 0x9ABC
All data input to the BGCRC must align to a 32-bit boundary, both in the starting address and the size. It
is possible to include 16-bit data within the span of data; however, when the data is read by the BGCRC, it
always assume 32-bits and conform to the above calculation order. For example, if two 16-bit words (0xA0B1
and 0xC2D3) were placed in between the previous two 32-bit words (Table 7-4), the calculations would be
performed in byte order 0x78, 0x56, 0x34, 0x12, 0xB1, 0xA0, 0xD3, 0xC2, 0xF0, 0xDE, 0xBC, and 0x9A and
yield 0x2AEFD987.
Table 7-4. Data Address Location Example 3
Address 0x100 0x101 0x102 0x103 0x104 0x105
Data 0x5678 0x1234 0xA0B1 0xC2D3 0xDEF0 0x9ABC
934 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
7.4 Software
7.4.1 BGCRC Examples
NOTE: These examples are located in the C2000Ware installation at the following location:
C2000Ware_VERSION#/driverlib/DEVICE_GPN/examples/CORE_IF_MULTICORE/bgcrc
Cloud access to these examples is available at the following link: dev.ti.com C2000Ware Examples.
7.4.1.1 BGCRC CPU Interrupt Example
FILE: bgcrc_ex1_cpuinterrupt.c
This example demonstrates how to configure and trigger BGCRC from the CPU. BGCRC module is configured
for 1 KB of GS0 RAM which is programmed with a known data. The pre-computed CRC value is used as the
golden CRC value. Interrupt is generated once the computation is done and checks if no error flags are raised
Calculation uses the 32-bit polynomial 0x04C11DB7 and seed value 0x00000000.
External Connections
• None.
Watch Variables
• pass - This should be 1.
• runStatus - BGCRC running status. This will be BGCRC_ACTIVE if the module is running, BGCRC_IDLE if
the module is idle
7.4.1.2 BGCRC Example with Watchdog and Lock
FILE: bgcrc_ex2_cpubgcrc_basic.c
This example demonstrates how to configure and trigger BGCRC from the CPU. It also showcases how to
configure the CRC watchdog and lock the registers after configuring the module. The watchdog is used as a
diagnostic to check memory test completion within the expected time window. An error signal is generated if the
test does not complete in the specified time window.
The module is configured for 1kB of GS0 RAM which is programmed with random data. The golden CRC value
for comparison is computed using software method. Interrupt is generated once the computation is done and
checks if no error flags are raised. The NMI is enabled and is triggered if an error is detected.
External Connections
• None.
Watch Variables
• pass
• bgcrcDone
7.4.1.3 CLA-BGCRC Example in CRC mode
FILE: bgcrc_ex3_clabgcrc_crcmode.c
This example demonstrates how to configure and trigger CLABGCRC from the CPU. It also showcases how to
configure the CRC watchdog and lock the registers after configuring the module. The watchdog is used as a
diagnostic to check memory test completion within the expected time window. An error signal is generated if the
test does not complete in the specified time window.
The module is configured for 1kB of CLA ROM memory. The golden CRC value for comparison is computed
using software method. Interrupt is generated once the computation is done and checks if no error flags are
raised. The NMI is enabled and is triggered if an error is detected.
External Connections
• None.
Watch Variables
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 935
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
• pass
• bgcrcDone
7.4.1.4 CLA-BGCRC Example in Scrub Mode
FILE: bgcrc_ex4_clabgcrc_scrubmode.c
This example demonstrates how to configure and trigger CLA-BGCRC in Scrub mode. In Scrub mode, CRC of
data is not compared with the golden CRC. Error check is done using the ECC/Parity logic. It also showcases
how to configure the CRC watchdog and lock the registers after configuring the module. The watchdog is used
as a diagnostic to check memory test completion within the expected time window. An error signal is generated if
the test does not complete in the specified time window.
The module is configured for 256 bytes of CLA ROM memory. Interrupt is generated once the computation is
done and checks if no error flags are raised. The NMI is enabled and is triggered if an error is detected.
External Connections
• None.
Watch Variables
• pass
• bgcrcDone
7.5 BGCRC Registers
This section describes the Background CRC registers.
7.5.1 BGCRC Base Address Table (C28)
Table 7-5. BGCRC Base Address Table (C28)
Bit Field Name Pipeline
DriverLib Name Base Address CPU1 CPU2 DMA CLA
Instance Structure Protected
936 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
Complex bit access types are encoded to fit into small table cells. Table 7-7 shows the codes that are used for
access types in this section.
Table 7-7. BGCRC_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
W1S W Write
1S 1 to set
WSonce W Write
Sonce Set once
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 937
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
938 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED START
R-0-0h R-0/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 939
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
23 22 21 20 19 18 17 16
RESERVED NMIDIS
R-0-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED FREE_SOFT RESERVED
R-0-0h R/W-0h R-0-0h
940 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
23 22 21 20 19 18 17 16
RESERVED SCRUB_MODE
R-0-0h R/W-0h
15 14 13 12 11 10 9 8
TEST_HALT RESERVED BLOCK_SIZE
R/W-0h R-0-0h R/W-0h
7 6 5 4 3 2 1 0
BLOCK_SIZE
R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 941
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
942 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 943
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
944 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 945
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
946 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED WDDIS
R-0-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 947
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
948 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 949
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
950 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED WD_OVERFLO WD_UNDERFL CORRECTABL UNCORRECTA CRC_FAIL RESERVED RESERVED
W OW E_ERR BLE_ERR
R-0-0h R-0h R-0h R-0h R-0h R-0h R-0-0h R-0-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 951
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED WD_OVERFLO WD_UNDERFL CORRECTABL UNCORRECTA CRC_FAIL RESERVED RESERVED
W OW E_ERR BLE_ERR
R-0-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0-0h R-0-0h
952 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED WD_OVERFLO WD_UNDERFL CORRECTABL UNCORRECTA CRC_FAIL RESERVED RESERVED
W OW E_ERR BLE_ERR
R-0-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0-0h R-0-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 953
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED WD_OVERFLO WD_UNDERFL CORRECTABL UNCORRECTA CRC_FAIL TEST_DONE RESERVED
W OW E_ERR BLE_ERR
R-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R-0-0h
954 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED WD_OVERFLO WD_UNDERFL CORRECTABL UNCORRECTA CRC_FAIL TEST_DONE INT
W OW E_ERR BLE_ERR
R-0-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 955
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
956 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED WD_OVERFLO WD_UNDERFL CORRECTABL UNCORRECTA CRC_FAIL TEST_DONE INT
W OW E_ERR BLE_ERR
R-0-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 957
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
RESERVED
R-0-0h
7 6 5 4 3 2 1 0
RESERVED WD_OVERFLO WD_UNDERFL CORRECTABL UNCORRECTA CRC_FAIL TEST_DONE RESERVED
W OW E_ERR BLE_ERR
R-0-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0-0h
958 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
23 22 21 20 19 18 17 16
BGCRC_NMIF RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED BGCRC_WD_M
RC AX
R/W-0h R-0-0h R-0-0h R-0-0h R-0-0h R-0-0h R-0-0h R/W-0h
15 14 13 12 11 10 9 8
BGCRC_WD_M BGCRC_WD_C RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED
IN FG
R/W-0h R/W-0h R-0-0h R-0-0h R-0-0h R-0-0h R-0-0h R-0-0h
7 6 5 4 3 2 1 0
BGCRC_GOLD RESERVED RESERVED BGCRC_SEED BGCRC_STAR BGCRC_CTRL BGCRC_CTRL BGCRC_EN
EN T_ADDR 2 1
R/W-0h R-0-0h R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 959
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
960 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
23 22 21 20 19 18 17 16
BGCRC_NMIF RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED BGCRC_WD_M
RC AX
R/WSonce-0h R-0-0h R-0-0h R-0-0h R-0-0h R-0-0h R-0-0h R/WSonce-0h
15 14 13 12 11 10 9 8
BGCRC_WD_M BGCRC_WD_C RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED
IN FG
R/WSonce-0h R/WSonce-0h R-0-0h R-0-0h R-0-0h R-0-0h R-0-0h R-0-0h
7 6 5 4 3 2 1 0
BGCRC_GOLD RESERVED RESERVED BGCRC_SEED BGCRC_STAR BGCRC_CTRL BGCRC_CTRL BGCRC_EN
EN T_ADDR 2 1
R/WSonce-0h R-0-0h R-0-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 961
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
962 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 963
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
964 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Chapter 8
Control Law Accelerator (CLA)
The Control Law Accelerator (CLA) Type-2 is an independent, fully-programmable, 32-bit floating-point math
processor that brings concurrent control-loop execution to the C28x family. The low interrupt latency of the
CLA allows the CLA to read ADC samples "just-in-time." This significantly reduces the ADC sample to output
delay to enable faster system response and higher MHz control loops. By using the CLA to service time-critical
control loops, the main CPU is free to perform other system tasks such as communications and diagnostics. This
chapter provides an overview of the architectural structure and components of the control law accelerator.
8.1 Introduction...............................................................................................................................................................966
8.2 CLA Interface............................................................................................................................................................ 968
8.3 CLA, DMA, and CPU Arbitration..............................................................................................................................975
8.4 CLA Configuration and Debug................................................................................................................................ 977
8.5 Pipeline......................................................................................................................................................................982
8.6 Software.................................................................................................................................................................... 989
8.7 Instruction Set...........................................................................................................................................................994
8.8 CLA Registers......................................................................................................................................................... 1116
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 965
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
8.1 Introduction
The Control Law Accelerator extends the capabilities of the C28x CPU by adding parallel processing. Time-
critical control loops serviced by the CLA can achieve low ADC sample to output delay. Thus, the CLA enables
faster system response and higher frequency control loops. Utilizing the CLA for time-critical tasks frees up the
main CPU to perform other system and communication functions concurrently.
8.1.1 Features
The following is a list of major features of the CLA:
• C compilers are available for CLA software development.
• Clocked at the same rate as the main CPU (SYSCLKOUT).
• An independent architecture allowing CLA algorithm execution independent of the main C28x CPU.
– Complete bus architecture:
• Program Address Bus (PAB) and Program Data Bus (PDB)
• Data Read Address Bus (DRAB), Data Read Data Bus (DRDB), Data Write Address Bus (DWAB), and
Data Write Data Bus (DWDB)
– Independent eight stage pipeline.
– 16-bit program counter (MPC)
– Four 32-bit result registers (MR0-MR3)
– Two 16-bit auxiliary registers (MAR0, MAR1)
– Status register (MSTF)
• Instruction set includes:
– IEEE single-precision (32-bit) floating-point math operations
– Floating-point math with parallel load or store
– Floating-point multiply with parallel add or subtract
– 1/X and 1/sqrt(X) estimations
– Data type conversions.
– Conditional branch and call
– Data load/store operations
• The CLA program code can consist of up to eight tasks or interrupt service routines, or seven tasks and a
main background task.
– The start address of each task is specified by the MVECT registers.
– No limit on task size as long as the tasks fit within the configurable CLA program memory space.
– One task is serviced at a time until completion. There is no nesting of tasks.
– Upon task completion a task-specific interrupt is flagged within the PIE.
– When a task finishes the next highest-priority pending task is automatically started.
– The Type-2 CLA can have a main task that runs continuously in the background, while other high priority
events trigger a foreground task.
• Task trigger mechanisms:
– C28x CPU using the IACK instruction
– Task1 to Task8: up to 256 possible trigger sources from peripherals connected to the shared bus on which
the CLA assumes secondary ownership.
– Task8 can be set to be the background task, while Tasks 1 through 7 take peripheral triggers.
• Memory and Shared Peripherals:
– Two dedicated message RAMs for communication between the CLA and the main CPU.
– Two dedicated message RAMs for communication between the CLA and the DMA.
– The C28x CPU can map CLA program and data memory to the main CPU space or CLA space.
Foundational Materials
• C2000 Academy - CLA
966 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Expert Materials
• Digital Control of Two Phase Interleaved PFC and Motor Drive Using MCU With CLA Application Report
• Sensorless Field Oriented Control:3-Phase Perm.Magnet Synch. Motors With CLA Application Report
8.1.3 Block Diagram
Figure 8-1 is a block diagram of the CLA.
CLA Control
Register Set
MIFR(16)
MPERINT1 MIOVF(16) CLA_INT1
From Shared to to
Peripherals MPERINT8 MICLR(16) CLA_INT8
MICLROVF(16) C28x
PIE INT11
MIFRC(16) CPU
MIER(16) INT12
MIRUN(16)
LVF
MCTLBGRND(16)
LUF
MSTSBGRND(16)
CLA1SOFTINTEN(16)
CLA1INTFRC(16)
SYSCLK
CLA Clock Enable MVECT1(16)
CPU Read/Write Data Bus
SYSRS MVECT2(16)
MVECT3(16)
MVECT4(16) CLA Program
MVECT5(16) CLA Program Bus Memory (LSx)
MVECT6(16)
MVECT7(16)
MVECT8(16) LSxMSEL[MSEL_LSx]
MVECTBGRND(16) LSxCLAPGM[CLAPGM_LSx]
MVECTBGRNDACTIVE(16)
MPSACTL(16)
MPSA1(32) CPU Data Bus
CLA Data
MPSA2(32) Memory (LSx)
MCTL(16)
CLA Data Bus
CLA Message
CLA Execution
RAMs
Register Set
MPC(16)
MSTF(32)
MR0(32)
MR1(32) Shared
MR2(32) MEALLOW Peripherals
MR3(32)
MAR0(16)
MAR1(16)
CPU Read Data Bus
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 967
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
968 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Note
The CLA read access time to the bus is 2-wait states while write access is 0-wait.
Refer to the device data sheet for the list of peripherals connected to the bus.
Several peripheral control registers are protected from spurious 28x CPU writes by the EALLOW protection
mechanism. These same registers are also protected from spurious CLA writes. The EALLOW bit in the CPU
status register 1 (ST1) indicates the state of protection for the CPU. Likewise, the MEALLOW bit in the CLA
status register (MSTF) indicates the state of write protection for the CLA. The MEALLOW CLA instruction
enables write access by the CLA to EALLOW protected registers. Likewise, the MEDIS CLA instruction disables
write access. This way the CLA can enable and disable write access independent of the CPU.
The ADC offers the option to generate an early interrupt pulse at the start of a sample conversion. If this option
is used to start an ADC-triggered CLA task, use the intervening cycles until the completion of the conversion
to perform preliminary calculations or loads and stores before finally reading the ADC value. The CLA pipeline
activity for this scenario is shown in Section 8.5.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 969
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
0 CLA_SOFTWARE_TRIGGER
1 ADCAINT1
2 ADCAINT2
3 ADCAINT3
4 ADCAINT4
5 ADCA_EVT_INT
6 ADCBINT1
7 ADCBINT2
8 ADCBINT3
9 ADCBINT4
10 ADCB_EVT_INT
11 ADCCINT1
12 ADCCINT2
13 ADCCINT3
14 ADCCINT4
15 ADCC_EVT_INT
16 ADCDINT1
17 ADCDINT2
18 ADCDINT3
970 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
19 ADCDINT4
20 ADCD_EVT_INT
21-28 Reserved
29 XINT1
30 XINT2
31 XINT3
32 XINT4
33 XINT5
34-35 Reserved
36 EPWM1_INT
37 EPWM2_INT
38 EPWM3_INT
39 EPWM4_INT
40 EPWM5_INT
41 EPWM6_INT
42 EPWM7_INT
43 EPWM8_INT
44 EPWM9_INT
45 EPWM10_INT
46 EPWM11_INT
47 EPWM12_INT
48 EPWM13_INT
49 EPWM14_INT
50 EPWM15_INT
51 EPWM16_INT
52 MCANA_FEVT0
53 MCANA_FEVT1
54 MCANA_FEVT2
55-67 Reserved
68 CPU_TINT0
69 CPU_TINT1
70 CPU_TINT2
71 MCBSPA_TX
72 MCBSPA_RX
73 MCBSPB_TX
74 MCBSPB_RX
75 ECAP1_INT
76 ECAP2_INT
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 971
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
77 ECAP3_INT
78 ECAP4_INT
79 ECAP5_INT
80 ECAP6_INT
81 ECAP7_INT
82 Reserved
83 EQEP1_INT
84 EQEP2_INT
85 EQEP3_INT
86-91 Reserved
92 ECAP6_INT2
93 ECAP7_INT3
94 Reserved
95 SD1FLT1_DRINT
96 SD1FLT2_DRINT
97-102 Reserved
103 ECAT_SYNC0
104 ECAT_SYNC1
105 PMBUSA_INT
106-108 Reserved
109 SPIA_TXINT
110 SPIA_RXINT
111 SPIB_TXINT
112 SPIB_RXINT
113 SPIC_TXINT
114 SPIC_RXINT
115 SPID_TXINT
116 SPID_RXINT
117 CLB5_INT
118 CLB6_INT
119 CLB7_INT
120 CLB8_INT
121 BGCRC_INT
122 Reserved
123 FSITXA_INT1
124 FSITXA_INT2
125 FSIRXA_INT1
126 FSIRXA_INT2
972 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
127 CLB1_INT
128 CLB2_INT
129 CLB3_INT
130 CLB4_INT
131-142 Reserved
143 SD1FLT1_DRINT
144 SD1FLT2_DRINT
145 SD1FLT3_DRINT
146 SD1FLT4_DRINT
147 SD2FLT1_DRINT
148 SD2FLT2_DRINT
149 SD2FLT3_DRINT
150 SD2FLT4_DRINT
151-154 Reserved
155 FSITXB_INT1
156 FSITXB_INT2
157 FSIRXB_INT1
158 FSIRXB_INT2
159 FSIRXC_INT1
160 FSIRXC_INT2
161 FSIRXD_INT1
162 FSIRXD_INT2
163 FSIRXE_INT1
164 FSIRXE_INT2
165 FSIRXF_INT1
166 FSIRXF_INT2
167 FSIRXG_INT1
168 FSIRXG_INT2
169 FSIRXH_INT1
170 FSIRXH_INT2
171-255 Reserved
• Software Trigger
CPU software can trigger tasks by writing to the MIFRC register or by the IACK instruction. Using the
IACK instruction is more efficient because the instruction does not require the need to issue an EALLOW
to set MIFR bits. Set the MCTL[IACKE] bit to enable the IACK feature. Each bit in the operand of the IACK
instruction corresponds to a task. For example, IACK #0x0001 sets bit 0 in the MIFR register to start task 1.
Likewise, IACK #0x0003 set bits 0 and 1 in the MIFR register to start task 1 and task 2.
• Background Task
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 973
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
The Type-2 CLA allows the use of Task 8 as a background task that runs continuously until Task 8 disables
the task or resets the device (or the CLA using a soft reset). The background task vector is given by the
MVECTBGRND register and the operation is controlled by the MCTLBGRND register; the task is enabled
by setting the BGEN bit to 1. Then start the task through software by writing a 1 to the BGSTART bit
(TRIGEN must be 0), or through a peripheral by setting the TRIGEN bit to 1 and then setting the trigger
source in the bit-field, DmaClaSrcSelRegs.CLA1TASKSRCSEL2.bit.TASK8. By default, the background task
is interruptible; the highest priority pending task is executed first. When a task completes and there are not
any pending tasks, the execution returns to the background task. The CLA keeps track of the branching point
by saving the return address to the MVECTBGRNDACTIVE register, and then popping this address to the
MPC when execution returns. Choose to make sections of the background task uninterruptible by possibly
doing this with the MSETC BGINTM assembly instruction.
Subsequently, enabling interrupts with the MCLRC BGINTM instruction.
The background interrupt mask bit, BGINTM, can be queried in the MSTSBGRND register. This register also
provides the current status of the background task. If the task is currently executing, the RUN bit is set to 1, if
another trigger for the background task is received while the task has already started, the overflow (BGOVF)
bit is set.
The CLA has their own fetch mechanism and can run and execute a task independently of the CPU. Only one
task is serviced at a time; there is no nesting of tasks unless the background task in enabled, then one level
of nesting is possible. The task currently running is indicated in the MIRUN register; if the background task is
enabled and running, the task is reflected in the MSTSBGRND register (the RUN bit).
Interrupts that have been received but not yet serviced are indicated in the flag register (MIFR). If an interrupt
request from a peripheral is received and that same task is already flagged, then the overflow flag bit is set.
Overflow flags remain set until the flags are cleared by the CPU. If the CLA is idle (no task is currently running)
or is executing the background task, then the highest priority interrupt request that is both flagged (MIFR) and
enabled (MIER) starts.
974 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 975
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
976 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 977
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
978 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
A software breakpoint is placed at instruction i5. The instruction, i5, is then replaced with MDEBUGSTOP1. It
takes 3 cycles for the MDEBUGSTOP1 to reach the D2 phase at which point the instructions i6, i7, and i8 that
were previously fetched are now flushed from the pipeline. The instruction, i5, is then re-fetched and execution
continues as before.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 979
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
980 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Note
A CLA fetch has higher priority than CPU debug reads. For this reason, it is possible for the
CLA to permanently block CPU debug accesses if the CLA is executing in a loop. This can occur
when initially developing CLA code due to a bug that causes an infinite loop. To avoid locking up
the main CPU, the program memory returns all 0x0000 for CPU debug reads when the CLA is
running. When the CLA is halted or idle, then normal CPU debug read and write access to CLA
program memory can be performed.
If the CLA gets caught in an infinite loop, use a soft or hard reset to exit the condition. A debugger
reset also exits the condition.
There are special cases that can occur when single-stepping a task such that the program counter, MPC,
reaches the MSTOP instruction at the end of the task.
• MPC halts at or after the MSTOP with a task already pending
If single-stepping or halted in "task A" and "task B" comes in before the MPC reaches the MSTOP, then
"task B" starts if continuing to step through the MSTOP instruction. Basically, if "task B" is pending before
the MPC reaches MSTOP in "task A" then there is no issue in "task B" starting and no special action is
required.
• MPC halts at or after the MSTOP with no task pending
In this case, if single-stepped or halted in "task A" and the MPC has reached the MSTOP with no tasks
pending. If "task B" comes in at this point, "task B" is flagged in the MIFR register but "task B" can or
cannot start if continuing to single-step through the MSTOP instruction of "task A."
Depending on exactly when the new task comes in, to reliably start "task B", perform a soft reset and
reconfigure the MIER bits. Once this is done, start single-stepping "task B."
This case can be handled slightly differently if there is control over when "task B" comes in (for example,
using the IACK instruction to start the task). In this case, the task is single-stepped or halted in "task A"
and the MPC has reached the MSTOP with no tasks pending. Before forcing "task B," run free to force
the CLA out of the debug state. Once this is done, force "task B" and continue debugging.
5. Disable CLA breakpoints, if desired
In the Code Composer Studio™ IDE, disable the CLA breakpoints by disconnecting the CLA core in the
debug perspective. Make sure to first issue a run or reset; otherwise, the CLA is halted and no other tasks
start.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 981
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
982 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 983
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
984 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 985
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
986 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
The ADCINTCYCLE register of the ADC can be programmed by the application to adjust the generation of the
interrupt pulse to align with the ADC read operation. For example, if the first instruction in the task reads the
ADC and the conversion time is N SYSCLK cycles, then the delay programmed is (N-2) - 4 = N-6.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 987
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Note
If background task has been configured in the system, then the compiler during code compilation
adds context save instructions at the start of each regular task and restore instructions at end
of each task so that register content can be saved and restored in case a background task
is executing while the regular task is triggered. When a regular task is entered, this compiler-
generated context save instruction is the first instruction of the task.
• CLA task trigger of normal task when background task is active:
Task takes 9 cycles from CLA task trigger to first instruction of normal task to reach the D2 phase of pipeline.
There is a difference of one clock cycle to force the MSTOP in the D2 phase of the background task before
the task exits as compared to a new task trigger without the background task active.
Note
If the MBCNDD/MCCNDD/MRCNDD instructions in the background task are in the D2 phase of the
pipeline when a new task gets triggered, the task takes a minimum of 3 more cycles to complete
these uninterruptible instructions adding to the delay.
• Returning to background task from normal task:
The task takes 5 cycles to return from a normal task to resume the background task instruction at the D2
phase of the pipeline.
988 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
8.6 Software
8.6.1 CLA Examples
NOTE: These examples are located in the C2000Ware installation at the following location:
C2000Ware_VERSION#/driverlib/DEVICE_GPN/examples/CORE_IF_MULTICORE/cla
Cloud access to these examples is available at the following link: dev.ti.com C2000Ware Examples.
8.6.1.1 CLA arcsine(x) using a lookup table (cla_asin_cpu01) - C28X_DUAL
FILE: cla_ex1_asin_cpu1.c
In this example, cpu1 will be used to initialize the clocks Task 1 of the CLA on cpu2 will calculate the arcsine of
an input argument in the range (-1.0 to 1.0) using a lookup table. It is recommended to run the c28x1 core first,
followed by the C28x2 core.
Memory Allocation
• CLA1 Math Tables (RAMLS0)
– CLAasinTable - Lookup table
• CLA1 to CPU Message RAM
– fResult - Result of the lookup algorithm
• CPU to CLA1 Message RAM
– fVal - Sample input to the lookup algorithm
Watch Variables
• fVal - Argument to task 1
• fResult - Result of arcsin(fVal)
8.6.1.2 CLA Arcsine Example. - C28X_DUAL
FILE: cla_ex1_asin_cpu2.c Dual Core arcsine example. This example demonstrates how to run CLA tasks on
cpu2.cla1 It is recommended to run the c28x1 core first, followed by the C28x2 core.
8.6.1.3 CLA arcsine(x) using a lookup table (cla_asin_cpu01)
FILE: cla_ex1_asin.c
In this example, Task 1 of the CLA will calculate the arcsine of an input argument in the range (-1.0 to 1.0) using
a lookup table.
Note that since this example does not use background CLA task, the compile flag cla_background_task is
turned off for this project. Set this flag as on to enable background CLA task. The option is available in Project
Properties -> C2000 Build -> C2000 Compiler -> Advanced Options -> Runtime Model Options.
Memory Allocation
• CLA1 Math Tables (RAMLS0)
• CLA1 to CPU Message RAM
– fResult - Result of the lookup algorithm
• CPU to CLA1 Message RAM
– fVal - Sample input to the lookup algorithm
Watch Variables
• fVal - Argument to task 1
• fResult - Result of arcsin(fVal)
8.6.1.4 CLA 2 Pole 2 Zero Infinite Impulse Response Filter (cla_iir2p2z_cpu01) - C28X_DUAL
FILE: cla_ex2_iir2p2z_cpu1.c
This example implements a Transposed Direct Form II IIR filter, commonly known as a Biquad. The input vector
is a software simulated noisy signal that is fed to the biquad one sample at a time, filtered and then stored in an
output buffer for storage. It is recommended to run the c28x1 core first, followed by the C28x2 core.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 989
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Memory Allocation
• CLA1 Data RAM 1 (RAML2)
– S1_A - Feedback coefficients
– S1_B - Feedforward coefficients
• CLA1 to CPU Message RAM
– yn - Output of the Biquad
• CPU to CLA1 Message RAM
– xn - Sample input to the filter
Watch Variables
• fBiquadOutput
• pass
• fail
8.6.1.5 CLA 2-pole 2-zero IIR Filter Example for F2837xD. - C28X_DUAL
FILE: cla_ex2_iir2p2z_cpu2.c Dual Core iir2p2z example. This example demonstrates how to run CLA tasks on
cpu2.cla1 It is recommended to run the c28x1 core first, followed by the C28x2 core.
8.6.1.6 CLA arctangent(x) using a lookup table (cla_atan_cpu01)
FILE: cla_ex2_atan.c
In this example, Task 1 of the CLA will calculate the arctangent of an input argument using a lookup table.
Note that since this example does not use background CLA task, the compile flag cla_background_task is
turned off for this project. Set this flag as on to enable background CLA task. The option is available in Project
Properties -> C2000 Build -> C2000 Compiler -> Advanced Options -> Runtime Model Options.
Memory Allocation
• CLA1 Math Tables (RAMLS0)
• CLA1 to CPU Message RAM
– fResult - Result of the lookup algorithm
• CPU to CLA1 Message RAM
– fNum - Numerator of sample input
– fDen - Denominator of sample input
Watch Variables
• fVal - Argument to task 1
• fResult - Result of arctan(fVal)
8.6.1.7 CLA background nesting task
FILE: cla_ex3_background_nesting_task.c
This example configures CLA task 1 to be triggered by EPWM1 running at 2 Hz (period = 0.5s). A background
task is configured to be triggered by CPU timer running at .5 Hz (period = 2s). CLA task 1 toggles LED1 at the
start and end of the task and the background task toggles LED2 at the start and end of the task. Background
task will be preempted by Task1 and hence LED1 will be toggling even while LED2 is ON.
Note that the compile flag cla_background_task is turned on in this project. Enabling background task adds
additional context save/restore cycles during task switching thus increasing the overall trigger-to-task latency.
If the application does not use the background CLA task, it is recommended to turn this flag off for better
performance. The option is available in Project Properties -> C2000 Build -> C2000 Compiler -> Advanced
Options -> Runtime Model Options.
External Connections
• None
Watch Variables
• None
990 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 991
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
992 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
This example showcases how to handle shared resource challenges across C28x and CLA. As the peripherals
are shared between CLA and the CPU, overlapping read-modify-write to the registers by them can lead to data
race conditions ultimately leading to data violation or incorrect functionality. In this example, CPU ISR and CLA
tasks runs independently. CPU ISR gets triggered by EPWM4 @10KHz and toggles the EPWM1B output via
software by controlling CSFB bits of AQCSFRC. CLA task gets triggered by EPWM5 @100Khz and toggles the
EPWM1A output via software by controlling CSFA bits of AQCSFRC. Thus in this process both CPU and CLA
do read-modify -write to AQCSFRC register independently at different frequencies so there is chance of race
condition and updates due to one of them can get lost/. overwritten. This can be clearly observed by updating
"phase_shift_ON" to 0U and probing the EPWM1A and 1B outputs on a scope.
This is a standard critical section problem and can be handled by software handshaking mechanism like
mutex etc. But most of the real-time control applications are time-sensitive and cannot afford addition software
overhead hence this example suggests an alternative hardware based technique to avoid shared resource
conflicts between CPU and CLA. The phase shifting mechanism of the EPWM modules is utilized to schedule
the CLA task and CPU ISR as desired. EPWM4 generates a synchronous pulse every ZERO event and provides
a phase shift of 20 cycles to EPWM5. This way both CLA task and C28x ISR runs at original frequencies
i.e. 100KHz and 10KHz but CLA task leads with a phase offset of 20 cycles wrt CPU ISR. Hence concurrent
read-modify-writes to AQCSFRC never happens and the EPWM1A and EPWM1B outputs behave as desired
i.e. consistent 50 KHz PWM output on EPWM1A and 5 KHz PWM output on EPWM1B with a duty ~50% on
both should be generated. In order to utilize this phase shifting mechanism in this example, please make sure
"phase_shift_ON" is set to 1.
External Connections
• Observe GPIO0 (EPWM1A Output) on oscilloscope
• Observe GPIO1 (EPWM1B Output) on oscilloscope
• Observe GPIO2 (CLA Task Profiling) on oscilloscope
• Observe GPIO3 (CPU ISR Profiling) on oscilloscope
Note :- The phase offset value can easily be configured by updating TBPHS register to schedule the CLA task
and C28x ISR as desired depending upon the application need so as to avoid overlapping register writes by
CPU and CLA
Note :- The optimization is on and set to O2 for the project and all the results quoted correspond to this case.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 993
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
994 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Each instruction has a table that gives a list of the operands and a short description. Instructions always have
their destination operand(s) first followed by the source operand(s).
Table 8-7. INSTRUCTION dest, source1, source2 Short Description
Description
dest1 Description for the 1st operand for the instruction
source1 Description for the 2nd operand for the instruction
source2 Description for the 3rd operand for the instruction
Opcode This section shows the opcode for the instruction
Description Detailed description of the instruction execution is described. Any constraints on the operands imposed by the
processor or the assembler are discussed.
Restrictions Any constraints on the operands or use of the instruction imposed by the processor are discussed.
Pipeline This section describes the instruction in terms of pipeline cycles as described in Section 8.5
Example Examples of instruction execution. If applicable, register and memory values are given before and after instruction
execution. Some examples are code fragments while other examples are full tasks that assume the CLA is correctly
configured and the main CPU has passed it data.
Operands Each instruction has a table that gives a list of the operands and a short description. Instructions always have their
destination operand(s) first followed by the source operand(s).
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 995
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Encoding for the shift fields in the MASR32, MLSR32 and MLSL32 instructions is shown in Table 8-9.
Table 8-9. Shift Field Encoding
Shift Value 'shift' Opcode
Field Encode
1 0000
2 0001
3 0010
.... ....
32 1111
996 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
For instructions that use MRx (where x can be 'a' through 'f') as operands, the trailing alphabet appears in the
opcode as a two-bit field. For example:
The two-bit field specifies one of four working registers according to Table 8-10.
Table 8-10. Operand Encoding
Two-Bit Field Working Register
00 MR0
01 MR1
10 MR2
11 MR3
Table 8-11 shows the condition field encoding for conditional instructions such as MNEGF, MSWAPF, MBCNDD,
MCCNDD, and MRCNDD.
Table 8-11. Condition Field Encoding
Encode(1) CNDF Description MSTF Flags Tested
0000 NEQ Not equal to zero ZF == 0
0001 EQ Equal to zero ZF == 1
0010 GT Greater than zero ZF == 0 AND NF == 0
0011 GEQ Greater than or equal to zero NF == 0
0100 LT Less than zero NF == 1
0101 LEQ Less than or equal to zero ZF == 1 OR NF == 1
1010 TF Test flag set TF == 1
1011 NTF Test flag not set TF == 0
1100 LU Latched underflow LUF == 1
1101 LV Latched overflow LVF == 1
1110 UNC Unconditional None
1111 UNCF(2) Unconditional with flag modification None
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 997
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
8.7.3 Instructions
The instructions are listed alphabetically.
998 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
MMOVD32 MRa, mem32 — Move 32-Bit Value from Memory with Data Copy................................................1070
MMOVF32 MRa, #32F — Load the 32-Bits of a 32-Bit Floating-Point Register................................................ 1072
MMOVI16 MARx, #16I — Load the Auxiliary Register with the 16-Bit Immediate Value.................................. 1073
MMOVI32 MRa, #32FHex — Load the 32-Bits of a 32-Bit Floating-Point Register with the Immediate........... 1075
MMOVIZ MRa, #16FHi — Load the Upper 16-Bits of a 32-Bit Floating-Point Register ....................................1077
MMOVZ16 MRa, mem16 — Load MRx with 16-Bit Value.................................................................................1078
MMOVXI MRa, #16FLoHex — Move Immediate Value to the Lower 16-Bits of a Floating-Point Register.......1079
MMPYF32 MRa, MRb, MRc — 32-Bit Floating-Point Multiply...........................................................................1080
MMPYF32 MRa, #16FHi, MRb — 32-Bit Floating-Point Multiply ..................................................................... 1081
MMPYF32 MRa, MRb, #16FHi — 32-Bit Floating-Point Multiply ..................................................................... 1083
MMPYF32 MRa, MRb, MRc||MADDF32 MRd, MRe, MRf — 32-Bit Floating-Point Multiply with Parallel Add.1085
MMPYF32 MRd, MRe, MRf ||MMOV32 MRa, mem32 — 32-Bit Floating-Point Multiply with Parallel Move.... 1087
MMPYF32 MRd, MRe, MRf ||MMOV32 mem32, MRa — 32-Bit Floating-Point Multiply with Parallel Move.... 1089
MMPYF32 MRa, MRb, MRc ||MSUBF32 MRd, MRe, MRf — 32-Bit Floating-Point Multiply with Parallel Subtract
...........................................................................................................................................................................1090
MNEGF32 MRa, MRb{, CNDF} — Conditional Negation..................................................................................1091
MNOP — No Operation..................................................................................................................................... 1093
MOR32 MRa, MRb, MRc — Bitwise OR........................................................................................................... 1094
MRCNDD {CNDF} — Return Conditional Delayed............................................................................................1095
MSETC BGINTM — Set Background Task Interrupt Mask................................................................................1098
MSETFLG FLAG, VALUE — Set or Clear Selected Floating-Point Status Flags............................................. 1099
MSTOP — Stop Task......................................................................................................................................... 1100
MSUB32 MRa, MRb, MRc — 32-Bit Integer Subtraction.................................................................................. 1102
MSUBF32 MRa, MRb, MRc — 32-Bit Floating-Point Subtraction..................................................................... 1103
MSUBF32 MRa, #16FHi, MRb — 32-Bit Floating-Point Subtraction.................................................................1104
MSUBF32 MRd, MRe, MRf ||MMOV32 MRa, mem32 — 32-Bit Floating-Point Subtraction with Parallel Move....
1106
MSUBF32 MRd, MRe, MRf ||MMOV32 mem32, MRa — 32-Bit Floating-Point Subtraction with Parallel Move....
1107
MSWAPF MRa, MRb {, CNDF} — Conditional Swap........................................................................................1108
MTESTTF CNDF — Test MSTF Register Flag Condition.................................................................................. 1110
MUI16TOF32 MRa, mem16 — Convert Unsigned 16-Bit Integer to 32-Bit Floating-Point Value...................... 1112
MUI16TOF32 MRa, MRb — Convert Unsigned 16-Bit Integer to 32-Bit Floating-Point Value...........................1113
MUI32TOF32 MRa, mem32 — Convert Unsigned 32-Bit Integer to 32-Bit Floating-Point Value...................... 1114
MUI32TOF32 MRa, MRb — Convert Unsigned 32-Bit Integer to 32-Bit Floating-Point Value...........................1115
MXOR32 MRa, MRb, MRc — Bitwise Exclusive Or.......................................................................................... 1116
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 999
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1110 0010 0000
Description The absolute value of MRb is loaded into MRa. Only the sign bit of the operand is
modified by the MABSF32 instruction.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
NF = 0;
ZF = 0;
if ( MRa(30:23) == 0) ZF = 1;
Example
MMOVIZ MR0, #-2.0 ; MR0 = -2.0 (0xC0000000)
MABSF32 MR0, MR0 ; MR0 = 2.0 (0x40000000), ZF = NF = 0
MMOVIZ MR0, #5.0 ; MR0 = 5.0 (0x40A00000)
MABSF32 MR0, MR0 ; MR0 = 5.0 (0x40A00000), ZF = NF = 0
MMOVIZ MR0, #0.0 ; MR0 = 0.0
MABSF32 MR0, MR0 ; MR0 = 0.0 ZF = 1, NF = 0
1000 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: 0000 0000 000cc bbaa
MSW: 0111 1110 1100 0000
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
The MSTF register flags are modified based on the integer results of the operation.
NF = MRa(31);
ZF = 0;
if(MRa(31:0) == 0) { ZF = 1; };
Example
; Given A = (int32)1
; B = (int32)2
; C = (int32)-7
;
; Calculate Y2 = A + B + C
;
_Cla1Task1:
MMOV32 MR0, @_A ; MR0 = 1 (0x00000001)
MMOV32 MR1, @_B ; MR1 = 2 (0x00000002)
MMOV32 MR2, @_C ; MR2 = -7 (0xFFFFFFF9)
MADD32 MR3, MR0, MR1 ; A + B
MADD32 MR3, MR2, MR3 ; A + B + C = -4 (0xFFFFFFFC)
MMOV32 @_y2, MR3 ; Store y2
MSTOP ; end of task
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1001
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: IIII IIII IIII IIII
MSW: 0111 0111 1100 bbaa
Description Add MRb to the floating-point value represented by the immediate operand. Store the
result of the addition in MRa.
#16FHi is a 16-bit immediate value that represents the upper 16-bits of an IEEE 32-bit
floating-point value. The low 16-bits of the mantissa are assumed to be all 0. #16FHi is
most useful for representing constants where the lowest 16-bits of the mantissa are 0.
Some examples are 2.0 (0x40000000), 4.0 (0x40800000), 0.5 (0x3F000000), and -1.5
(0xBFC00000). The assembler accepts either a hex or float as the immediate value. That
is, the value -1.5 can be represented as #-1.5 or #0xBFC0.
Example
; Add to MR1 the value 2.0 in 32-bit floating-point format
; Store the result in MR0
MADDF32 MR0, #2.0, MR1 ; MR0 = 2.0 + MR1
; Add to MR3 the value -2.5 in 32-bit floating-point format
; Store the result in MR2
MADDF32 MR2, #-2.5, MR3 ; MR2 = -2.5 + MR3
; Add to MR3 the value 0x3FC00000 (1.5)
; Store the result in MR3
MADDF32 MR3, #0x3FC0, MR3 ; MR3 = 1.5 + MR3
1002 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: IIII IIII IIII IIII
MSW: 0111 0111 1100 bbaa
Description Add MRb to the floating-point value represented by the immediate operand. Store the
result of the addition in MRa.
#16FHi is a 16-bit immediate value that represents the upper 16-bits of an IEEE 32-bit
floating-point value. The low 16-bits of the mantissa are assumed to be all 0. #16FHi is
most useful for representing constants where the lowest 16-bits of the mantissa are 0.
Some examples are 2.0 (0x40000000), 4.0 (0x40800000), 0.5 (0x3F000000), and -1.5
(0xBFC00000). The assembler accepts either a hex or float as the immediate value. That
is, the value -1.5 can be represented as #-1.5 or #0xBFC0.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No Yes Yes
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1003
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Example 1
; X is an array of 32-bit floating-point values
; Find the maximum value in an array X
; and store the value in Result
;
_Cla1Task1:
MMOVI16 MAR1,#_X ; Start address
MUI16TOF32 MR0, @_len ; Length of the array
MNOP ; delay for MAR1 load
MNOP ; delay for MAR1 load
MMOV32 MR1, *MAR1[2]++ ; MR1 = X0
LOOP
MMOV32 MR2, *MAR1[2]++ ; MR2 = next element
MMAXF32 MR1, MR2 ; MR1 = MAX(MR1, MR2)
MADDF32 MR0, MR0, #-1.0 ; Decrement the counter
MCMPF32 MR0 #0.0 ; Set/clear flags for MBCNDD
MNOP
MNOP
MNOP
MBCNDD LOOP, NEQ ; Branch if not equal to zero
MMOV32 @_Result, MR1 ; Always executed
MNOP ; Always executed
MNOP ; Always executed
MSTOP ; End of task
Example 2
; Show the basic operation of MADDF32
;
; Add to MR1 the value 2.0 in 32-bit floating-point format
; Store the result in MR0
MADDF32 MR0, MR1, #2.0 ; MR0 = MR1 + 2.0
; Add to MR3 the value -2.5 in 32-bit floating-point format
; Store the result in MR2
MADDF32 MR2, MR3, #-2.5 ; MR2 = MR3 + (-2.5)
; Add to MR0 the value 0x3FC00000 (1.5)
; Store the result in MR0
MADDF32 MR0, MR0, #0x3FC0 ; MR0 = MR0 + 1.5
1004 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: 000 0000 00cc bbaa
MSW: 0111 1100 0010 0000
Description Add the contents of MRc to the contents of MRb and load the result into MRa.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No Yes Yes
Example
; Given M1, X1, and B1 are 32-bit floating-point numbers
; Calculate Y1 = M1*X1+B1
;
_Cla1Task1:
MMOV32 MR0,@M1 ; Load MR0 with M1
MMOV32 MR1,@X1 ; Load MR1 with X1
MMPYF32 MR1,MR1,MR0 ; Multiply M1*X1
|| MMOV32 MR0,@B1 ; and in parallel load MR0 with B1
MADDF32 MR1,MR1,MR0 ; Add M*X1 to B1 and store in MR1
MMOV32 @Y1,MR1 ; Store the result
MSTOP ; end of task
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1005
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Operands MRd CLA floating-point destination register for the MADDF32 (MR0 to
MR3)
MRe CLA floating-point source register for the MADDF32 (MR0 to MR3)
MRf CLA floating-point source register for the MADDF32 (MR0 to MR3)
mem32 32-bit memory location accessed using one of the available
addressing modes. This is the destination of the MMOV32.
MRa CLA floating-point source register for the MMOV32 (MR0 to MR3)
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0101 ffee ddaa addr
Description Perform an MADDF32 and a MMOV32 in parallel. Add MRf to the contents of MRe
and store the result in MRd. In parallel move the contents of MRa to the 32-bit location
mem32.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No Yes Yes
Example
; Given A, B, and C are 32-bit floating-point numbers
; Calculate Y2 = (A * B)
; Y3 = (A * B) + C
;
_Cla1Task2:
MMOV32 MR0, @_A ; Load MR0 with A
MMOV32 MR1, @_B ; Load MR1 with B
MMPYF32 MR1, MR1, MR0 ; Multiply A*B
|| MMOV32 MR0, @_C ; and in parallel load MR0 with C
MADDF32 MR1, MR1, MR0 ; Add (A*B) to C
|| MMOV32 @_Y2, MR1 ; and in parallel store A*B
MMOV32 @_Y3, MR1 ; Store the A*B + C
MSTOP ; end of task
1006 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Operands MRd CLA floating-point destination register for the MADDF32 (MR0 to
MR3).
MRd cannot be the same register as MRa.
MRe CLA floating-point source register for the MADDF32 (MR0 to MR3)
MRf CLA floating-point source register for the MADDF32 (MR0 to MR3)
MRa CLA floating-point destination register for the MMOV32 (MR0 to
MR3).
MRa cannot be the same register as MRd.
mem32 32-bit memory location accessed using one of the available
addressing modes. This is the source for the MMOV32.
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0001 ffee ddaa addr
Description Perform an MADDF32 and a MMOV32 operation in parallel. Add MRf to the contents
of MRe and store the result in MRd. In parallel move the contents of the 32-bit location
mem32 to MRa.
Restrictions The destination register for the MADDF32 and the MMOV32 must be unique. That is,
MRa and MRd cannot be the same register.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes Yes Yes
NF = MRa(31);
ZF = 0;
if(MRa(30:23) == 0) { ZF = 1; NF = 0; };
Pipeline The MADDF32 and the MMOV32 both complete in a single cycle.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1007
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Example 1
; Given A, B, and C are 32-bit floating-point numbers
; Calculate Y1 = A + 4B
; Y2 = A + C
;
_Cla1Task1:
MMOV32 MR0, @A ; Load MR0 with A
MMOV32 MR1, @B ; Load MR1 with B
MMPYF32 MR1, MR1, #4.0 ; Multiply 4 * B
|| MMOV32 MR2, @C and in parallel load C
MADDF32 MR3, MR0, MR1 ; Add A + 4B
MADDF32 MR3, MR0, MR2 ; Add A + C
|| MMOV32 @Y1, MR3 ; and in parallel store A+4B
MMOV32 @Y2, MR3 ; store A + C MSTOP
; end of task
Example 2
; Given A, B, and C are 32-bit floating-point numbers
; Calculate Y3 = (A + B)
; Y4 = (A + B) * C
;
_Cla1Task2:
MMOV32 MR0, @A ; Load MR0 with A
MMOV32 MR1, @B ; Load MR1 with B
MADDF32 MR1, MR1, MR0 ; Add A+B
|| MMOV32 MR0, @C ; and in parallel load MR0 with C
MMPYF32 MR1, MR1, MR0 ; Multiply (A+B) by C
|| MMOV32 @Y3, MR1 ; and in parallel store A+B
MMOV32 @Y4, MR1 ; Store the (A+B) * C
MSTOP ; end of task
1008 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Bitwise AND
Opcode
LSW: 0000 0000 00cc bbaa
MSW: 0111 1100 0110 0000
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
The MSTF register flags are modified based on the integer results of the operation.
NF = MRa(31);
ZF = 0;
if(MRa(31:0) == 0) { ZF = 1; }
Example
MMOVIZ MR0, #0x5555 ; MR0 = 0x5555AAAA
MMOVXI MR0, #0xAAAA
MMOVIZ MR1, #0x5432 ; MR1 = 0x5432FEDC
MMOVXI MR1, #0xFEDC
; 0101 AND 0101 = 0101 (5)
; 0101 AND 0100 = 0100 (4)
; 0101 AND 0011 = 0001 (1)
; 0101 AND 0010 = 0000 (0)
; 1010 AND 1111 = 1010 (A)
; 1010 AND 1110 = 1010 (A)
; 1010 AND 1101 = 1000 (8)
; 1010 AND 1100 = 1000 (8)
MAND32 MR2, MR1, MR0 ; MR3 = 0x5410AA88
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1009
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: 0000 0000 0shi ftaa
MSW: 0111 1011 0100 0000
Description Arithmetic shift right of MRa by the number of bits indicated. The number of bits can be 1
to 32.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
The MSTF register flags are modified based on the integer results of the operation.
NF = MRa(31);
ZF = 0;
if(MRa(31:0) == 0) { ZF = 1; }
Example
; Given m2 = (int32)32
; x2 = (int32)64
; b2 = (int32)-128
;
; Calculate
; m2 = m2/2
; x2 = x2/4
; b2 = b2/8
;
_Cla1Task2:
MMOV32 MR0, @_m2 ; MR0 = 32 (0x00000020)
MMOV32 MR1, @_x2 ; MR1 = 64 (0x00000040)
MMOV32 MR2, @_b2 ; MR2 = -128 (0xFFFFFF80)
MASR32 MR0, #1 ; MR0 = 16 (0x00000010)
MASR32 MR1, #2 ; MR1 = 16 (0x00000010)
MASR32 MR2, #3 ; MR2 = -16 (0xFFFFFFF0)
MMOV32 @_m2, MR0 ; store results
MMOV32 @_x2, MR1
MMOV32 @_b2, MR2
MSTOP ; end of task
1010 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: dest dest dest dest
MSW: 0111 1001 1000 cndf
Description If the specified condition is true, then branch by adding the signed 16BitDest value to the
MPC value. Otherwise, continue without branching. If the address overflows, the address
wraps around. Therefore, a value of "0xFFFE" puts the MPC back to the MBCNDD
instruction.
Refer to the Pipeline section for important information regarding this instruction.
Restrictions The MBCNDD instruction is not allowed three instructions before or after a MBCNDD,
MCCNDD, or MRCNDD instruction. Refer to the Pipeline section for more information.
Flags This instruction does not modify flags in the MSTF register.
Flag TF ZF NF LUF LVF
Modified No No No No No
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1011
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Pipeline The MBCNDD instruction alone is a single-cycle instruction. As shown in Table 8-12, 6
instruction slots are executed for each branch; 3 slots before the branch instruction (I2-I4)
and 3 slots after the branch instruction (I5-I7). The total number of cycles for a branch
taken or not taken depends on the usage of these slots. That is, the number of cycles
depends on how many slots are filled with a MNOP as well as which slots are filled. The
effective number of cycles for a branch can, therefore, range from 1 to 7 cycles. The
number of cycles for a branch taken cannot be the same as for a branch not taken.
Referring to Table 8-12 and Table 8-13, the instructions before and after MBCNDD have
the following properties:
• I1
– I1 is the last instruction that can effect the CNDF flags for the MBCNDD instruction.
The CNDF flags are tested in the D2 phase of the pipeline. That is, a decision is
made whether to branch or not when MBCNDD is in the D2 phase.
– There are no restrictions on the type of instruction for I1.
• I2, I3, and I4
– The three instructions proceeding MBCNDD can change MSTF flags but have no
effect on whether the MBCNDD instruction branches or not. This is because the
flag modification occurs after the D2 phase of the MBCNDD instruction.
– These instructions must not be the following: MSTOP, MDEBUGSTOP, MBCNDD,
MCCNDD, or MRCNDD.
• I5, I6, and I7
– The three instructions following MBCNDD are always executed irrespective of
whether the branch is taken or not.
– These instructions must not be the following: MSTOP, MDEBUGSTOP, MBCNDD,
MCCNDD, or MRCNDD.
1012 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1013
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Example 1
; if (State == 0.1)
; RampState = RampState || RAMPMASK
; else if (State == 0.01)
; CoastState = CoastState || COASTMASK
; else
; SteadyState = SteadyState || STEADYMASK
;
_Cla1Task1:
MMOV32 MR0, @State
MCMPF32 MR0, #0.1 ; Affects flags for 1st MBCNDD (A)
MNOP
MNOP
MNOP
MBCNDD Skip1, NEQ ; (A) If State != 0.1, go to Skip1
MNOP ; Always executed
MNOP ; Always executed
MNOP ; Always executed
MMOV32 MR1, @RampState ; Execute if (A) branch not taken
MMOVXI MR2, #RAMPMASK ; Execute if (A) branch not taken
MOR32 MR1, MR2 ; Execute if (A) branch not taken
MMOV32 @RampState, MR1 ; Execute if (A) branch not taken
MSTOP ; end of task if (A) branch not taken
Skip1:
MCMPF32 MR0,#0.01 ; Affects flags for 2nd MBCNDD (B)
MNOP
MNOP
MNOP
MBCNDD Skip2,NEQ ; (B) If State != 0.01, go to Skip2
MNOP ; Always executed
MNOP ; Always executed
MNOP ; Always executed
MMOV32 MR1, @CoastState ; Execute if (B) branch not taken
MMOVXI MR2, #COASTMASK ; Execute if (B) branch not taken
MOR32 MR1, MR2 ; Execute if (B) branch not taken
MMOV32 @CoastState, MR1 ; Execute if (B) branch not taken
MSTOP
Skip2:
MMOV32 MR3, @SteadyState ; Executed if (B) branch taken
MMOVXI MR2, #STEADYMASK ; Executed if (B) branch taken
MOR32 MR3, MR2 ; Executed if (B) branch taken
MMOV32 @SteadyState, MR3 ; Executed if (B) branch taken
MSTOP
1014 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Example 2
; This example is the same as Example 1, except
; the code is optimized to take advantage of delay slots
;
; if (State == 0.1)
; RampState = RampState || RAMPMASK
; else if (State == 0.01)
; CoastState = CoastState || COASTMASK
; else
; SteadyState = SteadyState || STEADYMASK
;
_Cla1Task2:
MMOV32 MR0, @State
MCMPF32 MR0, #0.1 ; Affects flags for 1st MBCNDD (A)
MCMPF32 MR0, #0.01 ; Check used by 2nd MBCNDD (B)
MTESTTF EQ ; Store EQ flag in TF for 2nd MBCNDD (B)
MNOP
MBCNDD Skip1, NEQ ; (A) If State != 0.1, go to Skip1
MMOV32 MR1, @RampState ; Always executed
MMOVXI MR2, #RAMPMASK ; Always executed
MOR32 MR1, MR2 ; Always executed
MMOV32 @RampState, MR1 ; Execute if (A) branch not taken
MSTOP ; end of task if (A) branch not taken
Skip1:
MMOV32 MR3, @SteadyState
MMOVXI MR2, #STEADYMASK
MOR32 MR3, MR2
MBCNDD Skip2, NTF ; (B) if State != .01, go to Skip2
MMOV32 MR1, @CoastState ; Always executed
MMOVXI MR2, #COASTMASK ; Always executed
MOR32 MR1, MR2 ; Always executed
MMOV32 @CoastState, MR1 ; Execute if (B) branch not taken
MSTOP ; end of task if (B) branch not taken
Skip2:
MMOV32 @SteadyState, MR3 ; Executed if (B) branch taken
MSTOP
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1015
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: dest dest dest dest
MSW: 0111 1001 1001 cndf
Description If the specified condition is true, then store the return address in the RPC field of MSTF
and make the call by adding the signed 16BitDest value to the MPC value. Otherwise,
continue code execution without making the call. If the address overflows, the address
wraps around. Therefore a value of "0xFFFE" puts the MPC back to the MCCNDD
instruction.
Refer to the Pipeline section for important information regarding this instruction.
if (CNDF == TRUE)
{
RPC = return address;
MPC += 16BitDest;
};
Restrictions The MCCNDD instruction is not allowed three instructions before or after a MBCNDD,
MCCNDD, or MRCNDD instruction. Refer to the Pipeline section for more details.
Flags This instruction does not modify flags in the MSTF register.
Flag TF ZF NF LUF LVF
Modified No No No No No
1016 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Pipeline The MCCNDD instruction alone is a single-cycle instruction. As shown in Table 8-14, 6
instruction slots are executed for each call; 3 before the call instruction (I2-I4) and 3 after
the call instruction (I5-I7). The total number of cycles for a call taken or not taken depends
on the usage of these slots. That is, the number of cycles depends on how many slots are
filled with a MNOP as well as which slots are filled. The effective number of cycles for a
call can, therefore, range from 1 to 7 cycles. The number of cycles for a call taken cannot
be the same as for a call not taken.
Referring to the following code fragment and the pipeline diagrams in Table 8-14 and
Table 8-15, the instructions before and after MCCNDD have the following properties:
• I1
– I1 is the last instruction that can effect the CNDF flags for the MCCNDD instruction.
The CNDF flags are tested in the D2 phase of the pipeline. That is, a decision is
made whether to branch or not when MCCNDD is in the D2 phase.
– There are no restrictions on the type of instruction for I1.
• I2, I3, and I4
– The three instructions proceeding MCCNDD can change MSTF flags but have no
effect on whether the MCCNDD instruction makes the call or not. This is because
the flag modification occurs after the D2 phase of the MCCNDD instruction.
– These instructions must not be the following: MSTOP, MDEBUGSTOP, MBCNDD,
MCCNDD, or MRCNDD.
• I5, I6, and I7
– The three instructions following MBCNDD are always executed irrespective of
whether the branch is taken or not.
– These instructions must not be the following: MSTOP, MDEBUGSTOP, MBCNDD,
MCCNDD, or MRCNDD.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1017
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
1018 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
(1) The RPC value in the MSTF register points to the instruction following I7 (instruction I8).
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1019
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
MCLRC BGINTM
Opcode
LSW: 0000 0000 0000 0000
MSW: 0111 1111 0111 0000
Description This instruction clears the background task interrupt mask (BGINTM) bit in the
MSTSBGRND register, allowing any code thereafter to be interrupted by a higher priority
task. This instruction clears the BGINTM bit at the end of the D2 phase.
Note
This instruction does not require the MEALLOW bit to be asserted before or
deasserted after clearing BGINTM.
Flags This instruction does not modify flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No No No
Example
MCLRC BGINTM ; Allow the background task to be
; interrupted by clearing the
; MSTSBGRND.BGINTM bit
1020 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1111 0010 0000
Description Set ZF and NF flags on the result of MRa - MRb where MRa and MRb are 32-bit integers.
For a floating-point compare, refer to MCMPF32.
Note
A known hardware issue exists in the MCMP32 instruction. Signed-integer
comparisons using MCMP32 alone set the status bits in a way that is not useful
for comparison when the difference between the two operands is too large,
such as when the inputs have opposite sign and are near the extreme 32-bit
signed values. This affects both signed and unsigned integer comparisons.
The compiler (version 18.1.5.LTS or higher) has implemented a workaround for
this issue. The compiler checks the upper bits of the operands by performing
a floating point comparison before proceeding to do the integer comparison or
subtraction.
The compiler flag --cla_signed_compare_workaround enables this workaround.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
The MSTF register flags are modified based on the integer results of the operation.
Example
; Behavior of ZF and NF flags for different comparisons
;
; Given A = (int32)1
; B = (int32)2
; C = (int32)-7
;
MMOV32 MR0, @_A ; MR0 = 1 (0x00000001)
MMOV32 MR1, @_B ; MR1 = 2 (0x00000002)
MMOV32 MR2, @_C ; MR2 = -7 (0xFFFFFFF9)
MCMP32 MR2, MR2 ; NF = 0, ZF = 1
MCMP32 MR0, MR1 ; NF = 1, ZF = 0
MCMP32 MR1, MR0 ; NF = 0, ZF = 0
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1021
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1101 0000 0000
Description Set ZF and NF flags on the result of MRa - MRb. The MCMPF32 instruction is performed
as a logical compare operation. This is possible because of the IEEE format offsetting the
exponent. Basically the bigger the binary number, the bigger the floating-point value.
Special cases for inputs:
• Negative zero is treated as positive zero.
• A denormalized value is treated as positive zero.
• Not-a-Number (NaN) is treated as infinity.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
Example
; Behavior of ZF and NF flags for different comparisons
MMOVIZ MR1, #-2.0 ; MR1 = -2.0 (0xC0000000)
MMOVIZ MR0, #5.0 ; MR0 = 5.0 (0x40A00000)
MCMPF32 MR1, MR0 ; ZF = 0, NF = 1
MCMPF32 MR0, MR1 ; ZF = 0, NF = 0
MCMPF32 MR0, MR0 ; ZF = 1, NF = 0
1022 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: IIII IIII IIII IIII
MSW: 0111 1000 1100 00aa
Description Compare the value in MRa with the floating-point value represented by the immediate
operand. Set the ZF and NF flags on (MRa - #16FHi:0).
#16FHi is a 16-bit immediate value that represents the upper 16-bits of an IEEE 32-bit
floating-point value. The low 16-bits of the mantissa are assumed to be all 0. This
addressing mode is most useful for constants where the lowest 16-bits of the mantissa
are 0. Some examples are 2.0 (0x40000000), 4.0 (0x40800000), 0.5 (0x3F000000), and
-1.5 (0xBFC00000). The assembler accepts either a hex or float as the immediate value.
That is, -1.5 can be represented as #-1.5 or #0xBFC0.
The MCMPF32 instruction is performed as a logical compare operation. This is possible
because of the IEEE floating-point format offsets the exponent. Basically the bigger the
binary number, the bigger the floating-point value.
Special cases for inputs:
• Negative zero is treated as positive zero.
• Denormalized value is treated as positive zero.
• Not-a-Number (NaN) is treated as infinity.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
Example 1
; Behavior of ZF and NF flags for different comparisons
MMOVIZ MR1, #-2.0 ; MR1 = -2.0 (0xC0000000)
MMOVIZ MR0, #5.0 ; MR0 = 5.0 (0x40A00000)
MCMPF32 MR1, #-2.2 ; ZF = 0, NF = 0
MCMPF32 MR0, #6.5 ; ZF = 0, NF = 1
MCMPF32 MR0, #5.0 ; ZF = 1, NF = 0
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Example 2
; X is an array of 32-bit floating-point values
; and has length elements. Find the maximum value in
; the array and store the value in Result
;
; Note: MCMPF32 and MSWAPF can be replaced with MMAXF32
;
_Cla1Task1:
MMOVI16 MAR1,#_X ; Start address
MUI16TOF32 MR0, @_len ; Length of the array
MNOP ; delay for MAR1 load
MNOP ; delay for MAR1 load
MMOV32 MR1, *MAR1[2]++ ; MR1 = X0
LOOP
MMOV32 MR2, *MAR1[2]++ ; MR2 = next element
MCMPF32 MR2, MR1 ; Compare MR2 with MR1
MSWAPF MR1, MR2, GT ; MR1 = MAX(MR1, MR2)
MADDF32 MR0, MR0, #-1.0 ; Decrememt the counter
MCMPF32 MR0 #0.0 ; Set/clear flags for MBCNDD
MNOP
MNOP
MNOP
MBCNDD LOOP, NEQ ; Branch if not equal to zero
MMOV32 @_Result, MR1 ; Always executed
MNOP ; Always executed
MNOP ; Always executed
MSTOP ; End of task
1024 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
MDEBUGSTOP
Opcode
LSW: 0000 0000 0000 0000
MSW: 0111 1111 0110 0000
Description When CLA breakpoints are enabled, the MDEBUGSTOP instruction is used to halt a task
so that the task can be debugged. That is, MDEBUGSTOP is the CLA breakpoint. If CLA
breakpoints are not enabled, the MDEBUGSTOP instruction behaves like a MNOP. Unlike
the MSTOP, the MIRUN flag is not cleared and an interrupt is not issued. A single-step or
run operation continues execution of the task.
Flags This instruction does not modify flags in the MSTF register.
Flag TF ZF NF LUF LVF
Modified No No No No No
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1025
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
MDEBUGSTOP1
Software Breakpoint
Opcode
LSW: 0000 0000 0000 0000
MSW: 0111 1111 0011 0000
Flags This instruction does not modify flags in the MSTF register.
Flag TF ZF NF LUF LVF
Modified No No No No No
1026 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
MEALLOW
Opcode
LSW: 0000 0000 0000 0000
MSW: 0111 1111 1001 0000
Description This instruction sets the MEALLOW bit in the CLA status register MSTF. When this bit
is set, the CLA is allowed write access to EALLOW protected registers. To again protect
against CLA writes to protected registers, use the MEDIS instruction.
MEALLOW and MEDIS only control CLA write access; reads are allowed even if
MEALLOW has not been executed. MEALLOW and MEDIS are also independent from
the main CPU's EALLOW/EDIS. This instruction does not modify the EALLOW bit in the
main CPU's status register. The MEALLOW bit in MSTF only controls access for the CLA
while the EALLOW bit in the ST1 register only controls access for the main CPU.
As with EALLOW, the MEALLOW bit is overridden using the JTAG port, allowing full
control of register accesses during debug from Code Composer Studio.
Flags This instruction does not modify flags in the MSTF register.
Flag TF ZF NF LUF LVF
Modified No No No No No
Example
; C header file including definition of
; the EPwm1Regs structure
;
; The ePWM TZSEL register is EALLOW protected
;
.cdecls C,LIST,"CLAShared.h"
...
_Cla1Task1:
...
MEALLOW ; Allow CLA write access
MMOV16 @_EPwm1Regs.TZSEL.all, MR3 ; Write to TZSEL
MEDIS ; Disallow CLA write access
...
...
MSTOP
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1027
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
MEDIS
Opcode
LSW: 0000 0000 0000 0000
MSW: 0111 1111 1011 0000
Description This instruction clears the MEALLOW bit in the CLA status register MSTF. When this bit is
clear, the CLA is not allowed write access to EALLOW-protected registers. To enable CLA
writes to protected registers, use the MEALLOW instruction.
MEALLOW and MEDIS only control CLA write access; reads are allowed even if
MEALLOW has not been executed. MEALLOW and MEDIS are also independent from
the main CPU's EALLOW/EDIS. This instruction does not modify the EALLOW bit in the
main CPU's status register. The MEALLOW bit in MSTF only controls access for the CLA
while the EALLOW bit in the ST1 register only controls access for the main CPU.
As with EALLOW, the MEALLOW bit is overridden using the JTAG port, allowing full
control of register accesses during debug from the Code Composer Studio™ IDE.
Flags This instruction does not modify flags in the MSTF register.
Flag TF ZF NF LUF LVF
Modified No No No No No
Example
; C header file including definition of
; the EPwm1Regs structure
;
; The ePWM TZSEL register is EALLOW protected
;
.cdecls C,LIST,"CLAShared.h"
...
_Cla1Task1:
...
MEALLOW ; Allow CLA write access
MMOV16 @_EPwm1Regs.TZSEL.all, MR3 ; Write to TZSEL
MEDIS ; Disallow CLA write access
...
...
MSTOP
1028 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1111 0000 0000
Description This operation generates an estimate of 1/X in 32-bit floating-point format accurate to
approximately 8 bits. This value can be used in a Newton-Raphson algorithm to get a
more accurate answer. That is:
Ye = Estimate(1/X);
Ye = Ye*(2.0 - Ye*X);
Ye = Ye*(2.0 - Ye*X);
After two iterations of the Newton-Raphson algorithm, you get an exact answer
accurate to the 32-bit floating-point format. On each iteration, the mantissa bit accuracy
approximately doubles. The MEINVF32 operation does not generate a negative zero,
DeNorm, or NaN value.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No Yes Yes
Example
; Calculate Num/Den using a Newton-Raphson algorithum for 1/Den
; Ye = Estimate(1/X)
; Ye = Ye*(2.0 - Ye*X)
; Ye = Ye*(2.0 - Ye*X)
;
_Cla1Task1:
MMOV32 MR1, @_Den ; MR1 = Den
MEINVF32 MR2, MR1 ; MR2 = Ye = Estimate(1/Den)
MMPYF32 MR3, MR2, MR1 ; MR3 = Ye*Den
MSUBF32 MR3, #2.0, MR3 ; MR3 = 2.0 - Ye*Den
MMPYF32 MR2, MR2, MR3 ; MR2 = Ye = Ye*(2.0 - Ye*Den)
MMPYF32 MR3, MR2, MR1 ; MR3 = Ye*Den
|| MMOV32 MR0, @_Num ; MR0 = Num
MSUBF32 MR3, #2.0, MR3 ; MR3 = 2.0 - Ye*Den
MMPYF32 MR2, MR2, MR3 ; MR2 = Ye = Ye*(2.0 - Ye*Den)
|| MMOV32 MR1, @_Den ; Reload Den To Set Sign
MNEGF32 MR0, MR0, EQ ; if(Den == 0.0) Change Sign Of Num
MMPYF32 MR0, MR2, MR0 ; MR0 = Y = Ye*Num
MMOV32 @_Dest, MR0 ; Store result
MSTOP ; end of task
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1029
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1110 0100 0000
Description This operation generates an estimate of 1/sqrt(X) in 32-bit floating-point format accurate
to approximately 8 bits. This value can be used in a Newton-Raphson algorithm to get a
more accurate answer. That is:
Ye = Estimate(1/sqrt(X));
Ye = Ye*(1.5 - Ye*Ye*X/2.0);
Ye = Ye*(1.5 - Ye*Ye*X/2.0);
After 2 iterations of the Newton-Raphson algorithm, you get an exact answer accurate to
the 32-bit floating-point format. On each iteration, the mantissa bit accuracy approximately
doubles. The MEISQRTF32 operation does not generate a negative zero, DeNorm, or
NaN value.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No Yes Yes
Example
; Y = sqrt(X)
; Ye = Estimate(1/sqrt(X));
; Ye = Ye*(1.5 - Ye*Ye*X*0.5)
; Ye = Ye*(1.5 - Ye*Ye*X*0.5)
; Y = X*Ye
;
_Cla1Task3:
MMOV32 MR0, @_x ; MR0 = X
MEISQRTF32 MR1, MR0 ; MR1 = Ye = Estimate(1/sqrt(X))
MMOV32 MR1, @_x, EQ ; if(X == 0.0) Ye = 0.0
MMPYF32 MR3, MR0, #0.5 ; MR3 = X*0.5
MMPYF32 MR2, MR1, MR3 ; MR2 = Ye*X*0.5
MMPYF32 MR2, MR1, MR2 ; MR2 = Ye*Ye*X*0.5
MSUBF32 MR2, #1.5, MR2 ; MR2 = 1.5 - Ye*Ye*X*0.5
MMPYF32 MR1, MR1, MR2 ; MR1 = Ye = Ye*(1.5 - Ye*Ye*X*0.5)
MMPYF32 MR2, MR1, MR3 ; MR2 = Ye*X*0.5
MMPYF32 MR2, MR1, MR2 ; MR2 = Ye*Ye*X*0.5
MSUBF32 MR2, #1.5, MR2 ; MR2 = 1.5 - Ye*Ye*X*0.5
MMPYF32 MR1, MR1, MR2 ; MR1 = Ye = Ye*(1.5 - Ye*Ye*X*0.5)
MMPYF32 MR0, MR1, MR0 ; MR0 = Y = Ye*X
MMOV32 @_y, MR0 ; Store Y = sqrt(X)
MSTOP ; end of task
1030 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1031
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1101 1110 0000
Description Convert a 32-bit floating point value in MRb to a 16-bit integer and truncate. The result is
stored in MRa.
MRa(15:0) = F32TOI16(MRb);
MRa(31:16) = sign extension of MRa(15);
Example
MMOVIZ MR0, #5.0 ; MR0 = 5.0 (0x40A00000)
MF32TOI16 MR1, MR0 ; MR1(15:0) = MF32TOI16(MR0) = 0x0005
; MR1(31:16) = Sign extension of MR1(15) = 0x0000
MMOVIZ MR2, #-5.0 ; MR2 = -5.0 (0xC0A00000)
MF32TOI16 MR3, MR2 ; MR3(15:0) = MF32TOI16(MR2) = -5 (0xFFFB)
; MR3(31:16) = Sign extension of MR3(15) = 0xFFFF
1032 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1110 0110 0000
Description Convert the 32-bit floating point value in MRb to a 16-bit integer and round to the nearest
even value. The result is stored in MRa.
MRa(15:0) = F32TOI16round(MRb);
MRa(31:16) = sign extension of MRa(15);
Example
MMOVIZ MR0, #0x3FD9 ; MR0(31:16) = 0x3FD9
MMOVXI MR0, #0x999A ; MR0(15:0) = 0x999A
; MR0 = 1.7 (0x3FD9999A)
MF32TOI16R MR1, MR0 ; MR1(15:0) = MF32TOI16round (MR0) = 2 (0x0002)
; MR1(31:16) = Sign extension of MR1(15) = 0x0000
MMOVF32 MR2, #-1.7 ; MR2 = -1.7 (0xBFD9999A)
MF32TOI16R MR3, MR2 ; MR3(15:0) = MF32TOI16round (MR2) = -2 (0xFFFE)
; MR3(31:16) = Sign extension of MR2(15) = 0xFFFF
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1033
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1101 0110 0000
Description Convert the 32-bit floating-point value in MRb to a 32-bit integer value and truncate. Store
the result in MRa.
MRa = F32TOI32(MRb);
Example 1
MMOVF32 MR2, #11204005.0 ; MR2 = 11204005.0 (0x4B2AF5A5)
MF32TOI32 MR3, MR2 ; MR3 = MF32TOI32(MR2) = 11204005 (0x00AAF5A5)
MMOVF32 MR0, #-11204005.0 ; MR0 = -11204005.0 (0xCB2AF5A5)
MF32TOI32 MR1, MR0 ; MR1 = MF32TOI32(MR0) = -11204005 (0xFF550A5B)
Example 2
; Given X, M and B are IQ24 numbers:
; X = IQ24(+2.5) = 0x02800000
; M = IQ24(+1.5) = 0x01800000
; B = IQ24(-0.5) = 0xFF800000
;
; Calculate Y = X * M + B
;
; Convert M, X, and B from IQ24 to float
;
_Cla1Task2:
MI32TOF32 MR0, @_M ; MR0 = 0x4BC00000
MI32TOF32 MR1, @_X ; MR1 = 0x4C200000
MI32TOF32 MR2, @_B ; MR2 = 0xCB000000
MMPYF32 MR0, MR0, #0x3380 ; M = 1/(1*2^24) * iqm = 1.5 (0x3FC00000)
MMPYF32 MR1, MR1, #0x3380 ; X = 1/(1*2^24) * iqx = 2.5 (0x40200000)
MMPYF32 MR2, MR2, #0x3380 ; B = 1/(1*2^24) * iqb = -.5 (0xBF000000)
MMPYF32 MR3, MR0, MR1 ; M*X
MADDF32 MR2, MR2, MR3 ; Y=MX+B = 3.25 (0x40500000)
; Convert Y from float32 to IQ24
MMPYF32 MR2, MR2, #0x4B80 ; Y * 1*2^24
MF32TOI32 MR2, MR2 ; IQ24(Y) = 0x03400000
MMOV32 @_Y, MR2 ; store result
MSTOP ; end of task
1034 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1110 1010 0000
Description Convert the 32-bit floating point value in MRb to an unsigned 16-bit integer value and
truncate to zero. The result is stored in MRa. To instead round the integer to the nearest
even value, use the MF32TOUI16R instruction.
MRa(15:0) = F32TOUI16(MRb);
MRa(31:16) = 0x0000;
Example
MMOVIZ MR0, #9.0 ; MR0 = 9.0 (0x41100000)
MF32TOUI16 MR1, MR0 ; MR1(15:0) = MF32TOUI16(MR0) = 9 (0x0009)
; MR1(31:16) = 0x0000
MMOVIZ MR2, #-9.0 ; MR2 = -9.0 (0xC1100000)
MF32TOUI16 MR3, MR2 ; MR3(15:0) = MF32TOUI16(MR2) = 0 (0x0000)
; MR3(31:16) = 0x0000
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1035
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1110 1100 0000
Description Convert the 32-bit floating-point value in MRb to an unsigned 16-bit integer and round to
the closest even value. The result is stored in MRa. To instead truncate the converted
value, use the MF32TOUI16 instruction.
MRa(15:0) = MF32TOUI16round(MRb);
MRa(31:16) = 0x0000;
Example
MMOVIZ MR0, #0x412C ; MR0 = 0x412C
MMOVXI MR0, #0xCCCD ; MR0 = 0xCCCD ; MR0 = 10.8 (0x412CCCCD)
MF32TOUI16R MR1, MR0 ; MR1(15:0) = MF32TOUI16round(MR0) = 11 (0x000B)
; MR1(31:16) = 0x0000
MMOVF32 MR2, #-10.8 ; MR2 = -10.8 (0x0xC12CCCCD)
MF32TOUI16R MR3, MR2 ; MR3(15:0) = MF32TOUI16round(MR2) = 0 (0x0000)
; MR3(31:16) = 0x0000
1036 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1101 1010 0000
Description Convert the 32-bit floating-point value in MRb to an unsigned 32-bit integer and store the
result in MRa.
MRa = F32TOUI32(MRb);
Example
MMOVIZ MR0, #12.5 ; MR0 = 12.5 (0x41480000)
MF32TOUI32 MR0, MR0 ; MR0 = MF32TOUI32 (MR0) = 12 (0x0000000C)
MMOVIZ MR1, #-6.5 ; MR1 = -6.5 (0xC0D00000)
MF32TOUI32 MR2, MR1 ; MR2 = MF32TOUI32 (MR1) = 0.0 (0x00000000)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1037
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1110 0000 0000
Description Returns in MRa the fractional portion of the 32-bit floating-point value in MRb
Example
MMOVIZ MR2, #19.625 ; MR2 = 19.625 (0x419D0000)
MFRACF32 MR3, MR2 ; MR3 = MFRACF32(MR2) = 0.625 (0x3F200000)0)
1038 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1110 1000 0000
Description Convert the 16-bit signed integer in MRb to a 32-bit floating-point value and store the
result in MRa.
MRa = MI16TOF32(MRb);
Example
MMOVIZ MR0, #0x0000 ; MR0(31:16) = 0.0 (0x0000)
MMOVXI MR0, #0x0004 ; MR0(15:0) = 4.0 (0x0004)
MI16TOF32 MR1, MR0 ; MR1 = MI16TOF32 (MR0) = 4.0 (0x40800000)
MMOVIZ MR2, #0x0000 ; MR2(31:16) = 0.0 (0x0000)
MMOVXI MR2, #0xFFFC ; MR2(15:0) = -4.0 (0xFFFC)
MI16TOF32 MR3, MR2 ; MR3 = MI16TOF32 (MR2) = -4.0 (0xC0800000)
MSTOP
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1039
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0111 0101 00aa addr
Description Convert the 16-bit signed integer indicated by the mem16 pointer to a 32-bit floating-point
value and store the result in MRa.
MRa = MI16TOF32[mem16];
Example
; Assume A = 4 (0x0004)
; B = -4 (0xFFFC)
MI16TOF32 MR0, @_A ; MR0 = MI16TOF32(A) = 4.0 (0x40800000)
MI16TOF32 MR1, @_B ; MR1 = MI16TOF32(B) = -4.0 (0xC0800000
1040 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0111 0100 01aa addr
Description Convert the 32-bit signed integer indicated by mem32 to a 32-bit floating-point value and
store the result in MRa.
MRa = MI32TOF32[mem32];
Example
; Given X, M and B are IQ24 numbers:
; X = IQ24(+2.5) = 0x02800000
; M = IQ24(+1.5) = 0x01800000
; B = IQ24(-0.5) = 0xFF800000
;
; Calculate Y = X * M + B
;
; Convert M, X, and B from IQ24 to float
;
_Cla1Task3:
MI32TOF32 MR0, @_M ; MR0 = 0x4BC00000
MI32TOF32 MR1, @_X ; MR1 = 0x4C200000
MI32TOF32 MR2, @_B ; MR2 = 0xCB000000
MMPYF32 MR0, MR0, #0x3380 ; M = 1/(1*2^24) * iqm = 1.5 (0x3FC00000)
MMPYF32 MR1, MR1, #0x3380 ; X = 1/(1*2^24) * iqx = 2.5 (0x40200000)
MMPYF32 MR2, MR2, #0x3380 ; B = 1/(1*2^24) * iqb = -.5 (0xBF000000)
MMPYF32 MR3, MR0, MR1 ; M*X
MADDF32 MR2, MR2, MR3 ; Y=MX+B = 3.25 (0x40500000)
; Convert Y from float32 to IQ24
MMPYF32 MR2, MR2, #0x4B80 ; Y * 1*2^24
MF32TOI32 MR2, MR2 ; IQ24(Y) = 0x03400000
MMOV32 @_Y, MR2 ; store result
MSTOP ; end of task
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1041
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1101 1000 0000
Description Convert the signed 32-bit integer in MRb to a 32-bit floating-point value and store the
result in MRa.
MRa = MI32TOF32(MRb);
Example
MMOVIZ MR2, #0x1111 ; MR2(31:16) = 4369 (0x1111)
MMOVXI MR2, #0x1111 ; MR2(15:0) = 4369 (0x1111)
; MR2 = +286331153 (0x11111111)
MI32TOF32 MR3, MR2 ; MR3 = MI32TOF32 (MR2) = 286331153.0 (0x4D888888)
1042 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: 0000 0000 0shi ftaa
MSW: 0111 1011 1100 0000
Description Logical shift-left of MRa by the number of bits indicated. The number of bits can be 1 to
32.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
The MSTF register flags are modified based on the integer results of the operation.
NF = MRa(31);
ZF = 0;
if(MRa(31:0) == 0) { ZF = 1; }
Example
; Given m2 = (int32)32
; x2 = (int32)64
; b2 = (int32)-128
;
; Calculate:
; m2 = m2*2
; x2 = x2*4
; b2 = b2*8
;
_Cla1Task3:
MMOV32 MR0, @_m2 ; MR0 = 32 (0x00000020)
MMOV32 MR1, @_x2 ; MR1 = 64 (0x00000040)
MMOV32 MR2, @_b2 ; MR2 = -128 (0xFFFFFF80)
MLSL32 MR0, #1 ; MR0 = 64 (0x00000040)
MLSL32 MR1, #2 ; MR1 = 256 (0x00000100)
MLSL32 MR2, #3 ; MR2 = -1024 (0xFFFFFC00)
MMOV32 @_m2, MR0 ; Store results
MMOV32 @_x2, MR1
MMOV32 @_b2, MR2
MSTOP ; end of task
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1043
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: 0000 0000 0shi ftaa
MSW: 0111 1011 1000 0000
Description Logical shift-right of MRa by the number of bits indicated. The number of bits can be 1 to
32. Unlike the arithmetic shift (MASR32), the logical shift does not preserve the number's
sign bit. Every bit in the operand is moved the specified number of bit positions, and the
vacant bit positions are filled in with zeros.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
The MSTF register flags are modified based on the integer results of the operation.
NF = MRa(31);
ZF = 0;
if(MRa(31:0) == 0) { ZF = 1;}
Example
; Illustrate the difference between MASR32 and MLSR32
MMOVIZ MR0, #0xAAAA ; MR0 = 0xAAAA5555
MMOVXI MR0, #0x5555
MMOV32 MR1, MR0 ; MR1 = 0xAAAA5555
MMOV32 MR2, MR0 ; MR2 = 0xAAAA5555
MASR32 MR1, #1 ; MR1 = 0xD5552AAA
MLSR32 MR2, #1 ; MR2 = 0x55552AAA
MASR32 MR1, #1 ; MR1 = 0xEAAA9555
MLSR32 MR2, #1 ; MR2 = 0x2AAA9555
MASR32 MR1, #6 ; MR1 = 0xFFAAAA55
MLSR32 MR2, #6 ; MR2 = 0x00AAAA55
1044 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0011 ffee ddaa addr
Description Multiply and accumulate the contents of floating-point registers and move from register to
memory. The destination register for the MMOV32 cannot be the same as the destination
registers for the MMACF32.
Restrictions The destination registers for the MMACF32 and the MMOV32 must be unique. That is,
MRa cannot be MR3 and MRa cannot be the same register as MRd.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes Yes Yes
NF = MRa(31);
ZF = 0;
if(MRa(30:23) == 0) { ZF = 1; NF = 0; }
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1045
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
MMACF32 MR3, MR2, MRd, MRe, MRf ||MMOV32 MRa, mem32 (continued)
Example 1
; Perform 5 multiply and accumulate operations:
;
; X and Y are 32-bit floating-point arrays
;
; 1st multiply: A = X0 * Y0
; 2nd multiply: B = X1 * Y1
; 3rd multiply: C = X2 * Y2
; 4th multiply: D = X3 * Y3
; 5th multiply: E = X3 * Y3
;
; Result = A + B + C + D + E
;
_Cla1Task1:
MMOVI16 MAR0, #_X ; MAR0 points to X array
MMOVI16 MAR1, #_Y ; MAR1 points to Y array
MNOP ; Delay for MAR0, MAR1 load
MNOP ; Delay for MAR0, MAR1 load
; <-- MAR0 valid
MMOV32 MR0, *MAR0[2]++ ; MR0 = X0, MAR0 += 2
; <-- MAR1 valid
MMOV32 MR1, *MAR1[2]++ ; MR1 = Y0, MAR1 += 2
MMPYF32 MR2, MR0, MR1 ; MR2 = A = X0 * Y0
|| MMOV32 MR0, *MAR0[2]++ ; In parallel MR0 = X1, MAR0 += 2
MMOV32 MR1, *MAR1[2]++ ; MR1 = Y1, MAR1 += 2
MMPYF32 MR3, MR0, MR1 ; MR3 = B = X1 * Y1
|| MMOV32 MR0, *MAR0[2]++ ; In parallel MR0 = X2, MAR0 += 2
MMOV32 MR1, *MAR1[2]++ ; MR1 = Y2, MAR2 += 2
MMACF32 MR3, MR2, MR2, MR0, MR1 ; MR3 = A + B, MR2 = C = X2 * Y2
|| MMOV32 MR0, *MAR0[2]++ ; In parallel MR0 = X3
MMOV32 MR1, *MAR1[2]++ ; MR1 = Y3 M
MACF32 MR3, MR2, MR2, MR0, MR1 ; MR3 = (A + B) + C, MR2 = D = X3 * Y3
|| MMOV32 MR0, *MAR0 ; In parallel MR0 = X4
MMOV32 MR1, *MAR1 ; MR1 = Y4
MMPYF32 MR2, MR0, MR1 ; MR2 = E = X4 * Y4
|| MADDF32 MR3, MR3, MR2 ; in parallel MR3 = (A + B + C) + D
MADDF32 MR3, MR3, MR2 ; MR3 = (A + B + C + D) + E
MMOV32 @_Result, MR3 ; Store the result
MSTOP ; end of task
1046 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
MMACF32 MR3, MR2, MRd, MRe, MRf ||MMOV32 MRa, mem32 (continued)
Example 2
; sum = X0*B0 + X1*B1 + X2*B2 + Y1*A1 + Y2*B2
;
; X2 = X1
; X1 = X0
; Y2 = Y1 ; Y1 = sum
;
_ClaTask2:
MMOV32 MR0, @_B2 ; MR0 = B2
MMOV32 MR1, @_X2 ; MR1 = X2
MMPYF32 MR2, MR1, MR0 ; MR2 = X2*B2
|| MMOV32 MR0, @_B1 ; MR0 = B1
MMOVD32 MR1, @_X1 ; MR1 = X1, X2 = X1
MMPYF32 MR3, MR1, MR0 ; MR3 = X1*B1
|| MMOV32 MR0, @_B0 ; MR0 = B0
MMOVD32 MR1, @_X0 ; MR1 = X0, X1 = X0
; MR3 = X1*B1 + X2*B2, MR2 = X0*B0
; MR0 = A2
MMACF32 MR3, MR2, MR2, MR1, MR0
|| MMOV32 MR0, @_A2 M
See also MMPYF32 MRa, MRb, MRc || MADDF32 MRd, MRe, MRf
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1047
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1101 0010 0000
Description
if(MRa < MRb) MRa = MRb;
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
The ZF and NF flags are configured on the result of the operation, not the result stored in
the destination register.
Example 1
MMOVIZ MR0, #5.0 ; MR0 = 5.0 (0x40A00000)
MMOVIZ MR1, #-2.0 ; MR1 = -2.0 (0xC0000000)
MMOVIZ MR2, #-1.5 ; MR2 = -1.5 (0xBFC00000)
MMAXF32 MR2, MR1 ; MR2 = -1.5, ZF = NF = 0
MMAXF32 MR1, MR2 ; MR1 = -1.5, ZF = 0, NF = 1
MMAXF32 MR2, MR0 ; MR2 = 5.0, ZF = 0, NF = 1
MAXF32 MR0, MR2 ; MR2 = 5.0, ZF = 1, NF = 0
1048 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Example 2
; X is an array of 32-bit floating-point values
; Find the maximum value in an array X
; and store the value in Result
;
_Cla1Task1:
MMOVI16 MAR1,#_X ; Start address
MUI16TOF32 MR0, @_len ; Length of the array
MNOP ; delay for MAR1 load
MNOP ; delay for MAR1 load
MMOV32 MR1, *MAR1[2]++ ; MR1 = X0
LOOP
MMOV32 MR2, *MAR1[2]++ ; MR2 = next element
MMAXF32 MR1, MR2 ; MR1 = MAX(MR1, MR2)
MADDF32 MR0, MR0, #-1.0 ; Decrememt the counter
MCMPF32 MR0 #0.0 ; Set/clear flags for MBCNDD
MNOP
MNOP
MNOP
MBCNDD LOOP, NEQ ; Branch if not equal to zero
MMOV32 @_Result, MR1 ; Always executed
MNOP ; Always executed
MNOP ; Always executed
MSTOP ; End of task
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1049
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: IIII IIII IIII IIII
MSW: 0111 1001 0000 00aa
Description Compare MRa with the floating-point value represented by the immediate operand. If the
immediate value is larger, then load the value into MRa.
#16FHi is a 16-bit immediate value that represents the upper 16-bits of an IEEE 32-bit
floating-point value. The low 16-bits of the mantissa are assumed to be all 0. This
addressing mode is most useful for constants where the lowest 16-bits of the mantissa
are 0. Some examples are 2.0 (0x40000000), 4.0 (0x40800000), 0.5 (0x3F000000), and
-1.5 (0xBFC00000). The assembler accepts either a hex or float as the immediate value.
That is, -1.5 can be represented as #-1.5 or #0xBFC0.
Special cases for the output from the MMAXF32 operation:
• NaN output is converted to infinity
• A denormalized output is converted to positive zero.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
The ZF and NF flags are configured on the result of the operation, not the result stored in
the destination register.
Example
MMOVIZ MR0, #5.0 ; MR0 = 5.0 (0x40A00000)
MMOVIZ MR1, #4.0 ; MR1 = 4.0 (0x40800000)
MMOVIZ MR2, #-1.5 ; MR2 = -1.5 (0xBFC00000)
MMAXF32 MR0, #5.5 ; MR0 = 5.5, ZF = 0, NF = 1
MMAXF32 MR1, #2.5 ; MR1 = 4.0, ZF = 0, NF = 0
MMAXF32 MR2, #-1.0 ; MR2 = -1.0, ZF = 0, NF = 1
MMAXF32 MR2, #-1.0 ; MR2 = -1.5, ZF = 1, NF = 0
1050 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1101 0100 0000
Description
if(MRa > MRb) MRa = MRb;
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
The ZF and NF flags are configured on the result of the operation, not the result stored in
the destination register.
Example 1
MMOVIZ MR0, #5.0 ; MR0 = 5.0 (0x40A00000)
MMOVIZ MR1, #4.0 ; MR1 = 4.0 (0x40800000)
MMOVIZ MR2, #-1.5 ; MR2 = -1.5 (0xBFC00000)
MMINF32 MR0, MR1 ; MR0 = 4.0, ZF = 0, NF = 0
MMINF32 MR1, MR2 ; MR1 = -1.5, ZF = 0, NF = 0
MMINF32 MR2, MR1 ; MR2 = -1.5, ZF = 1, NF = 0
MMINF32 MR1, MR0 ; MR2 = -1.5, ZF = 0, NF = 1
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1051
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Example 2
;
; X is an array of 32-bit floating-point values
; Find the minimum value in an array X
; and store the value in Result
;
_Cla1Task1:
MMOVI16 MAR1,#_X ; Start address
MUI16TOF32 MR0, @_len ; Length of the array
MNOP ; delay for MAR1 load
MNOP ; delay for MAR1 load
MMOV32 MR1, *MAR1[2]++ ; MR1 = X0
LOOP
MMOV32 MR2, *MAR1[2]++ ; MR2 = next element
MMINF32 MR1, MR2 ; MR1 = MAX(MR1, MR2)
MADDF32 MR0, MR0, #-1.0 ; Decrememt the counter
MCMPF32 MR0 #0.0 ; Set/clear flags for MBCNDD
MNOP
MNOP
MNOP
MBCNDD LOOP, NEQ ; Branch if not equal to zero
MMOV32 @_Result, MR1 ; Always executed
MNOP ; Always executed
MNOP ; Always executed
MSTOP ; End of task
1052 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: IIII IIII IIII IIII
MSW: 0111 1001 0100 00aa
Description Compare MRa with the floating-point value represented by the immediate operand. If the
immediate value is smaller, then load the value into MRa.
#16FHi is a 16-bit immediate value that represents the upper 16-bits of an IEEE 32-bit
floating-point value. The low 16-bits of the mantissa are assumed to be all 0. This
addressing mode is most useful for constants where the lowest 16-bits of the mantissa
are 0. Some examples are 2.0 (0x40000000), 4.0 (0x40800000), 0.5 (0x3F000000), and
-1.5 (0xBFC00000). The assembler accepts either a hex or float as the immediate value.
That is, -1.5 can be represented as #-1.5 or #0xBFC0.
Special cases for the output from the MMINF32 operation:
• NaN output is converted to infinity
• A denormalized output is converted to positive zero.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
The ZF and NF flags are configured on the result of the operation, not the result stored in
the destination register.
Example
MMOVIZ MR0, #5.0 ; MR0 = 5.0 (0x40A00000)
MMOVIZ MR1, #4.0 ; MR1 = 4.0 (0x40800000)
MMOVIZ MR2, #-1.5 ; MR2 = -1.5 (0xBFC00000)
MMINF32 MR0, #5.5 ; MR0 = 5.0, ZF = 0, NF = 1
MMINF32 MR1, #2.5 ; MR1 = 2.5, ZF = 0, NF = 0
MMINF32 MR2, #-1.0 ; MR2 = -1.5, ZF = 0, NF = 1
MMINF32 MR2, #-1.5 ; MR2 = -1.5, ZF = 1, NF = 0
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1053
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: IIII IIII IIII IIII (opcode of MMOV16 MAR0, MRa, #16I)
MSW: 0111 1111 1101 00AA
LSW: IIII IIII IIII IIII (opcode of MMOV16 MAR1, MRa, #16I)
MSW: 0111 1111 1111 00AA
Description Load the auxiliary register, MAR0 or MAR1, with MRa(15:0) + 16-bit immediate value.
Refer to the Pipeline section for important information regarding this instruction.
Flags This instruction does not modify flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No No No
Pipeline This is a single-cycle instruction. The load of MAR0 or MAR1 occurs in the EXE phase
of the pipeline. Any post increment of MAR0 or MAR1 using indirect addressing occurs in
the D2 phase of the pipeline. Therefore, the following applies when loading the auxiliary
registers:
• I1 and I2
The two instructions following MMOV16 use MAR0 or MAR1 before the update occurs.
Thus, these two instructions use the old value of MAR0 or MAR1.
• I3
Loading of an auxiliary register occurs in the EXE phase while updates due to post-
increment addressing occur in the D2 phase. Thus, I3 cannot use the auxiliary register
or there is a conflict. In the case of a conflict, the update due to address-mode post
increment wins and the auxiliary register is not updated with #_X.
• I4
Starting with the 4th instruction, MAR0 or MAR1 is the new value loaded with
MMOVI16.
1054 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Example 1
; Calculate an offset into a sin/cos table
;
_Cla1Task1:
MMOV32 MR0,@_rad ; MR0 = rad
MMOV32 MR1,@_TABLE_SIZEDivTwoPi ; MR1 = TABLE_SIZE/(2*Pi)
MMPYF32 MR1,MR0,MR1 ; MR1 = rad* TABLE_SIZE/(2*Pi)
|| MMOV32 MR2,@_TABLE_MASK ; MR2 = TABLE_MASK
MF32TOI32 MR3,MR1 ; MR3 = K=int(rad*TABLE_SIZE/(2*Pi))
MAND32 MR3,MR3,MR2 ; MR3 = K & TABLE_MASK
MLSL32 MR3,#1 ; MR3 = K * 2
MMOV16 MAR0,MR3,#_Cos0 ; MAR0 K*2+addr of table.Cos0
MFRACF32 MR1,MR1 ; I1
MMOV32 MR0,@_TwoPiDivTABLE_SIZE ; I2
MMPYF32 MR1,MR1,MR0 ; I3
|| MMOV32 MR0,@_Coef3
MMOV32 MR2,*MAR0[#-64]++ ; MR2 = *MAR0, MAR0 += (-64)
...
...
MSTOP ; end of task
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1055
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Example 2
; This task logs the last NUM_DATA_POINTS
; ADCRESULT1 values in the array VoltageCLA
;
; When the last element in the array has been
; filled, the task goes back to the
; the first element.
;
; Before starting the ADC conversions, force
; Task 8 to initialize the ConversionCount to zero
;
; The ADC is set to sample (acquire) for 15 SYSCLK cycles
; or 75ns. After the capacitor has captured the analog
; value, the ADC triggers this task early.
; It takes 10.5 ADCCLKs to complete a conversion,
; the ADCCLK being SYSCLK/4
; T_sys = 1/200MHz = 5ns
; T_adc = 4*T_sys = 20ns
; The ADC takes 10.5 * 4 or 42 SYSCLK cycles to complete
; a conversion. The ADC result register can be read on the
; 36th instruction after the task begins.
;
_Cla1Task2:
.asg 0, N
.loop
MNOP ;I1 - I28 Wait till I36 to read
result
.eval N + 1, N
.break N = 28
.endloop
MMOVZ16 MR0, @_ConversionCount ;I29 Current Conversion
MMOV16 MAR1, MR0, #_VoltageCLA ;I30 Next array location
MUI16TOF32 MR0, MR0 ;I31 Convert count to float32
MADDF32 MR0, MR0, #1.0 ;I32 Add 1 to conversion count
MCMPF32 MR0, #NUM_DATA_POINTS.0 ;I33 Compare count to max
MF32TOUI16 MR0, MR0 ;I34 Convert count to Uint16
MNOP ;I35 Wait till I36 to read
result
MMOVZ16 MR2, @_AdcaResultRegs.ADCRESULT1 ;I36 Read ADCRESULT1
MMOV16 *MAR1, MR2 ; Store ADCRESULT1
MBCNDD _RestartCount, GEQ ; If count >= NUM_DATA_POINTS
MMOVIZ MR1, #0.0 ; Always executed: MR1=0
MNOP
MNOP
MMOV16 @_ConversionCount, MR0 ; If branch not taken
MSTOP ; store current count
_RestartCount
MMOV16 @_ConversionCount, MR1 ; If branch taken, restart
count
MSTOP ; end of task
; This task initializes the ConversionCount
; to zero
;
_Cla1Task8:
MMOVIZ MR0, #0.0
MMOV16 @_ConversionCount, MR0
MSTOP
_ClaT8End:
1056 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: mmmm mmmm mmmm mmmm (Opcode for MMOV16 MAR0, mem16)
MSW: 0111 0110 0000 addr
LSW: mmmm mmmm mmmm mmmm (Opcode for MMOV16 MAR1, mem16)
MSW: 0111 0110 0100 addr
Description Load MAR0 or MAR1 with the 16-bit value pointed to by mem16. Refer to the Pipeline
section for important information regarding this instruction.
MAR1 = [mem16];
Pipeline This is a single-cycle instruction. The load of MAR0 or MAR1 occurs in the EXE phase
of the pipeline. Any post increment of MAR0 or MAR1 using indirect addressing occurs in
the D2 phase of the pipeline. Therefore, the following applies when loading the auxiliary
registers:
• I1 and I2
The two instructions following MMOV16 use MAR0 or MAR1 before the update occurs.
Thus, these two instructions use the old value of MAR0 or MAR1.
• I3
Loading of an auxiliary register occurs in the EXE phase while updates due to post-
increment addressing occur in the D2 phase. Thus, I3 cannot use the auxiliary register
or there is a conflict. In the case of a conflict, the update due to address-mode post
increment, the auxiliary register is not updated with #_X.
• I4
Starting with the 4th instruction, MAR0 or MAR1 is the new value loaded with
MMOV16.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1057
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
1058 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Example
; This task logs the last NUM_DATA_POINTS
; ADCRESULT1 values in the array VoltageCLA
;
; When the last element in the array has been
; filled, the task goes back to the
; the first element.
;
; Before starting the ADC conversions, force
; Task 8 to initialize the ConversionCount to zero
;
; The ADC is set to sample (acquire) for 15 SYSCLK cycles
; or 75ns. After the capacitor has captured the analog
; value, the ADC triggers this task early.
; It takes 10.5 ADCCLKs to complete a conversion,
; the ADCCLK being SYSCLK/4
; T_sys = 1/200MHz = 5ns
; T_adc = 4*T_sys = 20ns
; The ADC takes 10.5 * 4 or 42 SYSCLK cycles to complete
; a conversion. The ADC result register can be read on the
; 36th instruction after the task begins.
;
_Cla1Task2:
.asg 0, N
.loop
MNOP
;I1 - I28 Wait till I36 to read result
.eval N + 1, N
.break N = 28
.endloop
MMOVZ16 MR0, @_ConversionCount ;I29 Current Conversion
MMOV16 MAR1, MR0, #_VoltageCLA ;I30 Next array location
MUI16TOF32 MR0, MR0 ;I31 Convert count to float32
MADDF32 MR0, MR0, #1.0 ;I32 Add 1 to conversion count
MCMPF32 MR0, #NUM_DATA_POINTS.0 ;I33 Compare count to max
MF32TOUI16 MR0, MR0 ;I34 Convert count to Uint16
MNOP ;I35 Wait until I36 to read
result
MMOVZ16 MR2, @_AdcaResultRegs.ADCRESULT1 ;I36 Read ADCRESULT1
MMOV16 *MAR1, MR2 ; Store ADCRESULT1
MBCNDD _RestartCount, GEQ ; If count >= NUM_DATA_POINTS
MMOVIZ MR1, #0.0 ; Always executed: MR1=0
MNOP
MNOP
MMOV16 @_ConversionCount, MR0 ; If branch not taken
MSTOP ; store current count
_RestartCount
MMOV16 @_ConversionCount, MR1 ; If branch taken, restart
count
MSTOP ; end of task
; This task initializes the ConversionCount
; to zero
;
_Cla1Task8:
MMOVIZ MR0, #0.0
MMOV16 @_ConversionCount, MR0
MSTOP
_ClaT8End:
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1059
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Operands mem16 16-bit destination memory accessed using one of the available
addressing modes
MARx CLA auxiliary register MAR0 or MAR1
Opcode
LSW: mmmm mmmm mmmm mmmm (Opcode for MMOV16 mem16, MAR0)
MSW: 0111 0110 1000 addr
LSW: mmmm mmmm mmmm mmmm (Opcode for MMOV16 mem16, MAR1)
MSW: 0111 0110 1100 addr
Description Store the contents of MAR0 or MAR1 in the 16-bit memory location pointed to by mem16.
[mem16] = MAR0;
1060 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Operands mem16 16-bit destination memory accessed using one of the available
addressing modes
MRa CLA floating-point source register (MR0 to MR3)
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0111 0101 11aa addr
Description Move 16-bit value from the lower 16-bits of the floating-point register (MRa(15:0)) to the
location pointed to by mem16.
[mem16] = MRa(15:0);
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1061
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Example
; This task logs the last NUM_DATA_POINTS
; ADCRESULT1 values in the array VoltageCLA
;
; When the last element in the array has been
; filled, the task goes back to the
; the first element.
;
; Before starting the ADC conversions, force
; Task 8 to initialize the ConversionCount to zero
;
; The ADC is set to sample (acquire) for 15 SYSCLK cycles
; or 75ns. After the capacitor has captured the analog
; value, the ADC triggers this task early.
; It takes 10.5 ADCCLKs to complete a conversion,
; the ADCCLK being SYSCLK/4
; T_sys = 1/200MHz = 5ns
; T_adc = 4*T_sys = 20ns
; The ADC takes 10.5 * 4 or 42 SYSCLK cycles to complete
; a conversion. The ADC result register can be read on the
; 36th instruction after the task begins.
;
_Cla1Task2:
.asg 0, N
.loop
MNOP
;I1 - I28 Wait till I36 to read result
.eval N + 1, N
.break N = 28
.endloop
MMOVZ16 MR0, @_ConversionCount ;I29 Current Conversion
MMOV16 MAR1, MR0, #_VoltageCLA ;I30 Next array location
MUI16TOF32 MR0, MR0 ;I31 Convert count to float32
MADDF32 MR0, MR0, #1.0 ;I32 Add 1 to conversion count
MCMPF32 MR0, #NUM_DATA_POINTS.0 ;I33 Compare count to max
MF32TOUI16 MR0, MR0 ;I34 Convert count to Uint16
MNOP ;I35 Wait till I36 to read
result
MMOVZ16 MR2, @_AdcaResultRegs.ADCRESULT1 ;I36 Read ADCRESULT1
MMOV16 *MAR1, MR2 ; Store ADCRESULT1
MBCNDD _RestartCount, GEQ ; If count >= NUM_DATA_POINTS
MMOVIZ MR1, #0.0 ; Always executed: MR1=0
MNOP
MNOP
MMOV16 @_ConversionCount, MR0 ; If branch not taken
MSTOP ; store current count
_RestartCount
MMOV16 @_ConversionCount, MR1 ; If branch taken, restart
count
MSTOP ; end of task
; This task initializes the ConversionCount
; to zero
;
_Cla1Task8:
MMOVIZ MR0, #0.0
MMOV16 @_ConversionCount, MR0
MSTOP
_ClaT8End:
1062 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0111 0100 11aa addr
[mem32] = MRa;
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No No No
No flags affected.
Pipeline This is a single-cycle instruction.
Example
; Perform 5 multiply and accumulate operations:
;
; X and Y are 32-bit floating-point arrays;
; 1st multiply: A = X0 * Y0
; 2nd multiply: B = X1 * Y1
; 3rd multiply: C = X2 * Y2
; 4th multiply: D = X3 * Y3
; 5th multiply: E = X3 * Y3;
; Result = A + B + C + D + E
;
_Cla1Task1:
MMOVI16 MAR0, #_X ; MAR0 points to X array
MMOVI16 MAR1, #_Y ; MAR1 points to Y array
MNOP ; Delay for MAR0, MAR1 load
MNOP ; Delay for MAR0, MAR1 load
; <-- MAR0 valid
MMOV32 MR0, *MAR0[2]++ ; MR0 = X0, MAR0 += 2
; <-- MAR1 valid
MMOV32 MR1, *MAR1[2]++ ; MR1 = Y0, MAR1 += 2
MMPYF32 MR2, MR0, MR1 ; MR2 = A = X0 * Y0
|| MMOV32 MR0, *MAR0[2]++ ; In parallel MR0 = X1, MAR0 += 2
MMOV32 MR1, *MAR1[2]++ ; MR1 = Y1, MAR1 += 2
MMPYF32 MR3, MR0, MR1 ; MR3 = B = X1 * Y1
|| MMOV32 MR0, *MAR0[2]++ ; In parallel MR0 = X2, MAR0 += 2
MMOV32 MR1, *MAR1[2]++ ; MR1 = Y2, MAR2 += 2
MMACF32 MR3, MR2, MR2, MR0, MR1 ; MR3 = A + B, MR2 = C = X2 * Y2
|| MMOV32 MR0, *MAR0[2]++ ; In parallel MR0 = X3
MMOV32 MR1, *MAR1[2]++ ; MR1 = Y3
MMACF32 MR3, MR2, MR2, MR0, MR1 ; MR3 = (A + B) + C, MR2 = D = X3 *
Y3
|| MMOV32 MR0, *MAR0 ; In parallel MR0 = X4
MMOV32 MR1, *MAR1 ; MR1 = Y4
MMPYF32 MR2, MR0, MR1 ; MR2 = E = X4 * Y4
|| MADDF32 MR3, MR3, MR2 ; in parallel MR3 = (A + B + C) + D
MADDF32 MR3, MR3, MR2 ; MR3 = (A + B + C + D) + E
MMOV32 @_Result, MR3 ; Store the result MSTOP ; end of task
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1063
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0111 0111 0100 addr
[mem32] = MSTF;
Flags This instruction does not modify flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No No No
Example The following example illustrates the pipeline flow for the context save (of the flags and
RPC) prior to a function call. The first column in the comments shows the pipeline stages
for the MMOV32 instruction while the second column pertains to the MCCNDD instruction.
1064 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0111 00cn dfaa addr
Description If the condition is true, then move the 32-bit value referenced by mem32 to the floating-
point register indicated by MRa.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
if(CNDF == UNCF)
{
NF = MRa(31);
ZF = 0;
if(MRa(30:23) == 0) { ZF = 1; NF = 0; }
}
else No flags modified;
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1065
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Example
; Given A, B, X, M1 and M2 are 32-bit floating-point numbers
;
; if(A == B) calculate Y = X*M1
; if(A! = B) calculate Y = X*M2
;
_Cla1Task5:
MMOV32 MR0, @_A
MMOV32 MR1, @_B
MCMPF32 MR0, MR1
MMOV32 MR2, @_M1, EQ ; if A == B, MR2 = M1
; Y = M1*X
MMOV32 MR2, @_M2, NEQ ; if A! = B, MR2 = M2
; Y = M2*X
MMOV32 MR3, @_X
MMPYF32 MR3, MR2, MR3 ; Calculate Y
MMOV32 @_Y, MR3 ; Store Y
MSTOP ; end of task
1066 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: 0000 0000 cndf bbaa
MSW: 0111 1010 1100 0000
Description If the condition is true, then move the 32-bit value in MRb to the floating-point register
indicated by MRa.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
if(CNDF == UNCF)
{
NF = MRa(31); ZF = 0;
if(MRa(30:23) == 0) {ZF = 1; NF = 0;}
}
else No flags modified;
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1067
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Example
; Given: X = 8.0
; Y = 7.0
; A = 2.0
; B = 5.0
; _ClaTask1
MMOV32 MR3, @_X ; MR3 = X = 8.0
MMOV32 MR0, @_Y ; MR0 = Y = 7.0
MMAXF32 MR3, MR0 ; ZF = 0, NF = 0, MR3 = 8.0
MMOV32 MR1, @_A, GT ; true, MR1 = A = 2.0
MMOV32 MR1, @_B, LT ; false, does not load MR1
MMOV32 MR2, MR1, GT ; true, MR2 = MR1 = 2.0
MMOV32 MR2, MR0, LT ; false, does not load MR2
MSTOP
1068 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0111 0111 0000 addr
Description Move from memory to the CLA's status register MSTF. This instruction is most useful
when nesting function calls (using MCCNDD).
MSTF = [mem32];
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified Yes Yes Yes Yes Yes
Loading the status register can overwrite all flags and the RPC field. The MEALLOW field
is not affected.
Pipeline This is a single-cycle instruction.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1069
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0111 0100 00aa addr
Description Move the 32-bit value referenced by mem32 to the floating-point register indicated by
MRa.
MRa = [mem32];
[mem32+2] = [mem32];
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
NF = MRa(31);
ZF = 0;
if(MRa(30:23) == 0){ ZF = 1; NF = 0; }
Example
; sum = X0*B0 + X1*B1 + X2*B2 + Y1*A1 + Y2*B2
;
; X2 = X1
; X1 = X0
; Y2 = Y1
; Y1 = sum
;
_Cla1Task2:
MMOV32 MR0, @_B2 ; MR0 = B2
MMOV32 MR1, @_X2 ; MR1 = X2
MMPYF32 MR2, MR1, MR0 ; MR2 = X2*B2
|| MMOV32 MR0, @_B1 ; MR0 = B1
MMOVD32 MR1, @_X1 ; MR1 = X1, X2 = X1
MMPYF32 MR3, MR1, MR0 ; MR3 = X1*B1
|| MMOV32 MR0, @_B0 ; MR0 = B0
MMOVD32 MR1, @_X0 ; MR1 = X0, X1 = X0
; MR3 = X1*B1 + X2*B2, MR2 = X0*B0
; MR0 = A2
MMACF32 MR3, MR2, MR2, MR1, MR0
|| MMOV32 MR0, @_A2
1070 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1071
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Operands This instruction is an alias for the MMOVIZ and MMOVXI instructions. The second
operand is translated by the assembler such that the instruction becomes:
Opcode
LSW: IIII IIII IIII IIII (opcode of MMOVIZ MRa, #16FHiHex)
MSW: 0111 1000 0100 00aa
LSW: IIII IIII IIII IIII (opcode of MMOVXI MRa, #16FLoHex)
MSW: 0111 1000 1000 00aa
Description This instruction accepts the immediate operand only in floating-point representation. To
specify the immediate value as a hex value (IEEE 32-bit floating- point format), use the
MOVI32 MRa, #32FHex instruction.
Load the 32-bits of MRa with the immediate float value represented by #32F.
#32F is a float value represented in floating-point representation. The assembler only
accepts a float value represented in floating-point representation. That is, 3.0 can only be
represented as #3.0 (#0x40400000 results in an error).
MRa = #32F;
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No No No
Pipeline Depending on #32F, this instruction takes one or two cycles. If all of the lower 16-bits
of the IEEE 32-bit floating-point format of #32F are zeros, then the assembler converts
MMOVF32 into only an MMOVIZ instruction. If the lower 16-bits of the IEEE 32-bit
floating-point format of #32F are not zeros, then the assembler converts MMOVF32 into
MMOVIZ and MMOVXI instructions.
Example
MMOVF32 MR1, #3.0 ; MR1 = 3.0 (0x40400000)
; Assembler converts this instruction as
; MMOVIZ MR1, #0x4040
MMOVF32 MR2, #0.0 ; MR2 = 0.0 (0x00000000)
; Assembler converts this instruction as
; MMOVIZ MR2, #0x0
MMOVF32 MR3, #12.265 ; MR3 = 12.625 (0x41443D71)
; Assembler converts this instruction as
; MMOVIZ MR3, #0x4144
; MMOVXI MR3, #0x3D71
1072 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: IIII IIII IIII IIII (opcode of MMOVI16 MAR0, #16I)
MSW: 0111 1111 1100 0000
LSW: IIII IIII IIII IIII (opcode of MMOVI16 MAR1, #16I)
MSW: 0111 1111 1110 0000
Description Load the auxiliary register, MAR0 or MAR1, with a 16-bit immediate value. Refer to the
Pipeline section for important information regarding this instruction.
MARx = #16I;
Flags This instruction does not modify flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No No No
Pipeline This is a single-cycle instruction. The immediate load of MAR0 or MAR1 occurs in
the EXE phase of the pipeline. Any post increment of MAR0 or MAR1 using indirect
addressing occurs in the D2 phase of the pipeline. Therefore, the following applies when
loading the auxiliary registers:
• I1 and I2
The two instructions following MMOVI16 use MAR0 or MAR1 before the update
occurs. Thus, these two instructions use the old value of MAR0 or MAR1.
• I3
Loading of an auxiliary register occurs in the EXE phase while updates due to post-
increment addressing occur in the D2 phase. Thus, I3 cannot use the auxiliary register
or there is a conflict. In the case of a conflict, the update due to address-mode post
increment, the auxiliary register is not updated with #_X.
• I4
Starting with the 4th instruction, MAR0 or MAR1 is the new value loaded with
MMOVI16.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1073
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
1074 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
This instruction is an alias for the MMOVIZ and MMOVXI instructions. The second
operand is translated by the assembler such that the instruction becomes:
Opcode
LSW: IIII IIII IIII IIII (opcode of MMOVIZ MRa, #16FHiHex)
MSW: 0111 1000 0100 00aa
LSW: IIII IIII IIII IIII (opcode of MMOVXI MRa, #16FLoHex)
MSW: 0111 1000 1000 00aa
Description This instruction only accepts a hex value as the immediate operand. To specify the
immediate value with a floating-point representation, use the MMOVF32 MRa, #32F
instruction.
Load the 32-bits of MRa with the immediate 32-bit hex value represented by #32FHex.
#32FHex is a 32-bit immediate hex value that represents the IEEE 32-bit floating-point
value of a floating-point number. The assembler only accepts a hex immediate value. That
is, 3.0 can only be represented as #0x40400000 (#3.0 results in an error).
MRa = #32FHex;
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No No No
Pipeline Depending on #32FHex, this instruction takes one or two cycles. If all of the lower 16-bits
of #32FHex are zeros, then the assembler converts MOVI32 to an MMOVIZ instruction.
If the lower 16-bits of #32FHex are not zeros, then the assembler converts MOVI32 to
MMOVIZ and MMOVXI instructions.
Example
MOVI32 MR1, #0x40400000 ; MR1 = 0x40400000
; Assembler converts this instruction as
; MMOVIZ MR1, #0x4040
MOVI32 MR2, #0x00000000 ; MR2 = 0x00000000
; Assembler converts this instruction as
; MMOVIZ MR2, #0x0
MOVI32 MR3, #0x40004001 ; MR3 = 0x40004001
; Assembler converts this instruction as
; MMOVIZ MR3, #0x4000
; MMOVXI MR3, #0x4001
MOVI32 MR0, #0x00004040 ; MR0 = 0x00004040
; Assembler converts this instruction as
; MMOVIZ MR0, #0x0000
; MMOVXI MR0, #0x4040
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1075
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
1076 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: IIII IIII IIII IIII
MSW: 0111 1000 0100 00aa
Description Load the upper 16-bits of MRa with the immediate value #16FHi and clear the low 16-bits
of MRa.
#16FHi is a 16-bit immediate value that represents the upper 16-bits of an IEEE
32-bit floating-point value. The low 16-bits of the mantissa are assumed to be all 0.
The assembler only accepts a decimal or hex immediate value. That is, -1.5 can be
represented as #-1.5 or #0xBFC0.
By itself, MMOVIZ is useful for loading a floating-point register with a constant in which
the lowest 16-bits of the mantissa are 0. Some examples are 2.0 (0x40000000), 4.0
(0x40800000), 0.5 (0x3F000000), and -1.5 (0xBFC00000). If a constant requires all 32-
bits of a floating-point register to be initialized, then use MMOVIZ along with the MMOVXI
instruction.
MRa(31:16) = #16FHi;
MRa(15:0) = 0;
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No No No
Example
; Load MR0 and MR1 with -1.5 (0xBFC00000)
MMOVIZ MR0, #0xBFC0 ; MR0 = 0xBFC00000 (1.5)
MMOVIZ MR1, #-1.5 ; MR1 = -1.5 (0xBFC00000)
; Load MR2 with pi = 3.141593 (0x40490FDB)
MMOVIZ MR2, #0x4049 ; MR2 = 0x40490000
MMOVXI MR2, #0x0FDB ; MR2 = 0x40490FDB
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1077
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0111 0101 10aa addr
Description Move the 16-bit value referenced by mem16 to the floating-point register indicated by
MRa.
MRa(31:16) = 0;
MRa(15:0) = [mem16];
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
The MSTF register flags are modified based on the integer results of the operation.
NF = 0;
if (MRa(31:0)== 0) { ZF = 1; }
1078 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: IIII IIII IIII IIII
MSW: 0111 1000 1000 00aa
Description Load the lower 16-bits of MRa with the immediate value #16FLoHex. #16FLoHex
represents the lower 16-bits of an IEEE 32-bit floating-point value. The upper 16-bits of
MRa are not modified. MMOVXI can be combined with the MMOVIZ instruction to initialize
all 32-bits of a MRa register.
MRa(15:0) = #16FLoHex;
MRa(31:16) = Unchanged;
Example
; Load MR0 with pi = 3.141593 (0x40490FDB)
MMOVIZ MR0,#0x4049 ; MR0 = 0x40490000
MMOVXI MR0,#0x0FDB ; MR0 = 0x40490FDB
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1079
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: 0000 0000 00cc bbaa
MSW: 0111 1100 0000 0000
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No Yes Yes
Example
; Calculate Num/Den using a Newton-Raphson algorithum for 1/Den
; Ye = Estimate(1/X)
; Ye = Ye*(2.0 - Ye*X)
; Ye = Ye*(2.0 - Ye*X)
;
_Cla1Task1:
MMOV32 MR1, @_Den ; MR1 = Den
MEINVF32 MR2, MR1 ; MR2 = Ye = Estimate(1/Den)
MMPYF32 MR3, MR2, MR1 ; MR3 = Ye*Den
MSUBF32 MR3, #2.0, MR3 ; MR3 = 2.0 - Ye*Den
MMPYF32 MR2, MR2, MR3 ; MR2 = Ye = Ye*(2.0 - Ye*Den)
MMPYF32 MR3, MR2, MR1 ; MR3 = Ye*Den
|| MMOV32 MR0, @_Num ; MR0 = Num
MSUBF32 MR3, #2.0, MR3 ; MR3 = 2.0 - Ye*Den
MMPYF32 MR2, MR2, MR3 ; MR2 = Ye = Ye*(2.0 - Ye*Den)
|| MMOV32 MR1, @_Den ; Reload Den To Set Sign
MNEGF32 MR0, MR0, EQ ; if(Den == 0.0) Change Sign Of Num
MMPYF32 MR0, MR2, MR0 ; MR0 = Y = Ye*Num
MMOV32 @_Dest, MR0 ; Store result
MSTOP ; end of task
1080 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: IIII IIII IIII IIII
MSW: 0111 0111 1000 bbaa
Description Multiply MRb with the floating-point value represented by the immediate operand. Store
the result of the addition in MRa.
#16FHi is a 16-bit immediate value that represents the upper 16-bits of an IEEE 32-bit
floating-point value. The lower 16-bits of the mantissa are assumed to be all 0. #16FHi
is most useful for representing constants where the lowest 16-bits of the mantissa are
0. Some examples are 2.0 (0x40000000), 4.0 (0x40800000), 0.5 (0x3F000000), and -1.5
(0xBFC00000). The assembler accepts either a hex or float as the immediate value. That
is, the value -1.5 can be represented as #-1.5 or #0xBFC0.
Example 1
; Same as example 2 but #16FHi is represented in float
MMOVIZ MR3, #2.0 ; MR3 = 2.0 (0x40000000)
MMPYF32 MR0, #3.0, MR3 ; MR0 = 3.0 * MR3 = 6.0 (0x40C00000)
MMOV32 @_X, MR0 ; Save the result in variable X
Example 2
; Same as example 1 but #16FHi is represented in Hex
MMOVIZ MR3, #2.0 ; MR3 = 2.0 (0x40000000)
MMPYF32 MR0, #0x4040, MR3 ; MR0 = 0x4040 * MR3 = 6.0 (0x40C00000)
MMOV32 @_X, MR0 ; Save the result in variable X
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1081
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Example 3
; Given X, M, and B are IQ24 numbers:
; X = IQ24(+2.5) = 0x02800000
; M = IQ24(+1.5) = 0x01800000
; B = IQ24(-0.5) = 0xFF800000
;
; Calculate Y = X * M + B
;
;
_Cla1Task2:
;
; Convert M, X, and B from IQ24 to float
MI32TOF32 MR0, @_M ; MR0 = 0x4BC00000
MI32TOF32 MR1, @_X ; MR1 = 0x4C200000
MI32TOF32 MR2, @_B ; MR2 = 0xCB000000
MMPYF32 MR0, MR0, #0x3380 ; M = 1/(1*2^24) * iqm = 1.5 (0x3FC00000)
MMPYF32 MR1, MR1, #0x3380 ; X = 1/(1*2^24) * iqx = 2.5 (0x40200000)
MMPYF32 MR2, MR2, #0x3380 ; B = 1/(1*2^24) * iqb = -.5 (0xBF000000)
MMPYF32 MR3, MR0, MR1 ; M*X
MADDF32 MR2, MR2, MR3 ; Y=MX+B = 3.25 (0x40500000)
; Convert Y from float32 to IQ24
MMPYF32 MR2, MR2, #0x4B80 ; Y * 1*2^24
MF32TOI32 MR2, MR2 ; IQ24(Y) = 0x03400000
MMOV32 @_Y, MR2 ; store result
MSTOP ; end of task
1082 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: IIII IIII IIII IIII
MSW: 0111 0111 1000 bbaa
Description Multiply MRb with the floating-point value represented by the immediate operand. Store
the result of the addition in MRa.
#16FHi is a 16-bit immediate value that represents the upper 16-bits of an IEEE 32-bit
floating-point value. The low 16-bits of the mantissa are assumed to be all 0. #16FHi is
most useful for representing constants where the lowest 16-bits of the mantissa are 0.
Some examples are 2.0 (0x40000000), 4.0 (0x40800000), 0.5 (0x3F000000), and -1.5
(0xBFC00000). The assembler accepts either a hex or float as the immediate value. That
is, the value -1.5 can be represented as #-1.5 or #0xBFC0.
Flags This instruction modifies the following flags in the MSTF register:.
Flag TF ZF NF LUF LVF
Modified No No No Yes Yes
Example 2
;Same as example 1 but #16FHi is represented in Hex
MMOVIZ MR3, #2.0 ; MR3 = 2.0 (0x40000000)
MMPYF32 MR0, MR3, #0x4040 ; MR0 = MR3 * 0x4040 = 6.0 (0x40C00000)
MMOV32 @_X, MR0 ; Save the result in variable X
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1083
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Example 3
; Given X, M, and B are IQ24 numbers:
; X = IQ24(+2.5) = 0x02800000
; M = IQ24(+1.5) = 0x01800000
; B = IQ24(-0.5) = 0xFF800000
;
; Calculate Y = X * M + B
;
_Cla1Task2:
;
; Convert M, X, and B from IQ24 to float
MI32TOF32 MR0, @_M ; MR0 = 0x4BC00000
MI32TOF32 MR1, @_X ; MR1 = 0x4C200000
MI32TOF32 MR2, @_B ; MR2 = 0xCB000000
MMPYF32 MR0, #0x3380, MR0 ; M = 1/(1*2^24) * iqm = 1.5 (0x3FC00000)
MMPYF32 MR1, #0x3380, MR1 ; X = 1/(1*2^24) * iqx = 2.5 (0x40200000)
MMPYF32 MR2, #0x3380, MR2 ; B = 1/(1*2^24) * iqb = -.5 (0xBF000000)
MMPYF32 MR3, MR0, MR1 ; M*X
MADDF32 MR2, MR2, MR3 ; Y=MX+B = 3.25 (0x40500000)
; Convert Y from float32 to IQ24
MMPYF32 MR2, #0x4B80, MR2 ; Y * 1*2^24
MF32TOI32 MR2, MR2 ; IQ24(Y) = 0x03400000
MMOV32 @_Y, MR2 ; store result
MSTOP ; end of task
1084 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Operands MRa CLA floating-point destination register for MMPYF32 (MR0 to MR3)
MRa cannot be the same register as MRd
MRb CLA floating-point source register for MMPYF32 (MR0 to MR3)
MRc CLA floating-point source register for MMPYF32 (MR0 to MR3)
MRd CLA floating-point destination register for MADDF32 (MR0 to MR3)
MRd cannot be the same register as MRa
MRe CLA floating-point source register for MADDF32 (MR0 to MR3)
MRf CLA floating-point source register for MADDF32 (MR0 to MR3)
Opcode
LSW: 0000 ffee ddcc bbaa
MSW: 0111 1010 0000 0000
Description Multiply the contents of two floating-point registers with parallel addition of two registers.
Restrictions The destination register for the MMPYF32 and the MADDF32 must be unique. That is,
MRa cannot be the same register as MRd.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No Yes Yes
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1085
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Example
; Perform 5 multiply and accumulate operations:
;
; X and Y are 32-bit floating-point arrays
;
; 1st multiply: A = X0 * Y0
; 2nd multiply: B = X1 * Y1
; 3rd multiply: C = X2 * Y2
; 4th multiply: D = X3 * Y3
; 5th multiply: E = X3 * Y3
;
; Result = A + B + C + D + E
;
_Cla1Task1:
MMOVI16 MAR0, #_X ; MAR0 points to X array
MMOVI16 MAR1, #_Y ; MAR1 points to Y array
MNOP ; Delay for MAR0, MAR1 load
MNOP ; Delay for MAR0, MAR1 load
; <-- MAR0 valid
MMOV32 MR0, *MAR0[2]++ ; MR0 = X0, MAR0 += 2
; <-- MAR1 valid
MMOV32 MR1, *MAR1[2]++ ; MR1 = Y0, MAR1 += 2
MMPYF32 MR2, MR0, MR1 ; MR2 = A = X0 * Y0
|| MMOV32 MR0, *MAR0[2]++ ; In parallel MR0 = X1, MAR0 += 2
MMOV32 MR1, *MAR1[2]++ ; MR1 = Y1, MAR1 += 2
MMPYF32 MR3, MR0, MR1 ; MR3 = B = X1 * Y1
|| MMOV32 MR0, *MAR0[2]++ ; In parallel MR0 = X2, MAR0 += 2
MMOV32 MR1, *MAR1[2]++ ; MR1 = Y2, MAR2 += 2
MMACF32 MR3, MR2, MR2, MR0, MR1 ; MR3 = A + B, MR2 = C = X2 * Y2
|| MMOV32 MR0, *MAR0[2]++ ; In parallel MR0 = X3
MMOV32 MR1, *MAR1[2]++ ; MR1 = Y3
MMACF32 MR3, MR2, MR2, MR0, MR1 ; MR3 = (A + B) + C, MR2 = D = X3 * Y3
|| MMOV32 MR0, *MAR0 ; In parallel MR0 = X4
MMOV32 MR1, *MAR1 ; MR1 = Y4
MMPYF32 MR2, MR0, MR1 ; MR2 = E = X4 * Y4
|| MADDF32 MR3, MR3, MR2 ; in parallel MR3 = (A + B + C) + D
See also MMACF32 MR3, MR2, MRd, MRe, MRf || MMOV32 MRa, mem32
1086 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Operands MRd CLA floating-point destination register for MMPYF32 (MR0 to MR3)
MRd cannot be the same register as MRa
MRe CLA floating-point source register for MMPYF32 (MR0 to MR3)
MRf CLA floating-point source register for MMPYF32 (MR0 to MR3)
MRa CLA floating-point destination register for MMOV32 (MR0 to MR3)
MRa cannot be the same register as MRd
mem32 32-bit memory location accessed using one of the available
addressing modes. This is the source of MMOV32.
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0000 ffee ddaa addr
Description Multiply the contents of two floating-point registers and load another.
Restrictions The destination register for the MMPYF32 and the MMOV32 must be unique. That is,
MRa cannot be the same register as MRd.
Flags This instruction modifies the following flags in the MSTF register:.
Flag TF ZF NF LUF LVF
Modified No Yes Yes Yes Yes
NF = MRa(31);
ZF = 0;
if(MRa(30:23) == 0) { ZF = 1; NF = 0; }
Example 1
; Given M1, X1, and B1 are 32-bit floating point
; Calculate Y1 = M1*X1+B1
;
_Cla1Task1:
MMOV32 MR0, @M1 ; Load MR0 with M1
MMOV32 MR1, @X1 ; Load MR1 with X1
MMPYF32 MR1, MR1, MR0 ; Multiply M1*X1
|| MMOV32 MR0, @B1 ; and in parallel load MR0 with B1
MADDF32 MR1, MR1, MR0 ; Add M*X1 to B1 and store in MR1
MMOV32 @Y1, MR1 ; Store the result
MSTOP ; end of task
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1087
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Example 2
; Given A, B, and C are 32-bit floating-point numbers
; Calculate Y2 = (A * B)
; Y3 = (A * B) * C
;
_Cla1Task2:
MMOV32 MR0, @A ; Load MR0 with A
MMOV32 MR1, @B ; Load MR1 with B
MMPYF32 MR1, MR1, MR0 ; Multiply A*B
|| MMOV32 MR0, @C ; and in parallel load MR0 with C
MMPYF32 MR1, MR1, MR0 ; Multiply (A*B) by C
|| MMOV32 @Y2, MR1 ; and in parallel store A*B
MMOV32 @Y3, MR1 ; Store the result
MSTOP ; end of task
1088 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Operands MRd CLA floating-point destination register for MMPYF32 (MR0 to MR3)
MRe CLA floating-point source register for MMPYF32 (MR0 to MR3)
MRf CLA floating-point source register for MMPYF32 (MR0 to MR3)
mem32 32-bit memory location accessed using one of the available
addressing modes. This is the destination of MMOV32.
MRa CLA floating-point source register for MMOV32 (MR0 to MR3)
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0100 ffee ddaa addr
Description Multiply the contents of two floating-point registers and move from memory to register.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No Yes Yes
Example
; Given A, B, and C are 32-bit floating-point numbers
; Calculate Y2 = (A * B)
; Y3 = (A * B) * C
;
_Cla1Task2:
MMOV32 MR0, @A ; Load MR0 with A
MMOV32 MR1, @B ; Load MR1 with B
MMPYF32 MR1, MR1, MR0 ; Multiply A*B
|| MMOV32 MR0, @C ; and in parallel load MR0 with C
MMPYF32 MR1, MR1, MR0 ; Multiply (A*B) by C
|| MMOV32 @Y2, MR1 ; and in parallel store A*B
MMOV32 @Y3, MR1 ; Store the result
MSTOP ; end of task
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1089
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Operands MRa CLA floating-point destination register for MMPYF32 (MR0 to MR3)
MRa cannot be the same register as MRd
MRb CLA floating-point source register for MMPYF32 (MR0 to MR3)
MRc CLA floating-point source register for MMPYF32 (MR0 to MR3)
MRd CLA floating-point destination register for MSUBF32 (MR0 to MR3)
MRd cannot be the same register as MRa
MRe CLA floating-point source register for MSUBF32 (MR0 to MR3)
MRf CLA floating-point source register for MSUBF32 (MR0 to MR3)
Opcode
LSW: 0000 ffee ddcc bbaa
MSW: 0111 1010 0100 0000
Description Multiply the contents of two floating-point registers with parallel subtraction of two
registers.
Restrictions The destination register for the MMPYF32 and the MSUBF32 must be unique. That is,
MRa cannot be the same register as MRd.
Flags This instruction modifies the following flags in the MSTF register:.
Flag TF ZF NF LUF LVF
Modified No No No Yes Yes
1090 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Conditional Negation
Opcode
LSW: 0000 0000 cndf bbaa
MSW: 0111 1010 1000 0000
Description
if (CNDF == true) {MRa = - MRb; }
else {MRa = MRb; }
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1091
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Conditional Negation
Example 1
; Show the basic operation of MNEGF32
;
MMOVIZ MR0, #5.0 ; MR0 = 5.0 (0x40A00000)
MMOVIZ MR1, #4.0 ; MR1 = 4.0 (0x40800000)
MMOVIZ MR2, #-1.5 ; MR2 = -1.5 (0xBFC00000)
MMPYF32 MR3, MR1, MR2 ; MR3 = -6.0
MMPYF32 MR0, MR0, MR1 ; MR0 = 20.0
MMOVIZ MR1, #0.0
MCMPF32 MR3, MR1 ; NF = 1
MNEGF32 MR3, MR3, LT ; if NF = 1, MR3 = 6.0
MCMPF32 MR0, MR1 ; NF = 0
MNEGF32 MR0, MR0, GEQ ; if NF = 0, MR0 = -20.0
Example 2
; Calculate Num/Den using a Newton-Raphson algorithum for 1/Den
; Ye = Estimate(1/X)
; Ye = Ye*(2.0 - Ye*X)
; Ye = Ye*(2.0 - Ye*X)
;
_Cla1Task1:
MMOV32 MR1, @_Den ; MR1 = Den
MEINVF32 MR2, MR1 ; MR2 = Ye = Estimate(1/Den)
MMPYF32 MR3, MR2, MR1 ; MR3 = Ye*Den
MSUBF32 MR3, #2.0, MR3 ; MR3 = 2.0 - Ye*Den
MMPYF32 MR2, MR2, MR3 ; MR2 = Ye = Ye*(2.0 - Ye*Den)
MMPYF32 MR3, MR2, MR1 ; MR3 = Ye*Den
|| MMOV32 MR0, @_Num ; MR0 = Num
MSUBF32 MR3, #2.0, MR3 ; MR3 = 2.0 - Ye*Den
MMPYF32 MR2, MR2, MR3 ; MR2 = Ye = Ye*(2.0 - Ye*Den)
|| MMOV32 MR1, @_Den ; Reload Den To Set Sign
MNEGF32 MR0, MR0, EQ ; if(Den == 0.0) Change Sign Of Num
MMPYF32 MR0, MR2, MR0 ; MR0 = Y = Ye*Num
MMOV32 @_Dest, MR0 ; Store result
MSTOP ; end of task
1092 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
MNOP
No Operation
Opcode
LSW: 0000 0000 0000 0000
MSW: 0111 1111 1010 0000
Description Do nothing. This instruction is used to fill required pipeline delay slots when other
instructions are not available to fill the slots.
Flags This instruction does not modify flags in the MSTF register.
Flag TF ZF NF LUF LVF
Modified No No No No No
Example
; X is an array of 32-bit floating-point values
; Find the maximum value in an array X
; and store the value in Result
;
_Cla1Task1:
MMOVI16 MAR1,#_X ; Start address
MUI16TOF32 MR0, @_len ; Length of the array
MNOP ; delay for MAR1 load
MNOP ; delay for MAR1 load
MMOV32 MR1, *MAR1[2]++ ; MR1 = X0
LOOP
MMOV32 MR2, *MAR1[2]++ ; MR2 = next element
MMAXF32 MR1, MR2 ; MR1 = MAX(MR1, MR2)
MADDF32 MR0, MR0, #-1.0 ; Decrememt the counter
MCMPF32 MR0 #0.0 ; Set/clear flags for MBCNDD
MNOP ; Too late to affect MBCNDD
MNOP ; Too late to affect MBCNDD
MNOP ; Too late to affect MBCNDD
MBCNDD LOOP, NEQ ; Branch if not equal to zero
MMOV32 @_Result, MR1 ; Always executed
MNOP ; Pad to seperate MBCNDD and MSTOP
MNOP ; Pad to seperate MBCNDD and MSTOP
MSTOP ; End of task
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1093
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Bitwise OR
Opcode
LSW: 0000 0000 00cc bbaa
MSW: 0111 1100 1000 0000
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
The MSTF register flags are modified based on the integer results of the operation.
NF = MRa(31);
ZF = 0;
if(MRa(31:0) == 0) { ZF = 1; }
Example
MMOVIZ MR0,
#0x5555 ; MR0 = 0x5555AAAA
MMOVXI MR0,
#0xAAAA
MMOVIZ MR1,
#0x5432 ; MR1 = 0x5432FEDC
MMOVXI MR1,
#0xFEDC
; 0101 OR 0101 = 0101 (5)
; 0101 OR 0100 = 0101 (5)
; 0101 OR 0011 = 0111 (7)
; 0101 OR 0010 = 0111 (7)
; 1010 OR 1111 = 1111 (F)
; 1010 OR 1110 = 1110 (E)
; 1010 OR 1101 = 1111 (F)
; 1010 OR 1100 = 1110 (E)
MOR32 MR2, MR1, MR0 ; MR3 = 0x5555FEFE
1094 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
MRCNDD {CNDF}
Opcode
LSW: 0000 0000 0000 0000
MSW: 0111 1001 1010 cndf
Description If the specified condition is true, then the RPC field of MSTF is loaded into MPC and
fetching continues from that location. Otherwise, program fetches continue without the
return.
Refer to the Pipeline section for important information regarding this instruction.
Flags This instruction does not modify flags in the MSTF register.
Flag TF ZF NF LUF LVF
Modified No No No No No
Pipeline The MRCNDD instruction by itself is a single-cycle instruction. As shown in Table 8-19, 6
instruction slots are executed for each return; 3 slots before the return instruction (d5-d7)
and 3 slots after the return instruction (d8-d10). The total number of cycles for a return
taken or not taken depends on the usage of these slots. That is, the number of cycles
depends on how many slots are filled with a MNOP as well as which slots are filled.
The effective number of cycles for a return can, therefore, range from 1 to 7 cycles. The
number of cycles for a return taken cannot be the same as for a return not taken.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1095
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Referring to the following code fragment and the pipeline diagrams in Table 8-19 and
Table 8-20, the instructions before and after MRCNDD have the following properties:
;
;
<Instruction 1> ; I1 Last instruction that can affect flags for
; the MCCNDD operation
<Instruction 2> ; I2 Cannot be stop, branch, call or return
<Instruction 3> ; I3 Cannot be stop, branch, call or return
<Instruction 4> ; I4 Cannot be stop, branch, call or return
MCCNDD _func, NEQ ; Call to func if not eqal to zero
; Three instructions after MCCNDD are always
; executed whether the call is taken or not
<Instruction 5> ; I5 Cannot be stop, branch, call or return
<Instruction 6> ; I6 Cannot be stop, branch, call or return
<Instruction 7> ; I7 Cannot be stop, branch, call or return
<Instruction 8> ; I8 The address of this instruction is saved
; in the RPC field of the MSTF register.
; Upon return this value is loaded into MPC
; and fetching continues from this point.
<Instruction 9> ; I9
<Instruction 10> ; I10
....
....
_func:
<Destination 1> ; d1 Can be any instruction
<Destination 2> ; d2
<Destination 3> ; d3
<Destination 4> ; d4 Last instruction that can affect flags for
; the MRCNDD operation
<Destination 5> ; d5 Cannot be stop, branch, call or return
<Destination 6> ; d6 Cannot be stop, branch, call or return
<Destination 7> ; d7 Cannot be stop, branch, call or return
MRCNDD NEQ ; Return to <Instruction 8> if not equal to zero
; Three instructions after MRCNDD are always
; executed whether the return is taken or not
<Destination 8> ; d8 Cannot be stop, branch, call or return
<Destination 9> ; d9 Cannot be stop, branch, call or return
<Destination 10> ; d10 Cannot be stop, branch, call or return
<Destination 11> ; d11
<Destination 12> ; d12
....
....
MSTOP
....
• d4
– d4 is the last instruction that can effect the CNDF flags for the MRCNDD instruction.
The CNDF flags are tested in the D2 phase of the pipeline. That is, a decision is
made whether to return or not when MRCNDD is in the D2 phase.
– There are no restrictions on the type of instruction for d4.
• d5, d6, and d7
– The three instructions proceeding MRCNDD can change MSTF flags but have no
effect on whether the MRCNDD instruction makes the return or not. This is because
the flag modification occurs after the D2 phase of the MRCNDD instruction.
– These instructions must not be the following: MSTOP, MDEBUGSTOP, MBCNDD,
MCCNDD, or MRCNDD.
• d8, d9, and d10
– The three instructions following MRCNDD are always executed irrespective of
whether the return is taken or not.
– These instructions must not be the following: MSTOP, MDEBUGSTOP, MBCNDD,
MCCNDD, or MRCNDD.
1096 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1097
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
MSETC BGINTM
Opcode
LSW: 0000 0000 0000 0000
MSW: 0111 1111 0101 0000
Description This instruction sets the background task interrupt mask (BGINTM) bit in the
MSTSBGRND register, making any code thereafter uninterruptible. No other higher
priority task is able to interrupt the background task until the BGINTM is cleared. This
instruction sets the BGINTM bit at the end of the D2 phase.
This instruction does not require the MEALLOW bit to be asserted before, or de-asserted
after, setting BGINTM.
Flags This instruction does not modify the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No No No
Example
MSETC BGINTM ; Set the MSTSBGRND.BGINTM bit
; to prevent any other tasks from
; interrupting the background task
1098 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Operands FLAG 8-bit mask indicating which floating-point status flags to change.
VALUE 8-bit mask indicating the flag value: 0 or 1.
Opcode
LSW: FFFF FFFF VVVV VVVV
MSW: 0111 1001 1100 0000
Description The MSETFLG instruction is used to set or clear selected floating-point status flags in the
MSTF register. The FLAG field is an 11-bit value that indicates which flags are changed.
That is, if a FLAG bit is set to 1, that flag is changed; all other flags are not modified. The
bit mapping of the FLAG field is:
9 8 7 6 5 4 3 2 1 0
RNDF Reserved TF Reserved ZF NF LUF LVF
32
The VALUE field indicates the value the flag can be set to: 0 or 1.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified Yes Yes Yes Yes Yes
Any flag can be modified by this instruction. The MEALLOW and RPC fields cannot be
modified with this instruction.
Example To make it easier and legible, the assembler accepts a FLAG=VALUE syntax for the
MSTFLG operation as:
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1099
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
MSTOP
Stop Task
Opcode
LSW: 0000 0000 0000 0000
MSW: 0111 1111 1000 0000
Description The MSTOP instruction must be placed to indicate the end of each task. In addition,
placing MSTOP in unused memory locations within the CLA program RAM can be useful
for debugging and preventing run away CLA code. When MSTOP enters the D2 phase of
the pipeline, the MIRUN flag for the task is cleared and the associated interrupt is flagged
in the PIE vector table.
There are three special cases that can occur when single-stepping a task such that the
MPC reaches the MSTOP instruction.
1. If you are single-stepping or halted in "task A" and "task B" comes in before the MPC
reaches the MSTOP, then "task B" starts if you continue to step through the MSTOP
instruction. Basically, if "task B" is pending before the MPC reaches MSTOP in "task
A" then there is no issue in "task B" starting and no special action is required.
2. In this case, you have single-stepped or halted in "task A" and the MPC has reached
the MSTOP with no tasks pending. If "task B" comes in at this point, "task B" is
flagged in the MIFR register but "task B" can or cannot start if you continue to
single-step through the MSTOP instruction of "task A". It depends on exactly when the
new task comes in. To reliably start "task B", perform a soft reset and reconfigure the
MIER bits. Once this is done, you can start single-stepping "task B".
3. Case 2 can be handled slightly differently if there is control over when "task B" comes
in (for example using the IACK instruction to start the task). In this case you have
single-stepped or halted in "task A" and the MPC has reached the MSTOP with no
tasks pending. Before forcing "task B", run free to force the CLA out of the debug
state. Once this is done you can force "task B" and continue debugging.
Restrictions The MSTOP instruction cannot be placed 3 instructions before or after a MBCNDD,
MCCNDD, or MRCNDD instruction.
Flags This instruction does not modify flags in the MSTF register.
Flag TF ZF NF LUF LVF
Modified No No No No No
1100 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
MSTOP (continued)
Stop Task
Pipeline This is a single-cycle instruction. Table 8-21 shows the pipeline behavior of the MSTOP
instruction. The MSTOP instruction cannot be placed with 3 instructions of a MBCNDD,
MCCNDD, or MRCNDD instruction.
Table 8-21. Pipeline Activity for MSTOP
Instruction F1 F2 D1 D2 R1 R2 E W
I1 I1
I2 I2 I1
I3 I3 I2 I1
MSTOP MSTOP I3 I2 I1
I4 I4 MSTOP I3 I2 I1
I5 I5 I4 MSTOP I3 I2 I1
I6 I6 I5 I4 MSTOP I3 I2 I1
New Task Arbitrated and
- - - - - I3 I2
Prioritized
New Task Arbitrated and
- - - - - - I3
Prioritized
I1 I1 - - - - - -
I2 I2 I1 - - - - -
I3 I3 I2 I1 - - - -
I4 I4 I3 I2 I1 - - -
I5 I5 I4 I3 I2 I1 - -
I6 I6 I5 I4 I3 I2 I1 -
I7 I7 I6 I5 I4 I3 I2 I1
....
Example
; Given A = (int32)1
; B = (int32)2
; C = (int32)-7
;
; Calculate Y2 = A - B - C
_Cla1Task3:
MMOV32 MR0, @_A ; MR0 = 1 (0x00000001)
MMOV32 MR1, @_B ; MR1 = 2 (0x00000002)
MMOV32 MR2, @_C ; MR2 = -7 (0xFFFFFFF9)
MSUB32 MR3, MR0, MR1 ; A + B
MSUB32 MR3, MR3, MR2 ; A + B + C = 6 (0x0000006)
MMOV32 @_y2, MR3 ; Store y2
MSTOP ; End of task
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1101
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: 0000 0000 00cc bbaa
MSW: 0111 1100 1110 0000
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
NF = MRa(31);
ZF = 0;
if(MRa(31:0) == 0) { ZF = 1; }
Example
; Given A = (int32)1
; B = (int32)2
; C = (int32)-7
;
;
Calculate Y2 = A - B - C
;
_Cla1Task3:
MMOV32 MR0, @_A ; MR0 = 1 (0x00000001)
MMOV32 MR1, @_B ; MR1 = 2 (0x00000002)
MMOV32 MR2, @_C ; MR2 = -7 (0xFFFFFFF9)
MSUB32 MR3, MR0, MR1 ; A + B
MSUB32 MR3, MR3, MR2 ; A + B + C = 6 (0x0000006)
MMOV32 @_y2, MR3 ; Store y2
MSTOP ; End of task
1102 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: 0000 0000 00cc bbaa
MSW: 0111 1100 0100 0000
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No Yes Yes
Example
; Given A, B, and C are 32-bit floating-point numbers
; Calculate Y2 = A + B - C
;
_Cla1Task5:
MMOV32 MR0, @_A ; Load MR0 with A
MMOV32 MR1, @_B ; Load MR1 with B
MADDF32 MR0, MR1, MR0 ; Add A + B
|| MMOV32 MR1, @_C ; and in parallel load C
MSUBF32 MR0, MR0, MR1 ; Subtract C from (A + B)
MMOV32 @Y, MR0 ; (A+B) - C
MSTOP ; end of task
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1103
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: IIII IIII IIII IIII
MSW: 0111 1000 0000 baaa
Description Subtract MRb from the floating-point value represented by the immediate operand. Store
the result of the addition in MRa.
#16FHi is a 16-bit immediate value that represents the upper 16-bits of an IEEE 32-bit
floating-point value. The lower 16-bits of the mantissa are assumed to be all 0. #16FHi
is most useful for representing constants where the lowest 16-bits of the mantissa are
0. Some examples are 2.0 (0x40000000), 4.0 (0x40800000), 0.5 (0x3F000000), and -1.5
(0xBFC00000). The assembler accepts either a hex or float as the immediate value. That
is, the value -1.5 can be represented as #-1.5 or #0xBFC0.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No Yes Yes
Example
; Y = sqrt(X)
; Ye = Estimate(1/sqrt(X));
; Ye = Ye*(1.5 - Ye*Ye*X*0.5)
; Ye = Ye*(1.5 - Ye*Ye*X*0.5)
; Y = X*Ye
;
_Cla1Task3:
MMOV32 MR0, @_x ; MR0 = X
MEISQRTF32 MR1, MR0 ; MR1 = Ye = Estimate(1/sqrt(X))
MMOV32 MR1, @_x, EQ ; if(X == 0.0) Ye = 0.0
MMPYF32 MR3, MR0, #0.5 ; MR3 = X*0.5
MMPYF32 MR2, MR1, MR3 ; MR2 = Ye*X*0.5
MMPYF32 MR2, MR1, MR2 ; MR2 = Ye*Ye*X*0.5
MSUBF32 MR2, #1.5, MR2 ; MR2 = 1.5 - Ye*Ye*X*0.5
MMPYF32 MR1, MR1, MR2 ; MR1 = Ye = Ye*(1.5 - Ye*Ye*X*0.5)
MMPYF32 MR2, MR1, MR3 ; MR2 = Ye*X*0.5
MMPYF32 MR2, MR1, MR2 ; MR2 = Ye*Ye*X*0.5
MSUBF32 MR2, #1.5, MR2 ; MR2 = 1.5 - Ye*Ye*X*0.5
MMPYF32 MR1, MR1, MR2 ; MR1 = Ye = Ye*(1.5 - Ye*Ye*X*0.5)
MMPYF32 MR0, MR1, MR0 ; MR0 = Y = Ye*X
MMOV32 @_y, MR0 ; Store Y = sqrt(X)
MSTOP ; end of task
1104 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1105
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Operands MRd CLA floating-point destination register (MR0 to MR3) for the
MSUBF32 operation
MRd cannot be the same register as MRa
MRe CLA floating-point source register (MR0 to MR3) for the MSUBF32
operation
MRf CLA floating-point source register (MR0 to MR3) for the MSUBF32
operation
MRa CLA floating-point destination register (MR0 to MR3) for the
MMOV32 operation
MRa cannot be the same register as MRd
mem32 32-bit memory location accessed using one of the available
addressing modes. Source for the MMOV32 operation.
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0010 ffee ddaa addr
Description Subtract the contents of two floating-point registers and move from memory to a floating-
point register.
Restrictions The destination register for the MSUBF32 and the MMOV32 must be unique. That is,
MRa cannot be the same register as MRd.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes Yes Yes
Example
NF = MRa(31);
ZF = 0;
if(MRa(30:23) == 0) { ZF = 1; NF = 0; }
1106 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Operands MRd CLA floating-point destination register (MR0 to MR3) for the
MSUBF32 operation
MRe CLA floating-point source register (MR0 to MR3) for the MSUBF32
operation
MRf CLA floating-point source register (MR0 to MR3) for the MSUBF32
operation
mem32 32-bit destination memory location for the MMOV32 operation
MRa CLA floating-point source register (MR0 to MR3) for the MMOV32
operation
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0110 ffee ddaa addr
Description Subtract the contents of two floating-point registers and move from a floating-point
register to memory.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No Yes Yes
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1107
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Conditional Swap
Opcode
LSW: 0000 0000 CNDF bbaa
MSW: 0111 1011 0000 0000
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No No No
No flags affected
1108 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Conditional Swap
Example
; X is an array of 32-bit floating-point values
; and has length elements. Find the maximum value in
; the array and store the value in Result
;
; Note: MCMPF32 and MSWAPF can be replaced by MMAXF32
;
_Cla1Task1:
MMOVI16 MAR1,#_X ; Start address
MUI16TOF32 MR0, @_len ; Length of the array
MNOP ; delay for MAR1 load
MNOP ; delay for MAR1 load
MMOV32 MR1, *MAR1[2]++ ; MR1 = X0
LOOP
MMOV32 MR2, *MAR1[2]++ ; MR2 = next element
MCMPF32 MR2, MR1 ; Compare MR2 with MR1
MSWAPF MR1, MR2, GT ; MR1 = MAX(MR1, MR2)
MADDF32 MR0, MR0, #-1.0 ; Decrememt the counter
MCMPF32 MR0 #0.0 ; Set/clear flags for MBCNDD
MNOP
MNOP
MNOP
MBCNDD LOOP, NEQ ; Branch if not equal to zero
MMOV32 @_Result, MR1 ; Always executed
MNOP ; Always executed
MNOP ; Always executed
MSTOP ; End of task
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1109
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
MTESTTF CNDF
Opcode
LSW: 0000 0000 0000 cndf
MSW: 0111 1111 0100 0000
Description Test the CLA floating-point condition and if true, set the MSTF[TF] flag. If the condition is
false, clear the MSTF[TF] flag. This is useful for temporarily storing a condition for later
use.
if (CNDF == true) TF = 1;
else TF = 0;
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified Yes No No No No
TF = 0;
if (CNDF == true) TF = 1;
1110 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Example
; if (State == 0.1)
; RampState = RampState || RAMPMASK
; else if (State == 0.01)
; CoastState = CoastState || COASTMASK
; else
; SteadyState = SteadyState || STEADYMASK
;
_Cla1Task2:
MMOV32 MR0, @_State
MCMPF32 MR0, #0.1 ; Affects flags for 1st MBCNDD (A)
MCMPF32 MR0, #0.01 ; Check used by 2nd MBCNDD (B)
MTESTTF EQ ; Store EQ flag in TF for 2nd MBCNDD (B)
MNOP
MBCNDD _Skip1, NEQ ; (A) If State != 0.1, go to Skip1
MMOV32 MR1, @_RampState ; Always executed
MMOVXI MR2, #RAMPMASK ; Always executed
MOR32 MR1, MR2 ; Always executed
MMOV32 @_RampState, MR1 ; Execute if (A) branch not taken
MSTOP ; end of task if (A) branch not taken
_Skip1:
MMOV32 MR3, @_SteadyState
MMOVXI MR2, #STEADYMASK
MOR32 MR3, MR2
MBCNDD _Skip2, NTF ; (B) if State != .01, go to Skip2
MMOV32 MR1, @_CoastState ; Always executed
MMOVXI MR2, #COASTMASK ; Always executed
MOR32 MR1, MR2 ; Always executed
MMOV32 @_CoastState, MR1 ; Execute if (B) branch not taken
MSTOP ; end of task if (B) branch not taken
_Skip2:
MMOV32 @_SteadyState, MR3 ; Executed if (B) branch taken
MSTOP
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1111
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0111 0101 01aa addr
Description When converting F32 to I16/UI16 data format, the MF32TOI16/UI16 operation truncates to
zero while the MF32TOI16R/UI16R operation rounds to the nearest (even) value.
MRa = UI16TOF32[mem16];
1112 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1110 1110 0000
Description Convert an unsigned 16-bit integer to a 32-bit floating-point value. When converting
float32 to I16/UI16 data format, the MF32TOI16/UI16 operation truncates to zero while
the MF32TOI16R/UI16R operation rounds to the nearest (even) value.
MRa = UI16TOF32[MRb];
Example
MMOVXI MR1, #0x800F ; MR1(15:0) = 32783 (0x800F)
MUI16TOF32 MR0, MR1 ; MR0 = UI16TOF32 (MR1(15:0))
; = 32783.0 (0x47000F00)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1113
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Opcode
LSW: mmmm mmmm mmmm mmmm
MSW: 0111 0100 10aa addr
Description
MRa = UI32TOF32[mem32];
Example
; Given x2, m2, and b2 are Uint32 numbers:
;
; x2 = Uint32(2) = 0x00000002
; m2 = Uint32(1) = 0x00000001
; b2 = Uint32(3) = 0x00000003
;
; Calculate y2 = x2 * m2 + b2
;
_Cla1Task1:
MUI32TOF32 MR0, @_m2 ; MR0 = 1.0 (0x3F800000)
MUI32TOF32 MR1, @_x2 ; MR1 = 2.0 (0x40000000)
MUI32TOF32 MR2, @_b2 ; MR2 = 3.0 (0x40400000)
MMPYF32 MR3, MR0, MR1 ; M*X
MADDF32 MR3, MR2, MR3 ; Y=MX+B = 5.0 (0x40A00000)
MF32TOUI32 MR3, MR3 ; Y = Uint32(5.0) = 0x00000005
MMOV32 @_y2, MR3 ; store result
MSTOP ; end of task
1114 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Opcode
LSW: 0000 0000 0000 bbaa
MSW: 0111 1101 1100 0000
Description
MRa = UI32TOF32 [MRb];
Example
MMOVIZ MR3, #0x8000 ; MR3(31:16) = 0x8000
MMOVXI MR3, #0x1111 ; MR3(15:0) = 0x1111
; MR3 = 2147488017
MUI32TOF32 MR3, MR3 ; MR3 = MUI32TOF32 (MR3) = 2147488017.0 (0x4F000011)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1115
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Bitwise Exclusive Or
Opcode
LSW: 0000 0000 00cc bbaa
MSW: 0111 1100 1010 0000
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No Yes Yes No No
The MSTF register flags are modified based on the integer results of the operation.
NF = MRa(31);
ZF = 0;
if(MRa(31:0) == 0) { ZF = 1; }
Example
MMOVIZ MR0, #0x5555 ; MR0 = 0x5555AAAA
MMOVXI MR0, #0xAAAA
MMOVIZ MR1, #0x5432 ; MR1 = 0x5432FEDC
MMOVXI MR1, #0xFEDC
; 0101 XOR 0101 = 0000 (0)
; 0101 XOR 0100 = 0001 (1)
; 0101 XOR 0011 = 0110 (6)
; 0101 XOR 0010 = 0111 (7)
; 1010 XOR 1111 = 0101 (5)
; 1010 XOR 1110 = 0100 (4)
; 1010 XOR 1101 = 0111 (7)
; 1010 XOR 1100 = 0110 (6)
MXOR32 MR2, MR1, MR0 ; MR3 = 0x01675476
1116 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Complex bit access types are encoded to fit into small table cells. Table 8-24 shows the codes that are used for
access types in this section.
Table 8-24. CLA_ONLY_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
W1S W Write
1S 1 to set
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1117
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
7 6 5 4 3 2 1 0
i16
R-0h
1118 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
7 6 5 4 3 2 1 0
MPSA2CFG MPSA2CLEAR MPSA1CLEAR MDWDBCYC MDWDBSTART MPABCYC MPABSTART
R/W-0h R-0/W1S-0h R-0/W1S-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1119
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
1120 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1121
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
7 6 5 4 3 2 1 0
TASK8 TASK7 TASK6 TASK5 TASK4 TASK3 TASK2 TASK1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
1122 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1123
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
7 6 5 4 3 2 1 0
TASK8 TASK7 TASK6 TASK5 TASK4 TASK3 TASK2 TASK1
R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
1124 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Complex bit access types are encoded to fit into small table cells. Table 8-32 shows the codes that are used for
access types in this section.
Table 8-32. CLA_SOFTINT_REGS Access Type
Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
W W Write
W1S W Write
1S 1 to set
Reset or Default Value
-n Value after reset or the default
value
Register Array Variables
i,j,k,l,m,n When these variables are used in
a register name, an offset, or an
address, they refer to the value of
a register array where the register
is part of a group of repeating
registers. The register groups
form a hierarchical structure and
the array is represented with a
formula.
y When this variable is used in a
register name, an offset, or an
address it refers to the value of
a register array.
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1125
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
7 6 5 4 3 2 1 0
TASK8 TASK7 TASK6 TASK5 TASK4 TASK3 TASK2 TASK1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
1126 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1127
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
7 6 5 4 3 2 1 0
TASK8 TASK7 TASK6 TASK5 TASK4 TASK3 TASK2 TASK1
R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
1128 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Complex bit access types are encoded to fit into small table cells. Table 8-36 shows the codes that are used for
access types in this section.
Table 8-36. CLA_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1129
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
1130 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
7 6 5 4 3 2 1 0
MVECT
R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1131
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
7 6 5 4 3 2 1 0
MVECT
R/W-0h
1132 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
7 6 5 4 3 2 1 0
MVECT
R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1133
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
7 6 5 4 3 2 1 0
MVECT
R/W-0h
1134 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
7 6 5 4 3 2 1 0
MVECT
R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1135
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
7 6 5 4 3 2 1 0
MVECT
R/W-0h
1136 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
7 6 5 4 3 2 1 0
MVECT
R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1137
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
7 6 5 4 3 2 1 0
MVECT
R/W-0h
1138 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
7 6 5 4 3 2 1 0
RESERVED IACKE SOFTRESET HARDRESET
R-0h R/W-0h R-0/W1S-0h R-0/W1S-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1139
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
7 6 5 4 3 2 1 0
i16
R-0h
1140 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
7 6 5 4 3 2 1 0
TASK8 TASK7 TASK6 TASK5 TASK4 TASK3 TASK2 TASK1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1141
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
1142 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
7 6 5 4 3 2 1 0
RESERVED BGOVF _BGINTM RUN
R/W-0h R/W1C-0h R-0h R-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1143
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
7 6 5 4 3 2 1 0
RESERVED TRIGEN BGSTART
R/W-0h R/W-0h R/W1S-0h
1144 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
7 6 5 4 3 2 1 0
i16
R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1145
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
7 6 5 4 3 2 1 0
INT8 INT7 INT6 INT5 INT4 INT3 INT2 INT1
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
1146 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1147
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
1148 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1149
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
7 6 5 4 3 2 1 0
INT8 INT7 INT6 INT5 INT4 INT3 INT2 INT1
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
1150 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1151
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
1152 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
7 6 5 4 3 2 1 0
INT8 INT7 INT6 INT5 INT4 INT3 INT2 INT1
R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1153
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
1154 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
7 6 5 4 3 2 1 0
INT8 INT7 INT6 INT5 INT4 INT3 INT2 INT1
R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1155
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
1156 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
7 6 5 4 3 2 1 0
INT8 INT7 INT6 INT5 INT4 INT3 INT2 INT1
R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1157
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
1158 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
7 6 5 4 3 2 1 0
INT8 INT7 INT6 INT5 INT4 INT3 INT2 INT1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUII0E – MAY 2019 – REVISED SEPTEMBER 2023 TMS320F2838x Real-Time Microcontrollers With Connectivity Manager 1159
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com