Contents ..........................Preface .................. Flash and OTP Memory Blocks ....................Flash and OTP Memory ...................... 1.1.1 Flash Memory ....................... 1.1.2 OTP Memory .................... Flash and OTP Power Modes ................... 1.2.1 Flash and OTP Performance ....................1.2.2 Flash Pipeline Mode ..............1.2.3 Reserved Locations Within Flash and OTP ............
Page 4
www.ti.com ....................GPIO Module Overview ....................Configuration Overview ..................Digital General Purpose I/O Control ......................Input Qualification ..............4.4.1 No Synchronization (asynchronous input) ................. 4.4.2 Synchronization to SYSCLKOUT Only ............... 4.4.3 Qualification Using a Sampling Window ................GPIO and Peripheral Multiplexing (MUX) ....................
www.ti.com List of Figures ..................Flash Power Mode State Diagram ....................... Flash Pipeline ................Flash Configuration Access Flow Diagram ..................Flash Options Register (FOPT) ................... Flash Power Register (FPWR) ..................Flash Status Register (FSTATUS) ................. Flash Standby Wait Register (FSTDBYWAIT) ..........
Page 6
www.ti.com ............4-14 GPIO Port A Qualification Control (GPACTRL) Register ............4-15 GPIO Port B Qualification Control (GPBCTRL) Register ............4-16 GPIO Port A Qualification Select 1 (GPAQSEL1) Register ............4-17 GPIO Port A Qualification Select 2 (GPAQSEL2) Register ............4-18 GPIO Port B Qualification Select 1 (GPBQSEL1) Register ............
Page 7
www.ti.com List of Tables ..................Flash/OTP Configuration Registers ..............Flash Options Register (FOPT) Field Descriptions ..............Flash Power Register (FPWR) Field Descriptions ..............Flash Status Register (FSTATUS) Field Descriptions ........... Flash Standby Wait Register (FSTDBYWAIT) Field Descriptions ......Flash Standby to Active Wait Counter Register (FACTIVEWAIT) Field Descriptions ............
Page 8
www.ti.com ..........4-12 GPIO Port A Multiplexing 1 (GPAMUX1) Register Field Descriptions ............4-13 GPIO Port A MUX 2 (GPAMUX2) Register Field Descriptions ............4-14 GPIO Port B MUX 1 (GPBMUX1) Register Field Descriptions ............4-15 GPIO Port B MUX 2 (GPBMUX2) Register Field Descriptions ............
Page 9
www.ti.com ................5-16 DEVICECNF Register Field Descriptions ................... 5-17 PARTID Register Field Descriptions ..................5-18 CLASSID Register Description ..................5-19 REVID Register Field Descriptions ................5-20 PROTSTART and PROTRANGE Registers ..................... 5-21 PROTSTART Valid Values ..................... 5-22 PROTRANGE Valid Values ......................
Page 10
List of Tables SPRUFB0C – September 2007 – Revised May 2009 Submit Documentation Feedback...
A legend explains the notation used for the properties. – Reserved bits in a register figure designate a bit that is used for future device expansion. Related Documentation From Texas Instruments The following books describe the 2833x and related support tools that are available on the TI website: Data Manual and Errata—...
Page 12
Related Documentation From Texas Instruments www.ti.com SPRU566 — TMS320x28xx, 28xxx DSP Peripheral Reference Guide describes the peripheral reference guides of the 28x digital signal processors (DSPs). SPRUFB0 — TMS320x2833x, 2823x System Control and Interrupts Reference Guide describes the various interrupts and system control features of the 2833x and 2823x digital signal controllers (DSCs).
Page 13
— TMS320C28x DSP/BIOS 5.32 Application Programming Interface (API) Reference Guide describes development using DSP/BIOS. Trademarks TMS320C28x, C28x, Code Composer Studio are trademarks of Texas Instruments. All other trademarks are the property of their respective owners. SPRUFB0C – September 2007 – Revised May 2009...
Page 14
Read This First SPRUFB0C – September 2007 – Revised May 2009 Submit Documentation Feedback...
Chapter 1 SPRUFB0C – September 2007 – Revised May 2009 Flash and OTP Memory Blocks This chapter describes the proper sequence to configure the wait states and operating mode of flash and one-time programmable (OTP) memories. It also includes information on flash and OTP power modes and how to improve flash performance by enabling the flash pipeline mode.
Flash and OTP Memory www.ti.com Flash and OTP Memory This section describes how to configure flash and one-time programmable (OTP) memory. 1.1.1 Flash Memory The on-chip flash is uniformly mapped in both program and data memory space. This flash memory is always enabled and features: •...
Page 17
Flash and OTP Power Modes www.ti.com Note: During the boot process, the Boot ROM performs a dummy read of the Code Security Module (CSM) password locations located in the flash. This read is performed to unlock a new or erased device that has no password stored in it so that flash programming or loading of code into CSM protected SARAM can be performed.
Flash and OTP Power Modes www.ti.com The duration of the delay is determined by the FSTDBYWAIT and FACTIVEWAIT registers. Moving from the sleep state to a standby state is delayed by a count determined by the FSTDBYWAIT register. Moving from the standby state to the active state is delayed by a count determined by the FACTIVEWAIT register. Moving from the sleep mode (lowest power) to the active mode (highest power) is delayed by FSTDBYWAIT + FACTIVEWAIT.
Flash and OTP Power Modes www.ti.com An instruction fetch from the flash or OTP reads out 64 bits per access. The starting address of the access from flash is automatically aligned to a 64-bit boundary such that the instruction location is within the 64 bits to be fetched.
Flash and OTP Power Modes www.ti.com 2. For code security operation, all addresses between 0x33 FF80 and 0x33 FFF5 cannot be used for program code or data, but must be programmed to 0x0000 when the Code Security Password is programmed. If security is not a concern, addresses 0x33 FF80 through 0x33 FFF5 may be used for code or data.
Flash and OTP Registers www.ti.com Flash and OTP Registers The flash and OTP memory can be configured by the registers shown in Table 1-1. The configuration registers are all EALLOW protected. The bit descriptions are in Figure 1-4 through Figure 1-10.
Chapter 2 SPRUFB0C – September 2007 – Revised May 2009 Code Security Module (CSM) The code security module (CSM) is a security feature incorporated in 28x devices. It prevents access/visibility to on-chip memory to unauthorized persons—i.e., it prevents duplication/reverse engineering of proprietary code. The word secure means access to on-chip memory is protected.
Functional Description www.ti.com Functional Description The security module restricts the CPU access to certain on-chip memory without interrupting or stalling CPU execution. When a read occurs to a protected memory location, the read returns a zero value and CPU execution continues with the next instruction. This, in effect, blocks read and write access to various memories through the JTAG port or external peripherals.
Page 29
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.
Incorporating Code Security in User Applications www.ti.com Incorporating Code Security in User Applications Code security is typically not required in the development phase of a project; however, security is needed once a robust code is developed. Before such a code is programmed in the flash memory, a password should be chosen to secure the device.
Incorporating Code Security in User Applications www.ti.com Figure 2-1. CSM Status and Control Register (CSMSCR) FORCESEC Reserved Reserved SECURE R/W-1 R-10111 LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 2-5. CSM Status and Control Register (CSMSCR) Field Descriptions Bits Field Value...
Incorporating Code Security in User Applications www.ti.com 2.3.2 Password Match Flow Password match flow (PMF) is essentially a sequence of eight dummy reads from password locations (PWL) followed by eight writes to KEY registers. Figure 2-2 shows how the PMF helps to initialize the security logic registers and disable security logic. Figure 2-2.
Incorporating Code Security in User Applications www.ti.com 2.3.3 Unsecuring Considerations for Devices With/Without Code Security Case 1 and Case 2 provide unsecuring considerations for devices with and without code security. Case 1: Device With Code Security A device with code security should have a predetermined password stored in the password locations (0x33 FFF8 - 0x33 FFFF in memory).
Page 35
Incorporating Code Security in User Applications www.ti.com 2.3.3.1 C Code Example to Unsecure volatile int *CSM = (volatile int *)0x000AE0; //CSM register file volatile int *PWL = (volatile int *)0x0033FFF8; //Password location volatile int tmp; int I; // Read the 128-bits of the password locations (PWL) // in flash at address 0x33 FFF8 - 0x33 FFFF // If the device is secure, then the values read will // not actually be loaded into the temp variable, so...
Do's and Don'ts to Protect Security Logic www.ti.com Do's and Don'ts to Protect Security Logic 2.4.1 Do's • To keep the debug and code development phase simple, use the device in the unsecure mode; i.e., use all 128 bits as ones in the password locations (or use a password that is easy to remember). Use a password after the development phase when the code is frozen.
Chapter 3 SPRUFB0C – September 2007 – Revised May 2009 Clocking This section describes the oscillator, PLL and clocking mechanisms, the watchdog function, and the low-power modes....................Topic Page ............. Clocking and System Control ..............OSC and PLL Block ............
Clocking and System Control www.ti.com Clocking and System Control Figure 3-1 shows the various clock and reset domains. The PLL, clocking, watchdog and low-power modes, are controlled by the registers listed in Table 3-1. Figure 3-1. Clock and Reset Domains C28x Core CLKIN SYSCLKOUT...
Clocking and System Control www.ti.com Table 3-2. Peripheral Clock Control 0 Register (PCLKCR0) Field Descriptions (continued) Field Valu Description MCBSPAENCLK McBSP-A Clock Enable The McBSP-A module is not clocked. (default) The McBSP-A module is clocked by the low-speed clock (LSPCLK). SCIBENCLK SCI-B clock enable SCI-B module is not clocked.
Clocking and System Control www.ti.com Table 3-3. Peripheral Clock Control 1 Register (PCLKCR1) Field Descriptions Bits Field Value Description EQEP2ENCLK eQEP2 clock enable The eQEP2 module is not clocked. (default) The eQEP2 module is clocked by the system clock (SYSCLKOUT). EQEP1ENCLK eQEP1 clock enable The eQEP1 module is not clocked.
Page 42
Clocking and System Control www.ti.com Table 3-3. Peripheral Clock Control 1 Register (PCLKCR1) Field Descriptions (continued) Bits Field Value Description EPWM1ENCLK ePWM1 clock enable. The ePWM1 module is not clocked. (default) The ePWM1 module is clocked by the system clock (SYSCLKOUT). Clocking SPRUFB0C –...
Clocking and System Control www.ti.com Figure 3-5. High-Speed Peripheral Clock Prescaler (HISPCP) Register Reserved HSPCLK R/W-001 LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 3-5. High-Speed Peripheral Clock Prescaler (HISPCP) Field Descriptions Bits Field Value Description 15-3...
OSC and PLL Block www.ti.com OSC and PLL Block The on-chip oscillator and phase-locked loop (PLL) block provides the clocking signals for the device, as well as control for low-power mode (LPM) entry. 3.2.1 PLL-Based Clock Module The 2833x, 2823x devices have an on-chip, PLL-based clock module. The PLL has a 4-bit ratio control to select different CPU clock rates.
OSC and PLL Block www.ti.com Table 3-7. Possible PLL Configuration Modes PLL Mode Remarks PLLSTS[DIVSEL] SYSCLKOUT PLL Off Invoked by the user setting the PLLOFF bit in the PLLSTS register. The 0, 1 OSCCLK/4 PLL block is disabled in this mode. This can be useful to reduce system OSCCLK/2 noise and for low power operation.
Page 47
OSC and PLL Block www.ti.com If the OSCCLK input signal is missing, then the PLL will output a default "limp mode" frequency and the VCOCLK counter will continue to increment. Since the OSCCLK signal is missing, the OSCCLK counter will not increment and, therefore, the VCOCLK counter is not periodically cleared. Eventually, the VCOCLK counter overflows and, if required, the device switches the CLKIN input to the CPU to the limp mode output frequency of the PLL.
OSC and PLL Block www.ti.com The following list describes the behavior of the missing clock detect logic in various operating modes: • PLL by-pass mode When the PLL control register is set to 0x0000, the PLL is by-passed. Depending on the state of the PLLSTS[DIVSEL] bit, OSCCLK, OSCCLK/2, or OSCCLK/4 is connected directly to the CPU's input clock, CLKIN.
OSC and PLL Block www.ti.com 3.2.4 PLL Control (PLLCR) Register The PLLCR register is used to change the PLL multiplier of the device. Before writing to the PLLCR register, the following requirements must be met: • The PLLSTS[DIVSEL] bit must be 0 (CLKIN divide by 4 enabled). Change PLLSTS[DIVSEL] to 1 only after the PLL has completed locking, i.e., after PLLSTS[PLLLOCKS] = 1.
OSC and PLL Block www.ti.com Figure 3-10. PLLCR Change Procedure Flow Chart Start Device is operating in limp PLLSTS[MCLKSTS] mode. Take appropriate = 1? action for your system. Do not write to PLLCR. PLLSTS[DIVSEL] Set PLLSTS[DIVSEL] = 0 = 2 or 3? Set PLLSTS[MCLKOFF] = 1 to disable failed oscillator detect logic...
OSC and PLL Block www.ti.com 3.2.5 PLL Control, Status and XCLKOUT Register Descriptions The DIV field in the PLLCR register controls whether the PLL is bypassed or not and sets the PLL clocking ratio when it is not bypassed. PLL bypass is the default mode after reset. Do not write to the DIV field if the PLLSTS[DIVSEL] bit is 10 or 01, or if the PLL is operating in limp mode as indicated by the PLLSTS[MCLKSTS] bit being set.
OSC and PLL Block www.ti.com Table 3-9. PLL Status Register (PLLSTS) Field Descriptions (continued) (1) (2) Bits Field Value Description Select Divide By 8 for CLKIN 00, 01 Select Divide By 4 for CLKIN Select Divide By 2 for CLKIN Select Divide By 1 for CLKIN.
Low-Power Modes Block www.ti.com Low-Power Modes Block Table 3-10 summarizes the various modes. The various low-power modes operate as shown in Table 3-11. See the TMS320F28335, TMS320F28334, TMS320F28332, TMS320F28235, TMS320F28234, TMS320F28232 Digital Signal Controllers (DSCs) Data Manual (literature number SPRS439) for exact timing for entering and exiting the low power modes.
Low-Power Modes Block www.ti.com Table 3-11. Low Power Modes (continued) Mode Description HALT If the LPM bits in the LPMCR0 register are set to 1x, the device enters the HALT mode when the IDLE Mode: instruction is executed. In HALT mode all of the device clocks, including the PLL and oscillator, are shut down. Before entering the HALT mode, you should perform the following tasks: •...
Watchdog Block www.ti.com Table 3-12. Low Power Mode Control 0 Register (LPMCR0) Field Descriptions (continued) Bits Field Value Description These bits set the low power mode for the device. Set the low power mode to IDLE (default) Set the low power mode to STANDBY Set the low power mode to HALT Set the low power mode to HALT The low power mode bits (LPM) only take effect when the IDLE instruction is executed.
Watchdog Block www.ti.com 3.4.1 Servicing The Watchdog Timer The WDCNTR is reset when the proper sequence is written to the WDKEY register before the 8-bit watchdog counter (WDCNTR) overflows. The WDCNTR is reset-enabled when a value of 0x55 is written to the WDKEY.
Watchdog Block www.ti.com 3.4.3 Watchdog Operation in Low Power Modes In STANDBY mode, all of the clocks to the peripherals are turned off on the device. The only peripheral that remains functional is the watchdog since the watchdog module runs off the oscillator clock (OSCCLK).
Watchdog Block www.ti.com 3.4.5 Watchdog Registers The system control and status register (SCSR) contains the watchdog override bit and the watchdog interrupt enable/disable bit. Figure 3-15 describes the bit functions of the SCSR register. Figure 3-15. System Control and Status Register (SCSR) Reserved Reserved WDINTS...
Watchdog Block www.ti.com Figure 3-16. Watchdog Counter Register (WDCNTR) Reserved WDCNTR LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 3-15. Watchdog Counter Register (WDCNTR) Field Descriptions Bits Field Description 15-8 Reserved Reserved WDCNTR These bits contain the current value of the WD counter. The 8-bit counter continually increments at the watchdog clock (WDCLK), rate.
32-Bit CPU Timers 0/1/2 www.ti.com Table 3-17. Watchdog Control Register (WDCR) Field Descriptions (continued) Bits Field Value Description WDDIS Watchdog disable. On reset, the watchdog module is enabled. Enables the watchdog module. WDDIS can be modified only if the WDOVERRIDE bit in the SCSR register is set to 1.
32-Bit CPU Timers 0/1/2 www.ti.com Figure 3-20. CPU-Timer Interrupts Signals and Output Signal INT1 TINT0 CPU-TIMER 0 INT12 TINT1 CPU-TIMER 1 INT13 XINT13 TINT2 CPU-TIMER 2 INT14 (Reserved for DSP/BIOS) The timer registers are connected to the Memory Bus of the 28x processor. The timing of the timers is synchronized to SYSCLKOUT of the processor clock.
32-Bit CPU Timers 0/1/2 www.ti.com Figure 3-21. TIMERxTIM Register (x = 0, 1, 2) R/W-0 LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 3-19. TIMERxTIM Register Field Descriptions Bits Field Description 15-0 CPU-Timer Counter Registers (TIMH:TIM): The TIM register holds the low 16 bits of the current 32-bit count of the timer.
Chapter 4 SPRUFB0C – September 2007 – Revised May 2009 General-Purpose Input/Output (GPIO) The GPIO multiplexing (MUX) registers are used to select the operation of shared pins. The pins are named by their general purpose I/O name (i.e., GPIO0 - GPIO87). These pins can be individually selected to operate as digital I/O, referred to as GPIO, or connected to one of up to three peripheral I/O signals (via the GPxMUXn registers).
GPIO Module Overview www.ti.com GPIO Module Overview Up to three independent peripheral signals are multiplexed on a single GPIO-enabled pin in addition to individual pin bit-I/O capability. There are three 32-bit I/O ports. Port A consists of GPIO0-GPIO31, port B consists of GPIO32-GPIO63, and port C consists of GPIO64-87.
Configuration Overview www.ti.com Configuration Overview The pin function assignments, input qualification, and the external interrupt (XINT1 – XINT7, XNMI) sources are all controlled by the GPIO configuration control registers. In addition, you can assign pins to wake the device from the HALT and STANDBY low power modes and enable/disable internal pullup resistors.
Digital General Purpose I/O Control www.ti.com To plan configuration of the GPIO module, consider the following steps: Step 1. Plan the device pin-out: Through a pin multiplexing scheme, a lot of flexibility is provided for assigning functionality to the GPIO-capable pins. Before getting started, look at the peripheral options available for each pin, and plan pin-out for your specific system.
Digital General Purpose I/O Control www.ti.com Table 4-3. GPIO Data Registers Name Address Size (x16) Register Description Bit Description GPADAT 0x6FC0 GPIO A Data Register (GPIO0-GPIO31) Figure 4-26 GPASET 0x6FC2 GPIO A Set Register (GPIO0-GPIO31) Figure 4-29 GPACLEAR 0x6FC4 GPIO A Clear Register (GPIO0-GPIO31) Figure 4-29 GPATOGGLE 0x6FC6...
Input Qualification www.ti.com Writing a 0 to any bit in the toggle registers has no effect. Input Qualification The input qualification scheme has been designed to be very flexible. You can select the type of input qualification for each GPIO pin by configuring the GPAQSEL1, GPAQSEL2, GPBQSEL1 and GPBQSEL2 registers.
Input Qualification www.ti.com Time between samples (sampling period): To qualify the signal, the input signal is sampled at a regular period. The sampling period is specified by the user and determines the time duration between samples, or how often the signal will be sampled, relative to the CPU clock (SYSCLKOUT).
Input Qualification www.ti.com Number of samples: The number of times the signal is sampled is either 3 samples or 6 samples as specified in the qualification selection (GPAQSEL1, GPAQSEL2, GPBQSEL1, and GPBQSEL2) registers. When 3 or 6 consecutive cycles are the same, then the input change will be passed through to the DSP. Total Sampling Window Width: The sampling window is the time during which the input signal will be sampled as shown in Figure...
Input Qualification www.ti.com Example Qualification Window: For the example shown in Figure 4-7, the input qualification has been configured as follows: • GPxQSEL1/2 = 1,0. This indicates a six-sample qualification. • GPxCTRL[QUALPRDn] = 1. The sampling period is t (SP) = 2 × GPxCTRL[QUALPRDn] × T SYSCLKOUT This configuration results in the following: •...
GPIO and Peripheral Multiplexing (MUX) www.ti.com GPIO and Peripheral Multiplexing (MUX) Up to three different peripheral functions are multiplexed along with a general input/output (GPIO) function per pin. This allows you to pick and choose a peripheral mix that will work best for the particular application.
Register Bit Definitions www.ti.com Table 4-12. GPIO Port A Multiplexing 1 (GPAMUX1) Register Field Descriptions (continued) Bits Field Value Description GPIO2 Configure the GPIO2 pin as: GPIO2 (I/O) General purpose I/O 2 (default) (I/O) EPWM2A - ePWM2 output A (O) Reserved.
Page 86
Register Bit Definitions www.ti.com Table 4-13. GPIO Port A MUX 2 (GPAMUX2) Register Field Descriptions (continued) Bits Field Value Description 23-22 GPIO27 Configure the GPIO27 pin as: GPIO27 - General purpose I/O 27 (default) (I/O) ECAP4 - eCAP4. (I/O) EQEP2S - eQEP2 strobe (I/O) MFSXB - McBSP-B Transmit Frame Synch (I/O) 21-20 GPIO26...
Register Bit Definitions www.ti.com Table 4-13. GPIO Port A MUX 2 (GPAMUX2) Register Field Descriptions (continued) Bits Field Value Description GPIO18 Configure the GPIO18 pin as: GPIO18 - General purpose I/O 18 (default) (I/O) SPICLKA - SPI-A clock (I/O) SCITXDB - SCI-B transmit. (O) CANRXA - eCAN-A Receive (I) GPIO17 Configure the GPIO17 pin as:...
Page 88
Register Bit Definitions www.ti.com Table 4-14. GPIO Port B MUX 1 (GPBMUX1) Register Field Descriptions (continued) Field Value Description 25:24 GPIO44 Configure this pin: GPIO 44 - general purpose I/O 44 (default) Reserved 10 or XA4 - External interface (XINTF) address line 4 (O) 23:22 GPIO43 Configure this pin as:...
Register Bit Definitions www.ti.com Table 4-14. GPIO Port B MUX 1 (GPBMUX1) Register Field Descriptions (continued) Field Value Description GPIO34 Configure this pin as: GPIO 34 - general purpose I/O 34 (default) ECAPI - Enhanced capture input/output 1 (I/O) 10 or XREADY - External interface ready signal GPIO33 Configure this pin as:...
Page 90
Register Bit Definitions www.ti.com Table 4-15. GPIO Port B MUX 2 (GPBMUX2) Register Field Descriptions (continued) Field Value Description 23:22 GPIO59 Configure this pin as: GPIO 59 - general purpose I/O 59 (default) MFSRA - McBSP-A receive frame synch (I/O) 10 or XD20 - External interface data line 20 (I/O) 21:20...
Register Bit Definitions www.ti.com Table 4-15. GPIO Port B MUX 2 (GPBMUX2) Register Field Descriptions (continued) Field Value Description GPIO49 Configure this pin as: GPIO 49 - general purpose I/O 49 (default) ECAP6 - Enhanced Capture input/output 6 (I/O) 10 or XD30 - External interface data line 30 (I/O) GPIO48 Configure this pin as:...
Register Bit Definitions www.ti.com Table 4-16. GPIO Port C MUX 1 (GPCMUX1) Register Field Descriptions (continued) Field Value Description 15:14 GPIO71 Configure this pin as: 00 or 01 GPIO 71 - general purpose I/O 71 (default) 10 or 11 XD8 - External interface data line 8 (O) 13:12 GPIO70 Configure this pin as:...
Page 93
Register Bit Definitions www.ti.com Table 4-17. GPIO Port C MUX 2 (GPCMUX2) Register Field Descriptions (continued) Field Value Description 13:12 GPIO86 Configure this pin as: 00 or GPIO 86 - general purpose I/O 86 (default) 10 or XA14 - External interface address line 14 (O) 11:10 GPIO85 Configure this pin as:...
Register Bit Definitions www.ti.com Figure 4-14. GPIO Port A Qualification Control (GPACTRL) Register QUALPRD3 QUALPRD2 R/W-0 R/W-0 QUALPRD1 QUALPRD0 R/W-0 R/W-0 LEGEND: R/W = Read/Write; R = Read only; -n = value after reset The GPxCTRL registers specify the sampling period for input pins when configured for input qualification using a window of 3 or 6 samples.
Register Bit Definitions www.ti.com Figure 4-15. GPIO Port B Qualification Control (GPBCTRL) Register QUALPRD3 QUALPRD2 R/W-0 R/W-0 QUALPRD1 QUALPRD0 R/W-0 R/W-0 LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 4-19. GPIO Port B Qualification Control (GPBCTRL) Register Field Descriptions Bits Field Value...
Register Bit Definitions www.ti.com The GPADIR and GPBDIR registers control the direction of the pins when they are configured as a GPIO in the appropriate MUX register. The direction register has no effect on pins configured as peripheral functions. Figure 4-20. GPIO Port A Direction (GPADIR) Register GPIO31 GPIO30 GPIO29...
Register Bit Definitions www.ti.com Table 4-25. GPIO Port B Direction (GPBDIR) Register Field Descriptions Bits Field Value Description 31-0 GPIO63-GPIO32 Controls direction of GPIO pin when GPIO mode is selected. Reading the register returns the current value of the register setting Configures the GPIO pin as an input.
Register Bit Definitions www.ti.com Table 4-30. GPIO Port A Data (GPADAT) Register Field Descriptions Bits Field Value Description 31-0 GPIO31-GPIO0 Each bit corresponds to one GPIO port A pin (GPIO0-GPIO31) as shown in Figure 4-26. Reading a 0 indicates that the state of the pin is currently low, irrespective of the mode the pin is configured for.
Register Bit Definitions www.ti.com Table 4-46. GPIO XNMI Interrupt Select (GPIOXNMISEL) Register Field Descriptions Bits Field Value Description 15-5 Reserved Reserved GPIOSEL Select which port A GPIO signal (GPIO0 - GPIO31) will be used as the XNMI interrupt source. In addition you can configure the interrupt in the XNMICR register described in Section 6.6.
Peripheral Frame Registers www.ti.com Peripheral Frame Registers The 2833x, 2823x devices contain four peripheral register spaces. The spaces are categorized as follows: • Peripheral Frame 0: These are peripherals that are mapped directly to the CPU memory bus. See Table 5-1.
EALLOW-Protected Registers www.ti.com EALLOW-Protected Registers Several control registers are protected from spurious CPU writes by the EALLOW protection mechanism. The EALLOW bit in status register 1 (ST1) indicates if the state of protection as shown in Table 5-5. Table 5-5. Access to EALLOW-Protected Registers EALLOW Bit CPU Writes CPU Reads...
EALLOW-Protected Registers www.ti.com Table 5-8. EALLOW-Protected Code Security Module (CSM) Registers Size Register Name Address Register Description (x16) KEY0 0x0AE0 Low word of the 128-bit KEY register KEY1 0x0AE1 Second word of the 128-bit KEY register KEY2 0x0AE2 Third word of the 128-bit KEY register KEY3 0x0AE3 Fourth word of the 128-bit KEY register...
Device Emulation Registers www.ti.com Device Emulation Registers These registers are used to control the protection mode of the C28x CPU and to monitor some critical device signals. The registers are defined in Table 5-15. Table 5-15. Device Emulation Registers Name Address Size (x16) Description...
Device Emulation Registers www.ti.com Figure 5-2. Part ID Register PARTTYPE PARTNO LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 5-17. PARTID Register Field Descriptions Field Value Description 15:8 PARTTYPE These 8 bits specify the type of device such as flash-based. 0x00 Flash-based device All other values are reserved.
Write-Followed-by-Read Protection www.ti.com Table 5-19. REVID Register Field Descriptions Bits Field Value Description 15-0 REVID These 16 bits specify the silicon revision number for the particular part. This number always starts with 0x0000 on the first revision of the silicon and is incremented on any subsequent revisions.
Write-Followed-by-Read Protection www.ti.com Table 5-22. PROTRANGE Valid Values Register Bits Block Size Register Value 0x0000 0x0001 0x0003 0x0007 0x000F 256K 0x0FFF 512K 0x1FFF 0x3FFF 0x7FFF 0xFFFF Not all register values are valid. The PROTSTART address value must be a multiple of the range value. For example: if the block size is set to 4K, then the start address can only be at any 4K boundary.
Page 120
Peripheral Frames SPRUFB0C – September 2007 – Revised May 2009 Submit Documentation Feedback...
Chapter 6 SPRUFB0C – September 2007 – Revised May 2009 Peripheral Interrupt Expansion (PIE) The peripheral interrupt expansion (PIE) block multiplexes numerous interrupt sources into a smaller set of interrupt inputs. The PIE block can support 96 individual interrupts that are grouped into blocks of eight. Each group is fed into one of 12 core interrupt lines (INT1 to INT12).
Overview of the PIE Controller www.ti.com Overview of the PIE Controller The 28x CPU supports one nonmaskable interrupt (NMI) and 16 maskable prioritized interrupt requests (INT1-INT14, RTOSINT, and DLOGINT) at the CPU level. The 28x devices have many peripherals and each peripheral is capable of generating one or more interrupts in response to many events at the peripheral level.
Page 123
Overview of the PIE Controller www.ti.com the request directly to the CPU. For multiplexed interrupt sources, each interrupt group in the PIE block has an associated flag register (PIEIFRx) and enable (PIEIERx) register (x = PIE group 1 - PIE group 12). Each bit, referred to as y, corresponds to one of the 8 MUXed interrupts within the group.
Overview of the PIE Controller www.ti.com Figure 6-2. Typical PIE/CPU Interrupt Response - INTx.y Start Stage E IFRx bit set 1 Stage A Wait for any PIEIFRx.y=1 PIEIFRx.y=1 Stage F IERx bit=1 Stage B Wait for Stage G PIEIERx.y=1 PIEIERx.y=1 INTM bit=0 Stage H CPU responds...
Vector Table Mapping www.ti.com The CPU then prepares to service the interrupt. This preparation process is described in detail in TMS320C28x DSP CPU and Instruction Set Reference Guide (literature number SPRU430). In preparation, the corresponding CPU IFR and IER bits are cleared, EALLOW and LOOP are cleared, INTM and DBGM are set, the pipeline is flushed and the return address is stored, and the automatic context save is performed.
Vector Table Mapping www.ti.com After the reset and boot is complete, the PIE vector table should be initialized by the user's code. Then the application enables the PIE vector table. From that point on the interrupt vectors are fetched from the PIE vector table.
Interrupt Sources www.ti.com Interrupt Sources Figure 6-4 shows how the various interrupt sources are multiplexed within the devices. This multiplexing (MUX) scheme may not be exactly the same on all 28x devices. See the data manual of your particular device for details. Figure 6-4.
Interrupt Sources www.ti.com 6.3.1 Procedure for Handling Multiplexed Interrupts The PIE module multiplexes eight peripheral and external pin interrupts into one CPU interrupt. These interrupts are divided into 12 groups: PIE group 1 - PIE group 12. Each group has an associated enable PIEIER and flag PIEIFR register.
Interrupt Sources www.ti.com 6.3.2 Procedures for Enabling And Disabling Multiplexed Peripheral Interrupts The proper procedure for enabling or disabling an interrupt is by using the peripheral interrupt enable/disable flags. The primary purpose of the PIEIER and CPU IER registers is for software prioritization of interrupts within the same PIE interrupt group.
Interrupt Sources www.ti.com 6.3.3 Flow of a Multiplexed Interrupt Request From a Peripheral to the CPU Figure 6-6 shows the flow with the steps shown in circled numbers. Following the diagram, the steps are described. Figure 6-6. Multiplexed Interrupt Request Flow Diagram interrupt enable interrupt...
Interrupt Sources www.ti.com a. The vector for the highest priority interrupt within the group that is both enabled in the PIEIERx register, and flagged as pending in the PIEIFRx is fetched and used as the branch address. In this manner if an even higher priority enabled interrupt was flagged after Step 7, it will be serviced first.
Interrupt Sources www.ti.com Table 6-4. PIE MUXed Peripheral Interrupt Vector Table (continued) INTx.8 INTx.7 INTx.6 INTx.5 INTx.4 INTx.3 INTx.2 INTx.1 0xDFE 0xDFC 0xDFA 0xDF8 0xDF6 0xDF4 0xDF2 0xDF0 Table 6-5. PIE Vector Table PIE Group Name VECTOR ID Address Size (x16) Description CPU Priority Priority...
Page 135
Interrupt Sources www.ti.com Table 6-5. PIE Vector Table (continued) PIE Group Name VECTOR ID Address Size (x16) Description CPU Priority Priority USER6 0x0000 0D32 User Defined Trap USER7 0x0000 0D34 User Defined Trap USER8 0x0000 0D36 User Defined Trap USER9 0x0000 0D38 User Defined Trap USER10...
Page 136
Interrupt Sources www.ti.com Table 6-5. PIE Vector Table (continued) PIE Group Name VECTOR ID Address Size (x16) Description CPU Priority Priority INT3.7 0x0000 0D6C Reserved INT3.8 0x0000 0D6E Reserved 8 (lowest) PIE Group 4 Vectors - MUXed into CPU INT4 INT4.1 0x0000 0D70 ECAP1_INT...
Page 137
Interrupt Sources www.ti.com Table 6-5. PIE Vector Table (continued) PIE Group Name VECTOR ID Address Size (x16) Description CPU Priority Priority INT7.4 0x0000 0DA6 DINTCH4 DMA Channel 4 INT7.5 0x0000 0DA8 DINTCH5 DMA Channel 5 INT7.6 0x0000 0DAA DINTCH6 DMA Channel 6 INT7.7 0x0000 0DAC Reserved...
Page 138
Interrupt Sources www.ti.com Table 6-5. PIE Vector Table (continued) PIE Group Name VECTOR ID Address Size (x16) Description CPU Priority Priority INT11.1 0x0000 0DE0 Reserved 1 (highest) INT11.2 0x0000 0DE2 Reserved INT11.3 0x0000 0DE4 Reserved INT11.4 0x0000 0DE6 Reserved INT11.5 0x0000 0DE8 Reserved INT11.6...
PIE Configuration Registers www.ti.com PIE Configuration Registers The registers controlling the functionality of the PIE block are shown in Table 6-6. Table 6-6. PIE Configuration and Control Registers Name Address Size (x16) Description PIECTRL 0x0000 - 0CE0 PIE, Control Register PIEACK 0x0000 - 0CE1 PIE, Acknowledge Register...
PIE Interrupt Registers www.ti.com PIE Interrupt Registers Figure 6-7. PIECTRL Register (Address CE0) PIEVECT ENPIE R/W-0 LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 6-7. PIECTRL Register Address Field Descriptions Bits Field Value Description 15-1 PIEVECT These bits indicate the address within the PIE vector table from which the vector was fetched.
PIE Interrupt Registers www.ti.com 6.5.1 PIE Interrupt Flag Registers There are twelve PIEIFR registers, one for each CPU interrupt used by the PIE module (INT1-INT12). Figure 6-9. PIEIFRx Register (x = 1 to 12) Reserved INTx.8 INTx.7 INTx.6 INTx.5 INTx.4 INTx.3 INTx.2 INTx.1...
PIE Interrupt Registers www.ti.com Table 6-10. PIEIERx Register (x = 1 to 12) Field Descriptions Bits Field Description 15-8 Reserved Reserved INTx.8 These register bits individually enable an interrupt within a group and behave very much like the core interrupt enable register.
PIE Interrupt Registers www.ti.com Table 6-11. Interrupt Flag Register (IFR) — CPU Register Field Descriptions (continued) Bits Field Value Description INT6 Interrupt 6 flag. INT6 is the flag for interrupts connected to CPU interrupt level INT6. No INT6 interrupt is pending At least one INT6 interrupt is pending.
PIE Interrupt Registers www.ti.com Table 6-12. Interrupt Enable Register (IER) — CPU Register Field Descriptions (continued) Bits Field Value Description INT4 Interrupt 4 enable.INT4 enables or disables CPU interrupt level INT4. Level INT4 is disabled Level INT4 is enabled INT3 Interrupt 3 enable.INT3 enables or disables CPU interrupt level INT3.
Page 147
PIE Interrupt Registers www.ti.com Table 6-13. Debug Interrupt Enable Register (DBGIER) — CPU Register Field Descriptions (continued) Bits Field Value Description INT12 Interrupt 12 enable. INT12 enables or disables CPU interrupt level INT12. Level INT12 is disabled Level INT12 is enabled INT11 Interrupt 11 enable.
External Interrupt Control Registers www.ti.com External Interrupt Control Registers Seven external interrupts, XINT1 –XINT7 are supported. XINT13 is multiplexed with one non-maskable interrupt XNMI. Each of these external interrupts can be selected for negative or positive edge triggered and can also be enabled or disabled (including XNMI). The masked interrupts also contain a 16-bit free running up counter that is reset to zero when a valid interrupt edge is detected.
External Interrupt Control Registers www.ti.com Table 6-15. External NMI Interrupt Control Register (XNMICR) Field Descriptions (continued) Bits Field Value Description Select Select the source for INT13 Timer 1 connected To INT13 XNMI_XINT13 connected To INT13 Enable This read/write bit enables or disables external interrupt NMI Disable XNMI interrupt Enable XNMI interrupt The XNMI Control Register (XNMICR) can be used to enable or disable the NMI interrupt to the CPU.
External Interrupt Control Registers www.ti.com Table 6-18. External Interrupt 2 Counter (XINT2CTR) Field Descriptions Bits Field Description 15-0 INTCTR This is a free running 16-bit up-counter that is clocked at the SYSCLKOUT rate. The counter value is reset to 0x0000 when a valid interrupt edge is detected and then continues counting until the next valid interrupt edge is detected.
Appendix A SPRUFB0C – September 2007 – Revised May 2009 Revision History Revision C of this document includes the changes shown in Table A-1. Table A-1. Changes Made in This Revision Location Additions, Deletions, Modifications Figure 3-7 Modified the OSC and PLL block diagram Section 2.1 Changed first para Section 1.2.3...
Page 152
IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete.
Need help?
Do you have a question about the TMS320x2833 series and is the answer not in the manual?
Questions and answers