SlideShare a Scribd company logo
1 of 21
Download to read offline
F28x –Digital I/O
Digital Signal Controller TMS320F2812
RANJA
N
SINGH
t32x32x323
2bbii
32x32 bit
Multiplier
SSectectoorr
eded
FFllashash
Sectored
Flash
A(18-0)
D(15-0)
Data Bus
RRAAMMRAM
Boot
ROM
22
32-32-
bbiitt
AAuuxixilliiaarrys
32-bit
Auxiliary
Registers
33
3232 bbiitt
3
32 bit
Timers
RReaeallttiimme
e
Realtime
JTAG
Register Bus
CPU
RR--MM-W
AAttoommii
AALLUU
R-M-WW
Atomic
ALU
PIE
Interrupt
Manager
32
32
32
EEvveenntt
MMaannaaggeerrAAanagerM
Event
A
EEvveenntt
MMaannaaggeerrBBanagerM
Event
B
1122-bbiittAADDCC12-bit ADC
WWaattcchhddooggWatchdog
MMccBBSSPPMcBSP
CCAANN22..00BBCAN2.0B
SSCCII-AASCI-A
SSCCII-BBSCI-B
SSPPIISPI
GGPPIIOGPIO
RANJA
N
SINGH
C281x Block Diagram
TMS320F2812 Memory Map
MO SARAM (1K)
LO SARAM (4K)
L1 SARAM (4K)
HO SARAM (8K)
MP/MC=0
BROM vector (32)
MP/MC=0 ENPIE=0
OTP (2K)
reserved
Boot ROM (4K)
reserved
M1 SARAM (1K)
PF 0 (2K) reserved
ENPIE=1
XINT Zone 0 (8K)
XINT Zone 1 (8K)
XINT Zone 2 (0.5M)
XINT Zone 6 (1M)
XINT Zone 7 (16K)
MP/MC=1
XINT Vector-RAM (32)
MP/MC=1 ENPIE=0
reserved
reserved
reserved
00 1000 reserved
00 6000 PF 2 (4K) reserved
00 7000 PF 1 (4K) reserved
00 0000
00 0400
00 0800
00 0D00 PIE vector
(256) reserved
00 8000
00 9000
00 A000
3D 7800
3D 8000
3F 8000
3F A000
3F F000
3F FFC0
3F C000
08 0000
10 0000
20 0000
00 2000
00 4000
Data | Program Data | Program
FLASH (128K)
128-Bit Password
CSM: LO, L1
OTP, FLASHRANJA
N
SINGH
GPIO A
GPIOA0 / PWM1
GPIOA1 / PWM2
GPIOA2 / PWM3
GPIOA3 / PWM4
GPIOA4 / PWM5
GPIOA5 / PWM6
GPIOA6 / T1PWM_T1CMP
GPIOA7 / T2PWM_T2CMP
GPIOA8 / CAP1_QEP1
GPIOA9 / CAP2_QEP2
CAP3_QEPI1
TDIRA
TCLKINA
C1TRIP
C2TRIP
C3TRIP
GPIOB0 / PWM7
GPIOB1 / PWM8
GPIOB2 / PWM9
GPIOB3 / PWM10
GPIOB4 / PWM11
GPIOB5 / PWM12
GPIOB6 / T3PWM_T3CMP
GPIOB7 / T4PWM_T4CMP
GPIOB8 / CAP4_QEP3
GPIOB9 / CAP5_QEP4
CAP6_QEPI2
TDIRB
TCLKINB
C4TRIP
C5TRIP
C6TRIP
GPIOD0 / T1CTRIP_PDPINTA
GPIOD1 / T2CTRIP / EVASOC
GPIOD5 / T3CTRIP_PDPINTB
GPIOD6 / T4CTRIP / EVBSOC
GPIO E
GPIOE0 / XINT1_XBIO
GPIOE1 / XINT2_ADCSOC
GPIOE2 / XNMI_XINT13
GPIOA10 /
GPIOA11 /
GPIOA12 /
GPIOA13 /
GPIOA14 /
GPIOA15 /
GPIO F
GPIOF0 / SPISIMOA
GPIOF1 / SPISOMIA
GPIOF2 / SPICLKA
GPIOF3 / SPISTEA
GPIOF4 / SCITXDA
GPIOF5 / SCIRXDA
GPIOF6 / CANTXA
GPIOF7 / CANRXA
GPIOF8 / MCLKXA
GPIOF9 / MCLKRA
GPIOF10 /
GPIOF11 /
GPIOF12 /
GPIOF13 /
GPIOF14 /
MFSXA
MFSRA
MDXA
MDRA
XF
GPIOB10 /
GPIOB11 /
GPIOB12 /
GPIOB13 /
GPIOB14 /
GPIOB15 /
GPIO G
GPIOG4 / SCITXDB
GPIOG5 / SCIRXDB
Note: GPIO are pin
functions at reset
GPIO A, B, D, E include
Input Qualification feature
C28x GPIO Pin Assignment
RANJA
N
SINGH
•
0 • •1
MUX Control Bit
0 = I/O Function
1 = Primary Function
Pin
Primary
Peripheral
Function
I/O DAT
Bit (R/W) In
Out
•
I/O DIR Bit
0 = Input
1 = Output GPxMUX
GPxDIR
GPxDAT
QUALPRDreserved
7 - 015 - 8
GPxQUAL
00h
01h
no qualification (SYNC to SYSCLKOUT)
QUALPRD = SYSCLKOUT/2
0
.2h
.
FFh
QUAL
.PRD = SYSCL
.KOUT/4
. .
QUALPRD = SYSCLKOUT/510
Some digital I/O and
peripheral I/O input
signals include an
Input Qualification
feature
C28x GPIO Functional Block Diagram
RANJA
N
SINGH
C28x GPIO MUX/DIR Registers
Address Register Name
70C0h
70C1h
70C2h
GPAMUX
GPADIR
GPAQUAL
GPIO A Mux Control Register
GPIO A Direction Control Register
GPIO A Input Qualification Control Register
70C4h
70C5h
70C6h
GPBMUX
GPBDIR
GPBQUAL
GPIO B Mux Control Register
GPIO B Direction Control Register
GPIO B Input Qualification Control Register
70CCh
70CDh
70CEh
GPDMUX
GPDDIR
GPDQUAL
GPIO D Mux Control Register
GPIO D Direction Control Register
GPIO D Input Qualification Control Register
70D0h
70D1h
70D2h
GPEMUX
GPEDIR
GPEQUAL
GPIO E Mux Control Register
GPIO E Direction Control Register
GPIO E Input Qualification Control Register
70D4h
70D5h
GPFMUX
GPFDIR
GPIO F Mux Control Register
GPIO F Direction Control Register
70D8h
70D9h
GPGMUX
GPGDIR
GPIO G Mux Control Register
GPIO G Direction ControlRegister
RANJA
N
SINGH
Address Register Name
70E0h
70E1h
70E2h
70E3h
GPADAT
GPASET
GPACLEAR
GPATOGGLE
GPIO A Data Register
GPIO A Set Register
GPIO A Clear Register
GPIO A ToggleRegister
70E4h
70E5h
70E6h
70E7h
GPBDAT
GPBSET
GPBCLEAR
GPBTOGGLE
GPIO B Data Register
GPIO B Set Register
GPIO B Clear Register
GPIO B ToggleRegister
70ECh
70EDh
70EEh
70EFh
GPDDAT
GPDSET
GPDCLEAR
GPDTOGGLE
GPIO D Data Register
GPIO D Set Register
GPIO D Clear Register
GPIO D ToggleRegister
70F0h
70F1h
70F2h
70F3h
GPEDAT
GPESET
GPECLEAR
GPETOGGLE
GPIO E Data Register
GPIO E Set Register
GPIO E Clear Register
GPIO E ToggleRegister
70F4h
70F5h
70F6h
70F7h
GPFDAT
GPFSET
GPFCLEAR
GPFTOGGLE
GPIO F Data Register
GPIO F Set Register
GPIO F Clear Register
GPIO F ToggleRegister
70F8h
70F9h
70FAh
GPGDAT
GPGSET
GPGCLEAR
GPIO G Data Register
GPIO G Set Register
GPIO G ClearRegister
C28x GPIO Data Registers
GPGTOGGLE
RANJA
N
SINGH
C28x Oscillator / PLL Clock Module
PLLCR @ 7021h
DIV3 DIV2 DIV1 DIV0 Clock Frequency (CLKIN)
0 0 0 0 OSCCLK x 1 / 2 (no PLL)
0 0 0 1 OSCCLK x 1 / 2
0 0 1 0 OSCCLK x 2 / 2
0 0 1 1 OSCCLK x 3 / 2
0 1 0 0 OSCCLK x 4 / 2
0 1 0 1 OSCCLK x 5 / 2
0 1 1 0 OSCCLK x 6 / 2
0 1 1 1 OSCCLK x 7 / 2
1 0 0 0 OSCCLK x 8 / 2
1 0 0 1 OSCCLK x 9 / 2
1 0 1 0 OSCCLK x 10 / 2
PLLCR
bits 15:4
reserved
crystal
X1 /CLKIN
X2
XTALOSC
Watchdog
Module
PLL
Clock Module
4-bit PLLSelect
PLLCLK
/2
OSCCLK
•
CLKIN
MUX
XF_XPLLDIS
1
0
HISPCP LOSPCP
C28x
Core
SYSCLKOUT
•
HSPCLK LSPCLK
•
RANJA
N
SINGH
RANJA
N
SINGH
Peripheral Clock Control Register
Module Enable Clock Bit
0 = disable
1 = enable
0
reserved reserved reserved reserved
ADC
ENCLK
reserved
EVB
ENCLK
EVA
ENCLK
1234567
reserved
HECCA
ENCLK
reserved
MA
ENCLK
SCIB
ENCLK
SCIA
ENCLK
reserved
SPIA
ENCLK
HSPCLK
PCLKCR @ 701Ch
LSPCLK
15 14 13 12 11 10 9 8
RANJA
N
SINGH
High / Low – Speed Peripheral Clock Pre-
scale Registers
HISPCP @ 701Ah / LOSPCP @ 701Bh
15 - 3 2 1 0
reserved HSPCLK2 HSPCLK1 HSPCLK0
01215 - 3
reserved LSPCLK2 LSPCLK1 LSPCLK0
H/LSPCLK2 H/LSPCLK1 H/LSPCLK0 Peripheral Clock Frequency
0 0 0 SYSCLKOUT / 1
0 0 1 SYSCLKOUT / 2 (default HISPCP)
0 1 0 SYSCLKOUT / 4 (default LOSPCP)
0 1 1 SYSCLKOUT / 6
1 0 0 SYSCLKOUT / 8
1 0 1 SYSCLKOUT / 10
1 1 0 SYSCLKOUT / 12
1 1 1 SYSCLKOUT / 14
RANJA
N
SINGH
Watchdog Timer
• Resets the C28x if the CPU crashes
–
–
–
Watchdog counter runs independent of CPU
If counter overflows, reset or interrupt is triggered
CPU must write correct data key sequence to reset the counter before
overflow
• Watchdog must be serviced (or disabled) within ~4,3ms after reset (30 MHz
external clock)
• This translates into 6.3 million instructions!
RANJA
N
SINGH
Watchdog Timer Module
6 - Bit
Free -
Running
Counter
CLR
/2
/4
/16
/8
OSCCLK
System
Reset
100
011
010
001
000
/64 111
/32 110
101
•
•
•
•
8 - Bit Watchdog
Counter
CLR
One-Cycle
Delay
Watchdog
Reset Key
Register
55 +AA
Detector
•
Good Key
Bad Key
1 0 1
• •
• • 3/
3/
WDCR . 2 - 0
WDCR . 6
WDPS
WDDIS
WDCR . 7
WDFLAG
WDCNTR . 7 - 0
WDKEY . 7 - 0
WDCR . 5 - 3 WDCHK 2-0
Bad WDCR Key
/512
Output
Pulse
WDRST
WDINT
SCSR .1
WDENINT
•
• •
SCSR . 0
WDOVERRIDE
RANJA
N
SINGH
Watchdog Timer
Control Register
• WDCR @ 7029h
7 6 5 4 3 2 1 0
reserved WDFLAG WDDIS WDCHK2 WDCHK1 WDCHK0 WDPS2 WDPS1 WDPS0
Logic Check Bits WD Prescale
Write as 101 or reset Selection Bits
immediately triggered
Watchdog Disable Bit
(Functions only if WD OVERRIDE
bit in SCSR is equal to 1)
15 - 8
WD Flag Bit
Gets set when the WD causes a reset
• Writing a 1 clears this bit
• Writing a 0 has no effect
RANJA
N
SINGH
Resetting the Watchdog
• Allowable write values:
55h - counter enabled for reset on next AAh write
AAh - counter set to zero if reset enabled
• Writing any other value immediately triggers a CPU reset
• Watchdog should not be serviced solely in an ISR
–
– If main code crashes, but interrupt continues to execute, the watchdog
will not catch the crash
Could put the 55h WDKEY in the main code, and the AAh WDKEY in an
ISR; this catches main code crashes and also ISR crashes
WDKEY @ 7025h
7 6 5 4 3 2 1 0
reserved D7 D6 D5 D4 D3 D2 D1 D0
15 - 8
RANJA
N
SINGH
Sequential
Step
Value Written
to WDKEY Result
1 AAh No action
2 AAh No action
3 55h WD counter enabled for reset on next AAh write
4 55h WD counter enabled for reset on next AAh write
5 55h WD counter enabled for reset on next AAh write
6 AAh WD counter is reset
7 AAh No action
8 55h WD counter enabled for reset on next AAh write
9 AAh WD counter is reset
10 55h WD counter enabled for reset on next AAh write
11 23h CPU reset triggered due to improper write value
WDKEY Write Results
RANJA
N
SINGH
System Control and Status Register
SCSR @ 7022h
WD Override (protect bit)
After RESET - bit gives user ability to disable WD by
setting WDDIS bit=1 in WDCR
•clear only bit and defaults to 1 after reset
0 = protects WD from being disabled by s/w
•bit cannot be set to 1 by s/w (clear-only by writing 1)
1 = (default value) allows WD to be disabled using
WDDIS bit in WDCR
• once cleared, bit cannot set to 1 by s/w
15 - 3 2 1 0
reserved WDINTS WDENINT
WD
OVERRIDE
WD Interrupt Status
(read only)
0 = active
1 = not active
WD Enable Interrupt
0 = WD generates a DSPreset
1 = WD generates a WDINT interrupt
RANJA
N
SINGH
Low Power
Mode
CPU Logic
Clock
Peripheral
Logic Clock
Watchdog
Clock
PLL /
OSC
Normal Run on on on on
IDLE off on on on
STANDBY off off on on
HALT off off off off
Low Power Modes
RANJA
N
SINGH
Low Power Mode Control Register 0
7 - 215 - 8
reserved QUALSTDBY LPM1 LPM0
Low Power Mode Entering
1. Set LPM bits
2. Enable desired exit interrupt(s)
3. Execute IDLE instruction
4. The Power down sequence of the hardware
depends on LP mode
Low Power Mode Selection
00 = Idle
01 = Standby
1x = Halt
Qualify before waking
from STANDBY mode
LPMCR0 @ 701Eh
000000 = 2 OSCCLKs
000001 = 3 OSCCLKs
111111 = 65 OSCCLKS
1 0
RANJA
N
SINGH
Wake device from
STANDBY mode
0 = disable
1 = enable
0
C1TRIP T4CTRIP T3CTRIP T2CTRIP T1CTRIP WDINT XNMI XINT1
CANRXA SCIRXB SCIRXA C6TRIP C5TRIP C4TRIP C3TRIP C2TRIP
1234567
89101112131415
Low Power Mode Control Register 1
RANJA
N
SINGH
Exit
Interrupt
Low Power
Mode
RESET
External
or
Wake up
Interrupts
Enabled
Peripheral
Interrupts
IDLE yes yes yes
STANDBY yes yes no
HALT yes no no
Note: External or Wake up include XINT1, PDPINT, TxCTRIP,
CxTRIP NMI, CAN, SPI, SCI, WD
Low Power Mode Exit
RANJA
N
SINGH
DEDICATED TO
MY LOVE
P. SINGH03/03/2019

