TMS320F28003x Real-Time Technical Reference Manual
TMS320F28003x Real-Time Technical Reference Manual
Microcontrollers
Table of Contents
28.3.1 Initialization..........................................................................................................................................................2774
28.3.2 CAN Message Transfer (Normal Operation)....................................................................................................... 2775
28.3.3 Test Modes.......................................................................................................................................................... 2776
28.4 Multiple Clock Source................................................................................................................................................ 2780
28.5 Interrupt Functionality.................................................................................................................................................2781
28.5.1 Message Object Interrupts.................................................................................................................................. 2781
28.5.2 Status Change Interrupts.....................................................................................................................................2781
28.5.3 Error Interrupts.................................................................................................................................................... 2781
28.5.4 Peripheral Interrupt Expansion (PIE) Module Nomenclature for DCAN Interrupts.............................................. 2781
28.5.5 Interrupt Topologies............................................................................................................................................. 2782
28.6 DMA Functionality...................................................................................................................................................... 2783
28.7 Parity Check Mechanism........................................................................................................................................... 2783
28.7.1 Behavior on Parity Error...................................................................................................................................... 2783
28.8 Debug Mode...............................................................................................................................................................2784
28.9 Module Initialization....................................................................................................................................................2784
28.10 Configuration of Message Objects........................................................................................................................... 2785
28.10.1 Configuration of a Transmit Object for Data Frames......................................................................................... 2785
28.10.2 Configuration of a Transmit Object for Remote Frames.................................................................................... 2785
28.10.3 Configuration of a Single Receive Object for Data Frames...............................................................................2785
28.10.4 Configuration of a Single Receive Object for Remote Frames..........................................................................2786
28.10.5 Configuration of a FIFO Buffer...........................................................................................................................2786
28.11 Message Handling....................................................................................................................................................2786
28.11.1 Message Handler Overview...............................................................................................................................2787
28.11.2 Receive/Transmit Priority...................................................................................................................................2787
28.11.3 Transmission of Messages in Event Driven CAN Communication.................................................................... 2787
28.11.4 Updating a Transmit Object............................................................................................................................... 2788
28.11.5 Changing a Transmit Object.............................................................................................................................. 2788
28.11.6 Acceptance Filtering of Received Messages..................................................................................................... 2789
28.11.7 Reception of Data Frames................................................................................................................................. 2789
28.11.8 Reception of Remote Frames............................................................................................................................ 2789
28.11.9 Reading Received Messages............................................................................................................................ 2789
28.11.10 Requesting New Data for a Receive Object.................................................................................................... 2790
28.11.11 Storing Received Messages in FIFO Buffers................................................................................................... 2790
28.11.12 Reading from a FIFO Buffer.............................................................................................................................2790
28.12 CAN Bit Timing.........................................................................................................................................................2792
28.12.1 Bit Time and Bit Rate.........................................................................................................................................2792
28.12.2 Configuration of the CAN Bit Timing..................................................................................................................2797
28.13 Message Interface Register Sets............................................................................................................................. 2801
28.13.1 Message Interface Register Sets 1 and 2 (IF1 and IF2)....................................................................................2801
28.13.2 Message Interface Register Set 3 (IF3).............................................................................................................2802
28.14 Message RAM..........................................................................................................................................................2803
28.14.1 Structure of Message Objects........................................................................................................................... 2803
28.14.2 Addressing Message Objects in RAM............................................................................................................... 2806
28.14.3 Message RAM Representation in Debug Mode................................................................................................ 2807
28.15 Software................................................................................................................................................................... 2808
28.15.1 CAN Examples.................................................................................................................................................. 2808
28.16 CAN Registers..........................................................................................................................................................2811
28.16.1 CAN Base Address Table.................................................................................................................................. 2811
28.16.2 CAN_REGS Registers.......................................................................................................................................2812
28.16.3 CAN Registers to Driverlib Functions................................................................................................................ 2868
29 Modular Controller Area Network (MCAN)................................................................................................................... 2873
29.1 MCAN Introduction.....................................................................................................................................................2874
29.1.1 MCAN Related Collateral.................................................................................................................................... 2874
29.1.2 MCAN Features...................................................................................................................................................2875
29.2 MCAN Environment................................................................................................................................................... 2875
29.3 CAN Network Basics..................................................................................................................................................2876
29.4 MCAN Integration.......................................................................................................................................................2877
29.5 MCAN Functional Description.................................................................................................................................... 2879
29.5.1 Module Clocking Requirements...........................................................................................................................2880
29.5.2 Interrupt Requests............................................................................................................................................... 2880
29.5.3 Operating Modes................................................................................................................................................. 2881
List of Figures
Figure 3-1. Device Interrupt Architecture.................................................................................................................................102
Figure 3-2. Interrupt Propagation Path.................................................................................................................................... 103
Figure 3-3. Clocking System.................................................................................................................................................... 116
Figure 3-4. System PLL........................................................................................................................................................... 117
Figure 3-5. AUXCLKIN.............................................................................................................................................................118
Figure 3-6. Single-ended 3.3V External Clock......................................................................................................................... 119
Figure 3-7. External Crystal..................................................................................................................................................... 119
Figure 3-8. External Resonator................................................................................................................................................120
Figure 3-9. Missing Clock Detection Logic.............................................................................................................................. 126
Figure 3-10. CPU Timers......................................................................................................................................................... 128
Figure 3-11. CPU Timer Interrupt Signals and Output Signal.................................................................................................. 128
Figure 3-12. Watchdog Timer Module......................................................................................................................................129
Figure 3-13. Memory Architecture........................................................................................................................................... 135
Figure 16-12. ADC Timings for 12-bit Mode in Early Interrupt Mode.....................................................................................1845
Figure 16-13. ADC Timings for 12-bit Mode in Late Interrupt Mode...................................................................................... 1846
Figure 16-14. Example: Basic Synchronous Operation.........................................................................................................1847
Figure 16-15. Example: Synchronous Operation with Multiple Trigger Sources................................................................... 1848
Figure 16-16. Example: Synchronous Operation with Uneven SOC Numbers..................................................................... 1849
Figure 16-17. Example: Asynchronous Operation with Uneven SOC Numbers – Trigger Overflow..................................... 1849
Figure 16-18. Example: Synchronous Equivalent Operation with Non-Overlapping Conversions........................................ 1850
Figure 16-19. ADC Reference System.................................................................................................................................. 1853
Figure 16-20. CMPSS to ADC Loopback Connection........................................................................................................... 1853
Figure 16-21. ADCRESULT0 Register...................................................................................................................................1863
Figure 16-22. ADCRESULT1 Register...................................................................................................................................1864
Figure 16-23. ADCRESULT2 Register...................................................................................................................................1865
Figure 16-24. ADCRESULT3 Register...................................................................................................................................1866
Figure 16-25. ADCRESULT4 Register...................................................................................................................................1867
Figure 16-26. ADCRESULT5 Register...................................................................................................................................1868
Figure 16-27. ADCRESULT6 Register...................................................................................................................................1869
Figure 16-28. ADCRESULT7 Register...................................................................................................................................1870
Figure 16-29. ADCRESULT8 Register...................................................................................................................................1871
Figure 16-30. ADCRESULT9 Register...................................................................................................................................1872
Figure 16-31. ADCRESULT10 Register.................................................................................................................................1873
Figure 16-32. ADCRESULT11 Register.................................................................................................................................1874
Figure 16-33. ADCRESULT12 Register.................................................................................................................................1875
Figure 16-34. ADCRESULT13 Register.................................................................................................................................1876
Figure 16-35. ADCRESULT14 Register.................................................................................................................................1877
Figure 16-36. ADCRESULT15 Register.................................................................................................................................1878
Figure 16-37. ADCPPB1RESULT Register........................................................................................................................... 1879
Figure 16-38. ADCPPB2RESULT Register........................................................................................................................... 1880
Figure 16-39. ADCPPB3RESULT Register........................................................................................................................... 1881
Figure 16-40. ADCPPB4RESULT Register........................................................................................................................... 1882
Figure 16-41. ADCCTL1 Register..........................................................................................................................................1886
Figure 16-42. ADCCTL2 Register..........................................................................................................................................1888
Figure 16-43. ADCBURSTCTL Register............................................................................................................................... 1889
Figure 16-44. ADCINTFLG Register......................................................................................................................................1891
Figure 16-45. ADCINTFLGCLR Register.............................................................................................................................. 1893
Figure 16-46. ADCINTOVF Register..................................................................................................................................... 1894
Figure 16-47. ADCINTOVFCLR Register.............................................................................................................................. 1895
Figure 16-48. ADCINTSEL1N2 Register............................................................................................................................... 1896
Figure 16-49. ADCINTSEL3N4 Register............................................................................................................................... 1898
Figure 16-50. ADCSOCPRICTL Register..............................................................................................................................1900
Figure 16-51. ADCINTSOCSEL1 Register............................................................................................................................ 1902
Figure 16-52. ADCINTSOCSEL2 Register............................................................................................................................ 1904
Figure 16-53. ADCSOCFLG1 Register..................................................................................................................................1906
Figure 16-54. ADCSOCFRC1 Register................................................................................................................................. 1910
Figure 16-55. ADCSOCOVF1 Register................................................................................................................................. 1915
Figure 16-56. ADCSOCOVFCLR1 Register.......................................................................................................................... 1918
Figure 16-57. ADCSOC0CTL Register..................................................................................................................................1921
Figure 16-58. ADCSOC1CTL Register..................................................................................................................................1923
Figure 16-59. ADCSOC2CTL Register..................................................................................................................................1925
Figure 16-60. ADCSOC3CTL Register..................................................................................................................................1927
Figure 16-61. ADCSOC4CTL Register..................................................................................................................................1929
Figure 16-62. ADCSOC5CTL Register..................................................................................................................................1931
Figure 16-63. ADCSOC6CTL Register..................................................................................................................................1933
Figure 16-64. ADCSOC7CTL Register..................................................................................................................................1935
Figure 16-65. ADCSOC8CTL Register..................................................................................................................................1937
Figure 16-66. ADCSOC9CTL Register..................................................................................................................................1939
Figure 16-67. ADCSOC10CTL Register................................................................................................................................1941
Figure 16-68. ADCSOC11CTL Register................................................................................................................................ 1943
Figure 16-69. ADCSOC12CTL Register................................................................................................................................1945
Figure 16-70. ADCSOC13CTL Register................................................................................................................................1947
Figure 16-71. ADCSOC14CTL Register................................................................................................................................1949
Figure 16-72. ADCSOC15CTL Register................................................................................................................................1951
Figure 20-69. Timing Waveforms Associated with Phase Control Between Two Modules....................................................2272
Figure 20-70. Control of 3-Phase Interleaved DC/DC Converter.......................................................................................... 2273
Figure 20-71. 3-Phase Interleaved DC/DC Converter Waveforms for Control of 3-Phase Interleaved DC/DC Converter....2274
Figure 20-72. Control of Full-H Bridge Stage (FPWM2 = FPWM1)............................................................................................ 2275
Figure 20-73. ZVS Full-H Bridge Waveforms........................................................................................................................ 2276
Figure 20-74. Peak Current Mode Control of Buck Converter...............................................................................................2277
Figure 20-75. Peak Current Mode Control Waveforms for Control of Buck Converter.......................................................... 2277
Figure 20-76. Control of Two Resonant Converter Stages....................................................................................................2278
Figure 20-77. H-Bridge LLC Resonant Converter PWM Waveforms.....................................................................................2278
Figure 20-78. HRPWM Block Diagram.................................................................................................................................. 2280
Figure 20-79. Resolution Calculations for Conventionally Generated PWM......................................................................... 2281
Figure 20-80. Operating Logic Using MEP............................................................................................................................ 2282
Figure 20-81. HRPWM Extension Registers and Memory Configuration.............................................................................. 2283
Figure 20-82. HRPWM System Interface.............................................................................................................................. 2284
Figure 20-83. HRPWM and HRCAL Source Clock................................................................................................................2285
Figure 20-84. Required PWM Waveform for a Requested Duty = 40.5%..............................................................................2288
Figure 20-85. Low % Duty Cycle Range Limitation Example (HRPCTL[HRPE] = 0)............................................................ 2291
Figure 20-86. High % Duty Cycle Range Limitation Example (HRPCTL[HRPE] = 0)............................................................2292
Figure 20-87. Up-Count Duty Cycle Range Limitation Example (HRPCTL[HRPE]=1)..........................................................2292
Figure 20-88. Up-Down Count Duty Cycle Range Limitation Example (HRPCTL[HRPE]=1)................................................2292
Figure 20-89. Simple Buck Controlled Converter Using a Single PWM................................................................................ 2299
Figure 20-90. PWM Waveform Generated for Simple Buck Controlled Converter................................................................ 2299
Figure 20-91. Simple Reconstruction Filter for a PWM-based DAC......................................................................................2301
Figure 20-92. PWM Waveform Generated for the PWM DAC Function................................................................................ 2301
Figure 20-93. TBCTL Register...............................................................................................................................................2317
Figure 20-94. TBCTL2 Register.............................................................................................................................................2319
Figure 20-95. EPWMSYNCINSEL Register.......................................................................................................................... 2320
Figure 20-96. TBCTR Register.............................................................................................................................................. 2321
Figure 20-97. TBSTS Register.............................................................................................................................................. 2322
Figure 20-98. EPWMSYNCOUTEN Register........................................................................................................................ 2323
Figure 20-99. TBCTL3 Register.............................................................................................................................................2325
Figure 20-100. CMPCTL Register......................................................................................................................................... 2326
Figure 20-101. CMPCTL2 Register....................................................................................................................................... 2328
Figure 20-102. DBCTL Register............................................................................................................................................ 2330
Figure 20-103. DBCTL2 Register.......................................................................................................................................... 2333
Figure 20-104. AQCTL Register............................................................................................................................................ 2334
Figure 20-105. AQTSRCSEL Register.................................................................................................................................. 2336
Figure 20-106. PCCTL Register............................................................................................................................................ 2337
Figure 20-107. VCAPCTL Register....................................................................................................................................... 2338
Figure 20-108. VCNTCFG Register.......................................................................................................................................2340
Figure 20-109. HRCNFG Register.........................................................................................................................................2342
Figure 20-110. HRPWR Register...........................................................................................................................................2344
Figure 20-111. HRMSTEP Register....................................................................................................................................... 2345
Figure 20-112. HRCNFG2 Register....................................................................................................................................... 2346
Figure 20-113. HRPCTL Register.......................................................................................................................................... 2347
Figure 20-114. TRREM Register............................................................................................................................................2349
Figure 20-115. GLDCTL Register.......................................................................................................................................... 2350
Figure 20-116. GLDCFG Register......................................................................................................................................... 2352
Figure 20-117. EPWMXLINK Register...................................................................................................................................2354
Figure 20-118. AQCTLA Register.......................................................................................................................................... 2356
Figure 20-119. AQCTLA2 Register........................................................................................................................................ 2358
Figure 20-120. AQCTLB Register..........................................................................................................................................2359
Figure 20-121. AQCTLB2 Register........................................................................................................................................2361
Figure 20-122. AQSFRC Register......................................................................................................................................... 2362
Figure 20-123. AQCSFRC Register...................................................................................................................................... 2363
Figure 20-124. DBREDHR Register...................................................................................................................................... 2364
Figure 20-125. DBRED Register........................................................................................................................................... 2365
Figure 20-126. DBFEDHR Register.......................................................................................................................................2366
Figure 20-127. DBFED Register............................................................................................................................................2367
Figure 20-128. TBPHS Register............................................................................................................................................ 2368
Figure 20-129. TBPRDHR Register.......................................................................................................................................2369
Figure 21-14. Capture Sequence for Delta Mode Time-stamp and Rising Edge Detect....................................................... 2468
Figure 21-15. Capture Sequence for Delta Mode Time-stamp with Rising- and Falling-Edge Detect...................................2469
Figure 21-16. PWM Waveform Details of APWM Mode Operation....................................................................................... 2470
Figure 21-17. TSCTR Register.............................................................................................................................................. 2475
Figure 21-18. CTRPHS Register........................................................................................................................................... 2476
Figure 21-19. CAP1 Register.................................................................................................................................................2477
Figure 21-20. CAP2 Register.................................................................................................................................................2478
Figure 21-21. CAP3 Register.................................................................................................................................................2479
Figure 21-22. CAP4 Register.................................................................................................................................................2480
Figure 21-23. ECCTL0 Register............................................................................................................................................ 2481
Figure 21-24. ECCTL1 Register............................................................................................................................................ 2482
Figure 21-25. ECCTL2 Register............................................................................................................................................ 2484
Figure 21-26. ECEINT Register.............................................................................................................................................2486
Figure 21-27. ECFLG Register.............................................................................................................................................. 2488
Figure 21-28. ECCLR Register..............................................................................................................................................2489
Figure 21-29. ECFRC Register..............................................................................................................................................2490
Figure 21-30. ECAPSYNCINSEL Register............................................................................................................................2491
Figure 22-1. HRCAP Operations Block Diagram...................................................................................................................2497
Figure 22-2. HRCAP Calibration............................................................................................................................................2498
Figure 22-3. HRCTL Register................................................................................................................................................ 2503
Figure 22-4. HRINTEN Register............................................................................................................................................ 2504
Figure 22-5. HRFLG Register................................................................................................................................................2505
Figure 22-6. HRCLR Register................................................................................................................................................2506
Figure 22-7. HRFRC Register............................................................................................................................................... 2507
Figure 22-8. HRCALPRD Register........................................................................................................................................ 2508
Figure 22-9. HRSYSCLKCTR Register................................................................................................................................. 2509
Figure 22-10. HRSYSCLKCAP Register............................................................................................................................... 2510
Figure 22-11. HRCLKCTR Register....................................................................................................................................... 2511
Figure 22-12. HRCLKCAP Register...................................................................................................................................... 2512
Figure 23-1. Optical Encoder Disk.........................................................................................................................................2516
Figure 23-2. QEP Encoder Output Signal for Forward/Reverse Movement.......................................................................... 2516
Figure 23-3. Index Pulse Example.........................................................................................................................................2517
Figure 23-4. Using eQEP to Decode Signals from SinCos Transducer.................................................................................2520
Figure 23-5. Functional Block Diagram of the eQEP Peripheral........................................................................................... 2522
Figure 23-6. Functional Block Diagram of Decoder Unit....................................................................................................... 2524
Figure 23-7. Quadrature Decoder State Machine..................................................................................................................2525
Figure 23-8. Quadrature-clock and Direction Decoding........................................................................................................ 2526
Figure 23-9. Position Counter Reset by Index Pulse for 1000-Line Encoder (QPOSMAX = 3999 or 0xF9F)....................... 2528
Figure 23-10. Position Counter Underflow/Overflow (QPOSMAX = 4)..................................................................................2529
Figure 23-11. Software Index Marker for 1000-line Encoder (QEPCTL[IEL] = 1)..................................................................2531
Figure 23-12. Strobe Event Latch (QEPCTL[SEL] = 1)......................................................................................................... 2531
Figure 23-13. Latching Position Counter on ADCSOCA/ADCSOCB event...........................................................................2532
Figure 23-14. eQEP Position-compare Unit.......................................................................................................................... 2533
Figure 23-15. eQEP Position-compare Event Generation Points..........................................................................................2534
Figure 23-16. eQEP Position-compare Sync Output Pulse Stretcher................................................................................... 2534
Figure 23-17. eQEP Edge Capture Unit................................................................................................................................ 2536
Figure 23-18. Unit Position Event for Low Speed Measurement (QCAPCTL[UPPS] = 0010)...............................................2537
Figure 23-19. eQEP Edge Capture Unit - Timing Details...................................................................................................... 2537
Figure 23-20. eQEP Watchdog Timer....................................................................................................................................2539
Figure 23-21. eQEP Unit Timer Base.................................................................................................................................... 2539
Figure 23-22. QMA Module Block Diagram........................................................................................................................... 2540
Figure 23-23. QMA Mode-1................................................................................................................................................... 2541
Figure 23-24. QMA Mode-2................................................................................................................................................... 2542
Figure 23-25. eQEP Interrupt Generation..............................................................................................................................2543
Figure 23-26. QPOSCNT Register........................................................................................................................................ 2550
Figure 23-27. QPOSINIT Register.........................................................................................................................................2551
Figure 23-28. QPOSMAX Register........................................................................................................................................2552
Figure 23-29. QPOSCMP Register........................................................................................................................................2553
Figure 23-30. QPOSILAT Register........................................................................................................................................ 2554
Figure 23-31. QPOSSLAT Register....................................................................................................................................... 2555
Figure 23-32. QPOSLAT Register......................................................................................................................................... 2556
List of Tables
Table 1-1. C2000Ware Root Directories.................................................................................................................................... 90
Table 2-1. TMU Supported Instructions..................................................................................................................................... 95
Table 3-1. Access to EALLOW-Protected Registers..................................................................................................................99
Table 3-2. Reset Signals............................................................................................................................................................99
Table 3-3. Pie Channel Mapping..............................................................................................................................................106
Table 3-4. CPU Interrupt Vectors............................................................................................................................................. 108
Table 3-5. PIE Interrupt Vectors...............................................................................................................................................109
Table 3-6. ALT Modes.............................................................................................................................................................. 120
Table 3-7. Clock Connections Sorted by Clock Domain.......................................................................................................... 122
Table 3-8. Clock Source (OSCCLK) Failure Detection............................................................................................................ 125
Table 3-9. Example Watchdog Key Sequences.......................................................................................................................130
Table 3-10. Effect of Clock-Gating Low-Power Modes on the Device..................................................................................... 132
Table 3-11. Local Shared RAM................................................................................................................................................ 136
Table 3-12. Global Shared RAM.............................................................................................................................................. 136
Table 3-13. Error Handling in Different Scenarios....................................................................................................................140
Table 3-14. Mapping of ECC Bits in Read Data from ECC Address Map................................................................................141
Table 3-15. System Control Registers Impacted..................................................................................................................... 147
Table 3-16. SYSCTRL Base Address Table............................................................................................................................ 155
Table 3-17. ACCESS_PROTECTION_REGS Registers......................................................................................................... 156
Table 3-18. ACCESS_PROTECTION_REGS Access Type Codes.........................................................................................156
Table 3-19. NMAVFLG Register Field Descriptions................................................................................................................. 158
Table 3-20. NMAVSET Register Field Descriptions................................................................................................................. 160
Table 3-21. NMAVCLR Register Field Descriptions.................................................................................................................162
Table 3-22. NMAVINTEN Register Field Descriptions............................................................................................................. 164
Table 3-23. NMCPURDAVADDR Register Field Descriptions................................................................................................. 166
Table 3-24. NMCPUWRAVADDR Register Field Descriptions................................................................................................ 167
Table 3-25. NMCPUFAVADDR Register Field Descriptions.................................................................................................... 168
Table 3-26. NMDMAWRAVADDR Register Field Descriptions................................................................................................ 169
Table 3-27. NMCLA1RDAVADDR Register Field Descriptions................................................................................................170
Table 3-28. NMCLA1WRAVADDR Register Field Descriptions............................................................................................... 171
Table 3-29. NMCLA1FAVADDR Register Field Descriptions................................................................................................... 172
Table 3-30. NMDMARDAVADDR Register Field Descriptions.................................................................................................173
Table 3-31. MAVFLG Register Field Descriptions....................................................................................................................174
Table 3-32. MAVSET Register Field Descriptions....................................................................................................................175
Table 3-33. MAVCLR Register Field Descriptions................................................................................................................... 176
Table 3-34. MAVINTEN Register Field Descriptions................................................................................................................177
Table 3-35. MCPUFAVADDR Register Field Descriptions....................................................................................................... 178
Table 3-36. MCPUWRAVADDR Register Field Descriptions................................................................................................... 179
Table 3-37. MDMAWRAVADDR Register Field Descriptions...................................................................................................180
Table 3-38. MHICWRAVADDR_y Register Field Descriptions.................................................................................................181
Table 3-39. NMHICRDAVADDR Register Field Descriptions...................................................................................................182
Table 3-40. NMHICWRAVADDR Register Field Descriptions..................................................................................................183
Table 3-41. CLK_CFG_REGS Registers................................................................................................................................. 184
Table 3-42. CLK_CFG_REGS Access Type Codes................................................................................................................ 184
Table 3-43. CLKCFGLOCK1 Register Field Descriptions........................................................................................................186
Table 3-44. CLKSRCCTL1 Register Field Descriptions...........................................................................................................188
Table 3-45. CLKSRCCTL2 Register Field Descriptions...........................................................................................................190
Table 3-46. CLKSRCCTL3 Register Field Descriptions...........................................................................................................191
Table 3-47. SYSPLLCTL1 Register Field Descriptions............................................................................................................192
Table 3-48. SYSPLLMULT Register Field Descriptions........................................................................................................... 193
Table 3-49. SYSPLLSTS Register Field Descriptions............................................................................................................. 194
Table 3-50. SYSCLKDIVSEL Register Field Descriptions....................................................................................................... 195
Table 3-51. AUXCLKDIVSEL Register Field Descriptions.......................................................................................................196
Table 3-52. XCLKOUTDIVSEL Register Field Descriptions.................................................................................................... 197
Table 3-53. LOSPCP Register Field Descriptions................................................................................................................... 198
Table 3-54. MCDCR Register Field Descriptions.....................................................................................................................199
Table 3-55. X1CNT Register Field Descriptions...................................................................................................................... 201
Table 3-56. XTALCR Register Field Descriptions.................................................................................................................... 202
Table 3-57. XTALCR2 Register Field Descriptions.................................................................................................................. 203
Table 7-16. Pipeline Activity for MMOV16 MARx, MRa , #16I................................................................................................. 872
Table 7-17. Pipeline Activity for MMOV16 MAR0/MAR1, mem16........................................................................................... 875
Table 7-18. Pipeline Activity for MMOVI16 MAR0/MAR1, #16I............................................................................................... 891
Table 7-19. Pipeline Activity for MRCNDD, Return Not Taken.................................................................................................914
Table 7-20. Pipeline Activity for MRCNDD, Return Taken....................................................................................................... 914
Table 7-21. Pipeline Activity for MSTOP.................................................................................................................................. 916
Table 7-22. CLA Base Address Table...................................................................................................................................... 932
Table 7-23. CLA_ONLY_REGS Registers............................................................................................................................... 934
Table 7-24. CLA_ONLY_REGS Access Type Codes...............................................................................................................934
Table 7-25. _MVECTBGRNDACTIVE Register Field Descriptions......................................................................................... 935
Table 7-26. _MPSACTL Register Field Descriptions............................................................................................................... 936
Table 7-27. _MPSA1 Register Field Descriptions....................................................................................................................937
Table 7-28. _MPSA2 Register Field Descriptions....................................................................................................................938
Table 7-29. SOFTINTEN Register Field Descriptions..............................................................................................................939
Table 7-30. SOFTINTFRC Register Field Descriptions........................................................................................................... 941
Table 7-31. CLA_SOFTINT_REGS Registers......................................................................................................................... 942
Table 7-32. CLA_SOFTINT_REGS Access Type Codes.........................................................................................................942
Table 7-33. SOFTINTEN Register Field Descriptions..............................................................................................................943
Table 7-34. SOFTINTFRC Register Field Descriptions........................................................................................................... 945
Table 7-35. CLA_REGS Registers...........................................................................................................................................946
Table 7-36. CLA_REGS Access Type Codes.......................................................................................................................... 946
Table 7-37. MVECT1 Register Field Descriptions................................................................................................................... 948
Table 7-38. MVECT2 Register Field Descriptions................................................................................................................... 949
Table 7-39. MVECT3 Register Field Descriptions................................................................................................................... 950
Table 7-40. MVECT4 Register Field Descriptions................................................................................................................... 951
Table 7-41. MVECT5 Register Field Descriptions................................................................................................................... 952
Table 7-42. MVECT6 Register Field Descriptions................................................................................................................... 953
Table 7-43. MVECT7 Register Field Descriptions................................................................................................................... 954
Table 7-44. MVECT8 Register Field Descriptions................................................................................................................... 955
Table 7-45. MCTL Register Field Descriptions........................................................................................................................ 956
Table 7-46. _MVECTBGRNDACTIVE Register Field Descriptions......................................................................................... 957
Table 7-47. SOFTINTEN Register Field Descriptions..............................................................................................................958
Table 7-48. _MSTSBGRND Register Field Descriptions......................................................................................................... 960
Table 7-49. _MCTLBGRND Register Field Descriptions......................................................................................................... 961
Table 7-50. _MVECTBGRND Register Field Descriptions...................................................................................................... 962
Table 7-51. MIFR Register Field Descriptions......................................................................................................................... 963
Table 7-52. MIOVF Register Field Descriptions.......................................................................................................................967
Table 7-53. MIFRC Register Field Descriptions.......................................................................................................................970
Table 7-54. MICLR Register Field Descriptions.......................................................................................................................972
Table 7-55. MICLROVF Register Field Descriptions............................................................................................................... 974
Table 7-56. MIER Register Field Descriptions......................................................................................................................... 976
Table 7-57. MIRUN Register Field Descriptions...................................................................................................................... 979
Table 7-58. _MPC Register Field Descriptions........................................................................................................................ 981
Table 7-59. _MAR0 Register Field Descriptions...................................................................................................................... 982
Table 7-60. _MAR1 Register Field Descriptions...................................................................................................................... 983
Table 7-61. _MSTF Register Field Descriptions...................................................................................................................... 984
Table 7-62. _MR0 Register Field Descriptions........................................................................................................................ 987
Table 7-63. _MR1 Register Field Descriptions........................................................................................................................ 988
Table 7-64. _MR2 Register Field Descriptions........................................................................................................................ 989
Table 7-65. _MR3 Register Field Descriptions........................................................................................................................ 990
Table 7-66. _MPSACTL Register Field Descriptions............................................................................................................... 991
Table 7-67. _MPSA1 Register Field Descriptions....................................................................................................................992
Table 7-68. _MPSA2 Register Field Descriptions....................................................................................................................993
Table 7-69. CLA Registers to Driverlib Functions.................................................................................................................... 993
Table 8-1. DCC Base Address Table..................................................................................................................................... 1008
Table 8-2. DCC_REGS Registers..........................................................................................................................................1009
Table 8-3. DCC_REGS Access Type Codes......................................................................................................................... 1009
Table 8-4. DCCGCTRL Register Field Descriptions.............................................................................................................. 1010
Table 8-5. DCCCNTSEED0 Register Field Descriptions....................................................................................................... 1011
Table 8-6. DCCVALIDSEED0 Register Field Descriptions.................................................................................................... 1012
Table 8-7. DCCCNTSEED1 Register Field Descriptions....................................................................................................... 1013
Preface
Read This First
Note
Texas Instruments is transitioning to use more inclusive terminology. Some language may be different
than what you would expect to see for certain technology areas.
Notational Conventions
This document uses the following conventions.
• Hexadecimal numbers can be shown with the suffix h or the prefix 0x. For example, the following number is
40 hexadecimal (decimal 64): 40h or 0x40.
• Registers in this document are shown in figures and described in tables.
– Each register figure shows a rectangle divided into fields that represent the fields of the register. Each field
is labeled with its bit name, its beginning and ending bit numbers above, and its read/write properties with
default reset value below. A legend explains the notation used for the properties.
– Reserved bits in a register figure can have one of multiple meanings:
• Not implemented on the device
• Reserved for future device expansion
• Reserved for TI testing
• Reserved configurations of the device that are not supported
– Writing nondefault values to the Reserved bits could cause unexpected behavior and should be avoided.
Glossary
TI Glossary This glossary lists and explains terms, acronyms, and definitions.
Related Documentation From Texas Instruments
For a complete listing of related documentation and development-support tools for these devices, visit the Texas
Instruments website at www.ti.com.
Additionally, the TMS320C28x DSP CPU and Instruction Set Reference Guide and the TMS320C28x Floating
Point Unit and Instruction Set Reference Guide must be used in conjunction with this TRM.
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.
Trademarks
TI E2E™, C2000™, Code Composer Studio™, and Texas Instruments™ are trademarks of Texas Instruments.
All trademarks are the property of their respective owners.
Chapter 1
C2000™ Microcontrollers Software Support
This chapter discusses the C2000Ware for the C2000™ microcontrollers. The C2000Ware can be downloaded
from: www.ti.com/tool/C2000WARE
1.1 Introduction.................................................................................................................................................................90
1.2 C2000Ware Structure................................................................................................................................................. 90
1.3 Documentation............................................................................................................................................................90
1.4 Devices........................................................................................................................................................................ 90
1.5 Libraries...................................................................................................................................................................... 90
1.6 Code Composer Studio™ Integrated Development Environment (IDE)................................................................90
1.7 SysConfig and PinMUX Tool......................................................................................................................................91
1.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
1.2 C2000Ware Structure
The C2000Ware software package is organized into the following directory structure as shown in Table 1-1.
Table 1-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.
1.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.
1.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.
1.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.
1.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.
Chapter 2
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
2.1 Introduction.................................................................................................................................................................94
2.2 C28X Related Collateral............................................................................................................................................. 94
2.3 Features.......................................................................................................................................................................94
2.4 Floating-Point Unit......................................................................................................................................................94
2.5 Trigonometric Math Unit (TMU)................................................................................................................................. 95
2.6 VCRC Unit....................................................................................................................................................................95
2.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.
2.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
2.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.
2.4 Floating-Point Unit
The C28x plus floating-point (C28x+FPU) processor extends the capabilities of the C28x fixed-point CPU by
adding registers and instructions to support IEEE single-precision floating point operations.
Devices with the C28x+FPU 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.
Fast Integer Division (FINTDIV) supports Truncated, Modulo and Euclidean division formats without cycle
penalty and provides results in integer and remainder representation.
For more information, see the TMS320C28x Extended Instruction Sets Technical Reference Manual.
2.5 Trigonometric Math Unit (TMU)
The trigonometric math unit (TMU) extends the capabilities of a C28x+FPU by adding instructions and
leveraging existing FPU instructions to speed up the execution of common trigonometric and arithmetic
operations listed in Table 2-1.
Table 2-1. TMU Supported Instructions
Instructions C Equivalent Operation Pipeline Cycles
MPY2PIF32 RaH,RbH a = b * 2pi 2/3
DIV2PIF32 RaH,RbH a = b / 2pi 2/3
DIVF32 RaH,RbH,RcH a = b/c 5
SQRTF32 RaH,RbH a = sqrt(b) 5
SINPUF32 RaH,RbH a = sin(b*2pi) 4
COSPUF32 RaH,RbH a = cos(b*2pi) 4
ATANPUF32 RaH,RbH a = atan(b)/2pi 4
QUADF32 RaH,RbH,RcH,RdH Operation to assist in calculating ATANPU2 5
Exponent instruction IEXP2F32 and logarithmic instruction LOG2F32 have been added to support computation
of floating-point power function for the non-linear proportional integral derivative control (NLPID) component of
the C2000 Digital Control Library. These two added instructions reduce the power function calculations from a
typical of 300 cycles using library emulation to less than 10 cycles.
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.
2.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.
Chapter 3
System Control and Interrupts
The system-level functionality of this microcontroller configures the clocking, resets, and interrupts of the CPU
and peripherals, as well as the operation of the on-chip memories, timers, and security features.
3.1 Introduction.................................................................................................................................................................98
3.2 Power Management....................................................................................................................................................99
3.3 Device Identification and Configuration Registers................................................................................................. 99
3.4 Resets..........................................................................................................................................................................99
3.5 Peripheral Interrupts................................................................................................................................................ 102
3.6 Exceptions and Non-Maskable Interrupts.............................................................................................................. 114
3.7 Clocking.....................................................................................................................................................................116
3.8 32-Bit CPU Timers 0/1/2........................................................................................................................................... 128
3.9 Watchdog Timer........................................................................................................................................................129
3.10 Low Power Modes.................................................................................................................................................. 132
3.11 Memory Controller Module.................................................................................................................................... 135
3.12 JTAG........................................................................................................................................................................ 142
3.13 Live Firmware Update............................................................................................................................................ 142
3.14 System Control Register Configuration Restrictions......................................................................................... 147
3.15 Software.................................................................................................................................................................. 148
3.16 System Control Registers......................................................................................................................................155
3.1 Introduction
System-level configuration is controlled by a group of submodules that are collectively referred to as the system
control module. The system control module provides the following capabilities:
• System-level resets, including power-on and brownout resets
• Clock source selection and PLL configuration
• Missing clock detection
• Clock-gating low-power modes
• Peripheral interrupt handling
• Non-maskable interrupts for certain fault conditions
• Three 32-bit timers
• Windowed watchdog timer, which can generate an interrupt or a reset
• RAM initialization, write protection, and mastership control
• Flash memory ECC, wait state, and cache configuration
• Dual-zone code security module
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
• Live Firmware Update With Device Reset on C2000 MCUs Application Report
• Live Firmware Update Without Device Reset on C2000 MCUs 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
3.1.2 LOCK Protection on System Configuration Registers
Several system configuration registers are protected from spurious CPU writes by “LOCK” registers. Once these
associated LOCK register bits are set, the respective locked registers can no longer be modified by software.
See the register descriptions for details.
3.1.3 EALLOW Protection
Some registers in the system are protected from spurious CPU writes by the EALLOW protection mechanism.
This uses the special CPU instructions EALLOW and EDIS to enable and disable access to protected registers.
The current protection state is given by the EALLOW bit in the CPU ST1 register, as shown in Table 3-1.
Register protection is enabled by default at startup. While protected, all writes to protected registers by the CPU
are ignored. Only CPU reads, JTAG reads, and JTAG writes are allowed. If protection is disabled 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.
Writes to the clock configuration and peripheral clock enable registers can be disabled until the next reset by
writing to special lock registers.
(1) The EALLOW bit is overridden by way of the JTAG port, allowing full access of protected registers during debug from the Code
Composer Studio™ IDE interface.
3.4 Resets
This section explains the types and effects of the different resets on this device.
3.4.1 Reset Sources
Table 3-2 summarizes the various reset signals and their effect on the device.
Table 3-2. Reset Signals
Reset Source CPU Core Reset Peripherals JTAG / Debug IOs XRS Output
(C28x, FPU, VCU, TMU) Reset Logic Reset
POR Yes Yes Yes Hi-Z Yes
BOR Yes Yes Yes Hi-Z Yes
XRS Pin Yes Yes No Hi-Z -
WDRS Yes Yes No Hi-Z Yes
NMIWDRS Yes Yes No Hi-Z Yes
SYSRS (Debugger Reset) Yes Yes No Hi-Z No
SCCRESET Yes Yes No Hi-Z No
SIMRESET. XRS Yes Yes No Hi-Z Yes
SIMRESET. CPU1RS Yes Yes No Hi-Z No
HWBISTRS Yes No No No No
• Special resets (HWBISTRS and TRST), which enable specific device functions.
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. They can only be cleared by a power-on reset (POR) or by writing ones to the
RESCCLR register. Some are cleared by the boot ROM as part of its start-up routines.
Many peripheral modules have individual resets accessible through the SOFTPRESx registers. For information
about a module's reset state, refer to the chapter for that module.
After any reset, the CPU begins execution from address 0x3FFFC0 (the reset vector), which is in the boot ROM.
After running the boot ROM code, the CPU will typically branch to the start of the Flash memory at address
0x80000. For more information on controlling the boot process, see ROM Code and Peripheral Booting.
Note
After a POR, the boot ROMs will clear the M0/M1, LSx, GSx, and message RAMs to ensure that they
contain valid ECC.
100 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 101
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
TIMER1 INT13
102 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 103
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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.5.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.5.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 can be found
in Table 3-3. Note that the vector table is EALLOW-protected.
4. Set the appropriate PIEIERx bit for each interrupt. The PIE group and channel assignments can be found in
Table 3-3.
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.5.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.
104 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 105
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
106 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 107
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
108 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 109
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
110 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 111
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
112 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 113
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
114 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 115
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
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-3 and Figure 3-4 provide an overview of the device's clocking system.
SYSCLKDIVSEL PLLSYSCLK
Watchdog NMIWD
Timer
SYS
PLLRAWCLK Divider
SYSPLL FPU
INTOSC1 CPUCLK
TMU
OSCCLK Flash
INTOSC2 SYSPLLCLKEN
X1 (XTAL)
OSCCLKSRCSEL
CPU
ePIE Boot ROM
CLA Message RAMs
SYSCLK GPIO DCSM
SYSCLK
Mx RAMs System Control
LSx RAMs WD
GSx RAMs XINT
CPUTIMERs I2C
One per SYSCLK peripheral CLB ADC
ECAP CMPSS
EQEP GPDAC
PCLKCRx EPWM CAN
PERx.SYSCLK
HRCAL MCAN
PMBUS HIC
LIN DCC
FSI HWBIST
SDFM BGCRC
EPG ERAD
AES
CLKSRCCTL2.CANxBCLKSEL
AUXCLKIN (GPIO29)
PERx.SYSCLK CAN Bit Clock
CLKSRCCTL2.MCANxBCLKSEL
AUXCLKDIVSEL.MCANCLKDIV
116 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SYSPLL
÷
IMULT
B15%%.- +/7.6
fPLLRAWCLK = ×
(4'(&+8 +1) (1&+8+1)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 117
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
Microcontroller
GPIO29
VSS (AUXCLKIN)
+3.3 V
VDD Out
3.3-V Oscillator
Gnd
118 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
Microcontroller
GPIO19 GPIO18*
VSS X1 X2
* Available as a
+3.3 V
GPIO when X1 is
used as a clock
VDD Out
3.3-V Oscillator
Gnd
• An external crystal. The crystal should be connected across X1 and X2 with its load capacitors connected to
VSS as shown in Figure 3-7.
Microcontroller
GPIO19 GPIO18
VSS X1 X2
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 119
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
• An external resonator. The resonator should be connected across X1 and X2 with its ground connected to
VSS as shown in Figure 3-8.
Microcontroller
GPIO19 GPIO18
VSS X1 X2
(1) OSCOFF and SE determine the ALT mode of GPIO18 and GPIO19.
120 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
Note
Application needs to wait for 5 SYSCLK cycles after enabling clock to the peripherals when using
PCLKCRx.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 121
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
122 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 123
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
4. Wait for the X1 counter value in the X1CNT register to reach 2047 (0x7ff).
5. Repeat steps 3-4 three additional times.
6. Select XTAL as the OSCCLK source by writing a 1 to CLKSRCCTL1.OSCCLKSRCSEL.
7. Check the MCLKSTS bit in the MCDCR register. If it's set, either the external oscillator or the device has
failed.
8. If MCLKSTS is clear, the switch to the external clock is a success. The system clock is now derived from
XTAL.
3.7.9 Choosing PLL Settings
The equation shown in Figure 3-4 should be used to configure the PLL.
IMULT is the integer value of the multiplier.
REFDIV is the reference divider for the OSCCLK.
ODIV is the output divider of the PLLRAWCLK.
PLLSYSCLKDIV is the system clock divider.
For the permissible values of the multipliers and dividers, see the documentation for their respective registers.
Many combinations of multiplier and divider can produce the same output frequency. However, the product of the
reference clock frequency and the multiplier (known as the VCO frequency) must be in the range specified in the
TMS320F28003x Real-Time Microcontrollers Data Sheet.
Note
The system clock frequency (PLLSYSCLK) may not exceed the limit specified in the TMS320F28003x
Real-Time Microcontrollers Data Sheet. This limit does not allow for oscillator tolerance.
124 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
Note
1. SYSPLL must be bypassed and powered down manually before changing the OSCCLK source.
2. At least 60 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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 125
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
126 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
Note
On a complete clock failure when OSCCLK is dead, it can take a maximum time of 8192 INTOSC1
cycles (that is, 0.8192 ms) before the CLOCKFAIL signal goes high, after which:
• NMI is generated
• OSCCLK is switched to INTOSC1
• PWM Trip happens
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 127
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
A. The timer registers are connected to the memory bus of the C28x processor.
B. The CPU Timers are synchronized to SYSCLKOUT.
128 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
WDCNTR
WDCLK
(INTOSC1) Overflow 1-count
delay
8-bit
WDCLK Watchdog Watchdog
Divider Prescaler Counter
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 129
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
130 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 131
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
(1) The Flash module is not powered down by hardware in any LPM. It may be powered down using software if required by the
application. For more information, see the Flash Module chapter.
(2) The XTAL is not powered down by hardware in any LPM. It may be powered down by software setting the XTALCR.OSCOFF bit to 1.
This can be done at any time during the application if the XTAL is not required.
3.10.2 IDLE
IDLE is a standard feature of the C28x CPU. In this mode, the CPU clock is gated while all peripheral clocks are
left running. IDLE can thus be used to conserve power while a CPU is waiting for peripheral events.
Any enabled interrupt will wake the CPU up from IDLE mode.
To enter IDLE mode, set LPMCR.LPM to 0x0 and execute the IDLE instruction.
The CPU will resume normal operations upon any enabled interrupt event.
132 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
3.10.3 STANDBY
STANDBY is a more aggressive low-power mode that gates both the CPU clock and any peripheral clocks
derived from the CPU's SYSCLK. The watchdog however, is left active. STANDBY is best suited for an
application where the wake-up signal will come from an external system (or CPU subsystem) rather than a
peripheral input.
An NMI (or optionally) a watchdog interrupt or a configured GPIO can wake the CPU from STANDBY mode.
Each GPIO from GPIO0-60 can be configured to wake the CPU when they are driven active low. Upon wakeup,
the CPU receives the WAKEINT interrupt if configured.
To enter STANDBY mode:
1. Set LPMCR.LPM to 0x1.
2. Enable the WAKEINT interrupt in the PIE.
3. For watchdog interrupt wakeup, set LPMCR.WDINTE to 1 and configure the watchdog to generate
interrupts.
4. For GPIO wakeup, set GPIOLPMSEL0 and GPIOLPMSEL1 to connect the chosen GPIOs to the LPM
module, and set LPMCR.QUALSTDBY to select the number of OSCCLK cycles for input qualification.
5. Execute the IDLE instruction to enter STANDBY.
To wake up from STANDBY mode:
1. Configure the desired GPIO to trigger the wakeup.
2. Drive the selected GPIO signal low; it must remain low for the number of OSCCLK cycles specified in the
QUALSTDBY bits in the LPMCR register. If the signal is sampled high during this period, the count restarts.
At the end of the qualification period, the PLL enables the CLKIN to the CPU and the WAKEINT interrupt is
latched in the PIE block.
The CPU is now out of STANDBY mode and can resume normal execution.
3.10.4 HALT
HALT is a global low-power mode that gates almost all system clocks and allows for power-down of oscillators
and analog blocks.
Unlike on other C2000™ devices, HALT mode will not automatically power down the XTAL upon HALT entry.
Additionally, if the XTAL is not powered on, waking up from HALT mode will not automatically power on the
XTAL. The XTALCR.OSCOFF bit has been added to power on and off the XTAL circuitry when not needed
through application software.
For applications that require minimal power consumption during HALT mode, application software should power
off the XTAL prior to entering HALT. If the OSCCLK source is configured to be XTAL, the application should first
switch the OSSCLK source to INTOSC1 or INTOSC2 prior to setting XTALCR.OSCOFF.
GPIO0-60 can be configured to wake up the system from HALT. No other wakeup option is available. However,
the watchdog timer may still be clocked, and can be configured to produce a watchdog reset if a timeout
mechanism is needed. On wakeup, the CPU receives a WAKEINT interrupt.
To enter HALT mode:
1. Enable the WAKEINT interrupt in the PIE .
2. Set LPMCR.LPM to 0x2. Set GPIOLPMSEL0 and GPIOLPMSEL1 to connect the chosen GPIOs to the LPM
module.
3. Set CLKSRCCTL1.WDHALTI to 1 to keep the watchdog timer active and INTOSC1 and INTOSC2 powered
up in HALT.
4. Set CLKSRCCTL1.WDHALTI to 0 to disable the watchdog timer and power down INTOSC1 and INTOSC2 in
HALT.
5. Execute the IDLE instruction to enter HALT.
If an interrupt or NMI is received while the IDLE instruction is in the pipeline, the system will begin executing the
WAKEINT ISR. After HALT wakeup, ISR execution will resume where it left off.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 133
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
Note
Before entering HALT mode, if the system PLL is locked (SYSPLL.LOCKS = 1), it must also be
connected to the system clock (PLLCTL1.PLLCLKEN = 1). Otherwise, the device will never wake up.
134 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 135
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
01 0 All Data Read LSx memory is shared between CPU and CLA1
Data Write
The shared RAM has different levels of access protection that can be enabled or disabled by configuring specific
bits in the GSxACCPROT registers.
Access protection configuration for the GSx RAM block can be locked by the user to prevent further updates to
this bit field. 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 a
configuration is committed for a particular GSx RAM block, it can not be changed further until CPU.SYSRS is
issued.
3.11.4 CLA-CPU Message RAM
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.
3.11.5 CLA-DMA Message 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.11.6 Access Arbitration
For a shared RAM, multiple accesses can happen at any 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.
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
136 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
CPU.DMA READ/WRITE
RR-CPU.DMA RR-HIC
HIC READ/WRITE
CLA-DWRITE CLA
Fixed RR-CPU.CLA
Priority
CLA-DREAD Arbiter
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 137
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
Note
For debug accesses, all the protections are disabled.
Note 1: All access protections are ignored during debug accesses. Write access to a protected memory will go through
when it is done via the debugger, irrespective of the write protection configuration for that memory.
138 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
If a CLA read protection violation occurs, a flag gets set into the appropriate access violation flag register, and
the memory address for which the access violation occurred, gets latched into the appropriate CLA read access
violation address register. Also, an access violation interrupt is generated to the master CPU if enabled in the
interrupt enable register.
3.11.7.6 CLA Write Protection
If local shared RAM is configured as dedicated RAM for the CPU, or if it is configured as program RAM for the
CLA, any data write access from the CLA to that particular LSx RAM results in a CLA write protection violation,
which is a non-master access violation. Similarly any data write access from CLA to CPUTOCLA or DMATOCLA
MSGRAM will result in a CLA write protection violation, which is a non-master access violation.
If a CLA write protection violation occurs, write gets ignored, a flag gets set into the appropriate access violation
flag register, and the memory address for which the access violation occurred, gets latched into the appropriate
CLA write access violation address register. Also, an access violation interrupt is generated to the master CPU if
enabled in the interrupt enable register.
3.11.7.7 HIC Write Protection
Write accesses from the HIC can be protected by setting the HICWRPROTx bit of a specific register to ‘1.’ If a
write access is done by the HIC to protected memory, a write protection violation occurs.
If a write access is made to GSx memory by a non-master HIC, it is called a non-master write protection
violation. If a write access is made to a dedicated or shared memory by a master HIC, and HICWRPROTx is set
to ‘1’ for that memory, it is called a master HIC write protection violation.
A flag gets set in the HIC access violation flag register, and the memory address where the violation happened
gets latched in the HIC fetch access violation address register. These are dedicated registers for each
subsystem.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 139
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
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.
140 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
Note
The memory map for ECC bits and data bits are the same. The user must choose a different test
mode to access ECC bits. In test mode, all access to memories (data as well as ECC) should be done
as 32-bit access only.
Table 3-14 shows the bit mapping for the ECC bits when they are read in RAMTEST mode using their respective
addresses.
Table 3-14. Mapping of ECC Bits in Read Data from ECC 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
Note
None of the masters should access the memory while initialization is taking place. If memory is
accessed before RAMINITDONE is set, the memory read/write as well as initialization will not happen
correctly.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 141
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
3.12 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 may 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 it), there will be a difference in how the application behaves
with the debugger and without.
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
3.13 Live Firmware Update
This device includes hardware hooks to streamline firmware updates. These hardware hooks enable seamless
switching from the old firmware to the new firmware without resetting the application.
This section discusses the Live Firmware Update (LFU) and the hardware features present on the device to
support LFU.
3.13.1 LFU Background
End equipment like Server Power Supply (PSU) are high availability systems that need to have minimum
downtime, even during firmware upgrades. Firmware upgrades are essential to add additional functionality,
enhance performance and fix software bugs/vulnerabilities. LFU helps update firmware while the application
is running, thus eliminating downtime (with respect to critical real-time interrupts) and also providing a more
cost-effective alternative compared to manually updating firmware.
LFU has traditionally been implemented in the C2000 family of MCUs using software-only techniques. This
impacts LFU switchover time, which is the time to switchover to new firmware once the transition has begun.
User application code initiates this transition, typically by jumping to an entry point in the new firmware. There,
a compiler provided initialization routine specific to LFU is called. This initializes user-specified data variables.
When execution arrives in main() of the new application, user application code performs minimal initialization to
get the new application running.
3.13.2 LFU Switchover Steps
A simplified representation of the LFU switchover is shown in Figure 3-16, and is described in the following
steps:
1. In typical systems, a host – typically a PC or another MCU, will initiate LFU (depicted as LFU Request) on
the application MCU (in this case, the C2000 MCU) that is executing the real-time control application. This
initiates the Flash Program sequence in the application MCU. This runs as a background process even as
the application MCU continues executing firmware (depicted as Firmware - 1).
2. Since the compiler may move existing PIE vectors and function pointers to new locations between firmware
versions, or PIE vectors or function pointers could get added or removed between firmware versions, user
application code needs to manage these properly and efficiently during LFU. In the absence of Flash
142 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
remapping (where different Flash memory banks can be mapped to the same address), PIE vector table
remapping, that is “swapping” and RAM memory block swapping are features supported on the device.
Without swapping, user application code would need to individually update each PIE vector and each
function pointer, adding valuable cycles to the LFU switchover time. With swapping, prior to LFU switchover,
user application code can populate a different PIE vector table (depicted as PIE Swap Memory Update) and
a different LS RAM region (depicted as LSx Swap Memory Update).
3. When complete, at a suitable time (depicted as LFU Switchover – waiting for appropriate time), user
application code initiates the transition to new firmware. Once the compiler LFU initialization routine
completes and transfers execution to the new application (depicted as Firmware – 2), user application code
needs to perform necessary initialization before the new application can begin running. Since PIE vectors
and function pointers have already been populated in the “swap” locations, all that is required is a PIE vector
table swap and LSx RAM Memory Swap (depicted as PIE Vector Swap, LSx Memory Swap).
LFU switchover ± waiting for PIE vector swap
LFU request appropriate time LSx memory swap
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 143
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
Thus, note that the active addresses are always 0x0000_0D00-0x0000_0EFF, and 0x0100_0D00-0x0100_0EFF
(for redundancy). The inactive addresses are always 0x0100_0900-0x0100_0AFF, and
0x0100_0B00-0x0100_0CFF (for redundancy). As mentioned above, prior to the LFU switchover, user
application code will need to write to the inactive addresses with the PIE vector locations corresponding to
the new firmware.
The register bit LFUStatus.PieVectorSwap provides the status of Pie Vector Swap.
Writes to addresses 0x0000_0D00-0x0000_0EFF will update both the currently active block and its redundant
counterpart. Writes to addresses 0x0100_0900-0x0100_0AFF will update both the currently inactive block and
its redundant counterpart.
Reads from addresses 0x0000_0D00-0x0000_0EFF will issue reads from both addresses
0x0000_0D00-0x0000_0EFF and the redundant counterpart 0x0100_0D00-0x0100_0EFF. The read values will
be compared, and any data mismatches will generate the same error response as that of the existing PIE vector
fetch mismatch (refer to PIEVERRADDR). On the other hand, a read from or write to the redundant PIE vector
RAM (0x0100_0D00-0x0100_0EFF or 0x0100_0B00-0x0100_0CFF) will impact only the redundant PIE vector
RAM.
Configuration without Configuration before
Configuration after swap
swap capability initiating swap
Redundant Redundant
PIE-2 PIE-2
Inactive vector table which PIE-2 PIE-2
(Block C) (Block C)
can be swapped (Block D) (Block D)
PIE-1 and PIE-2 are two halves of the same physical memory
Redundant PIE-1 and Redundant PIE-2 are two halved of the same physical memory
144 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
just 1 CPU clock cycle. This allows user application code to always have function pointers in LS0, yet have two
different physical blocks that can map to the LS0 address range.
For example, if current firmware contains 10 function pointers present at the start of Block 1 (LS0 address
space). If the new firmware contains the same 10 function pointers that now need to be updated, user
application code would place these at the start of Block 2 (LS1 address space) prior to LFU switchover. During
LFU switchover, user application code would execute a LS0/LS1 RAM memory swap, where the physical RAM
block previously mapped to the LS1 address space would now be mapped to the LS0 address space, and hence
can be used seamlessly for function pointer addressing for the new firmware.
The register bit LFUStatus.LS01Swap provides the status of LS0/LS1 RAM memory swap.
Logical Normal Mode Swap Mode
Address
0x8000 0x8000
0x0000_8000
Block-1 Block-2
LS0 LS0
0x87FF 0x87FF
0x8800 0x8800
Block-2 Block-1
LS1 LS1
0x0000_8FFF
0x8FFF 0x8FFF
Additional points pertaining to LS0/LS1 RAM memory swap are described below:
1. LFU registers can be accessed from both CPU and CLA.
2. Only LS0 and LS1 blocks can be swapped. LS2 to LS7 blocks cannot be swapped.
3. LS0 and LS1 blocks have ECC protection. Address ECC is computed based on the physical address and
hence it will not change based on the memory swap.
4. A number of LSx RAM registers are available to the user application code
to configure options such as master select (LSxMSEL.MSEL_LS0, LSxMSEL.MSEL_LS1),
fetch protect (LSxACCPROT0.FETCHPROT_LS0, LSxACCPROT0.FETCHPROT_LS1), write protect
(LSxACCPROT0.CPUWRPROT_LS0, LSxACCPROT0.CPUWRPROT_LS1), CLA program memory
LSxCLAPGM.CLAPGM_LS0, LSxCLAPGM.CLAPGM_LS1). These register bits indicate the status of the
memory block that is deemed as LS0 (CPU address 0x8000 to 0x87FF) and LS1 (CPU address 0x8800 to
0x8FFF) at any point of time. When a LS0/LS1 RAM memory swap occurs, the corresponding control/status
bits will also automatically swap.
5. It is recommended to service all pending errors (access violation, ECC, parity) associated with memory
before initiating a LS0/LS1 RAM memory swap.
6. LS0/LS1 RAM memory swap shall be initiated only after completion of RAM initialization for both LS0 and
LS1 memories (LSxINITDONE.INITDONE_LS0 = 1 and LSxINITDONE.INITDONE_LS1 = 1).
7. LS0/LS1 RAM memory swap shall not be initiated when RAM-test (LSxTEST.TEST_LS0 = 1 or
LSxTEST.TEST_LS1 = 1) is in progress for LS0 or LS1 blocks.
8. With DCSM security on the device, in general, LS0 and LS1 RAM blocks can be assigned to different
security zones. However, with LS0/LS1 RAM memory swaps, different physical RAM blocks can get mapped
to the same address space. Application software shall therefore ensure that both LS0 and LS1 have the
same security settings (for example, zone, EXE protection), if there is a plan to implement LS0/LS1 RAM
memory swap. Hardware logic is implemented on the device to prevent swap of LS0 and LS1 if the blocks
have different security configurations.
9. In order to prevent security vulnerabilities, LS0/LS1 RAM memory swap will not be allowed if it is initiated by
code from a different zone. For example, (i) If LS0 and LS1 are part of Zone1, swap will not be allowed if
code that initiates the swap resides in Zone2 or unsecure zone; (ii) If LS0 and LS1 are part of Zone2, swap
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 145
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
will not be allowed if code that initiates the swap resides in Zone1 or unsecure zone; (iii) If LS0 and LS1 are
part of the same zone which is unsecure, swap will be allowed in all cases irrespective of where the code
that initiates the swap resides; (iv) if LS0 and LS1 are part of the same zone and it is unlocked, the swap can
be initiated from code residing anywhere (including from the debugger).
10. Once swap is initiated, it will happen in the next cycle itself, subject to it meeting the security
requirements mentioned above. After initiation of a swap, application software shall check if the swap
was correctly configured by checking the LFUStatus.LS01Swap status register. Consistency between
LFUStatus.LS01Swap and LFUConfig.LS01Swap helps determine if the swap was correctly configured. If
LFUStatus.LS01Swap does not match LFUConfig.LS01Swap, LFUConfig.LS01Swap needs to be cleared by
user application code.
11. Since the logical address accessed by BGCRC will change with LS0/LS1 RAM memory swap, the computed
CRC values for these memories need to be updated after the LS0/LS1 RAM memory swap.
146 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 147
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
3.15 Software
3.15.1 INTERRUPT Examples
NOTE: These examples are located in the C2000Ware installation at the following location:
C2000Ware_VERSION#/driverlib/DEVICE_GPN/examples/CORE_IF_MULTICORE/interrupt
Cloud access to these examples is available at the following link: dev.ti.com C2000Ware Examples.
3.15.1.1 External Interrupts (ExternalInterrupt)
FILE: interrupt_ex1_external.c
This program sets up GPIO0 as XINT1 and GPIO1 as XINT2. Two other GPIO signals are used to trigger the
interrupt (GPIO10 triggers XINT1 and GPIO11 triggers XINT2). The user is required to externally connect these
signals for the program to work properly.
XINT1 input is synced to SYSCLKOUT.
XINT2 has a long qualification - 6 samples at 510*SYSCLKOUT each.
GPIO16 will go high outside of the interrupts and low within the interrupts. This signal can be monitored on a
scope.
Each interrupt is fired in sequence - XINT1 first and then XINT2
External Connections
• Connect GPIO10 to GPIO0. GPIO0 will be assigned to XINT1
• Connect GPIO11 to GPIO1. GPIO1 will be assigned to XINT2
Monitor GPIO16 with an oscilloscope. GPIO16 will be high outside of the ISRs and low within each ISR.
Watch Variables
• xint1Count for the number of times through XINT1 interrupt
• xint2Count for the number of times through XINT2 interrupt
• loopCount for the number of times through the idle loop
3.15.1.2 Multiple interrupt handling of I2C, SCI & SPI Digital Loopback
FILE: interrupt_ex2_with_i2c_sci_spi_loopback.c
This program is used to demonstrate how to handle multiple interrupts when using multiple communication
peripherals like I2C, SCI & SPI Digital Loopback all in a single example. The data transfers would be done with
FIFO Interrupts.
It uses the internal loopback test mode of these modules. Both the TX and RX FIFOs and their interrupts are
used. Other than boot mode pin configuration, no other hardware configuration is required.
A stream of data is sent and then compared to the received stream. The sent data looks like this for I2C and
SCI:
0000 0001
0001 0002
0002 0003
....
00FE 00FF
00FF 0000
etc..
The sent data looks like this for SPI:
0000 0001
0001 0002
0002 0003
....
FFFE FFFF
148 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
FFFF 0000
etc..
This pattern is repeated forever.
External Connections
• None
Watch Variables
• sDatai2cA - Data to send through I2C
• rDatai2cA - Received I2C data
• rDataPoint - Used to keep track of the last position in the receive I2C stream for error checking
• sDataspiA - Data to send through SPI
• rDataspiA - Received SPI data
• rDataPointspiA - Used to keep track of the last position in the receive SPI stream for error checking
• sDatasciA - SCI Data being sent
• rDatasciA - SCI Data received
• rDataPointA - Keep track of where we are in the SCI data stream. This is used to check the incoming data
3.15.1.3 CPU Timer Interrupt Software Prioritization
FILE: interrupt_ex3_sw_prioritization.c
This examples demonstrates the software prioritization of interrupts through CPU Timer Interrupts. Software
prioritization of interrupts is achieved by enabling interrupt nesting.
In this device, hardware priorities for CPU Timer 0, 1 and 2 are set as timer 0 being highest priority and timer 2
being lowest priority. This example configures CPU Timer0, 1, and 2 priority in software with timer 2 priority being
highest and timer 0 being lowest in software and prints a trace for the order of execution.
For most applications, the hardware prioritizing of the interrupts is sufficient. For applications that need custom
prioritizing, this example illustrates how this can be done through software.User specific priorities can be
configured in sw_prioritized_isr_level.h header file.
To enable interrupt nesting, following sequence needs to followed in ISRs. Step 1: Set the global priority: Modify
the IER register to allow CPU interrupts with a higher user priority to be serviced. Note: at this time IER has
already been saved on the stack. Step 2: Set the group priority: (optional) Modify the appropriate PIEIERx
register to allow group interrupts with a higher user set priority to be serviced. Do NOT clear PIEIER register bits
from another group other than that being serviced by this ISR. Doing so can cause erroneous interrupts to occur.
Step 3: Enable interrupts: There are three steps to do this: a. Clear the PIEACK bits b. Wait at least one cycle c.
Clear the INTM bit. Step 4: Run the main part of the ISR Step 5: Set INTM to disable interrupts. Step 6: Restore
PIEIERx (optional depending on step 2) Step 7: Return from ISR
Refer to below link on more details on Interrupt nesting in C28x devices: <C2000Ware>.html
External Connections
• None
Watch Variables
• traceISR - shows the order in which ISRs are executed.
3.15.1.4 EPWM Real-Time Interrupt
FILE: interrupt_ex4_epwm_realtime_interrupt.c
This example configures the ePWM1 Timer and increments a counter each time the ISR is executed. ePWM
interrupt can be configured as time critical to demonstrate real-time mode functionality and real-time interrupt
capability.
The example uses 2 LEDs - LED1 is toggled in the main loop and LED2 is toggled in the EPWM Timer
Interrupt. FREE_SOFT bits and DBGIER.INT3 bit must be set to enable ePWM1 interrupt to be time critical and
operational in real time mode after halt command
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 149
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
150 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 151
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
The device wakes up from the IDLE mode when the watchdog timer overflows, triggering an interrupt. A pre
scalar is set for the watchdog timer to change the counter overflow time.
GPIO1 is pulled high before entering the IDLE mode and is pulled low when in the wakeup ISR.
External Connections
• On device wakeup, the GPIO1 will be low and LED1 will start blinking
3.15.4.3 Low Power Modes: Device Standby Mode and Wakeup using GPIO
FILE: lpm_ex3_standbywake_gpio.c
This example puts the device into STANDBY mode. If the lowest possible current consumption in STANDBY
mode is desired, the JTAG connector must be removed from the device board while the device is in STANDBY
mode.
This example puts the device into STANDBY mode and then wakes up the device from STANDBY using an LPM
wakeup pin.
The pin GPIO0 is configured as the LPM wakeup pin to trigger a WAKEINT interrupt upon detection of a low
pulse. Initially, pull GPIO0 high externally. To wake device from STANDBY mode, pull GPIO0 low for at least
(2+QUALSTDBY), OSCLKS, then pull it high again.
The example then wakes up the device from STANDBY using GPIO0. GPIO0 wakes the device from STANDBY
mode when a low pulse (signal goes high->low->high)is detected on the pin. This pin must be pulsed by an
external agent for wakeup.
GPIO1 is pulled high before entering the STANDBY mode and is pulled low when in the wakeup ISR.
External Connections
• GPIO0 needs to be pulled low to wake up the device.
• On device wakeup, the GPIO1 will be low and LED1 will start blinking
3.15.4.4 Low Power Modes: Device Standby Mode and Wakeup using Watchdog
FILE: lpm_ex4_standbywake_watchdog.c
This example puts the device into STANDBY mode. If the lowest possible current consumption in STANDBY
mode is desired, the JTAG connector must be removed from the device board while the device is in STANDBY
mode.
This example puts the device into STANDBY mode then wakes up the device from STANDBY using watchdog
timer.
The device wakes up from the STANDBY mode when the watchdog timer overflows triggering an interrupt. In the
ISR, the GPIO1 is pulled low. the GPIO1 is toggled to indicate the device is out of STANDBY mode. A pre scalar
is set for the watchdog timer to change the counter overflow time.
GPIO1 is pulled high before entering the STANDBY mode and is pulled low when in the wakeup ISR.
External Connections
• On device wakeup, the GPIO1 will be low and LED1 will start blinking
3.15.4.5 Low Power Modes: Halt Mode and Wakeup using GPIO
FILE: lpm_ex5_haltwake_gpio.c
This example puts the device into HALT mode. If the lowest possible current consumption in HALT mode is
desired, the JTAG connector must be removed from the device board while the device is in HALT mode.
For applications that require minimal power consumption during HALT mode, application software should power
off the XTAL prior to entering HALT by setting the XTALCR.OSCOFF bit or by using the driverlib function
SysCtl_turnOffOsc(SYSCTL_OSCSRC_XTAL);. If the OSCCLK source is configured to be XTAL, the application
should first switch the OSSCLK source to INTOSC1 or INTOSC2 prior to setting XTALCR.OSCOFF.
152 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
This example puts the device into HALT mode and then wakes up the device from HALT using an LPM wakeup
pin.
The pin GPIO0 is configured as the LPM wakeup pin to trigger a WAKEINT interrupt upon detection of a low
pulse.The GPIO0 pin must be pulled from high to low by an external agent for wakeup.
GPIO1 is pulled high before entering the STANDBY mode and is pulled low when in the wakeup ISR.
External Connections
• On device wakeup, the GPIO1 will be low and LED1 will start blinking
3.15.4.6 Low Power Modes: Halt Mode and Wakeup
FILE: lpm_ex6_haltwake_gpio_watchdog.c
This example puts the device into HALT mode. If the lowest possible current consumption in HALT mode is
desired, the JTAG connector must be removed from the device board while the device is in HALT mode.
For applications that require minimal power consumption during HALT mode, application software should power
off the XTAL prior to entering HALT by setting the XTALCR.OSCOFF bit or by using the driverlib function
SysCtl_turnOffOsc(SYSCTL_OSCSRC_XTAL);. If the OSCCLK source is configured to be XTAL, the application
should first switch the OSSCLK source to INTOSC1 or INTOSC2 prior to setting XTALCR.OSCOFF.
This example puts the device into HALT mode and then wakes up the device from HALT using an LPM wakeup
pin.
The pin GPIO0 is configured as the LPM wakeup pin to trigger a WAKEINT interrupt upon detection of a low
pulse.The GPIO0 pin must be pulled from high to low by an external agent for wakeup.
In this example, the watchdog timer is clocked, and is configured to produce watchdog reset as a timeout
mechanism.
GPIO1 is pulled high before entering the STANDBY mode and is pulled low when in the wakeup ISR.
External Connections
• On device wakeup, the GPIO1 will be low and LED1 will start blinking
3.15.5 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.5.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.
Test functions used in this example
• generateMasterCPUWrViolation -
– This test configures Memconfig to block CPU writes to GS0 RAM. A write attempt to this memory location
by CPU causes RAM_ACC_VIOL Interrupt
• generateECCMemCorrError
– This test induces single bit ECC error in LS6 RAM. A read from the corrupted memory location causes
INT_RAM_CORR_ERR Interrupt
• generateECCMemUncorrError
– This test induces double bit ECC error in LS7 RAM. A read from the corrupted memory location causes
NMI
• forceNonMasterDMAReadViolation
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 153
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
– This forces a DMA access violation using MemCfg_forceViolationInterrupt API. This casuses
RAM_ACC_VIOL Interrupt
External Connections
• None
Watch Variables
• testStatusGlobal - Equivalent to TEST_PASS if test finished correctly, else the value is set to TEST_FAIL
• errCountGlobal - Error counter
3.15.6 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.
3.15.6.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 generates 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
154 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
CPUTIMER_REG
CpuTimer0Regs CPUTIMER0_BASE 0x0000_0C00 YES - - - -
S
CPUTIMER_REG
CpuTimer1Regs CPUTIMER1_BASE 0x0000_0C08 YES - - - -
S
CPUTIMER_REG
CpuTimer2Regs CPUTIMER2_BASE 0x0000_0C10 YES - - - -
S
PIE_CTRL_REG
PieCtrlRegs PIECTRL_BASE 0x0000_0CE0 YES - - - -
S
PIE_VECT_TABL
PieVectTable PIEVECTTABLE_BASE 0x0000_0D00 YES - - - -
E
WdRegs WD_REGS WD_BASE 0x0000_7000 YES - - - YES
NMI_INTRUPT_R
NmiIntruptRegs NMI_BASE 0x0000_7060 YES - - - YES
EGS
XintRegs XINT_REGS XINT_BASE 0x0000_7070 YES - - - YES
SYNC_SOC_RE
SyncSocRegs SYNCSOC_BASE 0x0000_7940 YES - - - YES
GS
DMA_CLA_SRC_
DmaClaSrcSelRegs DMACLASRCSEL_BASE 0x0000_7980 YES - - - YES
SEL_REGS
LfuRegs LFU_REGS LFU_BASE 0x0000_7FE0 YES - - YES YES
DEV_CFG_REG
DevCfgRegs DEVCFG_BASE 0x0005_D000 YES - - - YES
S
ClkCfgRegs CLK_CFG_REGS CLKCFG_BASE 0x0005_D200 YES - - - YES
CpuSysRegs CPU_SYS_REGS CPUSYS_BASE 0x0005_D300 YES - - - YES
SYS_STATUS_R
SysStatusRegs SYSSTAT_BASE 0x0005_D400 YES - - - YES
EGS
PERIPH_AC_RE
PeriphAcRegs PERIPHAC_BASE 0x0005_D500 YES - - - YES
GS
MEM_CFG_REG
MemCfgRegs MEMCFG_BASE 0x0005_F400 YES - - - YES
S
ACCESS_PROT ACCESSPROTECTION_B
AccessProtectionRegs 0x0005_F500 YES - - - YES
ECTION_REGS ASE
MEMORY_ERRO
MemoryErrorRegs MEMORYERROR_BASE 0x0005_F540 YES - - - YES
R_REGS
TEST_ERROR_R
TestErrorRegs TESTERROR_BASE 0x0005_F590 YES - - - YES
EGS
UidRegs UID_REGS UID_BASE 0x0007_0200 YES - - - -
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 155
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 3-18 shows the codes that are used for
access types in this section.
Table 3-18. 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
156 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 157
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 HICWRITE HICREAD DMAREAD RESERVED RESERVED
R-0h R-0h 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
158 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 159
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 HICWRITE HICREAD DMAREAD RESERVED RESERVED
R-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
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
160 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 161
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 HICWRITE HICREAD DMAREAD RESERVED RESERVED
R-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
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
162 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 163
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 HICWRITE HICREAD DMAREAD RESERVED RESERVED
R-0h R/W-0h R/W-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
164 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 165
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
166 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 167
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
168 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 169
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
170 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 171
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
172 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 173
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 HICAWRITE DMAWRITE CPUWRITE CPUFETCH
R-0h R-0h R-0h R-0h R-0h
174 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 HICAWRITE DMAWRITE CPUWRITE CPUFETCH
R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 175
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 HICAWRITE DMAWRITE CPUWRITE CPUFETCH
R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
176 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 HICAWRITE DMAWRITE CPUWRITE CPUFETCH
R-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 177
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
178 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 179
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
180 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 181
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
182 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 183
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 3-42 shows the codes that are used for
access types in this section.
Table 3-42. 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
W1C W Write
1C 1 to clear
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
184 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 185
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED XTALCR
R-0-0h R/WSonce-0h
15 14 13 12 11 10 9 8
LOSPCP RESERVED RESERVED AUXCLKDIVSE SYSCLKDIVSE RESERVED RESERVED RESERVED
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
RESERVED SYSPLLMULT RESERVED RESERVED 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
186 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 187
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 WDHALTI RESERVED INTOSC2OFF RESERVED OSCCLKSRCSEL
R-0-0h R/W-0h R/W-0h R/W-0h R-0-0h R/W-0h
188 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 189
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED
R-0-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED MCANABCLKSEL RESERVED
R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED CANABCLKSEL RESERVED
R/W-0h R/W-0h R/W-0h R/W-0h
190 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 191
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 RESERVED PLLCLKEN PLLEN
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
192 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 193
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 REF_LOSTS RESERVED SLIPS LOCKS
R-0-0h R-1h R-1h W1C-0h R-0h R-0h R-0h
194 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 PLLSYSCLKDI
V_LSB
R-0-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED PLLSYSCLKDIV
R-0-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 195
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED MCANCLKDIV RESERVED RESERVED
R-0-0h R/W-13h R-0-0h R/W-1h
196 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 197
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
198 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 RESERVED RESERVED
R-0-0h R/W-0h R-0/W1S-0h
7 6 5 4 3 2 1 0
RESERVED SYSREF_LOST SYSREF_LOST SYSREF_LOST OSCOFF MCLKOFF MCLKCLR MCLKSTS
_MCD_EN SCLR S
R-0h R/W-0h R-0/W1S-0h R-0h R/W-0h R/W-0h R-0/W1S-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 199
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
200 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED X1CNT
R-0-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 201
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 SE OSCOFF
R-0-0h R/W-1h R/W-0h R/W-1h
202 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED FEN XOF XIF
R-0-0h R/W-0h R/W-1h R/W-1h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 203
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 DCC1_ERROR DCC0_ERROR
_EN _EN
R-0-0h R/W-0h R/W-0h
204 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-60 shows the codes that are used for
access types in this section.
Table 3-60. CPU_SYS_REGS Access Type Codes
Access Type Code Description
Read Type
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 205
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
206 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 RESERVED 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 RESERVED 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 207
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
208 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 209
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 PCLKCR27 PCLKCR26 PCLKCR25 RESERVED
R-0-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
210 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 211
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED 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-0-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
212 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 213
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED
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
214 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 215
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 RESERVED 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
216 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 EQEP2 EQEP1
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 217
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
218 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 SCI_B SCI_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 219
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 RESERVED RESERVED SPI_B SPI_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
220 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 221
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 RESERVED CAN_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
222 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 ADC_C ADC_B ADC_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 223
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 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
224 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED RESERVED RESERVED 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 RESERVED RESERVED RESERVED RESERVED
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 225
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 CLB4 CLB3 CLB2 CLB1
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
226 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 FSIRX_A FSITX_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 227
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 LIN_B LIN_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
228 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 229
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 DCC1 DCC0
R-0-0h R/W-0h R/W-0h
230 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 HICA
R-0-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 231
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 AESA
R-0-0h R/W-0h
232 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 EPG1
R-0-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 233
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 XRSn CPU1RSn
R-0-0h R-0/W1S-0h R-0/W1S-0h
234 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 235
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
236 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 237
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
238 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 RESERVED GPIO37 RESERVED 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 239
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
240 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 241
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
242 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 RESERVED SCCRESETn
Sn U1RSn
R-0-0h W1C-0h W1C-0h R-0-0h W1S-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED HWBISTn RESERVED NMIWDRSn WDRSn XRSn POR
R-0-0h W1S-0h W1S-0h R-0-0h W1S-0h W1S-0h W1S-0h W1S-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 243
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
244 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 RESERVED SCCRESETn
Sn U1RSn
R-0-0h R-0h R-0h R-0-0h R-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED HWBISTn RESERVED NMIWDRSn WDRSn XRSn POR
R-0-0h R-0h R-0h R-0-0h R-0h R-0h R-1h R-1h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 245
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
246 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 247
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
248 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 RESERVED MCAN_A
R-0-0h R-0-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED
R-0-0h R/W-0h R/W-0h R-0-0h R/W-0h R-0-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 249
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 MCAN_A
R-0-0h R-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED
R-0-0h R-0h R-0h R-0-0h R-0h R-0-0h R-0h
250 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-96 shows the codes that are used for
access types in this section.
Table 3-96. 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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 251
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
252 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 253
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
RESERVED TRB TSS RESERVED
R-0h R/W-0h R/W-0h R-1h
254 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 255
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
TDDR
R/W-0h
256 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
7 6 5 4 3 2 1 0
TDDRH
R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 257
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
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. 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
258 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 259
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
FLASH_SIZE
R-X
15 14 13 12 11 10 9 8
RESERVED INSTASPIN RESERVED RESERVED PIN_COUNT
R-0h R-X R-0h R-X R-X
7 6 5 4 3 2 1 0
QUAL RESERVED RESERVED RESERVED
R-X R-0h R-0h R-0h
260 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FAMILY RESERVED RESERVED
R-5h R-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 261
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
262 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 263
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 CPU1_CLA1BG CPU1_CPUBG RESERVED
CRC CRC
R-0-0h R/W-0h R/W-0h R-0-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED RESERVED CPU1_CLA1
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
264 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 265
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
266 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 RESERVED RESERVED 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 267
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 EQEP2 EQEP1
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
268 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 269
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 SCI_B SCI_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
270 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 RESERVED RESERVED SPI_B SPI_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 271
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
272 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 MCAN_A RESERVED RESERVED RESERVED CAN_A
R-X R-X R-X R-X R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 273
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 ADC_C ADC_B ADC_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
274 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 RESERVED 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 275
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED RESERVED 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 RESERVED RESERVED RESERVED RESERVED
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
276 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-X
15 14 13 12 11 10 9 8
RESERVED
R-X
7 6 5 4 3 2 1 0
RESERVED CLB4 CLB3 CLB2 CLB1
R-X R/W-0h R/W-0h R-X R-X
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 277
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-X
15 14 13 12 11 10 9 8
RESERVED
R-X
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED FSIRX_A FSITX_A
R-X R/W-0h R/W-0h R-X R-X
278 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 LIN_B LIN_A
R-0-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 279
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-X
15 14 13 12 11 10 9 8
RESERVED
R-X
7 6 5 4 3 2 1 0
RESERVED RESERVED PMBUS_A
R-X R-X R-X
280 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 DCC1 DCC0
R-0-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 281
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 HIC_A
R-0-0h R/W-0h
282 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 AESA
R-0-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 283
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 EPG1
R-0-0h R/W-0h
284 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
TAP_STATE
R-0h
7 6 5 4 3 2 1 0
TAP_STATE
R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 285
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
RESERVED TYPE
R-0-0h R/W-0h
286 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
7 6 5 4 3 2 1 0
RESERVED TYPE
R-0-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 287
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 3-132 shows the codes that are used for
access types in this section.
Table 3-132. 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.
288 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 CLA1TASKSRC CLA1TASKSRC
SEL2 SEL1
R-0-0h R/WSonce-0h R/WSonce-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 289
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 DMACHSRCSE DMACHSRCSE
L2 L1
R-0-0h R/WSonce-0h R/WSonce-0h
290 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 291
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
292 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 293
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
294 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-140 shows the codes that are used for
access types in this section.
Table 3-140. MEM_CFG_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 295
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
296 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 RESERVED LOCK_M1 LOCK_M0
R-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 297
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 RESERVED COMMIT_M1 COMMIT_M0
R-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
298 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED RESERVED RESERVED
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 299
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 TEST_M1 TEST_M0
R/W-0h R/W-0h R/W-0h R/W-0h
300 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 RESERVED INIT_M1 INIT_M0
R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 301
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 RESERVED INITDONE_M1 INITDONE_M0
R-0h R-0h R-0h R-0h R-0h
302 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED RESE RESE M1 M0
RVED RVED
R-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 303
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
304 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 305
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
306 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 307
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
308 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 309
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
310 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 311
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
312 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 313
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
314 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 315
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
316 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 317
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
318 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 319
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
320 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 321
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
322 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED
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
RESERVED RESERVED RESERVED RESERVED 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 323
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
324 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED 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
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED RESERVED 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 325
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
326 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED HICWRPROT_ DMAWRPROT_ CPUWRPROT_ FETCHPROT_
GS2 GS2 GS2 GS2
R-0h R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED HICWRPROT_ DMAWRPROT_ CPUWRPROT_ FETCHPROT_
GS1 GS1 GS1 GS1
R-0h R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED HICWRPROT_ DMAWRPROT_ CPUWRPROT_ FETCHPROT_
GS0 GS0 GS0 GS0
R-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 327
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
328 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED RESERVED RESERVED RESERVED
R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED RESERVED
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 329
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
330 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED
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
RESERVED RESERVED RESERVED RESERVED 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 331
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
332 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED RESERVED INITDONE_GS INITDONE_GS INITDONE_GS INITDONE_GS
3 2 1 0
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 333
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
334 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED
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
RESERVED RESERVED RESERVED RESERVED 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 335
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 RESERVED RESERVED
R-0h R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED LOCK_DMATO LOCK_CLA1TO RESERVED RESERVED LOCK_CLA1TO LOCK_CPUTO RESERVED
CLA1 DMA CPU CLA1
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
336 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED RESERVED RESERVED
R-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
7 6 5 4 3 2 1 0
RESERVED COMMIT_DMA COMMIT_CLA1 RESERVED RESERVED COMMIT_CLA1 COMMIT_CPU RESERVED
TOCLA1 TODMA TOCPU TOCLA1
R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 337
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
338 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED RESERVED RESERVED RESERVED
R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED 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 RESERVED
R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 339
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
340 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED RESERVED RESERVED
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
RESERVED INIT_DMATOCL INIT_CLA1TOD RESERVED RESERVED INIT_CLA1TOC INIT_CPUTOCL RESERVED
A1 MA PU A1
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 341
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 RESERVED RESERVED
R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
RESERVED INITDONE_DM INITDONE_CL RESERVED RESERVED INITDONE_CL INITDONE_CP RESERVED
ATOCLA1 A1TODMA A1TOCPU UTOCLA1
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
342 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 RESERVED RESERVED RESERVED RESERVED
R-0h R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED DMATOCLA1 CLA1TODMA RESERVED RESERVED CLA1TOCPU CPUTOCLA1 RESERVED
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 343
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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_CLAPR LOCK_CLADAT LOCK_SECUR LOCK_BOOTR
OGROM AROM EROM OM
R-0h R/W-0h R/W-0h R/W-0h R/W-0h
344 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
TEST_CLAPROGROM TEST_CLADATAROM TEST_SECUREROM TEST_BOOTROM
R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 345
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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_CLAP FORCE_CLAD FORCE_SECU FORCE_BOOT
ROGROM_ER ATAROM_ERR REROM_ERRO ROM_ERROR
ROR OR R
R-0h R/W-0h R/W-0h R/W-0h R/W-0h
346 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-175 shows the codes that are used for
access types in this section.
Table 3-175. 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 347
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
348 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 HICARDERR RESERVED RESERVED CLA1RDERR DMARDERR CPURDERR
R-0h R-0h R-0h R-0h R-0h R-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 349
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 HICARDERR RESERVED RESERVED CLA1RDERR DMARDERR CPURDERR
R-0h R-0/W1S-0h R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
350 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 HICARDERR RESERVED RESERVED CLA1RDERR DMARDERR CPURDERR
R-0h R-0/W1S-0h R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 351
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
352 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 353
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
354 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 355
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 HICRDERR RESERVED RESERVED CLA1RDERR DMARDERR CPURDERR
R-0h R-0h R-0h R-0h R-0h R-0h R-0h
356 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 HICRDERR RESERVED RESERVED CLA1RDERR DMARDERR CPURDERR
R-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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 357
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 HICRDERR RESERVED RESERVED CLA1RDERR DMARDERR CPURDERR
R-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
358 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 359
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
360 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 361
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
362 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 363
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 CEINTFLAG
R-0h R-0h
364 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 CEINTCLR
R-0h R-0/W1S-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 365
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 CEINTSET
R-0h R-0/W1S-0h
366 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 CEINTEN
R-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 367
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
368 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-197 shows the codes that are used for
access types in this section.
Table 3-197. 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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 369
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
RESERVED NMIE
R-0h R/W1S-0h
370 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
7 6 5 4 3 2 1 0
SYSDBGNMI RESERVED RESERVED CPU1HWBISTE FLUNCERR RAMUNCERR CLOCKFAIL NMIINT
RR
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 371
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
372 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
7 6 5 4 3 2 1 0
SYSDBGNMI RESERVED RESERVED CPU1HWBISTE FLUNCERR RAMUNCERR CLOCKFAIL NMIINT
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 373
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
374 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
7 6 5 4 3 2 1 0
SYSDBGNMI RESERVED RESERVED CPU1HWBISTE FLUNCERR RAMUNCERR CLOCKFAIL RESERVED
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-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 375
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
376 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
7 6 5 4 3 2 1 0
NMIWDCNT
R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 377
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
NMIWDPRD
R/W-FFFFh
378 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
7 6 5 4 3 2 1 0
SYSDBGNMI RESERVED RESERVED CPU1HWBISTE FLUNCERR RAMUNCERR CLOCKFAIL RESERVED
RR
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 379
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
380 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
7 6 5 4 3 2 1 0
RESERVED PINSTS ERROR
R-0h R-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 381
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
RESERVED ERROR
R-0h R-0/W1S-0h
382 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
7 6 5 4 3 2 1 0
RESERVED ERROR
R-0h R-0/W1S-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 383
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
RESERVED ERRORPOLSE
L
R-0h R/W-0h
384 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
7 6 5 4 3 2 1 0
RESERVED ERRORCTL
R-0h R/WSonce-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 385
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
386 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-211 shows the codes that are used for
access types in this section.
Table 3-211. PERIPH_AC_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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 387
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
388 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 389
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
390 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 391
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
392 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 393
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
394 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 395
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
396 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 397
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
398 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 399
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
400 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 401
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
402 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 403
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
404 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 405
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
406 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 407
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
408 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 409
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
410 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 411
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC RESERVED CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
412 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC RESERVED CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 413
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC RESERVED CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
414 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC RESERVED CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 415
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC RESERVED RESERVED CPU1_ACC
R/W-3h R-0-0h R/W-3h R/W-3h
416 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC RESERVED RESERVED CPU1_ACC
R/W-3h R-0-0h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 417
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
418 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 419
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC RESERVED RESERVED CPU1_ACC
R/W-3h R-0-0h R/W-3h R/W-3h
420 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC RESERVED RESERVED CPU1_ACC
R/W-3h R-0-0h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 421
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
422 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 423
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
424 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC DMA1_ACC RESERVED CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 425
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC RESERVED RESERVED CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
426 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 427
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
428 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
HICA_ACC DMA1_ACC CLA1_ACC CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 429
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 CPU1_ACC
R/W-3h R/W-3h R/W-3h R/W-3h
430 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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/W-3h R/W-3h R/W-3h R/W-3h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 431
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 LOCK_AC_WR
R-0-0h R/WSonce-0h
432 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-258 shows the codes that are used for
access types in this section.
Table 3-258. 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 433
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
434 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
7 6 5 4 3 2 1 0
PIEVECT ENPIE
R-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 435
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
436 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 437
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
438 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 439
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
440 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 441
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
442 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 443
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
444 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 445
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
446 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 447
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
448 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 449
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
450 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 451
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
452 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 453
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
454 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 455
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
456 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 457
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
458 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 459
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
460 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 461
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
462 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 463
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
464 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 465
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
466 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 467
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
468 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 469
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
470 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 471
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
472 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-286 shows the codes that are used for
access types in this section.
Table 3-286. 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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 473
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED
R-0-0h R/W-7h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED RESERVED
R/W-7h R/W-7h R/W-7h R/W-7h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED
R/W-7h R/W-7h R/W-7h
474 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 475
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
RESERVED RESERVED RESERVED RESERVED RESERVED
R-0-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
476 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 477
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 ADCSOCOUTS SYNCSELECT
ELECT
R-0-0h R/WSonce-0h R/WSonce-0h
478 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-291 shows the codes that are used for
access types in this section.
Table 3-291. 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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 479
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 RESERVED EPG1_INT AES_BUS_ER RESERVED RESERVED
ROR
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED GINT
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
480 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED RESERVED EPG1_INT AES_BUS_ER RESERVED RESERVED
ROR
R-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
RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED GINT
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 481
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 RESERVED EPG1_INT AES_BUS_ER RESERVED RESERVED
ROR
R-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
RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED
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
482 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 483
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 RESERVED EPG1_INT AES_BUS_ER RESERVED RESERVED
ROR
R-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
RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R-0h
484 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 485
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 3-297 shows the codes that are used for
access types in this section.
Table 3-297. 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.
486 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 487
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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-0/W1S-0h R-0/W1S-0h
488 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 489
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 3-302 shows the codes that are used for
access types in this section.
Table 3-302. 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.
490 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 491
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
492 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 493
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
494 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 495
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
496 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 497
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
498 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-312 shows the codes that are used for
access types in this section.
Table 3-312. 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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 499
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
RESERVED WDINTS WDENINT WDOVERRIDE
R-0-0h R-1h R/W-0h R/W1C-1h
500 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
7 6 5 4 3 2 1 0
WDCNTR
R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 501
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
WDKEY
R/W-0h
502 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 503
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
504 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
7 6 5 4 3 2 1 0
MIN
R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 505
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 3-319 shows the codes that are used for
access types in this section.
Table 3-319. 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.
506 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 507
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
508 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 509
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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
510 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 511
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
INTCTR
R-0h
512 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
7 6 5 4 3 2 1 0
INTCTR
R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 513
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
7 6 5 4 3 2 1 0
INTCTR
R-0h
514 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
Complex bit access types are encoded to fit into small table cells. Table 3-329 shows the codes that are used for
access types in this section.
Table 3-329. LFU_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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 515
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
23 22 21 20 19 18 17 16
RESERVED LS01Swap
R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED PieVectorSwap RESERVED RESERVED
R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED LFU_CLA1 RESERVED LFU_CPU
R/W-0h R/W-0h R/W-0h R/W-0h
516 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
23 22 21 20 19 18 17 16
RESERVED LS01Swap
R-0-0h R-0h
15 14 13 12 11 10 9 8
RESERVED PieVectorSwap RESERVED
R-0-0h R-0h R-0-0h
7 6 5 4 3 2 1 0
RESERVED
R-0-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 517
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
518 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 519
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
520 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 521
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
522 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 523
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
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 SWConfig2_PO SWConfig1_PO SWConfig2_XR SWConfig1_XR SWConfig2_SY SWConfig1_SY
RESETn RESETn Sn Sn SRSn SRSn
R-0-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
RESERVED LFUConfig
R-0-0h R/W-0h
524 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com 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 SWConfig2_PO SWConfig1_PO SWConfig2_XR SWConfig1_XR SWConfig2_SY SWConfig1_SY
RESETn RESETn Sn Sn SRSn SRSn
R-0-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
RESERVED LFUConfig
R-0-0h R/WSonce-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 525
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
526 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 527
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
528 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 529
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
530 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 531
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
532 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 533
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
534 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 535
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
536 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 537
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
538 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 539
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
540 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 541
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
542 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 543
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
544 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com System Control and Interrupts
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 545
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
System Control and Interrupts www.ti.com
546 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Chapter 4
ROM Code and Peripheral Booting
This chapter explains the boot procedure, the available boot modes, and the various details of the ROM code
including memory maps, initializations, reset handling, and status information.
4.1 Introduction...............................................................................................................................................................548
4.2 ROM Related Collateral............................................................................................................................................548
4.3 Device Boot Sequence.............................................................................................................................................549
4.4 Device Boot Modes.................................................................................................................................................. 549
4.5 Device Boot Configurations.................................................................................................................................... 550
4.6 Device Boot Flow Diagrams.................................................................................................................................... 555
4.7 Device Reset and Exception Handling................................................................................................................... 559
4.8 Boot ROM Description............................................................................................................................................. 560
4.9 Application Notes for Using the Bootloaders........................................................................................................588
4.10 Software.................................................................................................................................................................. 592
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 547
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
4.1 Introduction
The purpose of this chapter is to explain the boot read-only memory (ROM) code functionality for the CPU core,
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 initializes the device to run the application
code. For the CPU, the boot ROM also contains peripheral bootloaders that can be used to load an application
into RAM. These bootloaders can be disabled for safety or security purposes.
See Table 4-1 for details on available boot features for the C28x CPU. Additionally, Table 4-2 shows the sizes of
the various ROMs on the device.
For details on the security APIs provided, refer to Section 4.8.10.
Various tables are provided in ROM for use in software library, refer to Section 4.8.7 for more details.
Table 4-1. Boot System Overview
Boot Feature CPU
Initial boot process Device reset
Boot mode selection GPIOs
Boot modes supported Flash boot
Secure Flash boot
RAM boot
Live firmware update (LFU) boot
Peripheral boot loaders supported Parallel IO
SCI / Wait
CAN
CAN-FD
I2C
SPI
Foundational Materials
• Bootloading 101 (Video)
Expert Materials
• C2000 Software Controlled Firmware Update Process Application Report
548 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
(1) SCI boot mode is used as a wait boot mode as long as SCI continues to wait for an 'A' or 'a' during the SCI autobaud lock process.
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 boot modes.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 549
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
550 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Note
When using Z2-OTP-BOOTPIN-CONFIG, the configurations programmed in this location take
priority over the configurations in Z1-OTP-BOOTPIN-CONFIG. It is recommended to use Z1-OTP-
BOOTPIN-CONFIG first and then if OTP configurations need to be altered, switch to using Z2-OTP-
BOOTPIN-CONFIG.
Note
GPIO 20, 21, 224 to 253 are analog pins, but digital inputs are possible on these pins provided the
software writes to the GPIOHAMSEL register bits.
The following GPIOs cannot be used as a BMSP. If selected for a particular BMSP, the boot ROM will
automatically select the factory default GPIOs for BMSP0 and BMSP1. Factory default for BMSP2 is
0xFF, which disables the BMSP.
• GPIO 36 and GPIO 38 (Not available on any package)
• GPIO 62 to GPIO 223 (Not available on any package)
• GPIO 20 and GPIO 21 are analog pins on 80-pin package only
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 551
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
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.
552 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Note
The locations Z2-OTP-BOOTDEF-LOW and Z2-OTP-BOOTDEF-HIGH will be used instead of Z1-
OTP-BOOTDEF-LOW and Z1-OTP-BOOTDEF-HIGH locations when Z2-OTP-BOOTPIN-CONFIG is
configured. Refer to Section 4.5.1 for more details on BOOTPIN_CONFIG usage.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 553
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
554 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Note
BOR follows same flow as POR.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 555
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
Security (SCC)
NMI Watchdog HWBIST POR XRS Debugger Watchdog
Reset
Note: Any resets that also cause the XRS reset bit to be set (excluding
CPU Boot Start
POR) will follow the flow relating to an XRS reset.
Value
FUSE Single Bit
is Yes
Error? Error?
Branch to Application zero
Yes
Disable wdg No
HWBIST, SCC, or
Debugger Reset Wait for
Timeout
Device Configuration
- PARTIDH/L Load
Initialize all of boot ROM stack space
XRS Reset Cause - DCX Load Set pump and bank power mode to Flash Powered up/
in M0RAM to zero
- CPUROM DCx Load active Timeout expired
- Package bonding config
Flash powered up
POR
POR
Capture any single bit flash Enable PLL and switch PLL O/P to
error addresses PBIST Enabled drive sysclk (TI OTP flag)
Verify RAM init
Field in
Is complete
GPREG2
=0x5A
Set flash pump wakeup time and wait
states for 120MHz
RAM Init complete
(delay if not complete)
Disabled
Check Z2/Z1 ROM
GPREG2 key integrity check
with BGCRC Run PBIST Memory Test
Adjust PLL clock as Passed (log staus)
configured in OTP
Any other value RAM Initialization (all RAMs)
(Wait for M0 RAM init)
Failed
Device
Calibration (ROM Code)
Wait of RAMInit
Completion (give error
status on timeout)
Is Debugger
Standalone Boot No Yes Emulation Boot
Connected?
556 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Emulate Check
Unsupported Wait
Standalone (=0xA5) EMU_BOOTPIN_C
ONFIG_KEY
Key Boot
Boot
(=0x5A)
Decode Unsupported
BOOTDEF options Boot Wait Boot
for boot mode mode
Supported
Boot mode
Is Flash /
Secure Flash /
LFU Flash Yes
Boot?
No
Enable
Watchdog
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 557
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
Check
Any
Z2 Read OTP loaded registers:
Other
OTP_BOOTPIN_C Z1-BOOTPINCONFIG
value
ONFIG_KEY
Check
Any
Z1 Read factory default two boot
Other
OTP_BOOTPIN_C mode GPIO pins
(=0x5A) Value
ONFIG_KEY
(=0x5A)
Decode boot mode from pins
Use Z2 registers: Use Z1 registers:
Z2-BOOTPINCONFIG Z1-BOOTPINCONFIG
Z2-BOOTDEF Z1-BOOTDEF
Enable
Watchdog
Decode
Unsupported
BOOTDEF table
Boot mode Flash Boot Branch to
for boot mode
Application Code
Parallel Boot
SPI Boot
SCI Boot Supported
CAN Boot Boot mode
CAN-FD Boot
Flash Boot
Secure Flash Boot (C28x AES)
LFU Flash Boot Is Flash
Yes
Boot?
No
Enable
Watchdog
Branch to Branch to
Application Code Flash Entry Point
558 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
(1) 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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 559
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
560 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Note
Z1-GPREG2 shares ECC with Z1-GPREG1, so users can program both these locations at the same
time in User OTP.
(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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 561
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
During boot ROM execution, there are situations where the CPU can enter a wait loop in the code. This state
can occur for a variety of reasons. Table 4-19 details the address ranges that the CPU PC register value falls
between if the CPU has entered one of these instances.
Following are the actions for entering wait boot mode:
• Wait boot is set by the user as the boot mode.
• Boot mode is unrecognizable and a debugger is connected to the device.
• The emulation BOOTPIN_CONFIG key isn't equal to 0xA5 or 0x5A.
• An error occurs during emulation boot and the boot mode pins are decoded with a value not recognized as a
valid boot mode.
Table 4-19. Wait Point Addresses
Address Range Description
0x3FB8B9 – 0x3FB8C0 In Wait Boot Mode
0x3FC7D0 – 0x3FC7D8 In SCI Boot waiting on autobaud lock
0x3FEDFE – 0x3FEEC8 In NMI Handler
0x3FEEC9 – 0x3FEEF9 In ITRAP ISR
0x3FCB96 - 0x3FCB9A In Parallel boot waiting for control signal
562 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Note
Both the CMAC golden signature and CMAC key are stored in the most-significant double format, but
each 32-bit section is in little-endian format.
Key: 2B7E1516 28AED2A6 ABF71588 09CF4F3C
(MSB is 2B and LSB is 3C)
CMACKEY0 = 0x2B7E1516
CMACKEY1 = 0x28AED2A6
CMACKEY2 = 0xABF71588
CMACKEY3 = 0x09CF4F3C
Note
User must make sure that the Flash sector that encompasses the configured Flash entry point and the
first 16 KB of Flash is assigned to Zone 1 for the core setup for secure Flash boot.
Recommended to use device JTAGLOCK when using secure Flash boot.
APIs for CMAC calculation and authentication is provided as part of ROM. Details are available in Section 4.8.10
Table 4-20. Secure Flash Boot Details
Details Location Address
CMAC Signature Address Flash Entry Point Address + 0x2
CMAC Key Address (128-bit key) DCSM Z1 OTP CMACKEY0/1/2/3
Flash Entry Point (Bank 0, Sector 0) 0x0008 0000
Flash Entry Point (Bank 0, Sector 8) 0x0008 8000
Flash Entry Point (Bank 0, End of Sector 15) 0x0008 FFF0
Flash Entry Point (Bank 1, Sector 0) 0x0009 0000
Flash Entry Point (Bank 1, End of Sector 7) 0x0009 7FF0
Flash Entry Point (Bank 1, End of Sector 15) 0x0009 FFF0
Flash Entry Point (Bank 2, Sector 0) 0x000A 0000
Address Range for CMAC Calculation Start: Flash Entry Point Address
End: Flash Entry Point Address + 16 KB
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 563
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
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
.
.
.
}
564 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Application entry point: This is the code execution start address of the image stored in Flash.
Key: This 32-bit field determines if this image is valid. The image in a bank is considered valid only if the location
contains the value 0x5A5A5A5A. In case all banks have invalid keys, an error is flagged in boot_status variable
and program jumps to a while loop in standalone boot mode (ESTOP in emulation boot mode).
Firmware version number: This 32-bit field is the version number of the firmware or application. 0xFFFF FFFF
is considered as the initial value and this needs to be decremented after every update. The image with lower
version number is the latest application. If all valid images have same version number, then bank-0 (or the
lowest numbered bank) is chosen.
For example, if bank-0 has invalid Key and bank-1 and bank-2 have valid keys, then the one having lowest
Firmware version number is selected for boot. If both are the same, then bank-1 is selected.
Table 4-25 shows the entry points for LFU boot mode.
Table 4-25. LFU Entry Point Addresses
Option BOOTDEFx Value Bank 0 Bank 1 Bank 2
0 0x0B 0x0008 0000 0x0009 0000 0x000A 0000
1 0x2B 0x0008 8000 0x0009 8000 0x000A 8000
2 0x4B 0x0008 FFF0 0x0009 FFF0 0x000A FFF0
3 0x6B 0x0008 8000 0x0009 0000 0x000A 0000
4 0x8B 0x0008 EFF0 0x0009 7FF0 0x0008 7FF0
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 565
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
Note
In Table 4-28, Load refers to the memory addresses where the CPU can view the data. Run refers to
the CLA memory addresses that the CLA uses to access the data.
566 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 567
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
4.8.8.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 4.9.1.
4.8.8.2.1 SCI Boot Mode
The SCI boot mode asynchronously transfers code from SCI-A to internal memory. This boot mode only
supports an incoming 8-bit data stream and follows the data flow as shown in Figure 4-4.
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.
568 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 569
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
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, you can specify a change in baud
rate or low-speed peripheral clock. Table 4-33 shows the 8-bit data stream used by the SPI.
Table 4-33. 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
570 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 is:
1. The SPI-A port is initialized.
2. The GPIO pin, as defined by SPI option configured from Table 4-43, 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 (LSB) of this word is the byte read first and the most-significant byte (MSB) 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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 571
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
572 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
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 it 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
4-34 shows the 8-bit data stream used by the I2C.
The I2C EEPROM protocol required by the I2C bootloader is shown in Figure 4-10 and Figure 4-11. The first
communication, which sets the EEPROM address pointer to 0x0000 and reads the KeyValue (0x08AA) from it, is
shown in Figure 4-10. All subsequent reads are shown in Figure 4-11 and are read two bytes at a time.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 573
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
574 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
NO ACK
START
WRITE
READ
STOP
MSB
MSB
ACK
ACK
ACK
ACK
ACK
LSB
LSB
SDA LINE
READ
STOP
ACK
ACK
SDA LINE
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 575
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
The control subsystem communicates with the external host device by polling/driving the Host Control and 28x
control lines. The handshake protocol shown in Figure 4-13 must be used to successfully transfer each word via
GPIO [D0:D7]. 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[D0:D7].
The 8-bit data stream is shown in Table 4-35.
Table 4-35. Parallel GPIO Boot 8-Bit Data Stream
Bytes GPIO[D0:D7] GPIO[D0:D7] 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
576 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
The device first signals the host that the device is ready to begin data transfer by pulling the C28x control pin
low. The host load then initiates the data transfer by pulling the DSP control pin low. The complete protocol is
shown in Figure 4-13.
1. The device indicates the device is ready to start receiving data by pulling the C28x control pin low.
2. The bootloader waits until the host puts data on GPIO [D0:D7]. The host signals to the device that data is
ready by pulling the host control pin low.
3. The device reads the data and signals the host that the read is complete by pulling C28x control high.
4. The bootloader waits until the host acknowledges the device by pulling host control high.
5. The device again indicates the device is ready for more data by pulling the C28x control pin low.
This process is repeated for each data value to be sent.
Figure 4-14 shows an overview of the Parallel GPIO bootloader flow.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 577
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
Figure 4-15 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.
Figure 4-16 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 4-16, discards the upper eight bits of the first read from the port and treats
the lower eight bits masked with D7 in bit position 7 and D6 in bit position six 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 performs a second read to fetch the MSB and then combines the MSB and LSB into
a single 16-bit value to be passed back to the calling routine.
578 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 579
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
The bit timing registers are programmed in such a way that a 100-kbps bit rate is achieved with a 20-MHz
external oscillator, as shown in Table 4-36.
Table 4-36. 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 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 can
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 4-37.
580 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 581
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
582 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 583
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
584 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
Note
The application should disable interrupts before calling one of the EXEONLY function APIs.
If a vector fetch request is given by the CPU (C28) while its program counter (PC) is within
the EXEONLY function API code of the Secure ROM, a reset will fire (RSN if from C28). The
consequence of this is if an NMI or 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 will be fired to
the 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 will result in a failure status returned. Upon successful copy of the data, the
number of 16-bit words copied is returned.
Table 4-45. Secure Copy Code Function
CPU Function Prototype Function Parameters Function Return Value
uint16_t SecureCopyCodeZ1(uint32_t size : The number of 16-bit words to 0xXXXX : Returns the number of
size, uint16_t *dst, uint16_t *src) copy 16-bit words copied
uint16_t SecureCopyCodeZ2(uint32_t dst : The destination memory address 0x0000 : Indicates one of the
size, uint16_t *dst, uint16_t *src) in EXEONLY RAM following: Copy length is zero; Copy
CPU (C28x) size crosses over Flash sector
boundary; Flash and RAM don't
src : The source memory address in belong to the same zone; Flash and/or
EXEONLY Flash RAM aren't set to EXEONLY; Error
occurred during data copy
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 will be 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. Any violations of these requirements will result in a failure
status returned. Upon successful CRC, the number of 16-bit words CRC'd is returned.
Table 4-46. Secure CRC Calculation Function
CPU Function Prototype Function Parameters Function Return Value
len_id : A number from 1 to 8 which
uint16_t SecureCRCCalcZ1(uint16_t corresponds to length options of 32, 0xXXXX : Returns the number of
len_id, uint16_t *dst, uint16_t *src) 64, 128, 256, 512, 1024, 2048, or 16-bit words CRC'd
4096 16-bit words
uint16_t SecureCRCCalcZ2(uint16_t dst : The destination memory address 0x0000 : Indicates one of the
size, uint16_t *dst, uint16_t *src) for resulting CRC following: Invalid length option; Source
CPU (C28x) address isn't modulo of length value;
Destination address isn't within secure
RAM; CRC size crosses over Flash
src : The source memory address to sector or RAM block boundary; The
begin CRC calculation source and destination memory don't
belong to the same zone; On CM,
CRCLOCK is enabled
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 585
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
The CMAC calculate and compare function allows to calculate CMAC signature of a Flash memory block and
compare against a golden signature. This is used in the secure boot mode to authenticate the boot image.
Table 4-47. Secure CRC Calculation Function
CPU Function Prototype Function Parameters Function Return Value
uint32_t
CPU1BROM_calculateCMAC(uint32_t startAddress: Starting address of 0xFFFFFFFFU: Calculated CMAC
memory for which CMAC has to be signature did not match golden
startAddress, uint32_t endAddress, calculated signature (fail)
uint32_t signatureAddress)
endAddress: Ending address of 0xA5A5A5A5U: Memory range
CPU (C28x) memory for which CMAC has to be provided isn't aligned to 128-bit
calculated boundary or length is zero
signatureAddress: Address of
location where golden CMAC 0xE1E1E1E1U: AES Engine timed out
signature is stored
0x00000000U: No Error
Note
CPU performs clock configurations during boot up. If the PLL is used during the boot process, it will be
bypassed by the boot ROM code before branching to the user application.
586 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 587
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
588 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
The next two words tell the loader the destination address of the block of data. Following the size and address is
the 16-bit words that makeup that block of data.
This pattern of block size/destination address repeats for each block of data to be transferred. Once all the
blocks have been transferred, a block size of 0x0000 signals to the loader that the transfer is complete. At this
point, the loader returns the entry point address to the calling routine, which cleans up and exits. Execution then
continues at the entry point address as determined by the input data stream contents.
Table 4-54. LSB/MSB Loading Sequence in 8-Bit Data Stream
Contents
Byte LSB (First Byte of 2) MSB (Second Byte of 2)
1 2 LSB: AA (KeyValue for memory width = 8 bits) MSB: 08h (KeyValue for memory width = 8 bits)
3 4 LSB: Register initialization value or reserved MSB: Register initialization value or reserved
5 6 LSB: Register initialization value or reserved MSB: Register initialization value or reserved
7 8 LSB: Register initialization value or reserved MSB: Register initialization value or reserved
... ... ... ...
... ... ... ...
17 18 LSB: Register initialization value or reserved MSB: Register initialization value or reserved
19 20 LSB: Upper half of Entry point PC[23:16] MSB: Upper half of entry point PC[31:24] (Always 0x00)
21 22 LSB: Lower half of Entry point PC[7:0] MSB: Lower half of Entry point PC[15:8]
23 24 LSB: Block size in words of the first block to load. If MSB: block size
the block size is 0, this indicates the end of the source
program;.otherwise, another block follows. For example, a
block size of 0x000A indicates 10 words or 20 bytes in the
block.
25 26 LSB: MSW destination address, first block Addr[23:16] MSB: MSW destination address, first block Addr[31:24]
27 28 LSB: LSW destination address, first block Addr[7:0] MSB: LSW destination address, first block Addr[15:8]
29 30 LSB: First word of the first block being loaded MSB: First word of the first block being loaded
... ... ... ...
... ... ... ...
. . LSB: Last word of the first block to load MSB: Last word of the first block to load
. . LSB: Block size of the second block MSB: Block size of the second block
. . LSB: MSW destination address, second block Addr[23:16] MSB: MSW destination address, second block Addr[31:24]
. . LSB: LSW destination address, second block Addr[7:0] MSB: LSW destination address, second block Addr[15:8]
. . LSB: First word of the second block being loaded MSB: First word of the second block being loaded
... ... ... ...
... ... ... ...
. . LSB: Last word of the second block MSB: Last word of the second block
. . LSB: Block size of the last block MSB: Block size of the last block
. . LSB: MSW of destination address of last block Addr[23:16] MSB: MSW destination address, last block Addr[31:24]
. . LSB: LSW destination address, last block Addr[7:0] MSB: LSW destination address, last block Addr[15:8]
. . LSB: First word of the last block being loaded MSB: First word of the last block being loaded
... ... ... ...
... ... ... ...
. . LSB: Last word of the last block MSB: Last word of the last block
n n+1 LSB: 00h MSB: 00h - indicates the end of the source
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 589
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
590 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com ROM Code and Peripheral Booting
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 591
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
ROM Code and Peripheral Booting www.ti.com
4.10 Software
4.10.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.
592 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
Chapter 5
Dual Code Security Module (DCSM)
5.1 Introduction...............................................................................................................................................................594
5.2 Functional Description.............................................................................................................................................594
5.3 Flash and OTP Erase/Program................................................................................................................................601
5.4 Secure Copy Code....................................................................................................................................................601
5.5 SecureCRC................................................................................................................................................................602
5.6 CSM Impact on Other On-Chip Resources.............................................................................................................603
5.7 Incorporating Code Security in User Applications................................................................................................604
5.8 Software.................................................................................................................................................................... 609
5.9 DCSM Registers........................................................................................................................................................609
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 593
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
5.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.
The CSM has dual-zone security, Zone1 (Z1) and Zone2 (Z2).
5.1.1 DCSM Related Collateral
594 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 of these conditions for a RAM
block/Flash sector makes that RAM block/Flash sector inaccessible.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 595
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
596 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 597
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
5.2.5 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. JTAG passwords are split into two parts, JTAGPSWDH and JTAGPSWDL. JTAGPSWDH is
part of Z1 USER OTP header and JTAGPSWDL is part of Z1 Zone Select Block (ZSB). What this means
is program JTAGPSWDH once and change the JTAGPSWDL multiple times, if needed. Code Composer
Studio has an integrated tool that you need to use to unlock the JTAGLOCK on 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.
5.2.6 Link Pointer and Zone Select
For each of the two security zones, a dedicated OTP block exists 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
598 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
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 5-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).
Note
Address locations for other security settings that are not part of Zone Select blocks can be
programmed only once; therefore, you should program them towards end of the development cycle.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 599
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
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 will have to replace the device.
600 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
5.2.7 C Code Example to Get Zone Select Block Addr for Zone1
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 601
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
5.5 SecureCRC
Since reads from EXEONLY memories are not allowed, the user cannot calculate the CRC on content in
EXEONLY memories using the CRC engine available on this device (for example, VCUCRC, 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
The user 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.
602 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
Note
Security Initialization is done by BOOTROM code on all the resets (as part of device initialization) that
assert 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, you should not keep a memory window with USER OTP address opened
in the debugger (CCS) when performing a reset.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 603
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
604 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 605
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
volatile long int *CSM = (volatile long int *)5F090; //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 0x5F090
*CSM++ = 0x44443333; // Register Z1_CSMKEY1 at 0x5F092
*CSM++ = 0x66665555; // Register Z1_CSMKEY2 at 0x5F094
*CSM++ = 0x88887777; // Register Z1_CSMKEY3 at 0x5F096
606 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 607
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
volatile long int *ECSL = (volatile int *)0x5F090; //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 0x5F090
*ECSL++ = 0x44443333; // Register Z1_CSMKEY1 at 0x5F092
608 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
5.8 Software
5.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.
5.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
5.9 DCSM Registers
This section describes the various DCSM registers.
5.9.1 DCSM Base Address Table
Table 5-4. DCSM Base Address Table
Bit Field Name Pipeline
DriverLib Name Base Address CPU1 DMA HIC CLA
Instance Structure Protected
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 609
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 5-6 shows the codes that are used for
access types in this section.
Table 5-6. 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
Reset or Default Value
-n Value after reset or the default
value
610 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 611
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
612 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 613
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) 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 Z1_JLM_ENABLE
R-0h R-Fh
614 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED Z1_LINKPOINTERERR
R-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 615
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
616 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 617
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
618 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 619
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
620 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 621
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
622 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 623
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
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
624 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 625
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
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
626 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 627
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
628 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 629
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
630 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 631
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
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
632 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 633
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
634 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
23 22 21 20 19 18 17 16
RESERVED
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 635
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
636 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
23 22 21 20 19 18 17 16
EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA
NK1_SECT7 NK1_SECT6 NK1_SECT5 NK1_SECT4 NK1_SECT3 NK1_SECT2 NK1_SECT1 NK1_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
EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA
NK0_SECT15 NK0_SECT14 NK0_SECT13 NK0_SECT12 NK0_SECT11 NK0_SECT10 NK0_SECT9 NK0_SECT8
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA
NK0_SECT7 NK0_SECT6 NK0_SECT5 NK0_SECT4 NK0_SECT3 NK0_SECT2 NK0_SECT1 NK0_SECT0
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 637
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
638 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 639
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
640 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 641
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA
NK2_SECT15 NK2_SECT14 NK2_SECT13 NK2_SECT12 NK2_SECT11 NK2_SECT10 NK2_SECT9 NK2_SECT8
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA
NK2_SECT7 NK2_SECT6 NK2_SECT5 NK2_SECT4 NK2_SECT3 NK2_SECT2 NK2_SECT1 NK2_SECT0
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
642 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 643
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
644 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
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
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 645
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
646 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 647
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
648 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 649
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
650 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 651
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
652 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 653
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
654 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 5-36 shows the codes that are used for
access types in this section.
Table 5-36. 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
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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 655
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
656 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 657
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
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
658 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED Z2_LINKPOINTERERR
R-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 659
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
660 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 661
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
662 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 663
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
664 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 665
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
666 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 667
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
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
668 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 669
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
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
670 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 671
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
672 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 673
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
674 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 675
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
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
676 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 677
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
678 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
23 22 21 20 19 18 17 16
RESERVED
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 679
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
680 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
23 22 21 20 19 18 17 16
EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA
NK1_SECT7 NK1_SECT6 NK1_SECT5 NK1_SECT4 NK1_SECT3 NK1_SECT2 NK1_SECT1 NK1_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
EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA
NK0_SECT15 NK0_SECT14 NK0_SECT13 NK0_SECT12 NK0_SECT11 NK0_SECT10 NK0_SECT9 NK0_SECT8
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA
NK0_SECT7 NK0_SECT6 NK0_SECT5 NK0_SECT4 NK0_SECT3 NK0_SECT2 NK0_SECT1 NK0_SECT0
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 681
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
682 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 683
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
684 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 685
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA
NK2_SECT15 NK2_SECT14 NK2_SECT13 NK2_SECT12 NK2_SECT11 NK2_SECT10 NK2_SECT9 NK2_SECT8
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA EXEONLY_BA
NK2_SECT7 NK2_SECT6 NK2_SECT5 NK2_SECT4 NK2_SECT3 NK2_SECT2 NK2_SECT1 NK2_SECT0
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
686 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 687
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
688 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
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
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 689
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
690 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 5-57 shows the codes that are used for
access types in this section.
Table 5-57. 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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 691
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
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
692 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 693
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
694 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 695
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
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
696 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 697
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
698 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 699
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
700 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 701
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
23 22 21 20 19 18 17 16
RESERVED
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
702 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 703
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED ERR
R-0h R-0h
704 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 705
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
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
706 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 5-67 shows the codes that are used for
access types in this section.
Table 5-67. 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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 707
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
708 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 709
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
710 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 711
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
712 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 713
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
714 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 715
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
716 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 717
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
718 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 719
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
720 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 721
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
722 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 723
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 5-85 shows the codes that are used for
access types in this section.
Table 5-85. 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.
724 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 725
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
726 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 727
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
728 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 729
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
730 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 731
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
732 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual Code Security Module (DCSM)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 733
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual Code Security Module (DCSM) www.ti.com
734 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
Chapter 6
Flash Module
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 735
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
Foundational Materials
• C2000 Academy - FLASH
• Embedded Flash Memory (Video)
736 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
Note
Before initializing wait-states, turn off the prefetch and data caching in the FRD_INTF_CTRL register.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 737
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
Bank0
Bank1 Bank2
738 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
power mode, the down counter delays from 0 to PSLEEP prescaled SYSCLK clock cycles (prescaled clock is
SYSCLK/2) before putting the charge pump into active power mode.
Following are the numbers of cycles for the bank and pump to wake up from low-power modes.
1. Pump sleep to active = PSLEEP * (SYSCLK/2) cycles
2. Bank sleep to standby = 254 Flash clock cycles
3. Bank standby to active = 55 Flash clock cycles
Where: Flash clock = SYSCLK/(RWAIT+1)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 739
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
where SYSCLK is the system operating frequency for CPU1, and where FCLK is the clock frequency for Flash.
FCLK must be ≤ FCLKmax, the allowed maximum Flash clock frequency at RWAIT=0.
If RWAIT results in a fractional value when calculated using the above formula, round up RWAIT to the nearest
integer.
740 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
Note
If the prefetch mechanism is enabled, then the last two rows (16 16-bit words, 256 bits) of a Flash
bank can not be used if there are no valid Flash memory addresses beyond the bank boundary. This
is necessary to prevent the Flash prefetch mechanism from attempting to pre-load the instruction
buffer with data from invalid address locations, causing an ECC error.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 741
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
Flash prefetch
Instruction buffer
128-bit 128-bit
buffer buffer
Instruction fetch
128-bit
M Data cache
CPU 32-bit U
X
The Flash prefetch is aborted only when there is a code discontinuity caused by executing an instruction such
as a branch, function call, or loop. When this occurs, the prefetch mechanism is aborted, and the contents of the
prefetch buffer are flushed. There are two possible scenarios when this occurs:
1. If the destination address is within the Flash or OTP, the prefetch aborts and then resumes at the destination
address.
2. If the destination address is outside of the Flash and OTP, the prefetch is aborted, and begins again
only when the code branches back into the Flash or OTP. The Flash prefetch mechanism only applies to
instruction fetches from program space. Data reads from data memory and from program memory do not
utilize the prefetch mechanism and thus bypass the prefetch buffer. For example, instructions such as MAC,
DMAC, and PREAD read a data value from program memory. When such a read happens, the prefetch
buffer is bypassed, but the buffer is not flushed. If an instruction prefetch is already in progress when a data
read operation is initiated, then the data read is stalled until the prefetch completes.
Note that the prefetch mechanism gets bypassed when RWAIT is configured as zero.
6.7.1.2.1 Data Cache
In addition to the prefetch mechanism, a data cache of 128-bits wide has been implemented to improve data
space read performance. This data cache is separate from the instruction prefetch buffer, and is used for data
reads only. Whenever a data read access is performed by the CPU to a Flash bank address, if the data located
at that address is not presently loaded into the data cache, then the Flash wrapper reads 128 bits of data from
the Flash bank and stores it in the data cache. This data is eventually sent to the CPU for processing. The
starting address of the Flash bank access is automatically aligned to a 128-bit boundary, such that the requested
address location is within the 128 bits to be read from the bank.
The data cache is disabled by default at reset. To enable the data cache, set the DATA_CACHE_EN bit in the
FRD_INTF_CTRL register, or call the Flash_enableCache() driverlib function. Note that the data cache gets
bypassed when RWAIT is set to zero.
742 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
6.8.1 Erase
When the target Flash is erased, the Flash reads as all 1's. This state is called 'blank.' The erase function must
be executed before programming. The user can not skip erase on sectors that read as 'blank' because these
sectors can require additional erasing due to marginally erased bits columns. The FSM provides an Erase Sector
command to erase the target sector. The erase function erases the data and the ECC together. Bank erase is
also supported in this device.
Note
It is important to provide the correct sector mask for the bank erase command. If the mask is
mistakenly chosen to erase an inaccessible sector (belongs to another security zone), the bank erase
command will continue attempting to erase the sector endlessly and the FSM will never exit (since
erase will not succeed). To avoid such a situation, user must take care to provide the correct mask.
However, given that there is a chance of choosing an incorrect mask, TI suggests to initialize the max
allowed erase pulses to zero after the max number of pulses are issued by the FSM for the bank
erase operation. This will ensure that the FSM will end the bank erase command after trying to erase
the inaccessible sector up to the max allowed erase pulses.
The Example_EraseBanks() function in the C2000Ware’s Flash API usage example depicts the
implementation of this sequence (content of the while loop waiting for the FSM to complete the
bank erase command). Users must use this code as-is irrespective of whether or not security is used
by the application to also make sure that the FSM exits from bank erase operations in case of an
erase-failure.
6.8.2 Program
The FSM provides a command to program the USER OTP and Flash. This command is also used to program
ECC check bits.
Note
The main array Flash programming must be aligned to 64-bit address boundaries and each 64-bit
word can only be programmed once per write/erase cycle.
The DCSM OTP programming must be aligned to 128-bit address boundaries and each 128-bit word
can only be programmed once. The exceptions are:
• The DCSM Zx-LINKPOINTER1 and Zx-LINKPOINTER2 values in the DCSM OTP can be
programmed together and can be programmed one bit at a time as required by the DCSM
operation.
• The DCSM Zx-LINKPOINTER3 values in the DCSM OTP can be programmed one bit at a time as
required by the DCSM operation.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 743
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
6.8.3 Verify
After programming, the user must perform verify using API function Fapi_doVerify(). This function verifies the
Flash contents against supplied data.
Application software typically perform a CRC check of the Flash memory contents during power-up and at
regular intervals during runtime (as needed). Apart from this, ECC logic, when enabled (enabled by default),
catches single-bit errors, double-bit errors, and address errors whenever the CPU reads/fetches from a Flash
address.
6.9 Error Correction Code (ECC) Protection
CPU1-FMC and CPU2-FMC contain an embedded single error correction and double error detection (SECDED)
module. SECDED, when enabled, provides the capability to screen out memory faults. SECDED can detect and
correct single-bit data errors and detect address errors/double-bit data errors. For every 64 bits of Flash/OTP
data (aligned on a 64-bit memory boundary) that is programmed, eight ECC check bits have to be calculated
and programmed in ECC memory space. Refer to the device data sheet for the Flash/OTP ECC memory-map.
SECDED works with a total of eight user-calculated error correction code (ECC) check bits associated with each
64-bit wide data word and the corresponding 128-bit memory-aligned address. Users must program ECC check
bits along with Flash data. TI recommends using the AutoEccGeneration option available in the Plugin/API to
program ECC. Users can use the Flash API to calculate and program ECC data along with Flash data. Flash API
uses hardware ECC logic in the device to generate the ECC data for the given Flash data. The Flash Plugin, the
Flash programming tool integrated with the Code Composer Studio™ IDE, uses the Flash API to generate and
program ECC data.
Figure 6-3 illustrates the ECC logic inputs and outputs.
During an instruction fetch or a data read operation, the 19 most significant address bits (three least significant
bits of address are not considered), together with the 64-bit data/8-bit ECC read-out of Flash banks/ECC
memory map area, pass through the SECDED logic and the eight checkbits are produced in FMC. These eight
calculated ECC check bits are then XORed with the stored check bits (user programmed check bits) associated
with the address and the read data. The 8-bit output is decoded inside the SECDED module to determine one of
three conditions:
• No error occurred
• A correctable error (single bit data error) occurred
• A non-correctable error (double bit data error or address error) occurred
744 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
Data[127:64]
ECC[7:0]
If the SECDED logic finds a single-bit error in the address field, then the error is considered to be a non-
correctable error.
Note
Since ECC is calculated for an entire 64-bit data, a non 64-bit read such as a byte read or a half-word
read still forces the entire 64-bit data to be read and calculated, but only the byte or half-word are
actually used by the CPU.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 745
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
This ECC (SECDED) feature is enabled at reset. The ECC_ENABLE register can be used to configure (enable/
disable) the ECC feature. The ECC for the application code must be programmed. There are two SECDED
modules in each FMC. Out of the 128-bit data (aligned on a 128-bit memory boundary) read from the bank/OTP
address, the lower 64 bits of data and corresponding 8 ECC bits (read from user programmable ECC memory
area) are fed as inputs to one SECDED module along with 128-bit aligned 19-bit address from where data has
been read. The upper 64 bits of data and corresponding 8 ECC bits are fed as inputs to another SECDED
module in parallel, along with 128-bit aligned 19-bit address. Each of the SECDED modules evaluate their inputs
and determine if there is any single-bit data error or double-bit data error/address error.
ECC logic is bypassed when the 64 data bits and the associated ECC bits fetched from the bank are either all
ones or zeros.
6.9.1 Single-Bit Data Error
This section provides information for both single-bit data errors and single-bit ECC check bit errors. If there is a
single bit flip (0 to 1 or 1 to 0) in Flash data or in ECC data, then the error is considered as a single-bit data error.
The SECDED module detects and corrects single-bit errors, if any, in the 64-bit Flash data or eight ECC check
bits read from the Flash/ECC memory map before the read data is provided to the CPU.
When SECDED finds and corrects single bit data errors, the following information is logged in the ECC registers
if the ECC feature is enabled:
• Address where the error occurred: if the single-bit error occurs in the lower 64 bits of a 128-bit memory-
aligned Flash data word, the address of the lower 64-bit word is captured in the SINGLE_ERR_ADDR_LOW
register. If the single-bit error occurs in the upper 64 bits of the 128-bit data word, then the address of the
upper 64-bit word is captured in the SINGLE_ERR_ADDR_HIGH register.
• Whether the error occurred in data bits or ECC bits: the ERR_TYPE_L and ERR_TYPE_H bit fields in the
ERR_POS register indicate whether the error occurred in data bits or ECC bits of the lower 64 bits, or the
upper 64 bits respectively, of a 128-bit memory-aligned Flash data word.
• Bit position at which the error occurred: the ERR_POS_L and ERR_POS_H bit fields in the ERR_POS
register indicate the bit position of the error in the lower 64 bits/lower 8-bit ECC, or the upper 64 bits/upper
8-bit ECC respectively, of a 128-bit memory-aligned Flash data word.
• Whether the corrected value is 0 (FAIL_0_L, FAIL_0_H flags in ERR_STATUS register).
• Whether the corrected value is 1 (FAIL_1_L, FAIL_1_H flags in ERR_STATUS register).
• A single bit error counter that increments on every single bit error occurrence (ERR_CNT register) until a
user-configurable threshold (see ERR_THRESHOLD) is met.
• A flag that gets set when one or more single-bit errors occurs after ERR_CNT equals ERR_THRESHOLD
(SINGLE_ERR_INT_FLG flag in the ERR_INTFLG register).
When the ERR_CNT value equals ERR_THRESHOLD+1, and a single bit error occurs, the Flash module sets
the SINGLE_ERR_INT flag and generates an interrupt signal. To enable propagation of the generated interrupt
pulse to the CPU, the user application must enable the FLASH_CORRECTABLE_ERROR channel in the C28
Peripheral Interrupt Expansion module (PIE). The interrupt signal remains high until the application clears the
SINGLE_ERR_INTFLG flag by writing to the SINGLE_ERR_INTCLR bit in the ERR_INTCLR register. The Flash
module cannot generate any further FLASH_CORRECTABLE_ERROR interrupt signals to the PIE/CPU until
SINGLE_ERR_INTFLG is cleared, as this is an edge-based interrupt.
When multiple single-bit errors have been detected by ECC logic, the contents of the Flash ECC registers reflect
the most recent ECC error. When multiple single-bit errors have been detected, both FAIL_0_L and FAIL_1_L
(or FAIL_0_H and FAIL_1_H) can be set, indicating that single-bit fail0/fail1 occurred in different 64-bit aligned
addresses.
Although ECC is calculated on 64-bit basis, a read of any address location within a 128-bit aligned Flash data
word causes the single-bit error flag to get set, if there is a single-bit error in both or in either the lower 64 or
upper 64 bits (or corresponding ECC check bits) of that 128-bit data word.
746 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 747
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
• Select the ECC logic block (lower 64-bits or upper 64-bits) which needs to be tested using the
ECC_SELECT bit in the FECC_CTRL register.
• Enable ECC test mode using the ECC_TEST_EN bit in FECC_CTRL register.
• Write a value of 1 in the DO_ECC_CALC bit in FECC_CTRL register to enable ECC test logic for a single
cycle to evaluate the address, data, ECC in FADDR_TEST, FDATAx_TEST and FECC_TEST registers
for ECC errors.
Once the above ECC test mode registers are written by the user:
• The FECC_OUTH register holds the data output bits 63:32 from the SECDED block under test.
• The FECC_OUTL register holds the data output bits 31:0 from the SECDED block under test.
• The FECC_STATUS register holds the status of single-bit error occurrence, uncorrectable error occurrence,
and error position of single- bit error in data/check bits.
748 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
7. Align all code and data sections to 128-bit address boundaries when mapping to Flash memory, using the
ALIGN directive in the linker command file.
8. For EABI executable formats, all uninitialized sections mapped to RAM are defined as NOINIT sections
(using the directive "type=NOINIT") in the linker command file.
9. Be sure to program ECC bits correctly for the Flash application image. Keep the AutoEccGeneration option
enabled in the Code Composer Studio Flash Plugin or UniFlash GUI.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 749
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
6.13 Software
6.13.1 FLASH Examples
NOTE: These examples are located in the C2000Ware installation at the following location:
C2000Ware_VERSION#/driverlib/DEVICE_GPN/examples/CORE_IF_MULTICORE/flash
Cloud access to these examples is available at the following link: dev.ti.com C2000Ware Examples.
6.13.1.1 Flash Programming with AutoECC, DataAndECC, DataOnly and EccOnly
FILE: flashapi_ex1_programming.c
This example demonstrates how to program Flash using API's following options
1. AutoEcc generation
2. DataOnly and EccOnly
3. DataAndECC
External Connections
• None.
Watch Variables
• None.
6.13.1.2 Flash ECC Test Mode
FILE: flash_ex2_ecc_test_mode.c
This example demonstrates ECC Test mode.
6.13.1.3 Boot Source Code
FILE: flash_kernel_ex3_boot.c
Functions: void copyData(void) uint32_t getLongData(void) void readReservedFn(void)
6.13.1.4 Erase Source Code
FILE: flash_kernel_ex3_erase.c Functions:
6.13.1.5 Live DFU Command Functionality
FILE: flash_kernel_ex3_ldfu.c This file contains the functionality of the Live Device Firmware Update (Live DFU
or LDFU) Command and bank selection logic. The command functionality has 1 build configuration for each
bank: BANK0_LDFU, BANK1_LDFU, and BANK2_LDFU
For the BANK0 build configurations, the following steps are taken when the kernel receives the Live DFU
command:
1. Read an SCI Boot hex formatted file until information related to each block of data remains
2. Read and store the revision values of banks 2, 1 and 0 from flash (B1_REV_ADD: 0x92006, B2_REV_ADD:
0xA2006)
1. Erase sectors 2-15 of bank 1 or 2 depending on the revision number
2. Write 64 bits of 'START' value to B1_START_ADD/B2_START_ADD to indicate that erasing is done and
programming/verifying is about to start
3. Program and verify bank 1/2 by receiving the SCI boot hex formatted file one block of data at a time, writing
each byte to flash, and verifying each byte (the data should not be linked to an address that is less than
0x92008/0xA2008 (B1_RESERVED/B2_RESERVED))
4. Decrement the revision value of bank 1 or 2
5. Write the 'KEY' value to 0x92004/0xA2004 (B1_KEY_ADD/B2_KEY_ADD) and the revision value of bank 1
to 0x92006 (B1_REV_ADD) or of bank 2 to 0xA2006 (B2_REV_ADD)
6. Configure the watchdog for a reset and enable the watchdog in order for a reset to occur
750 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
For the BANK1 build configurations, the following steps are taken when the kernel receives the Live DFU
command:
1. Read an SCI Boot hex formatted file until information related to each block of data remains
2. Read and store the revision value of bank 0, 1 and 2 from flash (B0_REV_ADD: 0x82006, B2_REV_ADD:
0xA2006)
1. Erase sectors 2-15 of bank 0 or 2 depending on the revision number
2. Write 64 bits of 'START' value to B0_START_ADD/B2_START_ADD to indicate that erasing is done and
programming/verifying is about to start
3. Program and verify bank 0/2 by receiving the SCI boot hex formatted file one block of data at a time, writing
each byte to flash, and verifying each byte (the data should not be linked to an address that is less than
0x82008/0xA2008 (B0_RESERVED/B2_RESERVED))
4. Decrement the revision value of bank 0 or 2
5. Write the 'KEY' value to 0x82004/0xA2004 (B0_KEY_ADD/B2_KEY_ADD) and the revision value of bank 0
to 0x82006 (B0_REV_ADD)or of bank 2 to 0xA2006 (B2_REV_ADD)
6. Configure the watchdog for a reset and enable the watchdog in order for a reset to occur
For the BANK2 build configurations, the following steps are taken when the kernel receives the Live DFU
command:
1. Read an SCI Boot hex formatted file until information related to each block of data remains
2. Read and store the revision value of bank 0, 1 and 2 from flash (B1_REV_ADD: 0x92006)
1. Erase sectors 2-15 of bank 0 or 1 depending on the revision number
2. Write 64 bits of 'START' value to B0_START_ADD/B1_START_ADD to indicate that erasing is done and
programming/verifying is about to start
3. Program and verify bank 0/1 by receiving the SCI boot hex formatted file one block of data at a time, writing
each byte to flash, and verifying each byte (the data should not be linked to an address that is less than
0x92008/0xA2008 (B1_RESERVED/B2_RESERVED))
4. Decrement the revision value of bank 1 or 2
5. Write the 'KEY' value to 0x82004/0xA2004 (B0_KEY_ADD/B2_KEY_ADD) and the revision value of bank 0
to 0x82006 (B0_REV_ADD)or of bank 2 to 0xA2006 (B2_REV_ADD)
6. Configure the watchdog for a reset and enable the watchdog in order for a reset to occur
Bank selection logic (bankSelect) is the entry point for the BANK0 build configurations; it is also the first thing
to run after a reset occurs. Bank selection logic branches to the most recently programmed bank or to the
kernel setup when no banks have been programmed using the Live DFU command. When no banks have
been programmed using the Live DFU command, a program must be loaded to bank 1 by using the Live DFU
command.
Bank selection logic is located at 0x80000; therefore the device must be configured to boot to flash at 0x80000
for correct functionality.
When running BANK0 configurations, a breakpoint may need to be placed at the beginning of bankSelect if CCS
debug tools are needed. The breakpoint may be removed afterwards to prevent the program from stopping after
each update.
6.13.1.6 Verify Source Code
FILE: flash_kernel_ex3_verify.c
6.13.1.7 SCI Boot Mode Routines
FILE: flash_kernel_ex3_sci_boot.c Functions: uint32_t sciBoot(void) void sciaInit(void) uint32_t
sciaGetWordData(void)
6.13.1.8 Flash Programming Solution using SCI
FILE: flash_kernel_ex3_sci_flash_kernel.c
In this example, we set up a UART connection with a host using SCI, receive commands for CPU1 to perform
which then sends ACK, NAK, and status packets back to the host after receiving and completing the tasks. This
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 751
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
kernel has the ability to program, verify, unlock, reset, and run an application. Each command either expects no
data from the command packet or specific data relative to the command.
In this example, we set up a UART connection with a host using SCI, receive an application for CPU01 in -sci8
ascii format to run on the device and program it into Flash.
6.14 Flash Registers
This section describes the Flash Module Registers.
6.14.1 FLASH Base Address Table
Table 6-1. FLASH Base Address Table
Bit Field Name Pipeline
DriverLib Name Base Address CPU1 DMA HIC CLA
Instance Structure Protected
FLASH_CTRL_RE FLASH0CTRL_BAS
Flash0CtrlRegs 0x0005_F800 YES - - - YES
GS E
FLASH_ECC_RE
Flash0EccRegs FLASH0ECC_BASE 0x0005_FB00 YES - - - YES
GS
752 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
Complex bit access types are encoded to fit into small table cells. Table 6-3 shows the codes that are used for
access types in this section.
Table 6-3. FLASH_CTRL_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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 753
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED RWAIT RESERVED
R-0h R/W-Fh R-0h
754 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 755
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module 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 BNKPWR2 BNKPWR1 BNKPWR0
R-0h R/W-0h R/W-0h R/W-0h
756 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
PUMPRDY RESERVED
R-0h R-0h
7 6 5 4 3 2 1 0
RESERVED BANK2RDY BANK1RDY BANK0RDY
R-0h R-0h R-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 757
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
23 22 21 20 19 18 17 16
PSLEEP
R/W-A0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED PMPPWR
R-0h R/W-0h
758 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 759
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED RESERVED
R-0h R-0h R-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED PGV RESERVED EV RESERVED BUSY
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
ERS PGM INVDAT CSTAT VOLTSTAT ESUSP PSUSP RESERVED
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
760 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 761
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module 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 DATA_CACHE_ PREFETCH_E
EN N
R-0h R/W-0h R/W-0h
762 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
Complex bit access types are encoded to fit into small table cells. Table 6-13 shows the codes that are used for
access types in this section.
Table 6-13. FLASH_ECC_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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 763
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
764 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED ENABLE
R-0h R/W-Ah
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 765
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
766 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 767
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
768 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 769
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
23 22 21 20 19 18 17 16
RESERVED UNC_ERR_H FAIL_1_H FAIL_0_H
R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED UNC_ERR_L FAIL_1_L FAIL_0_L
R-0h R-0h R-0h R-0h
770 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 771
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
23 22 21 20 19 18 17 16
RESERVED ERR_POS_H
R-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED ERR_TYPE_L
R-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED ERR_POS_L
R-0h R/W-0h
772 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
23 22 21 20 19 18 17 16
RESERVED UNC_ERR_H_ FAIL_1_H_CLR FAIL_0_H_CLR
CLR
R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
15 14 13 12 11 10 9 8
RESERVED
R-0h
7 6 5 4 3 2 1 0
RESERVED UNC_ERR_L_C FAIL_1_L_CLR FAIL_0_L_CLR
LR
R-0h R-0/W1S-0h R-0/W1S-0h R-0/W1S-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 773
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
774 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 775
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module 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_ERR_INT SINGLE_ERR_I
FLG NTFLG
R-0h R-0h R-0h
776 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
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_ERR_INT SINGLE_ERR_I
CLR NTCLR
R-0h R-0/W1S-0h R-0/W1S-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 777
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
778 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 779
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ADDRL RESERVED
R/W-0h R-0h
780 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 781
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module 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 DO_ECC_CAL ECC_SELECT ECC_TEST_EN
C
R-0h R-0/W1S-0h R/W-0h R/W-0h
782 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 783
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
784 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
23 22 21 20 19 18 17 16
RESERVED
R-0h
15 14 13 12 11 10 9 8
RESERVED ERR_TYPE
R-0h R-0h
7 6 5 4 3 2 1 0
DATA_ERR_POS UNC_ERR SINGLE_ERR
R-0h R-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 785
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
786 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Flash Module
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 787
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Flash Module www.ti.com
788 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Chapter 7
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.
7.1 Introduction...............................................................................................................................................................790
7.2 CLA Interface............................................................................................................................................................ 792
7.3 CLA and CPU Arbitration.........................................................................................................................................798
7.4 CLA Configuration and Debug................................................................................................................................ 799
7.5 Pipeline......................................................................................................................................................................803
7.6 Software.................................................................................................................................................................... 809
7.7 Instruction Set...........................................................................................................................................................813
7.8 CLA Registers...........................................................................................................................................................932
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 789
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
7.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.
7.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
– 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.
• Task trigger mechanisms:
– C28x CPU using the IACK instruction
– Task1 to Task8: trigger sources from peripherals connected to the shared bus on which the CLA assumes
secondary ownership.
• Memory and Shared Peripherals:
– Two dedicated message RAMs for communication between the CLA and the main CPU.
– The C28x CPU can map CLA program and data memory to the main CPU space or CLA space.
Foundational Materials
• C2000 Academy - CLA
• C2000 CLA C Compiler Series (Video)
• CLA Hands On Workshop (Video)
• CLA usage in Valley Switching Boost Power Factor Correction (PFC) Reference Design (Video)
• Enhancing the Computational Performance of the C2000™ Microcontroller Family Application Report
790 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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
7.1.3 Block Diagram
Figure 7-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)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 791
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
792 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 793
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
794 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 795
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
• 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
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.
796 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
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.
The flow is as follows:
1. The associated RUN register bit is set (MIRUN) and the flag bit (MIFR) is cleared.
2. The CLA begins execution at the location indicated by the associated interrupt vector (MVECTx). MVECT
contains the absolute 16-bit address of the task in the lower 64K memory space. If a task is interrupting
the background task then the current program address is stored in the MVECTBGRNDACTIVE register
before execution jumps to the task; this saved address is restored to the MPC when the task completes and
execution returns to the background task.
3. The CLA executes instructions until the MSTOP instruction is found. This indicates the end of the task.
4. The MIRUN bit is cleared.
5. The task-specific interrupt to the PIE is issued. This informs the main CPU that the task has completed.
6. The CLA returns to idle (or to the background task, if enabled). Once a task completes the next highest-
priority pending task is automatically serviced and this sequence repeats.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 797
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
798 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 799
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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.
800 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 801
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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 can
not 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.
802 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 803
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
804 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 805
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
806 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 807
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.
808 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
7.6 Software
7.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.
7.6.1.1 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 (RAMLS1)
– 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)
7.6.1.2 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 (RAMLS1)
– CLAatan2Table - Lookup table
• 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)
7.6.1.3 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 809
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
7.6.1.4 Controlling PWM output using CLA
FILE: cla_ex4_pwm_control.c
This example showcases how to update PWM signal output using CLA. EPWM1 is configured to generate
complementary signals on both of its channels of fixed frequency 100 KHz. EPWM4 is configured to trigger a
periodic CLA control task of frequency 10 KHz. The CLA task implements a very simple logic to vary the duty of
the EPWM1 outputs by increasing it by 0.1 in every iteration and maintaining it in the range of 0.1-0.9. For actual
use-cases, the control logic could be modified to much more complex depending upon the application. The other
CLA task (CLA task 8) is triggered by software at beginning to initialize the CLA global variables
External Connections
• Observe GPIO0 (EPWM1A) on oscilloscope
• Observe GPIO1 (EPWM1B) on oscilloscope
Watch Variables
• duty
7.6.1.5 Just-in-time ADC sampling with CLA
FILE: cla_ex5_adc_just_in_time.c
This example showcases how to utilize early-interrupt feature of ADC in combination with the low interrupt
response of CLA to enable faster system response and achieve high frequency control loops. EPWM1 is
configured to generate a PWM output signal of frequency 1 MHz and this is also used to trigger the ADC
sampling at each cycle. ADCA is configured to sample the input on Channel 0 and to generate the early interrupt
at the end of S/H + offset cycles. This interrupt is used to trigger the CLA control task. The CLA task implements
the control logic to update the duty of the PWM output based on reading the ADC sample data just-in-time i.e.
as soon as the ADC results gets latched.The early interrupt feature and low interrupt latency of CLA allows
to do some pre-processing as well before reading the ADC data and still completes updating the PWM output
before the next interrupts comes in i.e. data read and PWM update is done within a 1 MHz cycle. For illustration
purposes, 3-point moving average filter is used to simulate some processing and few steps of the filtering code
are done before reading the ADC result which we consider as pre-processing code. The ADC interrupt offset is
programmed based on the cycles consumed by the pre-processing code.
The calculation for interrupt offset value is as follows :- -ADC acquisition cycles programmed = 10 SYSCLKS
-Conversion time for 12-bit data = 10.5 ADCCLKS = N = 42 SYSCLKS -CLA task trigger to first instruction in
Fetch delay = 4 -Let the interrupt offset value be 'x' -The code inside CLA control task before ADC read takes
below cycles : Setting up profiling gpio : 3 cycles Pre-processing : 13 cycles Total = 3 + 13 = 16 cycles
As described in device TRM, in order to read just-in-time the total delay before reading ADC should be (N-2)
cycles = 40 i.e. : x + 4 + 16 = 40 : x = 20
NOTE :- The optimization is off for this project and the cycles quoted above corresponds to that case.
GPIO2 is used for profiling purposes. GPIO2 is set at the beginning of CLA task 1 and is reset at the end of the
task. Thus ON time of GPIO2 indicates the CLA activity. In order to validate the example functionality , observe
810 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
the GPIO0 (PWM output) and GPIO2 (profiling GPIO) on CRO. The cycles difference between the rising edge of
the GPIO0 and GPIO2 indicate the total delay from the time of ADC trigger to setting up of profiling GPIO inside
CLA task which should be around 44 cycles (367 ns) based on the above calculation.
External Connections
• Provide constant DC input on ADCA0 for quick validation. GND -> Should observe PWM output duty = 0.1
3.3V -> Should observe PWM output duty = 0.9 Can also provide analog input in range 0 - 3.3V upto fs / 10 =
100 KHz for observing continuous duty variations
• Observe GPIO0 on oscilloscope
• Observe GPIO2 on oscilloscope
Watch Variables
• None
7.6.1.6 Optimal offloading of control algorithms to CLA
FILE: cla_ex6_cpu_offloading.c
This example showcases how to optimally offload the control algorithms from CPU to CLA in order to meet the
system requirements. In this example, two control loops are simulated, the faster one (loop1) running at 200 KHz
and the slower one (loop2) running at 20 KHz. Loop1 senses the first parameter at ADCA Channel 0, runs the
PI controller to achieve the target and contributes to the duty of EPWM1A output with 80% weightage. Loop2
senses the second parameter at ADCB Channel 2, runs the PI controller and contributes to the duty of EPWM1A
output with 20% weightage. It is important to note that since these are just software simulated control loops but
there is no actual physical process involved and hence updating the duty is not going to have any affect on
sampled inputs. ADCA is configured to oversample the first parameter using SOCs 0-3 to suppress the noise
and similarly ADCB is used to oversample the second parameter. EPWM4 and EPWM5 are configured to trigger
the ADCA and ADCB sampling at loop1 and loop2 frequencies respectively. Once the conversion of all 4 SOCs
complete, a CPU ISR or a CLA task is triggered based on the user-configuration. There is also a background
task running in the main loop which disables the entire system including PWM output and the control loops
when "system_OFF" is set to 1. The system gets enabled again once "system_OFF" is restored back to 0. By
default system_OFF is set to 0 but it's value can be updated dynamically by adding it to expression window and
writing to it. DCL library is included in the project to make use of optimal PI controllers used in both the loops.
User-configurable pre-defined symbol "run_loop1_cla" has been added to the project options in order to specify
whether to run the loop1 on C28x or CLA. GPIO2 and GPIO3 are used to profile the execution of loop1 and
loop2.
For run_loop1_cla == 0 i.e. both loops running on CPU -> Loop1 Utilization = ~77.5% (measured using profiling
GPIO2) -> Loop2 Utilization = ~6% (measured using profiling GPIO3) -> Background task in a while loop ->
Total CPU utilization is greater than Utilization bound (UB) Hence the system is non-schedulable, lower priority
task (Loop2) execution never completes (no toggling observed on GPIO3) and also background task never gets
chance to execute
For run_loop1_cla == 1 i.e. high frequency control loop (loop1) is offloaded to CLA while loop2 runs on CPU ->
Loop1 Utilization (CLA) = ~73% -> Loop2 Utilization (CPU)= ~6% -> Total CPU utilization has come down to just
~6% Hence the system is perfectly schedulable, no miss happens for any of the loops and offloading of loop1 to
CLA saves CPU bandwidth to execute background tasks as well
For quick inspection of the example functionality, constant DC HIGH/LOW inputs can be provided to the analog
channels instead of varying analog voltages. The target value for both the loops are set as some intermediate
value i.e. 3500 corresponds to ~2.8V. Now since the sensed inputs are constant and not same as target so the
controller outputs will get saturated soon to either 1 or 0. Thus the "duty" variable can take only fixed values
based on the equations used in the loops. Infact the duty output would be very intutive, for instance if both inputs
are LOW(GND), the controller will try to produce the maximum duty as the target is higher than sensed value
hence the duty should be 1.0(0.2 + 0.8) but will get saturated to 0.9(the maximum value defined). Similarly if
both inputs are made HIGH, the duty will be 0.1 (the minimum saturation value defined). The final duty table is
shown below :
External Connections
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 811
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
812 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 813
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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 7-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 7.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).
814 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Encoding for the shift fields in the MASR32, MLSR32 and MLSL32 instructions is shown in Table 7-9.
Table 7-9. Shift Field Encoding
Shift Value 'shift' Opcode
Field Encode
1 0000
2 0001
3 0010
.... ....
32 1111
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 7-10.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 815
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Table 7-11 shows the condition field encoding for conditional instructions such as MNEGF, MSWAPF, MBCNDD,
MCCNDD, and MRCNDD.
Table 7-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
7.7.3 Instructions
The instructions are listed alphabetically.
816 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 817
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
MSUBF32 MRd, MRe, MRf ||MMOV32 MRa, mem32 — 32-Bit Floating-Point Subtraction with Parallel Move....
922
MSUBF32 MRd, MRe, MRf ||MMOV32 mem32, MRa — 32-Bit Floating-Point Subtraction with Parallel Move....
923
MSWAPF MRa, MRb {, CNDF} — Conditional Swap......................................................................................... 924
MTESTTF CNDF — Test MSTF Register Flag Condition....................................................................................926
MUI16TOF32 MRa, mem16 — Convert Unsigned 16-Bit Integer to 32-Bit Floating-Point Value........................928
MUI16TOF32 MRa, MRb — Convert Unsigned 16-Bit Integer to 32-Bit Floating-Point Value............................ 929
MUI32TOF32 MRa, mem32 — Convert Unsigned 32-Bit Integer to 32-Bit Floating-Point Value........................930
MUI32TOF32 MRa, MRb — Convert Unsigned 32-Bit Integer to 32-Bit Floating-Point Value............................ 931
MXOR32 MRa, MRb, MRc — Bitwise Exclusive Or............................................................................................ 932
818 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 819
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
820 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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.
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 821
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.
Flags This instruction modifies the following flags in the MSTF register:
Flag TF ZF NF LUF LVF
Modified No No No Yes Yes
822 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 823
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
824 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 825
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).
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.
826 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 827
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
828 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 829
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
830 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Pipeline The MBCNDD instruction alone is a single-cycle instruction. As shown in Table 7-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 can not be the same as for a branch not taken.
Referring to Table 7-12 and Table 7-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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 831
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
832 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 833
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
834 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 835
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Pipeline The MCCNDD instruction alone is a single-cycle instruction. As shown in Table 7-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 can not
be the same as for a call not taken.
Referring to the following code fragment and the pipeline diagrams in Table 7-14 and
Table 7-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.
836 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 837
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
(1) The RPC value in the MSTF register points to the instruction following I7 (instruction I8).
838 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 839
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
840 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 841
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
842 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 843
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
844 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 845
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
846 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 847
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
848 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 849
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
850 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 851
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
852 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 853
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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)
854 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 855
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
856 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 857
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
858 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 859
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
860 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 861
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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; }
862 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 863
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)
See also MMPYF32 MRa, MRb, MRc || MADDF32 MRd, MRe, MRf
864 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 865
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 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
866 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 867
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
868 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 869
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
870 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 871
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
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
872 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 873
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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.
874 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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:
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 875
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
876 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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
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;
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 877
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
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);
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
878 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
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:
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 879
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
880 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 881
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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;
882 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 883
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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;
884 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 885
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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.
886 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 887
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
888 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 889
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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.
890 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 891
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
892 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 893
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
894 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
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; }
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 895
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
896 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 897
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
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
;
898 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
;
_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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 899
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
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
;
900 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
_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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 901
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 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
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
902 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
See also MMACF32 MR3, MR2, MRd, MRe, MRf || MMOV32 MRa, mem32
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 903
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
Example 2
; Given A, B, and C are 32-bit floating-point numbers
; Calculate Y2 = (A * B)
; Y3 = (A * B) * C
904 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
;
_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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 905
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
906 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 907
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
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
908 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Conditional Negation
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 909
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
910 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 911
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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 7-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 can not be the same as for a return not taken.
912 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Referring to the following code fragment and the pipeline diagrams in Table 7-19 and
Table 7-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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 913
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
914 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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:
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 915
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 can not 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
Pipeline This is a single-cycle instruction. Table 7-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 7-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
916 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
MSTOP (continued)
Stop Task
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 917
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
918 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 919
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
920 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 921
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; }
922 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 923
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
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
924 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
Conditional Swap
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 925
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;
Example
; if (State == 0.1)
; RampState = RampState || RAMPMASK
; else if (State == 0.01)
926 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 927
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];
928 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 929
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
930 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 931
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
CLA1_ONLY_BAS
Cla1OnlyRegs CLA_ONLY_REGS 0x0000_0C00 - - - YES -
E
932 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
CLA_SOFTINT_R CLA1_SOFTINT_B
Cla1SoftIntRegs 0x0000_0CE0 - - - YES -
EGS ASE
Cla1Regs CLA_REGS CLA1_BASE 0x0000_1400 YES - - - -
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 933
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 7-24 shows the codes that are used for
access types in this section.
Table 7-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.
934 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 935
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
936 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 937
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
938 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 939
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
940 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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-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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 941
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 7-32 shows the codes that are used for
access types in this section.
Table 7-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.
942 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 943
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
944 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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-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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 945
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 7-36 shows the codes that are used for
access types in this section.
Table 7-36. CLA_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
Write Type
946 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 947
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
948 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 949
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
950 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 951
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
952 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 953
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
954 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 955
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
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
956 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 957
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
958 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 959
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
7 6 5 4 3 2 1 0
RESERVED BGOVF _BGINTM RUN
R/W-0h R/W1C-0h R-0h R-0h
960 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 TRIGEN BGSTART
R/W-0h R/W-0h R/W1S-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 961
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/W-0h
962 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 963
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
964 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 965
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
966 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 967
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
968 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 969
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-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
970 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 971
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-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
972 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 973
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-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
974 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 975
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/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
976 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 977
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
978 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 979
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
980 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
7 6 5 4 3 2 1 0
_MPC
R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 981
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
7 6 5 4 3 2 1 0
_MAR0
R-0h
982 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
7 6 5 4 3 2 1 0
_MAR1
R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 983
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
23 22 21 20 19 18 17 16
_RPC
R-0h
15 14 13 12 11 10 9 8
_RPC MEALLOW RESERVED RNDF32 RESERVED
R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
RESERVED TF RESERVED ZF NF LUF LVF
R-0h R-0h R-0h R-0h R-0h R-0h R-0h
984 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 985
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
986 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 987
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
988 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 989
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
990 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 991
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
992 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 993
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
994 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Control Law Accelerator (CLA)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 995
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Control Law Accelerator (CLA) www.ti.com
996 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual-Clock Comparator (DCC)
Chapter 8
Dual-Clock Comparator (DCC)
8.1 Introduction...............................................................................................................................................................998
8.2 Module Operation..................................................................................................................................................... 999
8.3 Interrupts.................................................................................................................................................................1005
8.4 Software.................................................................................................................................................................. 1006
8.5 DCC Registers........................................................................................................................................................ 1007
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 997
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual-Clock Comparator (DCC) www.ti.com
8.1 Introduction
The dual-clock comparator module is used for evaluating and monitoring the clock input based on a second
clock, which can be a more accurate and reliable version. This instrumentation is used to detect faults in clock
source or clock structures, thereby enhancing the system's safety metrics.
8.1.1 Features
The main features of each of the DCC modules are:
• Allows the application to ensure that a fixed ratio is maintained between frequencies of two clock signals.
• Supports the definition of a programmable tolerance window in terms of the number of reference clock cycles.
• Supports continuous monitoring without requiring application intervention.
• Supports a single-sequence mode for spot measurements.
• Allows the selection of a clock source for each of the counters, resulting in several specific use cases.
8.1.2 Block Diagram
Figure 8-1 shows how the DCC connects to the rest of the system. Figure 8-2 shows the main concept of the
DCC module.
Input XBAR
APLL
Error
XOSC
Interrupt
INTOSC1,2 DCC
AUXCLK
System Control
Clock
Gates, Dividers Peripheral
Clocks
998 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual-Clock Comparator (DCC)
DCC
20 Module
DCCxCLKSRC0 Counter0
DCCxCLKSRC0
20 DCC DONE
Valid0
Compare Logic ERROR
20
DCCxCLKSRC1 Counter1
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 999
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual-Clock Comparator (DCC) www.ti.com
Based on above formula for Window, if the desired tolerance is low, then the counter values are large and
increase the window of measurement. This means that counter values for a tolerance of 0.1% are larger than
that of 0.2%. So, based on the application defined tolerance, define the window of measurement in terms of
Clock0 cycles.
The clock under measurement can have an allowed frequency error. If this error is expected, then the error
can also be accounted while configuring counters. For example, if measuring INTOSC1/2 frequency using
an external crystal as a reference clock, the allowable tolerance of INTOSC1/2 (for example, +/-1%) can be
accounted for and factored into the counter configuration. The formula is:
Frequency Error Allowed (in Clock0 Cycles) = Window × (Allowable Frequency Tolerance (in %) / 100)
Total Error (in Clock0 Cycles) = DCC Error + Frequency Error Allowed
Note
Counter1 is a 20-bit counter, so the maximum possible value cannot exceed 1048575. If the value
does exceed, then increase the desired Tolerance for DCC error, so that Window of measurement is
lowered. The following formula can be used to compute minimum tolerance possible:
Tolerance (%) = (100 × DCC Error × (Fclk1/Fclk0)) / 1048575
1000 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual-Clock Comparator (DCC)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1001
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual-Clock Comparator (DCC) www.ti.com
1002 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual-Clock Comparator (DCC)
(no error)
Error
Count0 Count0
Clock0
Valid0 Valid0
0
Count1 Count1
Clock1
0
time
reload reload
Clock1 must expire
in this window, otherwise
signal an error
Error
Count0
Clock0
Valid0
0
Count1
Clock1
0
time
reload
Counter1 does not reach 0
before VALID0 reaches 0
Figure 8-4. Clock1 Slower Than Clock0 - Results in an Error and Stops Counting
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1003
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual-Clock Comparator (DCC) www.ti.com
Error
Count0
Clock0
Valid0
0
Count1
Clock1
0
time
reload
Counter1 reaches 0 before
Counter0 reaches 0
Figure 8-5. Clock1 Faster Than Clock0 - Results in an Error and Stops Counting
Error
Count0
Clock0
Valid0
0
Count1
Count1 does not count down
Clock1 due to an inactive clock 1
0
time
reload
An error signal is generated since Count1
does not reach 0 in the Valid0 window.
Figure 8-6. Clock1 Not Present - Results in an Error and Stops Counting
1004 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual-Clock Comparator (DCC)
Error
Count0
Count0 and Valid 0 do not
Clock0 count down due to an
inactive clock 0
Valid0
Count1
Clock1
time
reload
Counter1 reaches 0 at the
right time, but since Clock0 is not running,
Valid0 hasn’t started, thus an error is generated.
Figure 8-7. Clock0 Not Present - Results in an Error and Stops Counting
8.3 Interrupts
DCC generates an interrupt on either of two events:
• DCC finishes counting and all the counters expire within a defined window indicating DONE operation,
provided DCCGCTRL.DONENA=1.
• DCC finishes counting with error where counters do not expire in a defined window. This indicates an
ERROR event, and sets an interrupt provided DCCGCTRL.ERRENA=1.
Interrupts generated by DONE or ERROR events are ORed and flagged as DCCx interrupts. Refer to Section
3.5.5 to determine the interrupt channel mapping. The application interrupt service routine needs to check the
status flag inside the DCCSTATUS register to determine whether the interrupt is due to ERROR or DONE.
DCC Error interrupts can also be configured as a Non-Maskable Interrupt (NMI) by enabling the
CLKFAILCFG.DCCx_ERROR_EN flag.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1005
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual-Clock Comparator (DCC) www.ti.com
8.4 Software
8.4.1 DCC Examples
NOTE: These examples are located in the C2000Ware installation at the following location:
C2000Ware_VERSION#/driverlib/DEVICE_GPN/examples/CORE_IF_MULTICORE/dcc
Cloud access to these examples is available at the following link: dev.ti.com C2000Ware Examples.
8.4.1.1 DCC Single shot Clock verification
FILE: dcc_ex1_single_shot_verification.c
This program uses the XTAL clock as a reference clock to verify the frequency of the PLLRAW clock.
The Dual-Clock Comparator Module 0 is used for the clock verification. The clocksource0 is the reference clock
(Fclk0 = 20Mhz) and the clocksource1 is the clock that needs to be verified (Fclk1 = 120Mhz). Seed is the value
that gets loaded into the Counter.
Please refer to the TRM for details on counter seed values to be set.
External Connections
• None
Watch Variables
• status/result - Status of the PLLRAW clock verification
8.4.1.2 DCC Single shot Clock measurement
FILE: dcc_ex2_single_shot_measurement.c
This program demonstrates Single Shot measurement of the INTOSC2 clock post trim using XTAL as the
reference clock.
The Dual-Clock Comparator Module 0 is used for the clock measurement. The clocksource0 is the reference
clock (Fclk0 = 20Mhz) and the clocksource1 is the clock that needs to be measured (Fclk1 = 10Mhz). Since the
frequency of the clock1 needs to be measured an initial seed is set to the max value of the counter.
Please refer to the TRM for details on counter seed values to be set.
External Connections
• None
Watch Variables
• result - Status if the INTOSC2 clock measurement completed successfully.
• meas_freq1 - measured clock frequency, in this case for INTOSC2.
8.4.1.3 DCC Continuous clock monitoring
FILE: dcc_ex3_continuous_monitoring_of_clock.c
This program demonstrates continuous monitoring of PLL Clock in the system using INTOSC2 as the reference
clock. This would trigger an interrupt on any error, causing the decrement/ reload of counters to stop.
The Dual-Clock Comparator Module 0 is used for the clock monitoring. The clocksource0 is the reference clock
(Fclk0 = 10Mhz) and the clocksource1 is the clock that needs to be monitored (Fclk1 = 120Mhz). The clock0 and
clock1 seed are set to achieve a window of 340us. Seed is the value that gets loaded into the Counter. For the
sake of demo a slight variance is given to clock1 seed value to generate an error on continuous monitoring.
Please refer to the TRM for details on counter seed values to be set. Note : When running in flash configuration
it is good to do a reset & restart after loading the example to remove any stale flags/states.
External Connections
1006 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual-Clock Comparator (DCC)
• None
Watch Variables
• status/result - Status of the PLLRAW clock monitoring
• cnt0 - Counter0 Value measure when error is generated
• cnt1 - Counter1 Value measure when error is generated
• valid - Valid0 Value measure when error is generated
8.4.1.4 DCC Continuous clock monitoring
FILE: dcc_ex3_continuous_monitoring_of_clock_syscfg.c
This program demonstrates continuous monitoring of PLL Clock in the system using INTOSC2 as the reference
clock. This would trigger an interrupt on any error, causing the decrement/ reload of counters to stop. The
Dual-Clock Comparator Module 0 is used for the clock monitoring. The clocksource0 is the reference clock
(Fclk0 = 10Mhz) and the clocksource1 is the clock that needs to be monitored (Fclk1 = 120Mhz). The clock0 and
clock1 seed are set automatically by the error tolerances defined in the sysconfig file included this project. For
the sake of demo an un-realistic tolerance is assumed to generate an error on continuous monitoring.
Please refer to the TRM for details on counter seed values to be set. Note : When running in flash configuration
it is good to do a reset & restart after loading the example to remove any stale flags/states.
External Connections
• None
Watch Variables
• status/result - Status of the PLLRAW clock monitoring
• cnt0 - Counter0 Value measure when error is generated
• cnt1 - Counter1 Value measure when error is generated
• valid - Valid0 Value measure when error is generated
8.4.1.5 DCC Detection of clock failure
FILE: dcc_ex4_clock_fail_detect.c
This program demonstrates clock failure detection on continuous monitoring of the PLL Clock in the system
using XTAL as the osc clock source. Once the oscillator clock fails, it would trigger a DCC error interrupt,
causing the decrement/ reload of counters to stop. In this examples, the clock failure is simulated by turning off
the XTAL oscillator. Once the ISR is serviced, the osc source is changed to INTOSC1 and the PLL is turned off.
The Dual-Clock Comparator Module 0 is used for the clock monitoring. The clocksource0 is the reference clock
(Fclk0 = 20Mhz) and the clocksource1 is the clock that needs to be monitored (Fclk1 = 120Mhz). Seed is the
value that gets loaded into the Counter.
In the current example, the XTAL is expected to be a Resonator running in Crystal mode which is later switched
off to simulate the clock failure. If an SE Crystal is used, you will need to physically disconnect the clock on
the board. Please refer to the TRM for details on counter seed values to be set. Note : When running in flash
configuration it is good to do a reset & restart after loading the example to remove any stale flags/states.
External Connections
• None
Watch Variables
• status/result - Status of the clock failure detection
8.5 DCC Registers
This section describes the Dual Clock Comparator Registers.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1007
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual-Clock Comparator (DCC) www.ti.com
Note
DCC is used by Boot ROM, hence the register values can be different than the hardware reset value.
The user needs to make sure to configure the values of these registers to the desired value before
enabling DCC.
1008 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual-Clock Comparator (DCC)
Complex bit access types are encoded to fit into small table cells. Table 8-3 shows the codes that are used for
access types in this section.
Table 8-3. DCC_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
R-0 R Read
-0 Returns 0s
R-1 R Read
-1 Returns 1s
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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1009
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual-Clock Comparator (DCC) www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DONEENA SINGLESHOT ERRENA DCCENA
R/W-5h R/W-5h R/W-5h R/W-5h
1010 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual-Clock Comparator (DCC)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1011
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual-Clock Comparator (DCC) www.ti.com
1012 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual-Clock Comparator (DCC)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1013
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual-Clock Comparator (DCC) 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 DONE ERR
R-0h R/W-0h R/W-0h
1014 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual-Clock Comparator (DCC)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1015
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual-Clock Comparator (DCC) www.ti.com
1016 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual-Clock Comparator (DCC)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1017
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual-Clock Comparator (DCC) www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
KEY RESERVED CLKSRC1
R-0/W-0h R-0h R/W-0h
1018 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Dual-Clock Comparator (DCC)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
KEY RESERVED CLKSRC0
R-0/W-0h R-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1019
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Dual-Clock Comparator (DCC) www.ti.com
1020 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
Chapter 9
Background CRC-32 (BGCRC)
The Background CRC (BGCRC) module that helps to identify memory faults and corruption, is discussed in this
chapter.
9.1 Introduction.............................................................................................................................................................1022
9.2 Functional Description...........................................................................................................................................1024
9.3 Application of the BGCRC..................................................................................................................................... 1026
9.4 Software.................................................................................................................................................................. 1032
9.5 BGCRC Registers................................................................................................................................................... 1033
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1021
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
9.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. The two BGCRC modules differ only in the memories they test.
9.1.1 BGCRC Related Collateral
1022 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
CPU.LS[x]RAM CPU2CLA.MSGRAM
Memories tested
by CPU CRC
CPU.M0/M1 CLA2CPU.MSGRAM
Memories tested
by CLA CRC
CPU.BOOTROM DMA2CLA.MSGRAM
CPU.GS[x]RAM
CLA.DATAROM
CLA_CRC
CLA.PROGROM
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
1024 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1025
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
1026 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 9-5 shows the BGCRC execution sequence.
Table 9-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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1027
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
1028 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1029
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
1030 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
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 9-3) with two 32-bit words, 0x12345678 and 0x9ABCDEF0 at address 0x100 and
0x102 successively, can calculate the bytes in the order 0x78, 0x56, 0x34, 0x12, 0xDE, 0xBC, and 0x9A and
yield 0x7E0B4164.
Table 9-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 9-4), the calculations can be performed
in byte order 0x78, 0x56, 0x34, 0x12, 0xB1, 0xA0, 0xD3, 0xC2, 0xF0, 0xDE, 0xBC, and 0x9A and yield
0x2AEFD987.
Table 9-4. Data Address Location Example 3
Address 0x100 0x101 0x102 0x103 0x104 0x105
Data 0x5678 0x1234 0xA0B1 0xC2D3 0xDEF0 0x9ABC
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1031
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
9.4 Software
9.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.
9.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 can be 1.
• runStatus - BGCRC running status. This is BGCRC_ACTIVE if the module is running, BGCRC_IDLE if the
module is idle.
9.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
9.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
1032 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
• pass
• bgcrcDone
9.4.1.4 CLA-BGCRC Example in Scrub mode 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
9.5 BGCRC Registers
This section describes the Background CRC registers.
9.5.1 BGCRC Base Address Table
Table 9-5. BGCRC Base Address Table
Bit Field Name
DriverLib Name Base Address CPU1 DMA HIC CLA Pipeline Protected
Instance Structure
BGCRC_CPU_BAS
BgcrcCpuRegs BGCRC_REGS 0x0000_6340 YES - - - YES
E
BGCRC_CLA1_BA
BgcrcCla1Regs BGCRC_REGS 0x0000_6380 YES - - YES YES
SE
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1033
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 9-7 shows the codes that are used for
access types in this section.
Table 9-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
1034 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1035
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 START
R-0-0h R-0/W-0h
1036 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1037
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
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
1038 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1039
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
1040 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1041
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
1042 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1043
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED WDDIS
R-0-0h R/W-0h
1044 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1045
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
1046 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1047
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-0h R-0h R-0h R-0h R-0h R-0-0h R-0-0h
1048 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1049
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
1050 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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-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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1051
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 INT
W OW E_ERR BLE_ERR
R-0-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
1052 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1053
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 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
1054 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 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 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1055
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
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
1056 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1057
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
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
1058 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1059
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
1060 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Background CRC-32 (BGCRC)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1061
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Background CRC-32 (BGCRC) www.ti.com
1062 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
Chapter 10
General-Purpose Input/Output (GPIO)
The GPIO module controls the device's digital and analog I/O multiplexing, which uses shared pins to maximize
application flexibility. The pins are named by their general-purpose I/O name (for example, GPIO0, GPIO25,
GPIO58). These pins can be individually selected to operate as digital I/O (also called GPIO mode), or
connected to one of several peripheral I/O signals. The input signals can be qualified to remove unwanted
noise.
10.1 Introduction...........................................................................................................................................................1064
10.2 Configuration Overview....................................................................................................................................... 1067
10.3 Digital Inputs on ADC Pins (AIOs)...................................................................................................................... 1067
10.4 Digital Inputs and Outputs on ADC Pins (AGPIOs)...........................................................................................1068
10.5 Digital General-Purpose I/O Control................................................................................................................... 1068
10.6 Input Qualification................................................................................................................................................ 1071
10.7 GPIO and Peripheral Muxing............................................................................................................................... 1074
10.8 Internal Pullup Configuration Requirements..................................................................................................... 1079
10.9 Software................................................................................................................................................................ 1080
10.10 GPIO Registers................................................................................................................................................... 1081
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1063
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
10.1 Introduction
Up to twelve independent peripheral signals are multiplexed on a single GPIO-enabled pin in addition to the
CPU-controlled I/O capability. Each pin output can be controlled by either a peripheral or one of the two CPU
masters.
• CPU1
• CPU1.CLA
There are up to 8 possible I/O ports:
• Port A consists of GPIO0-GPIO31
• Port B consists of GPIO32-GPIO63
• Port C consists of GPIO64-GPIO95
• Port D consists of GPIO96-GPIO127
• Port E consists of GPIO128-GPIO159
• Port F consists of GPIO160-GPIO191
• Port G consists of GPIO192-GPIO223
• Port H consists of GPIO224-GPIO255
Note
Some GPIO and I/O ports can be unavailable on particular devices. See the GPIO Registers section
for available GPIO and I/O ports.
The analog signals on this device are multiplexed with digital inputs and outputs. Some of these analog IO (AIO)
pins do not have digital output capability. Others of these pins are analog pins capable of full digital input and
output capability (AGPIO). Analog pins with AIO (digital input only) capability contain "AIO" signals in the Pin
Attributes table of the device data sheet. Analog pins with full input and output capability (AGPIO pins) contain
"GPIO" signals in the Pin Attributes table of the device data sheet. AGPIO pins also have pin names with both
analog signals and GPIO in the name.
Note
By default, all analog pins with digital input support shall come up in analog mode. To turn ON the
digital input functionality, GPHAMSEL register needs to be configured.
1064 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
00:00 Unused
00:01 Peripheral A
00:10 Peripheral B
CPU1 / CLA Input 00:11 Peripheral C
GPyDAT_R (R) GPyDAT (R) XBAR 01:00 Unused
01:01 Peripheral D
01:10 Peripheral E
Low Power CPU1 01:11 Peripheral F
CPU1 Mode Control
GPyCTRL GPyQSEL1-2 10:00 Unused
GPyPUD Pull-Up CPU1 10:01 Peripheral G
GPyINV 10:10 Peripheral H
SYSCLK 10:11 Peripheral I
Sync 00
3-sample 01 11:00 Unused
11:01 Peripheral J
0 6-sample 10
11:10 Peripheral K
Async 11 11:11 Peripheral L
GPIOx 1
CPU1 CLA
GPySET.1 GPySET.2
GPyCLEAR.1 GPyCLEAR.2
GPyTOGGLE.1 GPyTOGGLE.2
GPyDAT (W).1 GPyDAT (W).2
Direction GPyDIR
00:00 Data
00:01 Peripheral A
00:10 Peripheral B
Data 00:11 Peripheral C
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1065
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
There are two key features to note in Figure 10-1. The first is that the input and output paths are entirely
separate, connecting only at the pin. The second is that peripheral muxing takes place far from the pin. As a
result, it is always possible for both CPUs and CLAs to read the physical state of the pin independent of CPU
mastering and peripheral muxing. Likewise, external interrupts can be generated from peripheral activity. All pin
options such as input qualification and open-drain output are valid for all masters and peripherals. However, the
peripheral muxing, CPU muxing, and pin options can only be configured by CPU1. Table 10-1 provides details of
GPIO registers accessible by different masters.
Table 10-1. GPIO access by different controllers
Register Type Function CPU CLA DMA HIC Comments
GPIO_CTRL Peripheral muxing, Pull Control ,etc. Yes No No No -
Based on
GPIO_DATA GPIODAT, SET, CLEAR, TOGGLE, and pin status, etc. Yes Yes No No GPxCSEL
configuration.
GPIO_DATA_REA
Read back of GPIODAT register Yes Yes No Yes -
D
Note
JTAG uses a different signal path that does not support inversion or qualification.
GPIO18/X2 and GPIO19/X1 have different timings due to the load placed on them by the oscillator
circuit. For information on using GPIO18/X2 and GPIO19/X1 as GPIOs, see the device data sheet and
the Clocking section of this document.
If digital signals with sharp edges (high dv/dt) are connected to the AIOs or AGPIOs, cross-talk can
occur with adjacent analog signals. Therefore, limit the edge rate of signals connected to AIOs or
AGPIOs if adjacent channels are being used for analog functions.
Foundational Materials
• C2000 Academy - GPIO
1066 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
Note
If digital signals with sharp edges (high dv/dt) are connected to the AIOs, cross-talk can occur with
adjacent analog signals. Therefore, limit the edge rate of signals connected to AIOs if adjacent
channels are being used for analog functions.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1067
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
Note
If digital signals with sharp edges (high dv/dt) are connected to the AGPIOs, cross-talk can occur with
adjacent analog signals. The user can therefore limit the edge rate of signals connected to AGPIOs, if
adjacent channels are being used for analog functions.
1068 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
If Read-Modify-Write operations are used on the GPyDAT registers, because of the delay between the output
and the input of the first instruction (I1), the second instruction (I2) reads the old value and writes the value
back.
The second instruction waits for the first to finish the write due to the write-followed-by-read protection on this
peripheral frame. There is some lag, however, between the write of (I1) and the GPyDAT bit reflecting the
new value (1) on the pin. During this lag, the second instruction reads the old value of GPIO1 (0) and writes
the value back along with the new value of GPIO2 (1). Therefore, GPIO1 pin stays low.
One answer is to put some NOPs between instructions. A better answer is to use the GPySET/GPyCLEAR/
GPyTOGGLE registers instead of the GPyDAT registers. These registers always read back a 0 and writes of
0 have no effect. Only bits that need to be changed can be specified without disturbing any other bits that are
currently in the process of changing.
• GPyDAT_R Registers
The GPyDAT_R registers are read only registers which return the value written to the GPyDAT registers
instead of pin status. Writes to these registers have no effect.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1069
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
• GPySET Registers
The set registers are used to drive specified GPIO pins high without disturbing other pins. Each I/O port has
one set register and each bit corresponds to one GPIO pin. The set registers always read back 0. If the
corresponding pin is configured as an output, then writing a 1 to that bit in the set register sets the output
latch high and the corresponding pin is driven high. If the pin is not configured as a GPIO output, then the
value is latched but the pin is not driven. Only if the pin is later configured as a GPIO output is the latched
value driven onto the pin. Writing a 0 to any bit in the set registers has no effect.
• GPyCLEAR Registers
The clear registers are used to drive specified GPIO pins low without disturbing other pins. Each I/O port
has one clear register. The clear registers always read back 0. If the corresponding pin is configured as a
general-purpose output, then writing a 1 to the corresponding bit in the clear register clears the output latch
and the pin is driven low. If the pin is not configured as a GPIO output, then the value is latched but the pin is
not driven. Only if the pin is later configured as a GPIO output is the latched value driven onto the pin. Writing
a 0 to any bit in the clear registers has no effect.
• GPyTOGGLE Registers
The toggle registers are used to drive specified GPIO pins to the opposite level without disturbing other pins.
Each I/O port has one toggle register. The toggle registers always read back 0. If the corresponding pin is
configured as an output, then writing a 1 to that bit in the toggle register flips the output latch and pulls the
corresponding pin in the opposite direction. That is, if the output pin is driven low, then writing a 1 to the
corresponding bit in the toggle register pulls the pin high. Likewise, if the output pin is high, then writing a 1
to the corresponding bit in the toggle register pulls the pin low. If the pin is not configured as a GPIO output,
then the value is latched but the pin is not driven. Only if the pin is later configured as a GPIO output is the
latched value driven onto the pin. Writing a 0 to any bit in the toggle registers has no effect.
1070 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
Note
Using input synchronization when the peripheral itself performs the synchronization can cause
unexpected results. The user must make sure that the GPIO pin is configured for asynchronous in
this case.
GPxCTRL Reg
GPxQSEL1/2
SYSCLKOUT
Number of Samples
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1071
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
From these equations, the minimum and maximum time between samples can be calculated for a given
SYSCLKOUT frequency:
Number of samples:
The number of times the signal is sampled is either three samples or six samples as specified in the qualification
selection (GPAQSEL1, GPAQSEL2, GPBQSEL1, and GPBQSEL2) registers. When three or six consecutive
cycles are the same, then the input change is passed through to the device.
Total Sampling Window Width:
The sampling window is the time during which the input signal is sampled as shown in Figure 10-3. By using the
equation for the sampling period, along with the number of samples to be taken, the total width of the window
can be determined.
For the input qualifier to detect a change in the input, the level of the signal must be stable for the duration of the
sampling window width or longer.
1072 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
The number of sampling periods within the window is always one less than the number of samples taken. For
a three-sample window, the sampling window width is two sampling periods wide where the sampling period is
defined in Table 10-3. Likewise, for a six-sample window, the sampling window width is five sampling periods
wide. Table 10-5 and Table 10-6 show the calculations used to determine the total sampling window width based
on GPxCTRL[QUALPRDn] and the number of samples taken.
Table 10-5. Case 1: Three-Sample Sampling Window Width
Total Sampling Window Width
If GPxCTRL[QUALPRDn] = 0 2 × TSYSCLKOUT
If GPxCTRL[QUALPRDn] ≠ 0 2 × 2 × GPxCTRL[QUALPRDn] × TSYSCLKOUT
Where TSYSCLKOUT is the period in time of SYSCLKOUT
Note
The external signal change is asynchronous with respect to both the sampling period and
SYSCLKOUT. Due to the asynchronous nature of the external signal, the input must be held stable for
a time greater than the sampling window width to make sure the logic detects a change in the signal.
The extra time required can be up to an additional sampling period + TSYSCLKOUT.
The required duration for an input signal to be stable for the qualification logic to detect a change is
described in the data manual.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1073
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1074 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1075
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1076 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1077
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
Note
The table below is for example only. GPIO6 may not be available on this device. If GPIO6 is available,
the functions mentioned in the table below may not match the actual functions available. Please see
the GPIO Muxing section of this document for correct list of GPIOs and corresponding mux options for
this device.
The devices have different multiplexing schemes. If a peripheral is not available on a particular device, that mux
selection is reserved on that device and can not be used.
CAUTION
If a reserved GPIO mux configuration that is not mapped to either a peripheral or GPIO mode is
selected, the state of the pin is undefined and the pin is driven. Unimplemented configurations are
for future expansion and must not be selected. In the device mux table (see the data manual), these
options are indicated as Reserved or left blank.
Some peripherals can be assigned to more than one pin by way of the mux registers. For example,
OUTPUTXBAR1 can be assigned to GPIOs p, q, or r (where p, q, and r are example GPIO numbers), depending
on individual system requirements. An example of this is shown in Table 10-9.
1078 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
Note
The table below is for example only. Bit ranges may not correspond to OUTPUTXBAR1 on this device.
Please see the GPIO Muxing section of this document for correct list of GPIOs and corresponding
mux options for this device.
If none or more then one of the GPIO pins is configured as peripheral input pins, then that GPIO is set to a
hard-wired default value.
Table 10-9. Peripheral Muxing (Multiple Pins Assigned)
GMUX Configuration MUX Configuration
Choice 1: GPIOp GPyGMUX1[5:4]=01 GPyMUX1[5:4]=01
or Choice 2: GPIOq GPyGMUX2[17:16]=00 GPyMUX2[17:16]=01
or Choice 3: GPIOr GPyGMUX1[7:6]=01 GPyMUX1[7:6]=01
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1079
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
10.9 Software
10.9.1 GPIO Examples
NOTE: These examples are located in the C2000Ware installation at the following location:
C2000Ware_VERSION#/driverlib/DEVICE_GPN/examples/CORE_IF_MULTICORE/gpio
Cloud access to these examples is available at the following link: dev.ti.com C2000Ware Examples.
10.9.1.1 Device GPIO Setup
FILE: gpio_ex1_setup.c
Configures the device GPIO into two different configurations This code is verbose to illustrate how the GPIO
could be setup. In a real application, lines of code can be combined for improved code size and efficiency.
This example only sets-up the GPIO. Nothing is actually done with the pins after setup.
In general:
• All pullup resistors are enabled. For ePWMs this may not be desired.
• Input qual for communication ports (CAN, SPI, SCI, I2C) is asynchronous
• Input qual for Trip pins (TZ) is asynchronous
• Input qual for eCAP and eQEP signals is synch to SYSCLKOUT
• Input qual for some I/O's and __interrupts may have a sampling window
10.9.1.2 Device GPIO Toggle
FILE: gpio_ex2_toggle.c
Configures the device GPIO through the sysconfig file. The GPIO pin is toggled in the infinit loop.
10.9.1.3 Device GPIO Interrupt
FILE: gpio_ex3_interrupt.c
Configures the device GPIOs through the sysconfig file. One GPIO output pin, and one GPIO input pin is
configured. The example then configures the GPIO input pin to be the source of an external interrupt which
toggles the GPIO output pin.
10.9.1.4 External Interrupt (XINT)
FILE: gpio_ex4_aio_external_interrupt.c
In this example AIO pins are configured as digital inputs. Two other GPIO signals (connected externally to AIO
pins) are toggled in software to trigger external interrupt through AIO224 and AIO225 (AIO224 assigned to
XINT1 and AIO225 assigned to XINT2). The user is required to externally connect these signals for the program
to work properly. Each interrupt is fired in sequence: XINT1 first and then XINT2.
GPIO34 will go high outside of the interrupts and low within the interrupts. This signal can be monitored on a
scope.
ExternalConnections
• Connect GPIO30 to AIO224. AIO224 will be assigned to XINT1
• Connect GPIO31 to AIO225. AIO225 will be assigned to XINT2
• GPIO34 can be monitored on an oscilloscope
Watch Variables
• xint1Count for the number of times through XINT1 interrupt
• xint2Count for the number of times through XINT2 interrupt
• loopCount for the number of times through the idle loop
10.9.2 LED Examples
NOTE: These examples are located in the C2000Ware installation at the following location:
C2000Ware_VERSION#/driverlib/DEVICE_GPN/examples/CORE_IF_MULTICORE/led
1080 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
Cloud access to these examples is available at the following link: dev.ti.com C2000Ware Examples.
10.9.2.1 LED Blinky Example
FILE: led_ex1_blinky.c
This example demonstrates how to blink a LED.
External Connections
• None.
Watch Variables
• None.
10.10 GPIO Registers
This section describes the General-Purpose Input/Output Registers.
10.10.1 GPIO Base Address Table
Table 10-10. GPIO Base Address Table
Bit Field Name Pipeline
DriverLib Name Base Address CPU1 DMA HIC CLA
Instance Structure Protected
GPIO_CTRL_RE
GpioCtrlRegs GPIOCTRL_BASE 0x0000_7C00 YES - - - YES
GS
GPIO_DATA_RE
GpioDataRegs GPIODATA_BASE 0x0000_7F00 YES - - YES YES
GS
GPIO_DATA_REA GPIODATAREAD_BAS
GpioDataReadRegs 0x0000_7F80 YES - YES YES YES
D_REGS E
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1081
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1082 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
Complex bit access types are encoded to fit into small table cells. Table 10-12 shows the codes that are used for
access types in this section.
Table 10-12. GPIO_CTRL_REGS Access Type Codes
Access Type Code Description
Read Type
R R Read
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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1083
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1084 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1085
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
15 14 13 12 11 10 9 8 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
1086 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1087
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
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
1088 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1089
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
15 14 13 12 11 10 9 8 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
1090 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1091
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) 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
1092 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1093
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
23 22 21 20 19 18 17 16
GPIO23 GPIO22 GPIO21 GPIO20 GPIO19 GPIO18 GPIO17 GPIO16
R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h
15 14 13 12 11 10 9 8
GPIO15 GPIO14 GPIO13 GPIO12 GPIO11 GPIO10 GPIO9 GPIO8
R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h
7 6 5 4 3 2 1 0
GPIO7 GPIO6 GPIO5 GPIO4 GPIO3 GPIO2 GPIO1 GPIO0
R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h
1094 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1095
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) 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
1096 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1097
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) 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
1098 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1099
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED GPIO21 GPIO20 RESERVED RESERVED RESERVED RESERVED
R/W-0h R/W-0h R/W-1h R/W-1h R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED
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
RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
1100 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1101
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
15 14 13 12 11 10 9 8 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
1102 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1103
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPIO3 GPIO2 GPIO1 GPIO0
R/W-0h R/W-0h R/W-0h R/W-0h
1104 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPIO11 GPIO10 GPIO9 GPIO8
R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1105
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPIO19 GPIO18 GPIO17 GPIO16
R/W-0h R/W-0h R/W-0h R/W-0h
1106 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPIO27 GPIO26 GPIO25 GPIO24
R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1107
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) 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
1108 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1109
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
23 22 21 20 19 18 17 16
GPIO23 GPIO22 GPIO21 GPIO20 GPIO19 GPIO18 GPIO17 GPIO16
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
GPIO15 GPIO14 GPIO13 GPIO12 GPIO11 GPIO10 GPIO9 GPIO8
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
GPIO7 GPIO6 GPIO5 GPIO4 GPIO3 GPIO2 GPIO1 GPIO0
R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
1110 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1111
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1112 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPIO39 RESERVED GPIO37 RESERVED GPIO35 GPIO34 GPIO33 GPIO32
R/W-0h R/W-0h R/W-3h R/W-0h R/W-3h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1113
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1114 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1115
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1116 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPIO39 RESERVED GPIO37 RESERVED GPIO35 GPIO34 GPIO33 GPIO32
R/W-0h R/W-0h R/W-3h R/W-0h R/W-3h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1117
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
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
1118 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
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 RESERVED GPIO37 RESERVED 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1119
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1120 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
23 22 21 20 19 18 17 16
GPIO55 GPIO54 GPIO53 GPIO52 GPIO51 GPIO50 GPIO49 GPIO48
R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h
15 14 13 12 11 10 9 8
GPIO47 GPIO46 GPIO45 GPIO44 GPIO43 GPIO42 GPIO41 GPIO40
R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h
7 6 5 4 3 2 1 0
GPIO39 RESERVED GPIO37 RESERVED GPIO35 GPIO34 GPIO33 GPIO32
R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1121
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1122 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
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 RESERVED GPIO37 RESERVED 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1123
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1124 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
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 RESERVED GPIO37 RESERVED 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1125
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1126 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPIO39 RESERVED GPIO37 RESERVED GPIO35 GPIO34 GPIO33 GPIO32
R/W-0h R/W-0h R/W-3h R/W-0h R/W-3h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1127
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
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
1128 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPIO35 GPIO34 GPIO33 GPIO32
R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1129
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPIO43 GPIO42 GPIO41 GPIO40
R/W-0h R/W-0h R/W-0h R/W-0h
1130 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPIO51 GPIO50 GPIO49 GPIO48
R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1131
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPIO59 GPIO58 GPIO57 GPIO56
R/W-0h R/W-0h R/W-0h R/W-0h
1132 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
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 RESERVED GPIO37 RESERVED 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1133
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1134 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
23 22 21 20 19 18 17 16
GPIO55 GPIO54 GPIO53 GPIO52 GPIO51 GPIO50 GPIO49 GPIO48
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
GPIO47 GPIO46 GPIO45 GPIO44 GPIO43 GPIO42 GPIO41 GPIO40
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
GPIO39 RESERVED GPIO37 RESERVED GPIO35 GPIO34 GPIO33 GPIO32
R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1135
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1136 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1137
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED GPIO233 GPIO232
R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
GPIO231 GPIO230 GPIO229 GPIO228
R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
GPIO227 GPIO226 GPIO225 GPIO224
R/W-0h R/W-0h R/W-0h R/W-0h
1138 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1139
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
23 22 21 20 19 18 17 16
GPIO251 RESERVED GPIO249 GPIO248
R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
GPIO247 RESERVED GPIO245 GPIO244
R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED GPIO242 GPIO241 GPIO240
R/W-0h R/W-0h R/W-0h R/W-0h
1140 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1141
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED GPIO233 GPIO232
R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
GPIO231 GPIO230 RESERVED GPIO228
R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
GPIO227 GPIO226 GPIO225 GPIO224
R/W-0h R/W-0h R/W-0h R/W-0h
1142 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1143
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED RESERVED RESERVED
R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED GPIO245 GPIO244
R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED GPIO242 GPIO241 GPIO240
R/W-0h R/W-0h R/W-0h R/W-0h
1144 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
23 22 21 20 19 18 17 16
GPIO247 RESERVED GPIO245 GPIO244 RESERVED GPIO242 GPIO241 GPIO240
R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h
15 14 13 12 11 10 9 8
GPIO239 GPIO238 GPIO237 GPIO236 RESERVED RESERVED GPIO233 GPIO232
R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h
7 6 5 4 3 2 1 0
GPIO231 GPIO230 GPIO229 GPIO228 GPIO227 GPIO226 GPIO225 GPIO224
R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1145
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1146 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1147
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1148 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1149
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
23 22 21 20 19 18 17 16
GPIO247 RESERVED GPIO245 GPIO244 RESERVED GPIO242 GPIO241 GPIO240
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
GPIO239 GPIO238 GPIO237 GPIO236 RESERVED RESERVED GPIO233 GPIO232
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
GPIO231 GPIO230 GPIO229 GPIO228 GPIO227 GPIO226 GPIO225 GPIO224
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
1150 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1151
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1152 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1153
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
23 22 21 20 19 18 17 16
GPIO247 RESERVED GPIO245 GPIO244 RESERVED GPIO242 GPIO241 GPIO240
R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h
15 14 13 12 11 10 9 8
GPIO239 GPIO238 GPIO237 GPIO236 RESERVED RESERVED GPIO233 GPIO232
R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h
7 6 5 4 3 2 1 0
GPIO231 GPIO230 GPIO229 GPIO228 GPIO227 GPIO226 GPIO225 GPIO224
R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h R/W-1h
1154 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1155
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1156 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1157
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1158 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1159
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED GPIO233 GPIO232
R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
GPIO231 GPIO230 RESERVED GPIO228
R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
GPIO227 GPIO226 GPIO225 GPIO224
R/W-0h R/W-0h R/W-0h R/W-0h
1160 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1161
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
23 22 21 20 19 18 17 16
RESERVED RESERVED RESERVED RESERVED
R/W-0h R/W-0h R/W-0h R/W-0h
15 14 13 12 11 10 9 8
RESERVED RESERVED GPIO245 GPIO244
R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
RESERVED GPIO242 GPIO241 GPIO240
R/W-0h R/W-0h R/W-0h R/W-0h
1162 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPIO227 GPIO226 GPIO225 GPIO224
R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1163
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED RESERVED GPIO233 GPIO232
R/W-0h R/W-0h R/W-0h R/W-0h
1164 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED GPIO242 GPIO241 GPIO240
R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1165
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GPIO251 RESERVED GPIO249 GPIO248
R/W-0h R/W-0h R/W-0h R/W-0h
1166 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
23 22 21 20 19 18 17 16
GPIO247 RESERVED GPIO245 GPIO244 RESERVED GPIO242 GPIO241 GPIO240
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
GPIO239 GPIO238 GPIO237 GPIO236 RESERVED RESERVED GPIO233 GPIO232
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
GPIO231 GPIO230 GPIO229 GPIO228 GPIO227 GPIO226 GPIO225 GPIO224
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1167
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1168 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1169
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1170 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
23 22 21 20 19 18 17 16
GPIO247 RESERVED GPIO245 GPIO244 RESERVED GPIO242 GPIO241 GPIO240
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
GPIO239 GPIO238 GPIO237 GPIO236 RESERVED RESERVED GPIO233 GPIO232
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
GPIO231 GPIO230 GPIO229 GPIO228 GPIO227 GPIO226 GPIO225 GPIO224
R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1171
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1172 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1173
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 10-65 shows the codes that are used for
access types in this section.
Table 10-65. GPIO_DATA_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.
1174 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1175
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1176 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
23 22 21 20 19 18 17 16
GPIO23 GPIO22 GPIO21 GPIO20 GPIO19 GPIO18 GPIO17 GPIO16
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
15 14 13 12 11 10 9 8
GPIO15 GPIO14 GPIO13 GPIO12 GPIO11 GPIO10 GPIO9 GPIO8
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
7 6 5 4 3 2 1 0
GPIO7 GPIO6 GPIO5 GPIO4 GPIO3 GPIO2 GPIO1 GPIO0
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1177
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1178 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
23 22 21 20 19 18 17 16
GPIO23 GPIO22 GPIO21 GPIO20 GPIO19 GPIO18 GPIO17 GPIO16
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
15 14 13 12 11 10 9 8
GPIO15 GPIO14 GPIO13 GPIO12 GPIO11 GPIO10 GPIO9 GPIO8
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
7 6 5 4 3 2 1 0
GPIO7 GPIO6 GPIO5 GPIO4 GPIO3 GPIO2 GPIO1 GPIO0
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1179
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1180 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
23 22 21 20 19 18 17 16
GPIO23 GPIO22 GPIO21 GPIO20 GPIO19 GPIO18 GPIO17 GPIO16
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
15 14 13 12 11 10 9 8
GPIO15 GPIO14 GPIO13 GPIO12 GPIO11 GPIO10 GPIO9 GPIO8
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
7 6 5 4 3 2 1 0
GPIO7 GPIO6 GPIO5 GPIO4 GPIO3 GPIO2 GPIO1 GPIO0
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1181
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1182 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
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 RESERVED GPIO37 RESERVED 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
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1183
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1184 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
23 22 21 20 19 18 17 16
GPIO55 GPIO54 GPIO53 GPIO52 GPIO51 GPIO50 GPIO49 GPIO48
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
15 14 13 12 11 10 9 8
GPIO47 GPIO46 GPIO45 GPIO44 GPIO43 GPIO42 GPIO41 GPIO40
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
7 6 5 4 3 2 1 0
GPIO39 RESERVED GPIO37 RESERVED GPIO35 GPIO34 GPIO33 GPIO32
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1185
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1186 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
23 22 21 20 19 18 17 16
GPIO55 GPIO54 GPIO53 GPIO52 GPIO51 GPIO50 GPIO49 GPIO48
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
15 14 13 12 11 10 9 8
GPIO47 GPIO46 GPIO45 GPIO44 GPIO43 GPIO42 GPIO41 GPIO40
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
7 6 5 4 3 2 1 0
GPIO39 RESERVED GPIO37 RESERVED GPIO35 GPIO34 GPIO33 GPIO32
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1187
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1188 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
23 22 21 20 19 18 17 16
GPIO55 GPIO54 GPIO53 GPIO52 GPIO51 GPIO50 GPIO49 GPIO48
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
15 14 13 12 11 10 9 8
GPIO47 GPIO46 GPIO45 GPIO44 GPIO43 GPIO42 GPIO41 GPIO40
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
7 6 5 4 3 2 1 0
GPIO39 RESERVED GPIO37 RESERVED GPIO35 GPIO34 GPIO33 GPIO32
R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h R-0/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1189
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1190 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
23 22 21 20 19 18 17 16
GPIO247 RESERVED GPIO245 GPIO244 RESERVED GPIO242 GPIO241 GPIO240
R-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
GPIO239 GPIO238 GPIO237 GPIO236 RESERVED RESERVED GPIO233 GPIO232
R/W-0h R/W-0h R/W-0h R-0h R/W-0h R/W-0h R/W-0h R/W-0h
7 6 5 4 3 2 1 0
GPIO231 GPIO230 GPIO229 GPIO228 GPIO227 GPIO226 GPIO225 GPIO224
R/W-0h R/W-0h R-0h R/W-0h R/W-0h R/W-0h R/W-0h R/W-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1191
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1192 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1193
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1194 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1195
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1196 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
Complex bit access types are encoded to fit into small table cells. Table 10-76 shows the codes that are used for
access types in this section.
Table 10-76. GPIO_DATA_READ_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.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1197
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1198 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1199
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1200 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1201
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1202 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com General-Purpose Input/Output (GPIO)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1203
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
General-Purpose Input/Output (GPIO) www.ti.com
1204 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
Chapter 11
Crossbar (X-BAR)
The crossbars (referred to as X-BAR throughout this chapter) provide flexibility to connect device inputs, outputs,
and internal resources in a variety of configurations.
The device contains a total of six X-BARs:
• Input X-BAR
• CLB Input X-BAR
• Output X-BAR
• CLB Output X-BAR
• CLB X-BAR
• ePWM X-BAR
Each of the X-BARs is named according to where the X-BAR takes signals. For example, the Input X-BAR and
CLB Input X-BAR bring external signals “in” to the device. The Output X-BAR and CLB Output X-BAR take
internal signals “out” of the device to a GPIO. The CLB X-BAR and ePWM X-BAR take signals to the CLB and
ePWM modules, respectively.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1205
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
GPIO0 Asynchronous
Synchronous Input X-BAR
Sync. + Qual. Other Sources 127:16
GPIOx
eCAP
Modules
INPUT[16:1] 15:0
INPUT16
INPUT15
INPUT14
INPUT13
INPUT12
INPUT10
INPUT11
INPUT6
INPUT5
INPUT4
INPUT3
INPUT2
INPUT1
INPUT9
INPUT8
INPUT7
XINT1 TRIP4
XINT2 TRIP5 ePWM
CPU PIE XINT3 Modules
XINT4 TRIP7
XINT5 TRIP8
ePWM TRIP9
X-BAR
TRIP10
TRIP11
TRIP12
Other
Sources
ADC ADCEXTSOC
EXTSYNCIN1 ePWM and eCAP
EXTSYNCIN2 Sync Scheme
Other Sources
Output X-BAR
1206 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1207
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
Note
Signals routed into the CLB using the XBAR must be synchronized within the CLB.
1208 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
0.0
0.1 0
0.2
0.3
TRIPxMUXENABLE
(32 bits)
TRIPxMUX0TO15CFG.MUX0
1.0
1.1 1
1.2
1.3
TRIPxMUX0TO15CFG.MUX1
31.0
31.1 TRIPOUTINV
31 (1 bit)
31.2
31.3
TRIPxMUX16TO31CFG.MUX31
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1209
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
Note
Do not use "Reserved" signals in your application.
1210 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
0.0
0.1 0
0.2
0.3 AUXSIGxMUXENABLE
(32 bits)
AUXSIGxMUX0TO15CFG.MUX0
1.0
1.1 1
1.2
1.3
AUXSIGx
AUXSIGxMUX0TO15CFG.MUX1
31.0
31.1 AUXSIGOUTINV
31 (1 bits)
31.2
31.3
AUXSIGxMUX16TO31CFG.MUX31
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1211
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
GPIO0 Asynchronous
To Synchronous Input X-BAR
GPIOx Sync. + Qual
CLB
Other INPUT1 – INPUT14 TILE
Sources OUT 4/5
CLB X-BAR
CLB TILE1
GPREG CELL
CLB Global Signals
IN0-7
Local OUT 0-7
Signals
.
CLB Tile Outputs
.
INPUT1 – INPUT16 . Intersect other
Peripherals
CLB TILEx
OUTPUT X-BAR
GPREG CELL
IN0-7
Local OUT 0-7
Signals
All CLB
Tile
Outputs
GPIO MUX
1212 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1213
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
0.0
0.1 0
0.2
0.3
OUTPUTxMUXENABLE
(32 bits)
OUTPUTxMUX0TO15CFG.MUX0
1.0
1.1 1
1.2
1.3
OUTPUTx
OUTPUTxMUX0TO15CFG.MUX1
OUTPUTLATCHENABLE
31.0
D Q
31.1 31
31.2 OLAT OUTPUTINV
31.3
Q
1214 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
Note
Do not use "Reserved" signals in your application.
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1215
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
Note
Do not use "Reserved" signals in your application.
1216 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1217
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
CTRIPOUTH
CTRIPOUTL (Output X-BAR only)
CMPSSx
CTRIPH
CTRIPL (ePWM X-BAR only)
OUTPUTXBAR1
OUTPUTXBAR2
OUTPUTXBAR3
Output OUTPUTXBAR4
X-BAR OUTPUTXBAR5
OUTPUTXBAR6
OUTPUTXBAR7
OUTPUTXBAR8
CLB_OUTPUTXBAR1
CLB_OUTPUTXBAR2
CLB CLB_OUTPUTXBAR3
CLB_OUTPUTXBAR4
CLB Input X-BAR CLB TILEx Output CLB_OUTPUTXBAR5
X-BAR CLB_OUTPUTXBAR6
CLB_OUTPUTXBAR7
CLB_OUTPUTXBAR8
1218 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
INPUT_XBAR_R
InputXbarRegs INPUTXBAR_BASE 0x0000_7900 YES - - - YES
EGS
XbarRegs XBAR_REGS XBAR_BASE 0x0000_7920 YES - - - YES
INPUT_XBAR_R
ClbInputXbarRegs CLBINPUTXBAR_BASE 0x0000_7960 YES - - - YES
EGS
EPWM_XBAR_R
EPwmXbarRegs EPWMXBAR_BASE 0x0000_7A00 YES - - - YES
EGS
CLB_XBAR_REG
ClbXbarRegs CLBXBAR_BASE 0x0000_7A40 YES - - - YES
S
OUTPUT_XBAR_
OutputXbarRegs OUTPUTXBAR_BASE 0x0000_7A80 YES - - - YES
REGS
OUTPUT_XBAR_ CLBOUTPUTXBAR_BA
ClbOutputXbarRegs 0x0000_7BC0 YES - - - YES
REGS SE
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1219
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 11-9 shows the codes that are used for
access types in this section.
Table 11-9. INPUT_XBAR_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.
1220 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1221
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
7 6 5 4 3 2 1 0
SELECT
R/W-FFFEh
1222 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
7 6 5 4 3 2 1 0
SELECT
R/W-FFFEh
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1223
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
7 6 5 4 3 2 1 0
SELECT
R/W-FFFEh
1224 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
7 6 5 4 3 2 1 0
SELECT
R/W-FFFEh
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1225
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
7 6 5 4 3 2 1 0
SELECT
R/W-FFFEh
1226 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
7 6 5 4 3 2 1 0
SELECT
R/W-FFFEh
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1227
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
7 6 5 4 3 2 1 0
SELECT
R/W-FFFEh
1228 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
7 6 5 4 3 2 1 0
SELECT
R/W-FFFEh
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1229
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
7 6 5 4 3 2 1 0
SELECT
R/W-FFFEh
1230 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
7 6 5 4 3 2 1 0
SELECT
R/W-FFFEh
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1231
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
7 6 5 4 3 2 1 0
SELECT
R/W-FFFEh
1232 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
7 6 5 4 3 2 1 0
SELECT
R/W-FFFEh
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1233
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
7 6 5 4 3 2 1 0
SELECT
R/W-FFFEh
1234 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
7 6 5 4 3 2 1 0
SELECT
R/W-FFFEh
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1235
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
7 6 5 4 3 2 1 0
SELECT
R/W-FFFEh
1236 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
7 6 5 4 3 2 1 0
SELECT
R/W-FFFEh
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1237
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
23 22 21 20 19 18 17 16
RESERVED
R-0-0h
15 14 13 12 11 10 9 8
INPUT16SELE INPUT15SELE INPUT14SELE INPUT13SELE INPUT12SELE INPUT11SELE INPUT10SELE INPUT9SELEC
CT CT CT CT CT CT CT T
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
INPUT8SELEC INPUT7SELEC INPUT6SELEC INPUT5SELEC INPUT4SELEC INPUT3SELEC INPUT2SELEC INPUT1SELEC
T T T T T T T T
R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h R/WSonce-0h
1238 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1239
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
Complex bit access types are encoded to fit into small table cells. Table 11-28 shows the codes that are used for
access types in this section.
Table 11-28. XBAR_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.
1240 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
23 22 21 20 19 18 17 16
CMPSS4_CTRI CMPSS4_CTRI CMPSS3_CTRI CMPSS3_CTRI CMPSS2_CTRI CMPSS2_CTRI CMPSS1_CTRI CMPSS1_CTRI
POUTH POUTL POUTH POUTL POUTH POUTL POUTH POUTL
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 RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
CMPSS4_CTRI CMPSS4_CTRI CMPSS3_CTRI CMPSS3_CTRI CMPSS2_CTRI CMPSS2_CTRI CMPSS1_CTRI CMPSS1_CTRI
PH PL PH PL PH PL PH PL
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1241
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
1242 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1243
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
23 22 21 20 19 18 17 16
ADCAEVT1 EXTSYNCOUT RESERVED RESERVED RESERVED ECAP3_OUT ECAP2_OUT ECAP1_OUT
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
INPUT14 INPUT13 INPUT12 INPUT11 INPUT10 INPUT9 INPUT8 INPUT7
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
ADCSOCB ADCSOCA INPUT6 INPUT5 INPUT4 INPUT3 INPUT2 INPUT1
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
1244 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1245
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
1246 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1247
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
23 22 21 20 19 18 17 16
RESERVED SD2FLT4_COM SD2FLT4_COM SD2FLT3_COM SD2FLT3_COM SD2FLT2_COM SD2FLT2_COM SD2FLT1_COM
PH PL PH PL PH PL PH
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
15 14 13 12 11 10 9 8
SD2FLT1_COM SD1FLT4_COM SD1FLT4_COM SD1FLT3_COM SD1FLT3_COM SD1FLT2_COM SD1FLT2_COM SD1FLT1_COM
PL PH PL PH PL PH PL PH
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
SD1FLT1_COM RESERVED RESERVED RESERVED RESERVED ADCCEVT4 ADCCEVT3 ADCCEVT2
PL
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
1248 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1249
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
1250 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1251
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
23 22 21 20 19 18 17 16
CLB4_5_1 CLB4_4_1 CLB3_5_1 CLB3_4_1 CLB2_5_1 CLB2_4_1 CLB1_5_1 CLB1_4_1
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 RESERVED RESERVED RESERVED MCANA_FEVT MCANA_FEVT MCANA_FEVT RESERVED
2 1 0
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
7 6 5 4 3 2 1 0
SD2FLT4_DRIN SD2FLT4_COM SD2FLT3_DRIN SD2FLT3_COM SD2FLT2_DRIN SD2FLT2_COM SD2FLT1_DRIN SD2FLT1_COM
T PZ T PZ T PZ T PZ
R-0h R-0h R-0h R-0h R-0h R-0h R-0h R-0h
1252 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1253
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
1254 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)
SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023 TMS320F28003x Real-Time Microcontrollers 1255
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
Crossbar (X-BAR) www.ti.com
23 22 21 20 19 18 17 16
CMPSS4_CTRI CMPSS4_CTRI CMPSS3_CTRI CMPSS3_CTRI CMPSS2_CTRI CMPSS2_CTRI CMPSS1_CTRI CMPSS1_CTRI
POUTH POUTL POUTH POUTL POUTH POUTL POUTH POUTL
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
15 14 13 12 11 10 9 8
RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED RESERVED
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
CMPSS4_CTRI CMPSS4_CTRI CMPSS3_CTRI CMPSS3_CTRI CMPSS2_CTRI CMPSS2_CTRI CMPSS1_CTRI CMPSS1_CTRI
PH PL PH PL PH PL PH PL
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
1256 TMS320F28003x Real-Time Microcontrollers SPRUIW9B – OCTOBER 2021 – REVISED JUNE 2023
Submit Document Feedback
Copyright © 2023 Texas Instruments Incorporated
www.ti.com Crossbar (X-BAR)