EasyManuals Logo

Texas Instruments TMS320C28x User Manual

Texas Instruments TMS320C28x
695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #623 background imageLoading...
Page #623 background image
Code Examples
D-7C2xLP Migration Guidelines
D.4 Code Examples
D.4.1 Boot Code for C28x operating mode initalization
Note: The following code fragment must be placed in your code just after
reset. This code will place the device in the proper operating mode to execute
C2xLP converted code:
Code Explanation
SETC OBJMODE ;C28OBJ = 1 enable 28x object mode
CLRC PAGE0 ;PAGE0 = 0 not relevant for 28x mode,
;cleared to zero
SETC AMODE ;AMODE = 1 enable C2xLP compatible
;addressing mode
SETC SXM ;SXM = 1 for C2xLP at reset, SXM = 0
;for 28x at reset
SETC C ;Carry bit =1 for C2xLP at reset,
;Carry bit = 0 for 28x at reset
SPM 0 ;Set product shift mode zero, that
is PM bits = 001 compatible to
;C2xLP PM reset;mode
D.4.2 IER/IFR Code
Table D1. Code to Save Contents Of IMR (IER) And Disabling Lower Priority Interrupts At
Beginning Of ISR
C2xLP C28x
INTx: .
MAR *,AR1
LDP #0
LACL IMR
SACL *+
AND #~INT_MASK
SACL IMR
.
.
INTx: .
AND IER,#~INT_MASK
.
Note: C28x saves IER as part of auto-
matic context save operation and dis-
ables the current interrupt automati-
cally to prevent recursive interrupts.
Table D2. Code to Disable an Interrupt
C2xLP C28x
SETC INTM
LDP #0
LACL IMR
AND #~INTx
SACL IMR
CLRC INTM
AND IER,#~INTx
;operation is atomic and
;will not be interrupted.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS320C28x and is the answer not in the manual?

Texas Instruments TMS320C28x Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS320C28x
CategoryProcessor
LanguageEnglish

Related product manuals