More Related Content

What's hot

Sony 0.71 inch AMOLED 1920x1080 OLED Display HD-MI Board Available USB Driver...
Sony 0.71 inch AMOLED 1920x1080 OLED Display HD-MI Board Available USB Driver...Sony 0.71 inch AMOLED 1920x1080 OLED Display HD-MI Board Available USB Driver...
Sony 0.71 inch AMOLED 1920x1080 OLED Display HD-MI Board Available USB Driver...Shawn Lee
 
Arduino atmega328
Arduino atmega328Arduino atmega328
Arduino atmega328Luciano FS
 
Practical reverse engineering and exploit development for AVR-based Embedded ...
Practical reverse engineering and exploit development for AVR-based Embedded ...Practical reverse engineering and exploit development for AVR-based Embedded ...
Practical reverse engineering and exploit development for AVR-based Embedded ...Alexander Bolshev
 
Keysight Mini-ICT - Testing Days México
Keysight Mini-ICT - Testing Days MéxicoKeysight Mini-ICT - Testing Days México
Keysight Mini-ICT - Testing Days MéxicoInterlatin
 
Básicos de Functional Test Systems - Testing Days Tijuana
Básicos de Functional Test Systems - Testing Days TijuanaBásicos de Functional Test Systems - Testing Days Tijuana
Básicos de Functional Test Systems - Testing Days TijuanaInterlatin
 
