Professional Documents
Culture Documents
Anoop Aggarwal
TM
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
PowerPC
Power ISA
Power ISA 2.03 merges previous ISA definitions into one documentation set and serves as the foundation for future generations of the architecture.
Crossbar Masters
Debug
JTAG
PowerPC e200z0 core running 48-64MHz VLE ISA instruction set for superior code density Vectored interrupt controller Memory Protection Unit with 8 regions, 32byte granularity
Nexus 2+
MEMORY
512Kbyte embedded program Flash, 64KByte data flash 64Kbyte embedded data Flash (for EE Emulation) Up to 64MHz non-sequential access with 2WS ECC-enabled array with error detect/correct 48Kbyte SRAM (single cycle access, ECC-enabled)
COMMUNICATIONS
3x enhanced FlexCAN 64 Message Buffers each, full CAN 2.0 spec 4x LINFlex 3x DSPI, 8-16 bits wide & chip selects 1x IC
Boot Assist Module (BAM)
I/O Bridge
512K Flash
64K Data Flash
ANALOG
5V ADC 10-bit resolution
Crossbar Slaves
TIMED I/O
16-bit eMIOS module
OTHER
CTU (Cross Triggering Unit) to sync ADC with PWM Channels Debug: Nexus 2+ I/O: 5V I/O, high flexibility with selecting GPIO functionality Packages: 100LQFP, 144LQFP, 208MAPBGA (Development only) Boot Assist Module for production and bench programming
Clocks
TM
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
FIRC_DIV div 1 to 32
div 1 to 16
Peripheral Set 1
div 1 to 16
Peripheral Set 2
32KHz 128KHz
CMU
Peripheral Set 3
API / RTC
SIRC 128KHz
Provides
Peripheral Set 1
Peripheral Set 2
Peripheral Set 3
All LINFlex modules All FlexCAN modules All eMIOS modules I2C module All DSPI modules CTUL ADC
DEx: DIVx:
Peripheral Set x Divider Enable Peripheral Set x Divider x Division Value (1..15)
CLKOUT Selector
div 1/2/4/8
SELDIV: SELCTL:
CGM
Frequency
modulated PLL
purpose of the FMPLL is to generate a 64 MHz max system clock from the FXOSC. FMPLL operating modes:
The
Power down Normal Normal with frequency modulation Progressive clock switching 1:1
These
CGM FMPLL
Normal mode
The
FMPLL
64MHz
16MHz 32
Frequency modulated FMPLL Frequency modulation Modulation enabled/disabled through software Triangle wave modulation Programmable modulation depth 0.25% to 4% deviation from center spread frequency 0.5% to -8% deviation from down spread frequency Programmable modulation frequency dependent on reference frequency
CGM FMPLL
CGM FMPLL
FMPLL
Progressive
clock switching allows to switch FXOSC input clock to PLL output clock stepping through different division factors: This means that the current consumption gradually increases and so the voltage regulator has a better response.
This mode is enabled by setting bit PLL_CR(en_pll_sw), prior to enabling the PLL by setting the bit ME_xxx_MC(PLLON) Divide FMPLL output by 8->4->2->1 for 8 clock cycles each time
CGM FMPLL
1:1 mode
1:1 mode is selected bit by asserting the CR(mode) bit. Then the input clock is divided by two and switched directly to the output clock.
The
FFMPLL = FFXOSC / 2
Boot Process
TM
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
Device Start-up:
Functional resets restart digital modules but preserve analog, flash and debugging module settings
The RGM contains various registers that reflect the status of the MCU and allow users to configure certain reset behaviours Resets can drive the reset pin on an event
Device Start-up:
POR monitors internal voltage and de-asserts itself Default clock is the 16MHz IRC Boot configuration pins are sampled by the hardware possiblity to go into e.g. serial boot mode Hardware checks reset configuration half word (RCHW) If hardware finds a valid RCHW (0x5A) it reads the 32-bit word at offset 0x04 = address where StartUp code is located (reset boot vector)
Device Start-up:
If valid RCHW not found -> BAM code is executed. In this case BAM moves this device into static mode crt0.s file contains required Start-Up code example Stages required within the crt0
Configure RCHW Initialise Stack Pointer (GPR1) Initialise Small Data Area Pointers (GPR2 & GPR13) Write to all of SRAM to initialise Error Correction Syndrome Copy initialised RAM variables from Flash -> RAM done by compiler if required Branch to main
POR
ABS = 0 Serial Boot (SBL) LINFlex
Device Start-up:
Y
ABS = ?
FABM = 1
NO
ABS = 1
During the power-up phase, all pads are forced to tristate. After power-up phase, all pads are still tristate on cut2 with the following exceptions: PA[9] (FAB = Force Alternate Boot Mode) is pulldown. The device starts fetching from flash unless there is a strong external pull-up. PA[8] (ABS = Alternate Boot Selector) input weak pull-up (selects UART or CAN boot)
TM
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
e200z0 Overview: Single issue architecture, 32-bit CPU 32-bit PowerPC Book E VLE-only Harvard architecture Independent instruction and data buses Multiple execution units:
SPR GPR
Integer Execution Unit Multiply Unit Control External SPR Interface Data
Instruction Unit: single cycle execution of successful look-ahead branches Load / Store Unit: pipelined for single cycle execution 1 cycle load latency Big endian support only Misaligned access support Branch processing unit: Dedicated branch address calculation adder Branch target buffer (BTB) for branch accelaration
Freescale Semiconductor Confidential and Proprietary Information
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
32 N
PC Unit
Branc h Unit
Address Data
Control
Nexus Debug Unit
TM
MSb
0
LSb
31
GPR (Rn)
All BookE instructions are 32 bits wide. Power architecture is naturally Big Endian, but has switch for Little Endian.
E200z0
Registers
e200z0 Registers
General Registers
Condition Register
CR
Count Register
MSR
Processor version
IVPR
Exception syndrome
CTR
Link Register
GPR0 GPR1
PVR
Processor ID
HID0 HID1
ESR
Machine check syndrom register
LR
XER Register
PIR
System Version
XER
GPR31
SVR
MCSR
Data Exception Address
Debug Registers
Debug Control Instruction Address Compare
DEAR
SPRG0 SPRG1
Process ID
Cache Registers
Cache configuration (Read-only)
PID0
Configuration (Read only)
BUCSR
L1CFG0*
Debug Status
MMUCFG*
DBSR
DAC1 DAC2
* Read-only for backward compatibility
e200z0 Registers
General Registers
Register
GPR0-GPR31 CTR
Description
Thirty-two 32-Bit GPRs (GPR0GPR31) serve as data source or destination registers for integer instructions and provide data for generating addresses. Count register holds a loop count that can be decremented during execution of appropriately coded branch instructions. It also provides the branch target address for the Branch Conditional to Count Register (bcctr, bcctrl) instructions. Link Register provides the branch target address for the Branch Conditional to Link Register (bclr, bclrl) instructions, and is used to hold the address of the instruction that follows a branch and link instruction, typically used for linking to subroutines. Integer Exception Register indicates overflow and carries for integer operations. Condition register
LR
XER CR
e200z0 Registers
Processor Control Registers
Register
MSR PVR PIR SVR HID0, HID1
Description
The MSR register defines state of the processor. This register is a read-only register that identifies the version (model) and revision level of the processor. This read-only register is provided to distinguish the processor from other processors in the system. Read-only register that that specifies a particular implementation of a Zen-based system by a particular business unit at their discretion. Hardware implementation-dependent registers controlling various processor and system functions (setting power modes, debug unit enable etc.)
e200z0 Registers
Interrupt Registers
Register
SRR0 SRR1
Description
Save / Restore Registers 0 & 1 are used to save the machine state on a non-critical interrupt. SRR0 saves the address of the instruction at which execution resumes following the end of an interrupt. SRR1 contains the contents of the MSR when the interrupt is taken. Save / Restore registers 0 & 1 are used to save the state machine state on a critical interrupt. Save / Restore registers 0 & 1 are used to save the state machine state on a debug interrupt when enabled HID0[DAPUEN]=1 otherwise CSRR registers are used The Interrupt Vector Prefix Register together with hardwire offsets provide the address of the interrupt handler for different classes of interrupts. The Data Exception Address Register is set to the address of the faulting instruction after most Data Storage Interrupts or Alignment Interrupts. This register provides a syndrome to differentiate between the different kinds of conditions which can generate a Machine Check. The Exception Syndrome Register provides a syndrome to differentiate between the different kinds of exceptions which can generate the same interrupts.
e200z0 Registers
Debug Registers
Register
DBCR0-2 DBSR IAC1-4 DAC1-2
Description
These registers provide control for enabling and configuring debug events Debug event status register These registers contain addresses and/or masks which are used to specify Instruction Address Compare debug event. These registers contain addresses and/or masks which are used to specify Data Address Compare debug event.
e200z0 Registers
Key registers overview - Machine State Register (MSR)
Manipulated during exceptions Saved when interrupt occurs to one of the save/restore registers (SRR1, CSRR1, DSRR1) Restored when returning from exception Accessible
Name
WE CE EE PR ME DE
Wait State (Power Management) Enable Critical interrupt Enable External interrupt Enable Problem state (0/1 Supervisor/User mode) Machine check Enable Debug interrupt Enable
e200z0 Registers
Key registers overview General purpose registers (GPRs)
registers Source or destination registers for integer instructions Provide data for address generating All arithmetic instructions that execute in the core operate on data in the general purpose registers GPRs registers are accessed through instruction operands
32-bit
e200z0 Registers
Key register overview - Condition register (CR)
Condition
fields Bit-Fields reflect results of certain arithmetic operations and provides a mechanism for testing and branching.
LT less then flag GT greater then flag EQ equal flag SO summary overflow
Condition register
CR0 CR1 CR2 CR3 CR4 CR5 CR6 CR7
LT
GT EQ SO
Bit field
e200z0 Registers
Special purpose registers (SPRs)
Most
of core registers are special purpose registers (SPRs) Each SPR register has the number used in the instruction syntax to access it Two assembly instruction are used to read and write
mfspr mtspr
gpr_dest,spr_src spr_dest,gpr_src
Few
SPRs have synchronization requirements for access (ie. HID0) Response to invalid SPR access depends on privileged level
Illegal instruction exception Privileged Violation exception
Example
General
mtspr 9,r4 mtspr 22,r0 mfspr r11,1 mfspr r0,26
Alternative
mtspr CTR,r4 mtspr DEC,r0 mfspr r11,XER mfspr r0,SRR0
Simplified
mtctr r4 mtdec r0 mfxer r11 mfsrr0 r0
Description
Copy contents of gpr4 to spr9 (CTR) Copy contents of gpr0 to spr22 (DEC) Copy contents of spr1 (XER) to gpr 11 Copy contents of spr26 (SRR0) to gpr 0
e200z0 Registers
Programmers model 1 of 2
e200z0
Registers PR (Problem State) Bit in MSR determines current mode that core is using
Supervisor
Mode
User
Mode
Only User Mode Registers have R/W Access (General registers) Access to any Supervisor Mode Register raises privileged exception
e200z0 Registers
Programmers model 2 of 2
Entering USER
> SUPERVISER
Trigger Software Interrupt (in INTC) or System Call Interrupt (use se_sc instruction) When Interrupt is taken, MSR is changed automatically to supervisor mode. In ISR, mask PR bit in SRR1 and set to 0 (Supervisor Mode) When Interrupt completes (via rfi instruction) the core will be restored to user mode
SUPERVISER
> USER
Programming Model:
High Addresses
last parameter save area last LR save area last back chain 32-bit GPR save area CR save area (+ pad) local variable space (+ pad) parameter save area LR save area
Only created when necessary Size varies as needed 16-byte alignment required
r1
Instruction
model
uses Variable Length Encoding Instruction Set VLE Re-encoding of the Power Architecture BookE ISA fixed 32-bit instructions VLE contains a mixture of 16-bit and 32-bit instructions VLE Instructions have exact or similar semantics to BookE instructions Some 32-bit BookE instructions do not need full 32-bit instruction size 16-bit PowerPC VLE instructions encoded with se_ prefix 32-bit PowerPC VLE instructions encoded with e_ prefix
Instruction Description
BookE 32-bit instruction (not used on e200z0) 32-bit PowerPC VLE instruction 16-bit PowerPC VLE instruction
Example
Typical VLE 16 bit instruction is 2-operand, not 3 operand Many zero-operand instructions encoded in 16 bits Access to just 16 of the 32 GPRs (4-bit range) Limited literal sizes
Example
se_li
OPCODE
0 5
se_sub
r4
12 15 0
0b0000111
OPCODE
5 7
rY
12
rX
15
Typical VLE 32-bit instruction is 3 operand Access to all 32 GPRs Larger literal sizes compared to 16-bit instructions
32-bit
VLE instruction
Example
rT
11
rA
16
SI
31
Require an instruction which will jump (branch) to an instruction with an offset of 0x8 from the current instruction e_b 0x8 - PowerPC VLE 32-Bit Encoding se_b 0x8 - PowerPC VLE 16-bit Encoding
e_b 0x8
OPCODE
0 5 7
0b000000000000000000001000
24-bit offset 30 31
se_b 0x8
OPCODE
0 5 8
0b00001000
8-bit offset 15
TM
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
Peripherals
SIUL Introduction
Pad
Intended to configure the electrical parameters and muxing of each pad; May simplify PCB design by multiple alternate input / output functions
GPIO
Different access mechanisms to the GPIO data registers in order to allow port accesses or bit manipulation without the need of R-M-W operations
External
interrupt management
Allows the enabling and configuration (such as filtering window, edge and mask setting) of digital glitch filters on each ext. IRQ;
MCU
Identification
Peripherals
SIUL Pad Control and IOMux configuration overview
Pad
IOMux configuration is managed through: PCR Registers (output functionalities) PSMI Registers (input functionalities)
0 R W
SMC
0 0
APC
0 0 0
PA
0
OBE
0
IBE
1 0 0
ODE
0 0 0
SRC
0
WPE
0
WPS
0
Reset
PAD n
PCRn.ODE
PCRn.OBE PCRn.APC
ADC ch #
PCRn.IBE
PAD m
Peripherals
SIUL Pad Control and IOMux configuration 2/4
Alternate functions are chosen by PCR.PA bitfields:
PCR.PA = 00 -> AF0; PCR.PA = 01 -> AF1; PCR.PA = 10 -> AF2; PCR.PA = 11-> AF3.
This is intended to select the output functions; For input functions, PCR.IBE bit must be written to 1, regardless of the values selected in PCR.PA bit fields.
For this reason, the value corresponding to an input only function is reported as --.
Peripherals
PSMI SIUL Pad Control and IOMux configuration 3/4
PAD j
PAD k
IP n+1
PAD l
PAD m
PSMIn_n+3 Register
0 R W 0 1 0 2 0 3 0 47 PADSELn 8 0 9 0 10 11 0 0 12 15 PADSEL(n+1) 16 17 18 19 0 0 0 0 20 23 PADSEL(n+2) 24 25 26 27 0 0 0 0 28 31 PADSEL(n+3)
Peripherals
SIUL Pad Control and IOMux configuration 4/4
0 R W 0 1 0 2 0 3 0 47 PADSELn 8 0 9 10 11 0 0 0 12 15 PADSEL(n+1) 16 17 18 19 0 0 0 0 20 23 PADSEL(n+2) 24 25 26 27 0 0 0 0 28 31 PADSEL(n+3)
Different
TM
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
SWT: Overview
32-bit time-out register to set the time-out period The unique SWT counter clock is the undivided slow internal RC oscillator 128 KHz (SIRC), no other clock source can be selected Programmable selection of window mode or regular servicing Programmable selection of reset or interrupt on an initial time-out Master access protection Hard and soft configuration lock bits
SWT: Refresh
Regular mode To prevent the watchdog from interrupting or resetting, the following sequence must be performed before a timeout period:
1. 2.
Note: other instructions, such as an ISR, can occur between above writes
Window mode The service sequence must be performed in the last part of the time-out period defined by the window register The window is open when the down counter is less than the value in the SWT_WN register Outside of this window, service sequence writes are invalid accesses and generate a bus error or reset depending on the value of the SWT_CR.RIA bit.
RIA Reset upon Invalid Access - 0 = Generate a bus error - 1 = Generate a reset
Freescale Semiconductor Confidential and Proprietary Information
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
TM
eMIOS260
The
eMIOS260 used on BOLERO family is based on the existing eMIOS used on 5500 power architecture parts
Introduction
IRC 16M OSC 4-16M PLL IRC 128K OSC 32K
e200z0h Core
Integer Execution Unit Multiply Unit Instruction Unit VLE General Purpose Registers (32 x 32-bit) Branch Unit Load/Store Unit
Debug
(C)JTAG
Provides various modes to generate or measure timed event signals. 24 to 56 Channels based on 3 channel types One new channel mode featuring lighting applications, OPWMT 16-bit time base All other channel modes are subset of the unified channel structure on previous eMIOS. Consistent user interface with previous eMIOS implementation.
VREG
INTC
Peripheral Bridge STM 4 ch PIT 6 ch API/RTC SWT I2C 1 SIU eMIOS-lite 24 56 ch BCTU ADC10 16 57 ch
LINFlex 3-8
Peripherals
EMIOS channel configuration MPC5604B
EMIOS_A
Channel 0 Prescaler (/1, 2, 3, 4)
EMIOS_B
Channel 0 Prescaler (/1, 2, 3, 4)
eMIOS260
Unified Channel Features
Selectable time base for each counter bus Programmable Clock Prescaler Double buffered data registers and comparators State Machine (with mode control) Programmable as input or output:
-
eMIOS260
Double Buffered A and B Registers
and B data registers are double buffered to provide a mechanism for safe update of the A and B register values
This also enables very small pulse / period generation or measurement since updates can happen in current period
channel A user registers are an address mapped link to either the A1 or A2 register (determined automatically by the mode of the unified channel).
For output modes, data is typically written to the A2 register For input capture modes, data is latched into either A1 or A2 depending on mode. All of this is transparent to the user
The
Register A2
Peripherals
EMIOS Channel Types MPC5604B
Peripherals
EMIOS clocking
Channel There
The
Note that both prescalers must be enabled!!! Caution Only eMIOS0 channels 0-8, 16, 23, 24 and eMIOS1 channels 0, 8, 16, 23, 24 have an internal counter
eMIOS is clocked from the peripheral set 3 clock signal which provides clock dividers from 1 to 16
Peripherals
MPC560xB family has 5 shared counter busses allowing common counter bus timing across multiple channels
The
Counter Bus A is shared with all channels and driven from channel 23 Counter bus B is shared with channels 0 to 7 and driven from channel 0
UC[24]
Counter Bus E
UC[23]
Counter Bus A
UC[16]
Counter Bus D
Counter bus C is shared with channels 8 to 15 and driven from channel 8 Counter bus D is shared with channels 16 to 23 and driven from channel 16 Counter bus E is shared with channels 24 to 27 and driven from channel 24
UC[15]
UC[8] UC[7]
Counter Bus C
UC[0]
Counter Bus B
Peripherals
EMIOS mode selection
MODE[0:6] Mode of operation 000_0000 General Purpose Input/Output (input) 000_0001 General Purpose Input/Output (output) 000_0010 Single Action Input Capture 000_0011 Single Action Output Compare 000_0100 Input Pulse width Measurement 000_0101 Input Period Measurement 000_011b Double Action Output compare 000_1000 Reserved 000_1111 001_0bbb Modulus Counter 001_1000 Reserved 010_0101 010_0110 Output Pulse Width Modulation with Trigger 010_0111 Reserved 100_1111 101_000b Modulus Counter Buffered (Up counter) 101_0010 Reserved 101_0011 101_010b Modulus Counter Buffered (Up/Down counter) 101_0110 Reserved 101_1001 101_10b0 Output Pulse Width and Frequency Modulation Buffered 101_11bb Center Aligned Output Pulse Width Modulation Buffered 110_00b0 Output Pulse Width Modulation Buffered 110_0100 Reserved 111_1111
Mode[6:0]
0 0 0 0 0 0 0
RST: .
Peripherals
EMIOS - Single Action Input Capture Returns the value of the counter bus on an edge match of an input signal .
-
Can use Internal or Modulus counter - Can match on Rising, Falling or Toggle determined by state of EDPOL, EDSEL
Edge detect input signal selected counter bus FLAG pin / register A2 (captured) $xxxxxx value $001000 $001250 $0016A0 $000500 $001000 $001100 $001250 $001525 $0016A0 Edge detect Edge detect
Notes: When edge is detected, flag is set and counter bus value is captured in register A2. User reads this value from UCA[n] register. UCB[n] = Cleared and cannot be written
Peripherals
EMIOS - Single Action Output Compare Generates an output on a counter bus match
-
Can use Internal or Modulus counter Can set output to go HIGH, LOW or TOGGLE, based on the state of EDPOL and EDSEL
output flip-flop
EDSEL=0, EDPOL=1
output flip-flop
EDSEL=1, EDPOL=x
$000500
$001000
$001100
$001000
$001100
$001000
$001000
$001000
$001000
$001000
update of A1
A1 match
A1 match
A1 match
Notes: Write the desired counter bus value to create a match into UCA[n] (A2n) which is buffered into A1. A comparator match of A1 results in an output event, defined by status of EDPOL and EDSEL
Peripherals
EMIOS - Double Action Output Compare Generates an output pulse
-
Can use Internal or Modulus counter - Polarity of pulse is determined by value of EDPOL
output flip-flop
EDSEL=0, EDPOL=1 MODE[0]=1
$000500
$001000
$001100
$001000
$001100
$001000
$001000
$001000
$001000
$001000
$001100
$001100
$001100
update of A1 & B1
A1 match
B1 match
A1 match
B1 match
A1 match
Notes: Write the desired pulse leading edge into UCA[n] (A2n) and the falling edge into UCB[n] (B2n) which are buffered into A1 and B1. On a comparator A match, the output is set to the value of EDPOL. FLAG is set if MODE0=1 On a comparator B match, the output is set to the inverse of EDPOL. FLAG is set
Freescale Semiconductor Confidential and Proprietary Information
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
TM
Peripherals
EMIOS - Input Pulse Width Measurement Determines the width (in counter bus clock ticks) of an input pulse width
-
Can use Internal or Modulus counter - Can be configured to measure HIGH or LOW pulses by state of EDPOL bit (EDPOL=1 for HIGH) B A B B A A
EDPOL = 1
input signal selected counter bus FLAG pin / register A2(captured) $xxxxxx value B1 value $xxxxxx B2(captured) $xxxxxx value A1 value $xxxxxx $001000 $001000 Width = A2 B1 $001100 $001000 $001250 $001250 Width = A2 B1 $001525 $001250 $FFFEC0 $FFFEC0 Width = A2 B1 ??? $000125 $FFFEC0 $001000 $001100 $001250 $001525 $FFFEC0 $000125
Notes: Leading edge is captured into B2[n]. (EDPOL Determines if leading edge is high or low). Trailing edge is captured into A2[n] and Flag is set Pulse width is calculated by subtracting UCBn (B1) from UCAn (A2) Caution If pulse has spanned a counter bus period, then need to take care to modify calculation. Width = (UCAn + Counter Bus Period) - UCBn
Freescale Semiconductor Confidential and Proprietary Information
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
TM
Peripherals
EMIOS - Input Period Measurement Determines the period (in counter bus clock ticks) of an input pulse width
-
Can use Internal or Modulus counter - Can be configured to measure between 2 HIGH or 2 LOW edges, determined by the state of the EDPOL bit
EDPOL = 1
Edge detected
Edge detected
Edge detected
input signal selected counter bus FLAG pin / register A2(captured) $xxxxxx value B1 value $xxxxxx B2(captured) $xxxxxx value A1 value $xxxxxx $001000 $001000 $001250 $001000 $001250 $001000 $000005 $001250 $000005 $001250 $001000 $001100 $001250 $FFFEC0 $000005 $000125
Width = A2 B1 Width = A2 B1 ??? Notes: When the edge of the selected polarity is detected, counter value is captured into A2[n] and B2[n], the data previously held in B2[n] is captured into A1[n] and B1[n], and Flag is set. Period is calculated by subtracting UCBn (B1) from UCAn (A2) Caution If period of input signal has spanned a counter bus period, then need to take care to modify calculation. Width = (UCAn + Counter Bus Period) - UCBn Freescale Semiconductor Confidential and Proprietary Information
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
TM
Peripherals
EMIOS - Modulus Counter Mode UP Counter Generates a time base which can be shared with other channels through the internal counter buses
-
Internal Counter (UCCNTn) 0x001000 0x000800 0x000000 FLAG pin / register A1 value $001000 A2 value $001000 A1 match $001000 $000800 $000800 write update into A2 of A1 $000800 $000800
A1 match
A1 match
Notes: On a comparator A match, FLAG is set and the internal counter is set to value $0. A change of the A2 register makes the A1 register be updated at the next clock. Caution If when entering MC mode the internal counter value is upper than register UCA[n] value, then it will wrap at the maximum counter value ($FFFFFF) before matching A1.
Peripherals
EMIOS - Modulus Counter Buffer Mode UP Counter Generates a time base which can be shared with other channels through the internal counter buses
-
Internal Counter (UCCNTn) 0x001000 0x000800 0x000001 FLAG pin / register A1 value $001000 A2 value $001000 A1 match $001000 $000800 write into A2 $001000 $000800 $000800
A1 match
update of A1
A1 match
Notes: On a comparator A match, FLAG is set and the internal counter is set to value $1. Allowing smooth transitions, a change of the A2 register makes the A1 register be updated when the internal counter reaches the value $1. Caution If when entering MCB mode the internal counter value is upper than register UCA[n] value, then it will wrap at the maximum counter value ($FFFFFF) before matching A1.
Freescale Semiconductor Confidential and Proprietary Information
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
TM
Peripherals
EMIOS - Modulus Counter Buffer Mode UP/DOWN Counter Generates a time base which can be shared with other channels through the internal counter buses
-
Internal Counter (UCCNTn) 0x001000 0x000800 0x000001 FLAG pin / register A1 value $001000 A2 value $001000 A1 match $001000 $000800 write into A2 $000800 $000800
A1 match
update of A1
A1 match
Notes: On a comparator A match, FLAG is set and the internal counter is set to value $1. Allowing smooth transitions, a change of the A2 register makes the A1 register be updated when the internal counter reaches the value $1. Caution If when entering MCB mode the internal counter value is upper than register UCA[n] value, then it will wrap at the maximum counter value ($FFFFFF) before matching A1.
Freescale Semiconductor Confidential and Proprietary Information
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
TM
Peripherals
EMIOS - OPWMFMB Generates a simple output PWM signal
Requires INTERNAL Counter - EDPOL allows selection between active HIGH or active LOW duty cycle. output flip-flop
EDPOL=0
output flip-flop
EDPOL=1
Selected counter bus 0x001000 0x000800 0x000200 B1 value $001000 A1 value $000200 A2 value $000200 A1 match B1 match $000200 $001000 $000200 $000800 write into A2 $001000 $000800 $001000 $000800
A1 match
B1 match
update of A1
A1 match B1 match
Notes: Duty Cycle = UCA[n] (A1) + 1, Period = UCB[n] (B1) + 1 On Comparator A1 match, Output pin is set to value of EDPOL On Comparator B1 match, Output pin is set to complement of EDPOL and Internal counter is reset The transfers from register B2[n] to B1[n] and from register A2[n] to A1[n] are performed at the first clock of the next cycle. FLAGS can be generated only on B1 matches or on both A1 and B1 matches depending on MODE[5] bit.
Peripherals
EMIOS - OPWMB Generates a simple output PWM signal
-
Can use Internal or Modulus counter - EDPOL allows selection between active HIGH or active LOW duty cycle.
output flip-flop Selected counter bus 0x001000 0x000800 0x000600 0x000400 0x000200 B1 value $000800 B2 value $000800 A1 value $000200 $000200 A2 value $000200 A1 match B1 match write into A2 & B2 $000800 $000600 $000200 $000400 A1 match B1 match update of A1 & B1 $000400 $000400 $000800 $000600 $000600
EDPOL=1
Notes: Write UCA[n] (A1) with Leading Edge. Write UCB[n] (B1) with trailing edge On Comparator A1 match, Output pin is set to value of EDPOL On Comparator B1 match, Output pin is set to complement of EDPOL The transfers from register B2[n] to B1[n] and from register A2[n] to A1[n] are performed at the first clock of the next cycle. FLAGS can be generated only on B1 matches or on both A1 and B1 matches depending on MODE[5] bit.
Peripherals
EMIOS - OPWMT
Generates a PWM signal with a fixed offset and a trigger signal
Intended to be used with other channels in the same mode with shared common time base - This mode is particularly useful in the generation of lighting PWM control signals.
output flip-flop
EDPOL=1
FLAG pin / register Selected counter bus 0x001000 0x000800 0x000600 0x000400 0x000200 B1 value $000800 B2 value $000800 A1 value $000200 $000200 A2 value $000400 A1 $000400 A2 B1 A1 $000200 $000400 A2 write into B1 Update A1 $000800 $000800 $000600 $000200 $000400 A2 B1 $000600 $000600
match match match match match match match of B2 match match B2 Notes: A1[n] defines the Leading Edge, B1[n] the trailing edge, A2[n] the generation of a FLAG event On Comparator A1 match, Output pin is set to value of EDPOL On comparator A2 match, FLAG is set (and can allow to synchronize with other events, ie. AD conversion) On Comparator B1 match, Output pin is set to complement of EDPOL The transfers from register B2[n] to B1[n] is performed at every match of register A1
Peripherals
EMIOS - Changing Modes
If a Channel is changed from one mode to another without performing this procedure, matches can occur in random time if the contents of A[n] or B[n] were not updated.
Peripherals
EMIOS - Programmable Input Filter
Filter Consists of a 5 bit programmable upcounter, clocked by either the channel or peripheral set clock (defined by FCK) Input signal is synchronised to system clock. When the synchroniser output changes state, the counter starts counting up If the synchroniser state remains stable for the desired number of selected clocks, the counter overflows on next high clock edge, counter resets and filter output changes
IF3
IF2
IF1
5-Bit Up Counter
Synchroniser
Start
Start
Start
Overflow
Start
Start
Start
TM
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
INTC: Features
The INTC provides priority-based preemptive scheduling of ISRs Supports 134 peripheral interrupt and 8 software-configurable interrupt request sources Provides a unique vector for each interrupt request source Each interrupt source programmable to one of 16 priorities Preemptive prioritized interrupt requests to processor Low latency3 clock cycles from receipt of interrupt request from peripheral to interrupt request to processor Supports the priority ceiling protocol for coherent accesses Software configurable interrupt requests to separate the work involved in servicing an interrupt request into a high-priority portion and a low-priority portion
Low-priority portion can be used to schedule tasks with RTOS at INTC_CPR priority 0
Interrupt controller
MPC5604B Interrupt Structure
CPU Interrupt
CPU Core
Freescale Semiconductor Confidential and Proprietary Information
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
TM
Interrupt controller
MPC560xB INTC Interrupts
The INTC provides a mechanism to service interrupts external to the core. 8 3 1 1 4 2 2 3 5 6 3 54 1 28 15 12 148 Software Settable Flags MCM (Flash & RAM) Software watchdog timer SWT FXOSC System Timer STM RTC/API SIUL (external IRQ) Wakeup Unit Mode Entry (ME & RGM) PIT ADC FlexCAN (6 per module) IIC eMIOS (14 per module) DSPI (5 per DSPI) LINFlex (3 per LINFLex) Examples of Possible IRQ Sources to Interrupt Controller
Interrupt controller
INTC Hardware and Software Vector Mode
Hardware Vector Mode Each interrupt has a unique vector entry containing the jump address of the ISR. The ISR contains: Unique Prologue ISR Unique Epilogue
and software vector mode are only relevant to IVOR4 (INTC) exceptions
Interrupt controller
INTC Hardware and Software Vector Mode
Hardware vector mode has IVPR (Interrupt Vector Prefix Register) at a 2Kbyte offset from the software mode IVPR
IVOR0_ISR IVOR1_ISR IVOR15_ISR
Note IVPR is SPR 63 Only bits 0..19 are written in IVPR hence 4k boundary
2K
Interrupt controller
Typical CPU Interrupt Behaviour
Interrupt is recognized Hardware context switch: SRR0*: Loaded with address of Next Instruction, or Instruction causing the interrupt SRR1*: Loaded with Bits 16:31 - MSR bits 16:31 MSR: All bits are cleared except ME Instruction Pointer: points to unique interrupt vector
Some interrupts use CSRR[0..1] (critical) or DSRR[0..1] (Debug) instead of SRR[0..1]
1.
2. 3. 4.
Software Interrupt handler (at interrupt vector) Last instruction, rfi, (return from interrupt): - Restores MSR bits 16:31 from SRR1 - Restores instruction pointer from SRR0
Freescale Semiconductor Confidential and Proprietary Information
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
TM
Interrupt controller
Software Vector Mode Core Interrupt Details
When a core exception occurs, the core will branch to one of the IVOR vectors defined in the IVPR vector table
Each entry in the vector table contains a branch instruction to the relevant IVOR exception handler. The IVPR base address (IVPR bits 0..19) and current IVOR causing the exception are added to calculate the vector table address to execute the branch from.
IVOR15
Interrupt controller
Software Vector Mode Interrupt Handler
The
Prologue
Save SRRs to stack Read IACKR to determine which INTC interrupt occurred (See next slide) Re-enable interrupts in MSR Save GPRs to stack Branch with link to IACKR (contains ISR address, see next slide) Execute MBAR to ensure all pending data operations are complete before restoring any registers (synchronisation process)! Write to EOIR (Sets CPR back to 0) Restore GPRs Disable Interrupts in MSR Restore SRRs Execute RFI (Return to address in SRR0 and restore MSR)
Jump to ISR
Epilogue
Interrupt controller
Software Vector Mode Interrupt Acknowledge
The INTC has a an Interrupt Acknowledge Register (IACKR) for each core valid for IVOR4 (INTC) exceptions in software vector mode.
INTC_IACKR Reading this register acknowledges the interrupt has taken place and prevents the same interrupt occurring again Reading IACKR also calculates and returns the address of the relevant Interrupt Service Routine based on reading the 32-bit address at VTBA + ISR Offset
Vector Table Base Address (VTBA) ISR0 ISR1 ISR2 ISR3 ISRn IACKR = Contents of (VTBA + Interrupt #) ISR293
Interrupt controller
SRR Updated with return address and current MSR. MSR updated to disable further EE Ints IVOR4 Interrupt from INTC
MAIN Program
{ . . }
IVOR4 Handler
Prologue: (1) SavePrologue SRRs to stack (2) Read IACKR to: - acknowledge interrupt (to prevent servicing same interrupt again) Jump to ISR - automatically return physical address of ISR (3) Store IACKR (4) Re enable interrupts in Epilogue MSR (5) Save GPRs to stack (6) Branch with link to IACKR (ISRn Address)
IVOR15
ISRn
{ . }
Interrupt controller
Software INTC Interrupt Example
CPR= current priority register
MAIN Program { . . }
(2) (3) (4) (5) RFI Causes: (1) Branch back to origin (held in SRR0) (2) Restore of original MSR from SRR1 (6)
IVOR4 Handler
Epilogue: Write to EOIR resets the CPR back to previous value so lower priority interrupts are no longer masked
(1)
Write mbar to finish Prologue any data transfers in progress Write to EOIR (End of interrupt register) Jump to ISR Restore GPRs from stack Disable Interrupts Epilogue Restore SRRs from stack Execute RFI
ISRn
{
Context Save
.
Context Restore
}
Interrupt controller
Hardware Vector Mode Details
Interrupt controller
Hardware Interrupt Example
MAIN Program
{ . . }
SRR Updated with return address and current MSR MSR updated to disable further EE Ints VECTOR Table
Base Address IVPR + 2KB b_handler_0 b_handler_1 b_handler_2 b_handler_3 b_handler_n b_handler_293
handler_0 Prologue
ISR
Interrupt_n
Prologue saves SRR registers and GPR as per software vector mode
Current Priority Register (CPR) updated with current interupt priority to prevent preemption of <= priority int
Epilogue Epilogue follows same format as per software vector mode --handler_293 Prologue
ISR
Epilogue
Instructions prolog
ISR_0
ISR
(including branch to vector address using IACKR to get vector then bl ISR_n)
ISR_n
ISR
ISR_511
ISR
epilog
Address Instructions1 b handler_0 b handler_1 IVPR + 0x20 b handler_2 b handler_n handler_0
Notes: 1. b ISR_n and b handler_n instructions are technically part of the handlers. 2. b ISRn instruction alignment in software vector mode assume INTC_MCR[VTES]=0 handler_n
. . .
IRQ n taken
. . .
IVPR + n(0x10)
handler_511
SW ISR (clears interrupt flag) SW Epilog: - Executes mbar to ensure IRQ flag cleared - Restores most registers - Disables EE* and writes to INTC_EOIR - Restores remaining registers and returns (rfi)
* When nesting
TM
UART (LINFlex)
TM
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
Peripherals LINFlex
Features: Supports LIN UART mode
7/8-bit data, parity/no-parity, 1 or 2 stop bit LSB first LIN Management Initialisation, Normal and Sleep Maskable interrupts Wake-up event on dominant bit detection 8-bit counter for time-out management Software-efficient data buffer interface mapping at a unique address space LIN Master Mode Autonomous message handling Once the software has triggered the header transmission, no further intervention needed: until the next header transmission request in transmission mode until the checksum reception in reception mode LIN Slave Mode (only LINFlex0 on Bolero is capable of slave mode) Software intervention needed only to: Trigger transmission, reception or discard depending on the identifier, Fill the buffer (transmission) or get data from buffer (reception). In Filter mode Software intervention needed only to: Fill the buffer in transmission, Get data from buffer in reception. UART mode Full duplex; Character length 7 & 8 bits; opt parity, 1 or 2 stop bits 4 byte Tx and Rx buffers 3 interrupt sources : error, Rx, Tx LSB first
SCI / LIN
UART Overview
UART mode
Mode
Transmit
Buffer
Receive
Buffer
Error
Transmission
UART/SCI CORE
number of bytes transmitted is equal to the value configured by the TDFL[0:1] bits in the UARTCR
Freescale Semiconductor Confidential and Proprietary Information
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
LIN TX
LIN RX
TM
UART Features Full duplex communication 8- or 9-bit char with parity One or two stop bits Non-Return-to Zero data format encoding 4-byte buffer for reception, 4-byte buffer for transmission 8-bit counter for timeout management Fractional baud rate generator Loop-back and self test mode 3 interrupt sources : Error, Rx, Tx
TDFL[0:1] - Transmit data field length (Tx Buffer size range from 1 to 4) RDFL[0:1] Receive data field length (Tx Buffer size range from 1 to 4) RXEN Receive enable/disable TXEN Transmitter enable/disable OP Even/odd parity PCE Parity/transmit check enable/disable WL 7 or 8 data bits with parity UART LIN /UART mode
This register contains UART mode status flags: SZF - Stock at zero flag OCF - Output compare flag PEn Parity error in received char n (1 flag for each of 4 received char n RMB Release message buffer (Buffer is either free or ready to be read) FEF Framing error flag BOF Buffer overrun flag RPS UART current receive pin state (LINRX) WUF Wakeup flag (An edge is detected a edge on the LINRX pin DRF Data reception complete flag DTF Data transmission complete flag NF Noise flag
UART Mode
UART Transmit Process: 1- Select the Baud Rate by writing the BAUD Register 2- Select UART Mode in UART control Register (UARTCR), select parity type (Odd/Even) & char length (8/9 bit) 3- Set the Transmit Enable bit in UART control Register (UARTCR) 4- Write the message to transmit into the transmit buffer (Max # = 4 bytes) 5- Write the Transmit Data Length field in the UARTCR
UART Mode
For the receiver to become active, exits Initialization mode and sets the RXEN bit in the UARTCR. Once the programmed number (RDFL bits) of bytes has been received, the DRF bit is set in UARTSR and an interrupt is generated, if enabled. If a parity error occurs during reception of any byte, then the corresponding PEx bit in the UARTSR is set but no interrupt is generated. If a framing error occurs in any byte (FE bit in UARTSR is set) then an interrupt is generated if the FEIE bit in the LINIER is set. If the last received frame has not been read from the buffer (that is, RMB bit is not reset by the user) then upon reception of the next byte an overrun error occurs (BOF bit in UARTSR is set) and one message will be lost. Which message is lost depends on the configuration of the RBLM bit of LINCR1.
Freescale Semiconductor Confidential and Proprietary Information
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
TM
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
Introduction
Up to 6 FlexCAN modules with 64 message buffers Full Implementation of the CAN protocol specification Version 2.0B and ISO Standard 11898
Standard and Extended ID frames and Remote Frames Zero to eight bytes data Programmable bit rate up to 1 Mb/sec
Capable of matching incoming IDs against 8 extended, 16 standard or 32 partial (8 bits) IDs, with individual masking capability
Introduction (Contd)
Programmable acceptance filters for receive message buffers Arbitration scheme according to message ID or message buffer number Message buffers and errors can cause interrupts (maskable) Short latency time for high priority transmit messages Unused Message Buffer space can be used as general purpose RAM CAN clock from Either Internal (PLL) or External Source (OSC) Programmable loop-back for self test operation 16-bit time Stamp Independent of the transmission medium
TM
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
Memories:
RAM features:
up to 96KB (MPC5607B) general purpose SRAM Supports byte (8-bit), half word (16-bit), and word (32-bit) writes for optimal use of memory User transparent ECC encoding and decoding for byte, half word, and word accesses 32-bit ECC with single-bit correction (and visibility), double bit detection for data integrity ECC is checked on reads, calculated on writes
FLASH features:
up to 1.5MB Code Flash (MPC5607B) up to 64k Data Flash on Bolero; same emulated EEPROM concept for most products of the Bolero family (sectorization; software compatibility; memory mapping) 64-bit programming granularity (can change value from 1 0 only) Read-while-write with Code and Data Flash or by RWW feature Erase granularity is Sector size 64-bit ECC with single-bit correction (and visibility), double bit detection for data integrity
ADC, CTU
TM
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
ADC overview
10-bit ADC resolution, on MPC5605/6/7B additional 12 Bit ADC Supports conversions time down to 650ns internal clock will be system clock/2 Up to 36 single ended inputs channels, expandable to 64 channels with external multiplexers Internally multiplexed channels 10-bit 2 counts accuracy (TUE) available for 16ch 10-bit 3 counts accuracy (TUE) available for up to 20ch Externally multiplexed channels 10-bit 3 counts accuracy (TUE) available for up to 32ch Internal control to support generation of external analog multiplexer selection Dedicated result register available for every internally and externally muxed channel 3 independently configurable sample and conversion times for high occurrence channels, internally muxed channels and externally muxed channels Support for one-shot, scan, injection and triggered injected (CTU) conversion modes Independently configurable parameters for channels
D0 D1
. .
D94 D95
EMIOS Timer channels Cross triggering Unit Trigger event for injected conversion The CTU will automatically signal the channel to be converted by hardware
Peripherals
External ADC multiplexing
The
Each of the 4 dedicated internal channels (ANX pins) can support up to 8 external multiplexed channels, yielding up to 32 channels with dedicated internal result registers
3 external multiplexer select channels (MA[0-2], PE[5-7]) are provided in the Bolero pinout
AIN0 AIN 15 AIN32 AIN47 AIN64 AIN65 AIN70 AIN71 AIN72 AIN73 AIN78 AIN79 AIN80 AIN81 AIN86 AIN87 AIN88 AIN89 AIN94 AIN95 32 (ANP + ANS)
Mux
36
Mux
4 ANX
M U X
ADC
Mux
MA[02]
Mux
Mux Control
114
115
116
Aborting a conversion
By setting the ABORT bit in the MCR Current conversion is aborted and the conversion of the next channel of the chain is immediately started If the last channel of a chain is aborted, the end of chain is reported generating an ECH interrupt. In Scan Mode, current chain conversion can be aborted by setting the ABORTCHAIN bit in the MCR; ECH interrupt is generated to signal the end of the chain.
117
violation
Can
CTU Lite
Peripherals
CTU Lite Purpose
Cross Triggering Unit Lite on the Bolero family is a link between timers (eMIOS or PIT) and the ADC
The
The
CTU Lite automatically transforms timer events into ADC conversions without main CPU intervention
The
real-time behavior (synchronization) between timer events and ADC conversions is guaranteed
Peripherals
CTU Lite Block Diagram
eMIOS
CTU
eMIOS B23 Ch52 Trig
ADC Done
ADC
PIT3
Ch28 Trig
PIT
PIT2
Injection trigger
B1 C1 A1
Output Pin Period: the period of the PWM is defined by a Modulus Counter channel. A1 Value: define the leading edge (or shift) of the PWM channel. Buffering is not needed as the value of the shift must not changed on the fly. B1 Value: define the trailing edge (or duty cycle) of the PWM channel B2 Value: buffered value of trailing edge B1 update: transfer from B2 to B1 takes place at A1 match EDPOL: define the output polarity A2 Value: define the sampling point for the analog diagnostic. It can be configured anywhere within the PWM period.
Peripherals
CTU Lite Features
CTU features details:
64 timer events Each timer event can be assigned corresponding ADC channel Only one ADC conversion can be triggered at a time HW arbitration when simultaneous event occur Event priorities are HW defined Single cycle delayed trigger output. The trigger output is a combination of 64 (generic value) input flags/events connected to different timers in the system. Maskable interrupt generation whenever a trigger output is generated One event configuration register dedicated to each timer event allows to define the corresponding ADC channel Acknowledgment signal to eMIOS/PIT for clearing the flag Synchronization with ADC to avoid collision
DSPI
TM
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
Peripherals
SPI Overview
High speed, full duplex, three wire synchronous interface Master and slave modes supported Six Peripheral Chip Selects Expandable to 64 with external demultiplexer Deglitching support of up to 32 chip selects when external mux used SPI Queue support Buffered transfers using 4 deep Tx FIFO and 4 deep Rx FIFO for regular SPI modules FIFO visibility for debugging 6 Interrupt conditions
DSPI:
Separate 4 message entry Rx and Tx FIFO Status Reg Status Reg
FIFOs
Rx FIFO POPR
TXCNT
# FIFO Entries
RXCNT
# FIFO Entries
RX Data Rx Data
TXNXTPT POPNXTPT
Rx Shift Reg
Tx or Rx FIFO can be manually flushed (CLR_TXF or CLR_RXF in MCR) FIFOs can be individually disabled providing simple double buffered operation
127
DSPI: CTAR
8 Clock and transfer Attributes registers allow the transfer characteristics of each SPI message to be defined:
Frame size of message (4-16 bits) Baud rate selection SCK Clock Polarity (inactive state of clock) SCK Phase (defines active clock edge for data capture / change) Transmission order LSB or MSB transferred 1st Delay between assertion of Peripheral Chip Select and 1st SCK edge Delay between assertion of last SCK edge and negation of chip select Delay between transfer frames
The desired transfer characteristics (stored in the CTAR registers) are then called
128
DSPI:
Transmit
TFFF: Tx FIFO not full Fill Flag (IRQ or DMA) TCF: Transfer of current frame complete (IRQ) EOQF: End of queue reached (IRQ) TFUF: Attempt to transmit with empty FIFO (IRQ)
RFDF: Rx FIFO not empty - Drain Flag (IRQ or DMA) RFOF: Frame received while FIFO full (IRQ)
INTC
Debugging, Tools
TM
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
Crossbar Masters
Debug
JTAG
Includes Nexus Class 1 (i.e. JTAG) Standard interface High speed Run control Flexible breakpoint and watchpoint set-up (4 IAC, 2 DAC) register/memory R/W
Nexus 2+
minimum of 6 pins required Class 2 adds the following (only on 208 packages):
Boot Assist Module (BAM)
I/O Bridge
512K Flash
64K Data Flash
Full duplex communication Non-intrusive program trace Ownership trace Watchpoint messaging And Class 2+ provides (only on 208
Crossbar Slaves
CTU
3 FlexCAN
4 LINFlex
3 DSPI
1 I2C
Software Drivers
LIN 2.1 Drivers J2602 Drivers Graphic Library General Motor Control RAppID Init
Software Libraries
Tools
RAppID Toolbox System Simulation GHS Compiler Lauterbach Debugger iSystem Debugger Cosmic CodeWarrior Compiler Mini Modules Adapters PLS Debugger P&E Debugger eTPU Compiler
EVB
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. Freescale Semiconductor, Inc. 2006.
TM
Evaluation boards
Evaluation board for XPC56xx devices. Allow to evaluate and develop the whole range of XPC devices.
Full modular design: motherboard, minimodule for each device, standardized connectors Standard communication transceivers and connectors Users buttons, jumpers and LEDs Device mini-module connector
The
USB Multi link is a Nexus Class 0 = JTAG Interface Interface is delivered with XPC560BKIT144/176/208
MULTILINK
Starter Kits.
It
The
Cyclone Max is a standalone Flash Programmer that can save several images. or USB interface
Ethernet It
Other
Compilers CodeWarrior Green Hills Wind River GNU Lauterbach iSystem P&E Micro RAppID Init dSpace MathWorks
(v2.2)
Simulators
Eval Boards
TM