Industrial training presentation
Industrial training presentationIndustrial training presentation
Industrial training presentationlavinasebastian
 
Watch-dog Timer in LPC1768
Watch-dog Timer in LPC1768Watch-dog Timer in LPC1768
Watch-dog Timer in LPC1768Srishti Kakade
 
Microchip NANOWatt Technology
Microchip NANOWatt TechnologyMicrochip NANOWatt Technology
Microchip NANOWatt TechnologyEmanuele Bonanni
 
DIgital clock using verilog
DIgital clock using verilog DIgital clock using verilog
DIgital clock using verilog Abhishek Sainkar
 
Handling Interrupts in Microchip MCUs
Handling Interrupts in Microchip MCUsHandling Interrupts in Microchip MCUs
Handling Interrupts in Microchip MCUsCorrado Santoro
 
Migration ux to windows - ICT i3070
Migration ux to windows - ICT i3070Migration ux to windows - ICT i3070
Migration ux to windows - ICT i3070Interlatin
 
Complete detail of arm part 5
Complete detail of arm part 5Complete detail of arm part 5
Complete detail of arm part 5NOWAY
 
B tech Final Year Projects & Embedded Systems Training
B tech Final Year Projects & Embedded Systems Training B tech Final Year Projects & Embedded Systems Training
B tech Final Year Projects & Embedded Systems Training Technogroovy India
 
Introduction to nanoWatt XLP: PIC18F46J50
Introduction to nanoWatt XLP: PIC18F46J50 Introduction to nanoWatt XLP: PIC18F46J50
Introduction to nanoWatt XLP: PIC18F46J50 Premier Farnell
 
Stm32f303 rest and Clock contol
Stm32f303 rest and Clock contolStm32f303 rest and Clock contol
Stm32f303 rest and Clock contolPrem Sanil
 

What's hot (20)

Sony 0.71 inch AMOLED 1920x1080 OLED Display HD-MI Board Available USB Driver...
Sony 0.71 inch AMOLED 1920x1080 OLED Display HD-MI Board Available USB Driver...Sony 0.71 inch AMOLED 1920x1080 OLED Display HD-MI Board Available USB Driver...
Sony 0.71 inch AMOLED 1920x1080 OLED Display HD-MI Board Available USB Driver...
 
Arduino atmega328
Arduino atmega328Arduino atmega328
Arduino atmega328
 
Practical reverse engineering and exploit development for AVR-based Embedded ...
Practical reverse engineering and exploit development for AVR-based Embedded ...Practical reverse engineering and exploit development for AVR-based Embedded ...
Practical reverse engineering and exploit development for AVR-based Embedded ...
 
Keysight Mini-ICT - Testing Days México
Keysight Mini-ICT - Testing Days MéxicoKeysight Mini-ICT - Testing Days México
Keysight Mini-ICT - Testing Days México
 
Básicos de Functional Test Systems - Testing Days Tijuana
Básicos de Functional Test Systems - Testing Days TijuanaBásicos de Functional Test Systems - Testing Days Tijuana
Básicos de Functional Test Systems - Testing Days Tijuana
 
Industrial training presentation
Industrial training presentationIndustrial training presentation
Industrial training presentation
 
89 c2051
89 c205189 c2051
89 c2051
 
At89c4051
At89c4051At89c4051
At89c4051
 
Watch-dog Timer in LPC1768
Watch-dog Timer in LPC1768Watch-dog Timer in LPC1768
Watch-dog Timer in LPC1768
 
Never Trust Your Inputs
Never Trust Your InputsNever Trust Your Inputs
Never Trust Your Inputs
 
Microchip NANOWatt Technology
Microchip NANOWatt TechnologyMicrochip NANOWatt Technology
Microchip NANOWatt Technology
 
DIgital clock using verilog
DIgital clock using verilog DIgital clock using verilog
DIgital clock using verilog
 
Handling Interrupts in Microchip MCUs
Handling Interrupts in Microchip MCUsHandling Interrupts in Microchip MCUs
Handling Interrupts in Microchip MCUs
 
Migration ux to windows - ICT i3070
Migration ux to windows - ICT i3070Migration ux to windows - ICT i3070
Migration ux to windows - ICT i3070
 
Complete detail of arm part 5
Complete detail of arm part 5Complete detail of arm part 5
Complete detail of arm part 5
 
At89c2051 Data sheet
At89c2051 Data sheetAt89c2051 Data sheet
At89c2051 Data sheet
 
B tech Final Year Projects & Embedded Systems Training
B tech Final Year Projects & Embedded Systems Training B tech Final Year Projects & Embedded Systems Training
B tech Final Year Projects & Embedded Systems Training
 
Introduction to nanoWatt XLP: PIC18F46J50
Introduction to nanoWatt XLP: PIC18F46J50 Introduction to nanoWatt XLP: PIC18F46J50
Introduction to nanoWatt XLP: PIC18F46J50
 
Stm32f303 rest and Clock contol
Stm32f303 rest and Clock contolStm32f303 rest and Clock contol
Stm32f303 rest and Clock contol
 
Iuwne10 S06 L01
Iuwne10 S06 L01Iuwne10 S06 L01
Iuwne10 S06 L01
 

Similar to Dsp 2812

Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming IIOmar Sanchez
 
Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming IIOmar Sanchez
 
Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming IIOmar Sanchez
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller Gaurav Verma
 
Lecture 5 (system clock crossbar and gpio) rv012
Lecture 5 (system clock crossbar and gpio) rv012Lecture 5 (system clock crossbar and gpio) rv012
Lecture 5 (system clock crossbar and gpio) rv012cairo university
 
Información de microcontrolador attiny85
Información de microcontrolador attiny85Información de microcontrolador attiny85
Información de microcontrolador attiny85stserviciosactivos
 
Gesture Controlled Robot
Gesture Controlled RobotGesture Controlled Robot
Gesture Controlled RobotSujit Singh
 
Atmel microcontrollers-a tmega328-p_datasheet
Atmel microcontrollers-a tmega328-p_datasheetAtmel microcontrollers-a tmega328-p_datasheet
Atmel microcontrollers-a tmega328-p_datasheetAlexTronciu
 
Quanta ze7 r1b_schematics
Quanta ze7 r1b_schematicsQuanta ze7 r1b_schematics
Quanta ze7 r1b_schematicsDATACORP
 
GPIO In Arm cortex-m4 tiva-c
GPIO In Arm cortex-m4 tiva-cGPIO In Arm cortex-m4 tiva-c
GPIO In Arm cortex-m4 tiva-cZakaria Gomaa
 

Similar to Dsp 2812 (20)

Dv3
Dv3Dv3
Dv3
 
Msp430
Msp430Msp430
Msp430
 
Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming II
 
Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming II
 
Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming II
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
report cs
report csreport cs
report cs
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
8051 Presentation
8051 Presentation8051 Presentation
8051 Presentation
 
Lecture 5 (system clock crossbar and gpio) rv012
Lecture 5 (system clock crossbar and gpio) rv012Lecture 5 (system clock crossbar and gpio) rv012
Lecture 5 (system clock crossbar and gpio) rv012
 
8051 MC.pptx
8051 MC.pptx8051 MC.pptx
8051 MC.pptx
 
Información de microcontrolador attiny85
Información de microcontrolador attiny85Información de microcontrolador attiny85
Información de microcontrolador attiny85
 
Introduction to PIC.pptx
Introduction to PIC.pptxIntroduction to PIC.pptx
Introduction to PIC.pptx
 
Dv5 amd
Dv5 amdDv5 amd
Dv5 amd
 
Gesture Controlled Robot
Gesture Controlled RobotGesture Controlled Robot
Gesture Controlled Robot
 
Atmel microcontrollers-a tmega328-p_datasheet
Atmel microcontrollers-a tmega328-p_datasheetAtmel microcontrollers-a tmega328-p_datasheet
Atmel microcontrollers-a tmega328-p_datasheet
 
Quanta ze7 r1b_schematics
Quanta ze7 r1b_schematicsQuanta ze7 r1b_schematics
Quanta ze7 r1b_schematics
 
GPIO In Arm cortex-m4 tiva-c
GPIO In Arm cortex-m4 tiva-cGPIO In Arm cortex-m4 tiva-c
GPIO In Arm cortex-m4 tiva-c
 
2014 ii c08t-sbc pic para ecg
2014 ii c08t-sbc pic para ecg 2014 ii c08t-sbc pic para ecg
2014 ii c08t-sbc pic para ecg
 
Msp430g2453
Msp430g2453Msp430g2453
Msp430g2453
 

Recently uploaded

Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Recently uploaded (20)

Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 

Dsp 2812

  • 1. F28x –Digital I/O Digital Signal Controller TMS320F2812 RANJA N SINGH
  • 2. t32x32x323 2bbii 32x32 bit Multiplier SSectectoorr eded FFllashash Sectored Flash A(18-0) D(15-0) Data Bus RRAAMMRAM Boot ROM 22 32-32- bbiitt AAuuxixilliiaarrys 32-bit Auxiliary Registers 33 3232 bbiitt 3 32 bit Timers RReaeallttiimme e Realtime JTAG Register Bus CPU RR--MM-W AAttoommii AALLUU R-M-WW Atomic ALU PIE Interrupt Manager 32 32 32 EEvveenntt MMaannaaggeerrAAanagerM Event A EEvveenntt MMaannaaggeerrBBanagerM Event B 1122-bbiittAADDCC12-bit ADC WWaattcchhddooggWatchdog MMccBBSSPPMcBSP CCAANN22..00BBCAN2.0B SSCCII-AASCI-A SSCCII-BBSCI-B SSPPIISPI GGPPIIOGPIO RANJA N SINGH C281x Block Diagram
  • 3. TMS320F2812 Memory Map MO SARAM (1K) LO SARAM (4K) L1 SARAM (4K) HO SARAM (8K) MP/MC=0 BROM vector (32) MP/MC=0 ENPIE=0 OTP (2K) reserved Boot ROM (4K) reserved M1 SARAM (1K) PF 0 (2K) reserved ENPIE=1 XINT Zone 0 (8K) XINT Zone 1 (8K) XINT Zone 2 (0.5M) XINT Zone 6 (1M) XINT Zone 7 (16K) MP/MC=1 XINT Vector-RAM (32) MP/MC=1 ENPIE=0 reserved reserved reserved 00 1000 reserved 00 6000 PF 2 (4K) reserved 00 7000 PF 1 (4K) reserved 00 0000 00 0400 00 0800 00 0D00 PIE vector (256) reserved 00 8000 00 9000 00 A000 3D 7800 3D 8000 3F 8000 3F A000 3F F000 3F FFC0 3F C000 08 0000 10 0000 20 0000 00 2000 00 4000 Data | Program Data | Program FLASH (128K) 128-Bit Password CSM: LO, L1 OTP, FLASHRANJA N SINGH
  • 4. GPIO A GPIOA0 / PWM1 GPIOA1 / PWM2 GPIOA2 / PWM3 GPIOA3 / PWM4 GPIOA4 / PWM5 GPIOA5 / PWM6 GPIOA6 / T1PWM_T1CMP GPIOA7 / T2PWM_T2CMP GPIOA8 / CAP1_QEP1 GPIOA9 / CAP2_QEP2 CAP3_QEPI1 TDIRA TCLKINA C1TRIP C2TRIP C3TRIP GPIOB0 / PWM7 GPIOB1 / PWM8 GPIOB2 / PWM9 GPIOB3 / PWM10 GPIOB4 / PWM11 GPIOB5 / PWM12 GPIOB6 / T3PWM_T3CMP GPIOB7 / T4PWM_T4CMP GPIOB8 / CAP4_QEP3 GPIOB9 / CAP5_QEP4 CAP6_QEPI2 TDIRB TCLKINB C4TRIP C5TRIP C6TRIP GPIOD0 / T1CTRIP_PDPINTA GPIOD1 / T2CTRIP / EVASOC GPIOD5 / T3CTRIP_PDPINTB GPIOD6 / T4CTRIP / EVBSOC GPIO E GPIOE0 / XINT1_XBIO GPIOE1 / XINT2_ADCSOC GPIOE2 / XNMI_XINT13 GPIOA10 / GPIOA11 / GPIOA12 / GPIOA13 / GPIOA14 / GPIOA15 / GPIO F GPIOF0 / SPISIMOA GPIOF1 / SPISOMIA GPIOF2 / SPICLKA GPIOF3 / SPISTEA GPIOF4 / SCITXDA GPIOF5 / SCIRXDA GPIOF6 / CANTXA GPIOF7 / CANRXA GPIOF8 / MCLKXA GPIOF9 / MCLKRA GPIOF10 / GPIOF11 / GPIOF12 / GPIOF13 / GPIOF14 / MFSXA MFSRA MDXA MDRA XF GPIOB10 / GPIOB11 / GPIOB12 / GPIOB13 / GPIOB14 / GPIOB15 / GPIO G GPIOG4 / SCITXDB GPIOG5 / SCIRXDB Note: GPIO are pin functions at reset GPIO A, B, D, E include Input Qualification feature C28x GPIO Pin Assignment RANJA N SINGH
  • 5. • 0 • •1 MUX Control Bit 0 = I/O Function 1 = Primary Function Pin Primary Peripheral Function I/O DAT Bit (R/W) In Out • I/O DIR Bit 0 = Input 1 = Output GPxMUX GPxDIR GPxDAT QUALPRDreserved 7 - 015 - 8 GPxQUAL 00h 01h no qualification (SYNC to SYSCLKOUT) QUALPRD = SYSCLKOUT/2 0 .2h . FFh QUAL .PRD = SYSCL .KOUT/4 . . QUALPRD = SYSCLKOUT/510 Some digital I/O and peripheral I/O input signals include an Input Qualification feature C28x GPIO Functional Block Diagram RANJA N SINGH
  • 6. C28x GPIO MUX/DIR Registers Address Register Name 70C0h 70C1h 70C2h GPAMUX GPADIR GPAQUAL GPIO A Mux Control Register GPIO A Direction Control Register GPIO A Input Qualification Control Register 70C4h 70C5h 70C6h GPBMUX GPBDIR GPBQUAL GPIO B Mux Control Register GPIO B Direction Control Register GPIO B Input Qualification Control Register 70CCh 70CDh 70CEh GPDMUX GPDDIR GPDQUAL GPIO D Mux Control Register GPIO D Direction Control Register GPIO D Input Qualification Control Register 70D0h 70D1h 70D2h GPEMUX GPEDIR GPEQUAL GPIO E Mux Control Register GPIO E Direction Control Register GPIO E Input Qualification Control Register 70D4h 70D5h GPFMUX GPFDIR GPIO F Mux Control Register GPIO F Direction Control Register 70D8h 70D9h GPGMUX GPGDIR GPIO G Mux Control Register GPIO G Direction ControlRegister RANJA N SINGH
  • 7. Address Register Name 70E0h 70E1h 70E2h 70E3h GPADAT GPASET GPACLEAR GPATOGGLE GPIO A Data Register GPIO A Set Register GPIO A Clear Register GPIO A ToggleRegister 70E4h 70E5h 70E6h 70E7h GPBDAT GPBSET GPBCLEAR GPBTOGGLE GPIO B Data Register GPIO B Set Register GPIO B Clear Register GPIO B ToggleRegister 70ECh 70EDh 70EEh 70EFh GPDDAT GPDSET GPDCLEAR GPDTOGGLE GPIO D Data Register GPIO D Set Register GPIO D Clear Register GPIO D ToggleRegister 70F0h 70F1h 70F2h 70F3h GPEDAT GPESET GPECLEAR GPETOGGLE GPIO E Data Register GPIO E Set Register GPIO E Clear Register GPIO E ToggleRegister 70F4h 70F5h 70F6h 70F7h GPFDAT GPFSET GPFCLEAR GPFTOGGLE GPIO F Data Register GPIO F Set Register GPIO F Clear Register GPIO F ToggleRegister 70F8h 70F9h 70FAh GPGDAT GPGSET GPGCLEAR GPIO G Data Register GPIO G Set Register GPIO G ClearRegister C28x GPIO Data Registers GPGTOGGLE RANJA N SINGH
  • 8. C28x Oscillator / PLL Clock Module PLLCR @ 7021h DIV3 DIV2 DIV1 DIV0 Clock Frequency (CLKIN) 0 0 0 0 OSCCLK x 1 / 2 (no PLL) 0 0 0 1 OSCCLK x 1 / 2 0 0 1 0 OSCCLK x 2 / 2 0 0 1 1 OSCCLK x 3 / 2 0 1 0 0 OSCCLK x 4 / 2 0 1 0 1 OSCCLK x 5 / 2 0 1 1 0 OSCCLK x 6 / 2 0 1 1 1 OSCCLK x 7 / 2 1 0 0 0 OSCCLK x 8 / 2 1 0 0 1 OSCCLK x 9 / 2 1 0 1 0 OSCCLK x 10 / 2 PLLCR bits 15:4 reserved crystal X1 /CLKIN X2 XTALOSC Watchdog Module PLL Clock Module 4-bit PLLSelect PLLCLK /2 OSCCLK • CLKIN MUX XF_XPLLDIS 1 0 HISPCP LOSPCP C28x Core SYSCLKOUT • HSPCLK LSPCLK • RANJA N SINGH
  • 9. RANJA N SINGH Peripheral Clock Control Register Module Enable Clock Bit 0 = disable 1 = enable 0 reserved reserved reserved reserved ADC ENCLK reserved EVB ENCLK EVA ENCLK 1234567 reserved HECCA ENCLK reserved MA ENCLK SCIB ENCLK SCIA ENCLK reserved SPIA ENCLK HSPCLK PCLKCR @ 701Ch LSPCLK 15 14 13 12 11 10 9 8
  • 10. RANJA N SINGH High / Low – Speed Peripheral Clock Pre- scale Registers HISPCP @ 701Ah / LOSPCP @ 701Bh 15 - 3 2 1 0 reserved HSPCLK2 HSPCLK1 HSPCLK0 01215 - 3 reserved LSPCLK2 LSPCLK1 LSPCLK0 H/LSPCLK2 H/LSPCLK1 H/LSPCLK0 Peripheral Clock Frequency 0 0 0 SYSCLKOUT / 1 0 0 1 SYSCLKOUT / 2 (default HISPCP) 0 1 0 SYSCLKOUT / 4 (default LOSPCP) 0 1 1 SYSCLKOUT / 6 1 0 0 SYSCLKOUT / 8 1 0 1 SYSCLKOUT / 10 1 1 0 SYSCLKOUT / 12 1 1 1 SYSCLKOUT / 14
  • 11. RANJA N SINGH Watchdog Timer • Resets the C28x if the CPU crashes – – – Watchdog counter runs independent of CPU If counter overflows, reset or interrupt is triggered CPU must write correct data key sequence to reset the counter before overflow • Watchdog must be serviced (or disabled) within ~4,3ms after reset (30 MHz external clock) • This translates into 6.3 million instructions!
  • 12. RANJA N SINGH Watchdog Timer Module 6 - Bit Free - Running Counter CLR /2 /4 /16 /8 OSCCLK System Reset 100 011 010 001 000 /64 111 /32 110 101 • • • • 8 - Bit Watchdog Counter CLR One-Cycle Delay Watchdog Reset Key Register 55 +AA Detector • Good Key Bad Key 1 0 1 • • • • 3/ 3/ WDCR . 2 - 0 WDCR . 6 WDPS WDDIS WDCR . 7 WDFLAG WDCNTR . 7 - 0 WDKEY . 7 - 0 WDCR . 5 - 3 WDCHK 2-0 Bad WDCR Key /512 Output Pulse WDRST WDINT SCSR .1 WDENINT • • • SCSR . 0 WDOVERRIDE
  • 13. RANJA N SINGH Watchdog Timer Control Register • WDCR @ 7029h 7 6 5 4 3 2 1 0 reserved WDFLAG WDDIS WDCHK2 WDCHK1 WDCHK0 WDPS2 WDPS1 WDPS0 Logic Check Bits WD Prescale Write as 101 or reset Selection Bits immediately triggered Watchdog Disable Bit (Functions only if WD OVERRIDE bit in SCSR is equal to 1) 15 - 8 WD Flag Bit Gets set when the WD causes a reset • Writing a 1 clears this bit • Writing a 0 has no effect
  • 14. RANJA N SINGH Resetting the Watchdog • Allowable write values: 55h - counter enabled for reset on next AAh write AAh - counter set to zero if reset enabled • Writing any other value immediately triggers a CPU reset • Watchdog should not be serviced solely in an ISR – – If main code crashes, but interrupt continues to execute, the watchdog will not catch the crash Could put the 55h WDKEY in the main code, and the AAh WDKEY in an ISR; this catches main code crashes and also ISR crashes WDKEY @ 7025h 7 6 5 4 3 2 1 0 reserved D7 D6 D5 D4 D3 D2 D1 D0 15 - 8
  • 15. RANJA N SINGH Sequential Step Value Written to WDKEY Result 1 AAh No action 2 AAh No action 3 55h WD counter enabled for reset on next AAh write 4 55h WD counter enabled for reset on next AAh write 5 55h WD counter enabled for reset on next AAh write 6 AAh WD counter is reset 7 AAh No action 8 55h WD counter enabled for reset on next AAh write 9 AAh WD counter is reset 10 55h WD counter enabled for reset on next AAh write 11 23h CPU reset triggered due to improper write value WDKEY Write Results
  • 16. RANJA N SINGH System Control and Status Register SCSR @ 7022h WD Override (protect bit) After RESET - bit gives user ability to disable WD by setting WDDIS bit=1 in WDCR •clear only bit and defaults to 1 after reset 0 = protects WD from being disabled by s/w •bit cannot be set to 1 by s/w (clear-only by writing 1) 1 = (default value) allows WD to be disabled using WDDIS bit in WDCR • once cleared, bit cannot set to 1 by s/w 15 - 3 2 1 0 reserved WDINTS WDENINT WD OVERRIDE WD Interrupt Status (read only) 0 = active 1 = not active WD Enable Interrupt 0 = WD generates a DSPreset 1 = WD generates a WDINT interrupt
  • 17. RANJA N SINGH Low Power Mode CPU Logic Clock Peripheral Logic Clock Watchdog Clock PLL / OSC Normal Run on on on on IDLE off on on on STANDBY off off on on HALT off off off off Low Power Modes
  • 18. RANJA N SINGH Low Power Mode Control Register 0 7 - 215 - 8 reserved QUALSTDBY LPM1 LPM0 Low Power Mode Entering 1. Set LPM bits 2. Enable desired exit interrupt(s) 3. Execute IDLE instruction 4. The Power down sequence of the hardware depends on LP mode Low Power Mode Selection 00 = Idle 01 = Standby 1x = Halt Qualify before waking from STANDBY mode LPMCR0 @ 701Eh 000000 = 2 OSCCLKs 000001 = 3 OSCCLKs 111111 = 65 OSCCLKS 1 0
  • 19. RANJA N SINGH Wake device from STANDBY mode 0 = disable 1 = enable 0 C1TRIP T4CTRIP T3CTRIP T2CTRIP T1CTRIP WDINT XNMI XINT1 CANRXA SCIRXB SCIRXA C6TRIP C5TRIP C4TRIP C3TRIP C2TRIP 1234567 89101112131415 Low Power Mode Control Register 1
  • 20. RANJA N SINGH Exit Interrupt Low Power Mode RESET External or Wake up Interrupts Enabled Peripheral Interrupts IDLE yes yes yes STANDBY yes yes no HALT yes no no Note: External or Wake up include XINT1, PDPINT, TxCTRIP, CxTRIP NMI, CAN, SPI, SCI, WD Low Power Mode Exit