Sam E70/s70/v70/v71
Sam E70/s70/v70/v71
Features
Core
• Arm® Cortex®-M7 running at up to 300 MHz
• 16 Kbytes of I-Cache and 16 Kbytes of D-Cache with Error Code Correction (ECC)
• Single-precision and double-precision HW Floating Point Unit (FPU)
• Memory Protection Unit (MPU) with 16 zones
• DSP Instructions, Thumb®-2 Instruction Set
• Embedded Trace Module (ETM) with instruction trace stream, including Trace Port Interface Unit (TPIU)
Memories
• Up to 2048 Kbytes embedded Flash with unique identifier and user signature for user-defined data
• Up to 384 Kbytes embedded Multi-port SRAM
• Tightly Coupled Memory (TCM)
• 16 Kbytes ROM with embedded Bootloader routines (UART0, USB) and IAP routines
• 16-bit Static Memory Controller (SMC) with support for SRAM, PSRAM, LCD module, NOR and NAND Flash
with on-the-fly scrambling
System
• Embedded voltage regulator for single-supply operation
• Power-on-Reset (POR), Brown-out Detector (BOD) and Dual Watchdog for safe operation
• Quartz or ceramic resonator oscillators: 3 MHz to 20 MHz main oscillator with failure detection, 12 MHz or 16
MHz needed for USB operations. Optional low-power 32.768 kHz for RTC or device clock
• RTC with Gregorian calendar mode, waveform generation in low-power modes
• RTC counter calibration circuitry compensates for 32.768 kHz crystal frequency variations
• 32-bit low-power Real-time Timer (RTT)
• High-precision Main RC oscillator with 12 MHz default frequency
• 32.768 kHz crystal oscillator or Slow RC oscillator as source of low-power mode device clock (SLCK)
• One 500 MHz PLL for system clock, one 480 MHz PLL for USB high-speed operations
• Temperature Sensor
• One dual-port 24-channel central DMA Controller (XDMAC)
Low-Power Features
• Low-power sleep, wait and backup modes, with typical power consumption down to 1.1 μA in Backup mode with
RTC, RTT and wakeup logic enabled
• Ultra low-power RTC and RTT
• 1 Kbyte of backup RAM (BRAM) with dedicated regulator
Peripherals
• One Ethernet MAC (GMAC) 10/100 Mbps in MII mode and RMII with dedicated DMA. IEEE® 1588 PTP
frames and 802.3az Energy-efficiency support. Ethernet AVB support with IEEE802.1AS Timestamping and
IEEE802.1Qav credit-based traffic-shaping hardware support.
• USB 2.0 Device/Mini Host High-speed (USBHS) at 480 Mbps, 4-Kbyte FIFO, up to 10 bidirectional endpoints,
dedicated DMA
• 12-bit ITU-R BT. 601/656 Image Sensor Interface (ISI)
• Two host Controller Area Networks (MCAN) with Flexible Data Rate (CAN-FD) with SRAM-based mailboxes,
time-triggered and event-triggered transmission
• MediaLB® device with 3-wire mode, up to 1024 x Fs speed, supporting MOST25 and MOST50 networks
• Three USARTs, USART0, USART1, USART2, support LIN mode, ISO7816, IrDA®, RS-485, SPI, Manchester
and Modem modes; USART1 supports LON mode.
• Five 2-wire UARTs with SleepWalking™ support
• Three Two-Wire Interfaces (TWIHS) (I2C-compatible) with SleepWalking support
• Quad I/O Serial Peripheral Interface (QSPI) interfacing up to 256 MB Flash and with eXecute-In-Place and
on-the-fly scrambling
• Two Serial Peripheral Interfaces (SPI)
• One Serial Synchronous Controller (SSC) with I2S and TDM support
• Two Inter-IC Sound Controllers (I2SC)
• One High-speed Multimedia Card Interface (HSMCI) (SDIO/SD Card/e.MMC)
• Four Three-Channel 16-bit Timer/Counters (TC) with Capture, Waveform, Compare and PWM modes, constant
on time. Quadrature decoder logic and 2-bit Gray Up/Down Counter for stepper motor
• Two 4-channel 16-bit PWMs with complementary outputs, Dead Time Generator and eight fault inputs per PWM
for motor control, two external triggers to manage power factor correction (PFC), DC-DC and lighting control
• Two Analog Front-End Controllers (AFEC), each supporting up to 12 channels with differential input mode
and programmable gain stage, allowing dual sample-and-hold (S&H) at up to 1.7 Msps. Offset and gain error
correction feature.
• One 2-channel, 12-bit, 1 Msps-per-channel Digital-to-Analog Controller (DAC) with Differential and Over
Sampling modes
• One Analog Comparator Controller (ACC) with flexible input selection, selectable input hysteresis
Cryptography
• True Random Number Generator (TRNG)
• AES: 256-bit, 192-bit, 128-bit Key Algorithm, Compliant with FIPS PUB-197 Specifications
• Integrity Check Monitor (ICM). Supports Secure Hash Algorithm SHA1, SHA224 and SHA256.
I/O
• Up to 114 I/O lines with external interrupt capability (edge- or level-sensitivity), debouncing, glitch filtering and
On-die Series Resistor Termination
• Five Parallel Input/Output Controllers (PIO)
Voltage
• Single supply voltage from 3.0V to 3.6V for Qualification AEC - Q100 Grade 2 Devices
• Single Supply voltage from 1.7V to 3.6V for Industrial Temperature Devices
Packages
• LQFP144, 144-lead LQFP, 20x20 mm, pitch 0.5 mm
• LFBGA144, 144-ball LFBGA, 10x10 mm, pitch 0.8 mm
• TFBGA144, 144-ball TFBGA, 10x10 mm, pitch 0.8 mm
• UFBGA144, 144-ball UFBGA, 6x6 mm, pitch 0.4 mm
• LQFP100, 100-lead LQFP, 14x14 mm, pitch 0.5 mm
• TFBGA100, 100-ball TFBGA, 9x9 mm, pitch 0.8 mm
• VFBGA100, 100-ball VFBGA, 7x7 mm, pitch 0.65 mm
• LQFP64, 64-lead LQFP, 10x10 mm, pitch 0.5 mm
• QFN64, 64-pad QFN 9x9 mm, pitch 0.5 mm with wettable flanks
Table of Contents
Features......................................................................................................................................................... 1
1. Configuration Summary........................................................................................................................ 13
2. Ordering Information............................................................................................................................. 15
3. Block Diagram.......................................................................................................................................16
4. Signal Description................................................................................................................................. 20
7. Power Considerations........................................................................................................................... 43
7.1. Power Supplies.......................................................................................................................... 43
7.2. Power Constraints...................................................................................................................... 43
7.3. Voltage Regulator.......................................................................................................................44
7.4. Backup SRAM Power Switch..................................................................................................... 44
7.5. Active Mode................................................................................................................................45
7.6. Low-power Modes...................................................................................................................... 45
7.7. Wakeup Sources........................................................................................................................ 47
7.8. Fast Startup................................................................................................................................47
8. Input/Output Lines.................................................................................................................................48
8.1. General-Purpose I/O Lines.........................................................................................................48
8.2. System I/O Lines........................................................................................................................ 48
8.3. NRST Pin................................................................................................................................... 50
8.4. ERASE Pin................................................................................................................................. 50
9. Interconnect.......................................................................................................................................... 51
11. Memories.............................................................................................................................................. 53
11.1. Embedded Memories................................................................................................................. 53
11.2. External Memories..................................................................................................................... 59
14. Peripherals............................................................................................................................................ 65
14.1. Peripheral Identifiers.................................................................................................................. 65
14.2. Peripheral Signal Multiplexing on I/O Lines................................................................................67
Trademarks.............................................................................................................................................. 1942
1. Configuration Summary
The SAM E70/S70/V70/V71 devices differ in memory size, package and features. The following tables summarize
the different configurations.
Table 1-1. SAM V71 Family Features (With CAN-FD, Ethernet AVB and Media LB)
Digital Peripherals Analog
Multi-port SRAM Memory (KB)
Analog Comparators
DAC (Channels)
HSMCI port/bits
Packages
DMA Channels
USART/UART
Ethernet AVB
USART/SPI
Pins
Media LB
Device
CAN-FD
I/O Pins
TWIHS
QSPI
I2SC
SPI0
SPI1
ETM
SSC
ATSAMV71Q19 512 256
LQFP, MII, 12 -
ATSAMV71Q20 1024 144 HS 3/5 Y 3 3 1/4 2 Y Y Y Y 24 Y Y 12 36 2 114 24 Y 2
TFBGA RMII bit
384
ATSAMV71Q21 2048
Analog Comparators
DAC (Channels)
HSMCI port/bits
Packages
DMA Channels
USART/UART
Ethernet AVB
USART/SPI
Pins
Device
CAN-FD
I/O Pins
TWIHS
QSPI
I2SC
SPI0
SPI1
ETM
SSC
Table 1-3. SAM V70 Family Features (With CAN-FD, Without Ethernet Control)
Digital Peripherals Analog
Analog Comparators
DAC (Channels)
HSMCI port/bits
Packages
DMA Channels
USB (see Note
USART/UART
USART/SPI
Pins
Media LB
Device
CAN-FD
I/O Pins
TWIHS
QSPI
I2SC
SPI0
SPI1
ETM
SSC
ATSAMV70Q19 512 256
LQFP, 12 -
144 HS 3/5 Y 3 3 1/4 Y 2 Y Y Y 24 Y Y 12 36 2 114 24 Y 2
TFBGA bit
ATSAMV70Q20 1024 384
Analog Comparators
HSMCI port/bits
Packages
DMA Channels
DAC Channels
USART/UART
USART/SPI
Pins
Device
I/O Pins
TWIHS
QSPI
I2SC
SPI0
SPI1
ETM
ATSAMS70Q19 512 256 SSC
LQFP,
12 -
ATSAMS70Q20 1024 144 LFBGA, HS 3/5 Y 3 3 1/4 Y Y Y 24 Y Y 12 36 2 114 24 Y 2
bit
384 UFBGA
ATSAMS70Q21 2048
2. Ordering Information
ATSAM V71 Q 21 B - ANB
Note:
1. LQFP package type for Grade 2 variants.
3. Block Diagram
Refer to the table 1. Configuration Summary for detailed configurations of memory size, package and features of the
SAM E70/S70/V70/V71 devices.
Figure 3-1. SAM S70 144-pin Block Diagram
E
E NW
C
,
YN
DW RD
S
O
AN N
_V
W
C
N 3,
SI
M
D CS ]
ES
E, ..
6, , N E
/N ND E
AN , N :0
O 0
AG LK
A1 LB CL
I_
IO
A1 B
,I
A0 NA AL
.3
IO /Q 0
.3 1
N AIT [15
Q S CS
AC LK
Q ISO IO
2. IO
U
AC
IS
C
T
0.
K, ]
D
2/ ND
C
PC :0
N
L
W D
M I/Q
U
M Q
7
TR EC
ED
SW
SW
I_ 1
SE
IO
SY
R
N 0],
A2 /NA
IS D[1
Q K,
H M
/T
P
D
H
AC
O
:
S/
SC
SD
SD
23
K/
O
I_
I_
VD
VD
I
A2
TM
A[
IS
IS
TD
TD
TC
TR
H
JT
System Controller
TST
Voltage
XIN 3-20 MHz Regulator
XOUT Crystal
Oscillator
PCK0..2
Serial Wire Debug/JTAG Boundary Scan
4/8/12 MHz
RC Oscillator PMC Transceiver
RTCOUT0 RTT
RTC
RTCOUT1
M M M S S S S S S M M M M
POR DMA
VDDIO
ROM
RSTC 12-layer Bus Matrix
fMAX 150 MHz M ICM/SHA
NRST Boot S
Program
SM WDT S
VDDPLL
VDDCORE RSWDT Peripheral Bridge
PIOA/B/C/D/E
XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA
2x
3x 5x 3x 2x 2x 4x 2x 12-bit 12-bit AES TRNG
PIO SSC HSMCI ACC
TWIHS UART USART SPI I2SC TC PWM AFE DAC
Temp Sensor
K0 2
..2
D 4
.4
D 2
XD .2
TS 2
R 0. CT 0..2
, D T ..2
D ..2
E 7
D .2
LK
TD
D
TK
K
TF
F
M CK
DA A
SC 0..3
I2 Cx_ K
x K
SC S
x_ I
TI 0. 1
B0 1
1
x_ x_ M .3
M M .3
AF TR 0..2
AF x_A 0..1
D G
1
DA ..1
G
O
S _M O
Ix _S SI
PC CK
..3
SC _D
P
.
TX ..
O .1
O .1
..1
TX 0..
R 0..
C ..
.1
R
M CD
R
S C
SC C
I2 _W
R
_A TR
TR
0.
0.
R 0.
M M _PW H0.
.
D
Ix IS
SP PIx O
U D0
D 0
PI N1
..2 , D 0
C R0
PW PW L0
0
P ..2
EF
C
EF
S0
I2 _M
TI K0.
0.
_N P
I2 x
O DC
TW D
I0 .2 S
EX FI
E G
C
SP x_M
C
C
M
Ex D
A
0
C
SC
DA
TW
PW PW Cx M
VR
VR
x
L
C
R
PI IO
M PW
O
TC
I
U
SP
I2
PW Cx_
SR
C C
M
D
PW
K
E , NW
FC
G S, GT CK NC
V
G C, , G DV SD
G ER CO DV RE
DW RD
R
G XE GR VS
O
G
AN N
G CK , IS K
M ..3 X C
C D .3
W
R G X ,
TX NC MC
N .3,
G X0 GR , G
I_
U M 0.
O IO
D NC ]
ES
6, N E
/N ND E
:0
E, 0.
TS G TX
R , L
LK
A1 LB CL
I_
C R X
IO
A1 UB
A0 /NA DAL
.3
IO /Q 0
.3 1
N AIT [15
P
O S
Q S CS
AC LK
Q ISO IO
2. IO
AC
SY S
TX ..1
M
T
.1
0.
IS PC :0]
D
H ,I
L
W D
M I/Q
U
0.
2 N
M Q
7
TR EC
ED
AN X0
SW
SW
I_ 1
IO
I_ K
SE
T ,
R ,
R
,
O
N 0],
A2 NA
IS D[1
AN ,
Q K,
H M
/T
C NR
P
D
D
AC
O
:
D
AG
SC
X
S/
SD
SD
23
1/
K/
O
I_
VD
VD
A
I
A2
TM
A[
IS
TD
TD
TC
TR
G
H
C
JT
System Controller
TST
Voltage
XIN 3-20 MHz Regulator
XOUT Crystal
Oscillator
PCK0..2
Serial Wire Debug/JTAG Boundary Scan
4/8/12 MHz
RC Oscillator PMC Transceiver
RTCOUT0
RTC RTT
RTCOUT1 24-channel
M M M S S S S S S M M M M M XDMA
POR
VDDIO ROM
RSTC 12-layer Bus Matrix M
NRST Boot S fMAX 150 MHz
Program DMA
SM WDT S M
ICM/SHA
VDDPLL
VDDCORE RSWDT Peripheral Bridge
PIOA/B/C/D/E
XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA
2x
3x 5x 3x 2x 2x 4x 2x 12-bit 12-bit AES TRNG
PIO SSC HSMCI ACC
TWIHS UART USART I2SC SPI TC PWM AFE DAC
Temp Sensor
I2 Cx_ K
x K
I2 Cx S
x_ I
C ..2
..2
D 4
.4
D 2
XD .2
S 2
R 0. CT 0..2
, D T ..2
D ..2
EN 7
O 1..2
LK
TD
D
TK
K
TF
F
M CK
DA A
.3
SP _M O
Ix _S SI
PC CK
..3
TI A0. 1
B0 1
1
x_ x_ M .3
M M .3
AF TR ..2
AF x_A ..1
D G
1
DA ..1
G
M O
SC _D
P
C ..
TX ..
TX 0..
RT 0..
O .1
O .1
..1
.1
R
M CD
S C
SC C
I2 _W
R
R
Ix IS
_A TR
TR
0.
0.
R 0.
M M _PW H0.
.
D
SP Ix O
EF
EF
D 0
S0
0
K0
U D0
..2 , D 0
C 0
PW PW L0
0
E G0
0
P ..2
I2 _M
_N P
TI 0.
0.
O C
TW D
I0 .2 S
R
EX FI
C
SP x_M
C
Ex D
LK
0
VR
SC
VR
DA
PI IOD
TW
PW PW Cx M
D
C
R
W
SC
TC
I
U
SP
PI
P
I2
PW Cx_
SR
C C
M
M
D
PW
E
E , NW
C
YN
DW RD
VS
O
AN N
IS K
W
C
N .3,
I_
N I_M
D NC ]
6, N E
ES
/N ND E
:0
E, 0.
A1 LB CL
LK
A1 UB
A0 /NA DAL
IO
IO /Q 0
.3 1
.3
N AIT [15
O S
Q S CS
Q ISO IO
2. IO
AC LK
SY S
AC
IS PC :0]
0.
H ,I
W D
L
M I/Q
U
2 N
M Q
7
TR EC
ED
M BS K
SW
T
I_ 1
SW
IO
I_ K
LB IG
SE
,
R
N 0],
A2 NA
DA
IS D[1
AN ,
L L
Q K,
H M
/T
M BC
D
O
AC
:
AG
SC
SD
SD
S/
23
1/
K/
I_
O
VD
VD
L
A2
I
TM
A[
IS
TD
TD
TC
M
Q
TR
H
JT
System Controller
TST
Voltage
XIN 3-20 MHz Regulator
XOUT Crystal
Oscillator
PCK0..2
Serial Wire Debug/JTAG Boundary Scan
4/8/12 MHz
RC Oscillator PMC Transceiver
VDDPLL
VDDCORE RSWDT Peripheral Bridge
PIOA/B/C/D/E
XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA
2x
3x 5x 3x 2x 2x 4x 2x 12-bit 12-bit AES TRNG
PIO SSC HSMCI ACC
TWIHS UART USART I2SC SPI TC PWM AFE DAC
Temp Sensor
C ..2
..2
D 4
.4
D 2
XD .2
S 2
R 0. CT 0..2
, D T ..2
D ..2
EN 7
O 1..2
LK
TD
D
TK
K
TF
F
M CK
DA A
.3
SP _M O
Ix _S SI
PC CK
..3
TI A0. 1
B0 1
1
x_ x_ M .3
M M .3
AF TR 0..2
AF _A ..1
D G
1
DA ..1
G
I2 Cx_ K
x K
I2 Cx S
x_ I
M O
SC _D
P
C ..
TX ..
TX 0..
RT 0..
O .1
O .1
..1
.1
R
M CD
R
S C
SC C
I2 _W
R
Ix IS
_A TR
TR
0.
0.
R 0.
M M _PW H0.
.
D
SP Ix O
D 0
S0
0
K0
U D0
..2 , D 0
C 0
PW PW L0
Ex G0
0
P ..2
EF
C
EF
C
_N P
TI K0.
0.
I2 _M
O C
TW D
I0 .2 S
R
EX FI
C
SP x_M
C
Ex D
0
SC
DA
PI IOD
TW
PW PW Cx M
VR
VR
D
L
C
R
W
SC
TC
I
U
SP
PI
P
I2
PW Cx_
SR
C C
M
M
D
PW
K
E , NW
FC
G S, GT CK NC
V
G C, , G DV SD
G ER CO DV RE
DW RD
R
G XE GR VS
G
O
AN N
G CK , IS K
M ..3 X C
C D .3
W
R G X ,
TX NC MC
N .3,
G X0 GR , G
I_
U M 0.
O IO
D NC ]
ES
6, N E
/N ND E
:0
E, 0.
TS G TX
R , L
A1 LB CL
I_
C R X
K
IO
A1 UB
A0 /NA DAL
.3
IO /Q 0
.3 1
N AIT [15
P
O S
Q S CS
AC LK
Q ISO IO
2. IO
L
SY S
AC
TX ..1
M
T
.1
0.
IS PC :0]
D
H ,I
L
W D
M I/Q
U
0.
2 N
M Q
7
TR EC
ED
AN X0
SW
M BS K
T
SW
I_ 1
IO
I_ K
SE
LB IG
T ,
R ,
,
R
N 0],
A2 NA
DA
IS D[1
AN ,
L L
Q K,
H M
/T
C NR
P
M BC
D
D
AC
O
:
D
AG
SC
X
S/
SD
SD
23
1/
K/
O
I_
VD
VD
L
I
A2
TM
A[
IS
TD
TD
TC
M
TR
G
H
C
JT
System Controller
TST
Voltage
XIN 3-20 MHz Regulator
XOUT Crystal
Oscillator
PCK0..2
Serial Wire Debug/JTAG Boundary Scan
4/8/12 MHz
RC Oscillator PMC Transceiver
RTCOUT0 RTT
RTC
RTCOUT1
M M M S S S S S S M M M M M 24-channel
POR XDMA
VDDIO M
ROM
RSTC 12-layer Bus Matrix
NRST Boot S fMAX 150 MHz M
Program DMA
S M
SM WDT
ICM/SHA
VDDPLL
VDDCORE RSWDT Peripheral Bridge
PIOA/B/C/D/E
XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA XDMA
2x
3x 5x 3x 2x 2x 4x 2x 12-bit 12-bit AES TRNG
PIO SSC HSMCI ACC
TWIHS UART USART I2SC SPI TC PWM AFE DAC
Temp Sensor
I2 Cx_ K
x K
I2 Cx S
x_ I
C ..2
..2
D 4
.4
D 2
XD .2
S 2
R 0. CT 0..2
, D T ..2
D ..2
EN 7
O 1..2
LK
TD
D
TK
K
TF
F
M CK
DA A
.3
SP _M O
Ix _S SI
PC CK
..3
TI A0. 1
B0 1
1
x_ x_ M .3
M M .3
AF TR 0..2
AF x_A 0..1
D G
1
DA ..1
G
M O
SC _D
P
C ..
TX ..
TX 0..
RT 0..
O .1
O .1
..1
.1
R
M CD
S C
SC C
I2 _W
R
R
Ix IS
_A TR
TR
0.
0.
R 0.
M M _PW H0.
.
D
SP Ix O
D 0
S0
0
K0
U D0
..2 , D 0
C 0
PW PW L0
0
EF
EF
P ..2
I2 _M
_N P
TI 0.
0.
O C
TW D
I0 .2 S
R
EX FI
E G
C
SP x_M
C
Ex D
LK
0
SC
DA
PI IOD
TW
PW PW Cx M
VR
VR
D
C
R
W
SC
TC
I
U
SP
PI
P
I2
PW Cx_
SR
C C
M
M
D
PW
4. Signal Description
The following table provides details on signal names classified by peripherals.
Table 4-1. Signal Description List
Active Voltage
Signal Name Function Type Comments
Level Reference
Power Supplies
Peripherals I/O Lines
VDDIO Power – – –
Power Supply
Voltage Regulator Input,
AFE, DAC, and Analog
VDDIN Power – – –
Comparator Power
Supply(1)
Voltage Regulator
VDDOUT Power – – –
Output
VDDPLL PLLA Power Supply Power – – –
USB PLL and Oscillator
VDDPLLUSB Power – – –
Power Supply
Powers the core, the
VDDCORE embedded memories Power – – –
and the peripherals
GND, GNDPLL,
GNDPLLUSB,
Ground Ground – – –
GNDANA,
GNDUTMI
USB Transceiver Power
VDDUTMII Power – – –
Supply
VDDUTMIC USB Core Power Supply Power – – –
GNDUTMI USB Ground Ground – – –
Clocks, Oscillators, and PLLs
XIN Main Oscillator Input Input – If any signal is not
used, its PIO pin
XOUT Main Oscillator Output Output – should be setup as an
Slow Clock Oscillator output, driven low, and
XIN32 Input – attached to a dedicated
Input
VDDIO trace on the board in
Slow Clock Oscillator order to reduce current
XOUT32 Output –
Output consumption.
Programmable Clock
PCK0–PCK2 Output – –
Output
Real Time Clock
Programmable RTC
RTCOUT0 Output – –
Waveform Output
VDDIO
Programmable RTC
RTCOUT1 Output – –
Waveform Output
...........continued
Active Voltage
Signal Name Function Type Comments
Level Reference
Serial Wire Debug/JTAG Boundary Scan
Serial Wire Clock/Test
SWCLK/TCK Clock (Boundary scan Input – –
mode only)
Test Data In (Boundary
TDI Input – –
scan mode only)
Test Data Out (Boundary
TDO/TRACESWO Output – VDDIO –
scan mode only)
Serial Wire Input/
Output /Test Mode
SWDIO/TMS I/O / Input – –
Select (Boundary scan
mode only)
JTAGSEL JTAG Selection Input High –
Trace Debug Port
TRACECLK Trace Clock Output – PCK3 is used for ETM
TRACED0– VDDIO
Trace Data Output – –
TRACED3
Flash Memory
Flash and NVM
ERASE Configuration Bits Erase Input High VDDIO –
Command
Reset/Test
Synchronous
NRST I/O Low –
Microcontroller Reset VDDIO
TST Test Select Input – –
Universal Asynchronous Receiver Transceiver - UART(x=[0:4])
URXDx UART Receive Data Input – – PCK4 can be used to
UTXDx UART Transmit Data Output – – generate the baud rate
...........continued
Active Voltage
Signal Name Function Type Comments
Level Reference
Parallel Capture Mode
PIODC0–PIODC7 Input – –
Data
Parallel Capture Mode
PIODCCLK Input – VDDIO –
Clock
PIODCEN1– Parallel Capture Mode
Input – –
PIODCEN2 Enable
External Bus Interface
D[15:0] Data Bus I/O – – –
A[23:0] Address Bus Output – – –
NWAIT External Wait Signal Input Low – –
Static Memory Controller (SMC)
NCS0–NCS3 Chip Select Lines Output Low – –
NRD Read Signal Output Low – –
NWE Write Enable Output Low – –
NWR0–NWR1 Write Signal Output Low – –
NBS0–NBS1 Byte Mask Signal Output Low – –
NAND Flash Logic
NAND Flash Output
NANDOE Output Low – –
Enable
NAND Flash Write
NANDWE Output Low – –
Enable
High-Speed Multimedia Card Interface (HSMCI)
MCCK Multimedia Card Clock O – – –
Multimedia Card Slot A
MCCDA I/O – – –
Command
Multimedia Card Slot A
MCDA0–MCDA3 I/O – – –
Data
Universal Synchronous Asynchronous Receiver Transmitter (USART(x=[0:2]))
...........continued
Active Voltage
Signal Name Function Type Comments
Level Reference
SCKx USARTx Serial Clock I/O – –
TXDx USARTx Transmit Data I/O – –
RXDx USARTx Receive Data Input – –
USARTx Request To
RTSx Output – –
Send
CTSx USARTx Clear To Send Input – –
USARTx Data Terminal PCK4 can be used to
DTRx Output – – generate the baud rate
Ready
USARTx Data Set
DSRx Input – –
Ready
USARTx Data Carrier
DCDx Input – –
Detect
RIx USARTx Ring Indicator Input – –
LONCOL1 LON Collision Detection Input – –
Synchronous Serial Controller (SSC)
TD SSC Transmit Data Output – – –
RD SSC Receive Data Input – – –
TK SSC Transmit Clock I/O – – –
RK SSC Receive Clock I/O – – –
SSC Transmit Frame
TF I/O – – –
Sync
SSC Receive Frame
RF I/O – – –
Sync
Inter-IC Sound Controller (I2SC[1..0])
I2SCx_MCK Host Clock Output – VDDIO
I2SCx_CK Serial Clock I/O – VDDIO
GCLK[PID] can be used
I2SCx_WS I2S Word Select I/O – VDDIO to generate the baud
rate
I2SCx_DI Serial Data Input Input – VDDIO
I2SCx_DO Serial Data Output Output – VDDIO
Image Sensor Interface (ISI)
ISI_D0–ISI_D11 Image Sensor Data Input – – –
Image sensor Reference
clock.
ISI_MCK No dedicated signal, Output – – –
PCK1 can be used.
...........continued
Active Voltage
Signal Name Function Type Comments
Level Reference
Image Sensor Vertical
ISI_VSYNC Input – – –
Synchro
Image Sensor Data
ISI_PCK Input – – –
clock
Timer Counter (TC(x=[0:11]))
TC Channel x External PCK6 can be used as an
TCLKx Input – –
Clock Input input clock
PCK7 can be used as an
TIOAx TC Channel x I/O Line A I/O – – input clock for TC0.Ch0
TIOBx TC Channel x I/O Line B I/O – – only
Only output in
PWMCx_PWML0– Waveform Output Low complementary mode
PWMCx_PWML3 Output – –
for Channel 0–3 when dead time
insertion is enabled.
PWMCx_PWMFI0–
Fault Input Input – – –
PWMCx_PWMFI2
PWMCx_PWMEXT
RG0–
External Trigger Input Input – – –
PWMCx_PWMEXT
RG1
Serial Peripheral Interface (SPI(x=[0..1]))
SPIx_MISO Host In Client Out I/O – – –
SPIx_MOSI Host Out Client In I/O – – –
SPIx_SPCK SPI Serial Clock I/O – – –
SPI Peripheral Chip
SPIx_NPCS0 I/O Low – –
Select 0
SPIx_NPCS1– SPI Peripheral Chip
Output Low – –
SPIx_NPCS3 Select
Quad I/O SPI (QSPI)
QSCK QSPI Serial Clock Output – – –
QCS QSPI Chip Select Output – – –
QSPI I/O
QIO0 is QMOSI Host
QIO0–QIO3 Out Client In I/O – – –
QIO1 is QMISO Host In
Client Out
...........continued
Active Voltage
Signal Name Function Type Comments
Level Reference
TWIx Two-wire Serial
TWDx I/O – – –
Data
TWIx Two-wire Serial
TWCKx I/O – – –
Clock
Analog
ADC, DAC and Analog
VREFP Comparator Positive Analog – – –
Reference
ADC, DAC and Analog
Comparator Negative
VREFN Reference Must be Analog – – –
connected to GND or
GNDANA.
12-bit Analog Front End - (x=[0..1])
AFEx_AD0– Analog,
Analog Inputs – – –
AFEx_AD11 (2) Digital
AFEx_ADTRG ADC Trigger Input – VDDIO –
12-bit Digital-to-Analog Converter (DAC)
Analog,
DAC0–DAC1 Analog Output – – –
Digital
DATRG DAC Trigger Input – VDDIO –
Fast Flash Programming Interface (FFPI)
PGMEN0–
Programming Enabling Input – VDDIO –
PGMEN1
PGMM0–PGMM3 Programming Mode Input – –
PGMD0–PGMD15 Programming Data I/O – –
PGMRDY Programming Ready Output High –
VDDIO
PGMNVALID Data Direction Output Low –
PGMNOE Programming Read Input Low –
PGMNCMD Programming Command Input Low –
USB High Speed (USBHS)
HSDM USB High -Speed Data - Analog, – –
VDDUTMII
HSDP USB High-Speed Data + Digital – –
Bias Voltage Reference
VBG Analog – – –
for USB
Ethernet MAC 10/100 - GMAC
GREFCK Reference Clock Input – – RMII only
GTXCK Transmit Clock Input – – MII only
GRXCK Receive Clock Input – – MII only
...........continued
Active Voltage
Signal Name Function Type Comments
Level Reference
GTXEN Transmit Enable Output – – –
GTX0–GTX1 only in
GTX0 - GTX3 Transmit Data Output – –
RMII
GTXER Transmit Coding Error Output – – MII only
GRXDV Receive Data Valid Input – – MII only
GRX0–GRX1 only in
GRX0 - GRX3 Receive Data Input – –
RMII
GRXER Receive Error Input – – –
GCRS Carrier Sense Input – – MII only
GCOL Collision Detected Input – – MII only
GMDC Management Data Clock Output – – –
Management Data Input/
GMDIO I/O – – –
Output
TSU timer comparison
GTSUCOMP Output – – Active Low
valid
Controller Area Network - MCAN (x=[0:1])
CANRX1 is available on
PD28 for 100-pin only
CANRXx CAN Receive Input – – CANRX1 is available on
PC12 for 144-pin only
MediaLB - (MLB)
MLBCLK MLB Clock input – – –
MLBSIG MLB Signal I/O – – –
MLBDAT MLB Data I/O – – –
Notes:
1. Refer to the Active Mode section in the Power Considerations chapter for restrictions on the voltage range of
analog cells.
2. AFE0_AD11 is not an actual pin but is connected to a temperature sensor.
144
1
Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal, Dir,
PU, PD,
HiZ, ST
102 C11 E11 VDDIO GPIO_AD PA0 I/O WKUP0(1) I PWMC0_ O TIOA0 I/O A17 O I2SC0_M O PIO, I, PU,
PWMH0 CK ST
99 D12 F11 VDDIO GPIO_AD PA1 I/O WKUP1(1) I PWMC0_ O TIOB0 I/O A18 O I2SC0_C K I/O PIO, I, PU,
PWML0 ST
93 E12 G12 VDDIO GPIO PA2 I/O WKUP2(1) I PWMC0_ O – – DATRG I – – PIO, I, PU,
PWMH1 ST
91 F12 G11 VDDIO GPIO_AD PA3 I/O PIODC0(2) I TWD0 I/O LONCOL 1 I PCK2 O – – PIO, I, PU,
ST
77 K12 L12 VDDIO GPIO PA4 I/O WKUP3/P I TWCK0 O TCLK0 I UTXD1 O – – PIO, I, PU,
IODC1(3) ST
...........continued
LQFP Pin LFBGA/ UFBGA Power Rail I/O Type Primary Alternate PIO PIO PIO PIO Reset
TFBGA Ball Peripheral Peripheral Peripheral Peripheral State
Ball A B C D
Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal, Dir,
PU, PD,
HiZ, ST
73 M11 N13 VDDIO GPIO_AD PA5 I/O WKUP4/P I PWMC1_ O ISI_D4 I URXD1 I – – PIO, I, PU,
IODC2(3) PWML3 ST
114 B9 B11 VDDIO GPIO_AD PA6 I/O – – – – PCK0 O UTXD1 O – – PIO, I, PU,
ST
75 M12 L11 VDDIO GPIO_AD PA9 I/O WKUP6/P I URXD0 I ISI_D3 I PWMC0_ I – – PIO, I, PU,
IODC3(3) PWMFI0 ST
66 L9 M10 VDDIO GPIO_AD PA10 I/O PIODC4(2) I UTXD0 O PWMC0_ I RD I – – PIO, I, PU,
PWMEXTR ST
G0
64 J9 N10 VDDIO GPIO_AD PA11 I/O WKUP7/P I QCS O PWMC0_ O PWMC1_ O – – PIO, I, PU,
IODC5(3) PWMH0 PWML0 ST
68 L10 N11 VDDIO GPIO_AD PA12 I/O PIODC6(2) I QIO1 I/O PWMC0_ O PWMC1_ O – – PIO, I, PU,
PWMH1 PWMH0 ST
42 M3 M4 VDDIO GPIO_AD PA13 I/O PIODC7(2) I QIO0 I/O PWMC0_ O PWMC1_ O – – PIO, I, PU,
PWMH2 PWML1 ST
51 K6 M6 VDDIO GPIO_CL PA14 I/O WKUP8/P I QSCK O PWMC0_ O PWMC1_ O – – PIO, I, PU,
K IODCEN1( PWMH3 PWMH1 ST
3)
49 L5 N6 VDDIO GPIO_AD PA15 I/O – – D14 I/O TIOA1 I/O PWMC0_ O I2SC0_W I/O PIO, I, PU,
PWML3 S ST
45 K5 L4 VDDIO GPIO_AD PA16 I/O – – D15 I/O TIOB1 I/O PWMC0_ O I2SC0_DI I PIO, I, PU,
PWML2 ST
25 J1 J4 VDDIO GPIO_AD PA17 I/O AFE0_AD6 I QIO2 I/O PCK1 O PWMC0_ O – – PIO, I, PU,
(5) PWMH3 ST
24 H2 J3 VDDIO GPIO_AD PA18 I/O AFE0_AD7 I PWMC1_ I PCK2 O A14 O – – PIO, I, PU,
(5) PWMEXTR ST
G1
23 H1 J2 VDDIO GPIO_AD PA19 I/O AFE0_AD8 I – – PWMC0_ O A15 O I2SC1_M O PIO, I, PU,
/WKUP9(6) PWML0 CK ST
22 H3 J1 VDDIO GPIO_AD PA20 I/O AFE0_AD9 I – – PWMC0_ O A16 O I2SC1_C K I/O PIO, I, PU,
/ PWML1 ST
WKUP10(6
)
32 K2 M1 VDDIO GPIO_AD PA21 I/O AFE0_AD1 I RXD1 I PCK1 O PWMC1_ I – – PIO, I, PU,
/ PIODCEN PWMFI0 ST
2(8)
37 K3 M2 VDDIO GPIO_AD PA22 I/O PIODCCL I RK I/O PWMC0_ I NCS2 O – – PIO, I, PU,
K(2) PWMEXTR ST
G1
46 L4 N5 VDDIO GPIO_AD PA23 I/O – – SCK1 I/O PWMC0_ O A19 O PWMC1_ O PIO, I, PU,
PWMH0 PWML2 ST
56 L7 N8 VDDIO GPIO_AD PA24 I/O – – RTS1 O PWMC0_ O A20 O ISI_PCK I PIO, I, PU,
PWMH1 ST
59 K8 L8 VDDIO GPIO_AD PA25 I/O – – CTS1 I PWMC0_ O A23 O MCCK O PIO, I, PU,
PWMH2 ST
62 J8 M9 VDDIO GPIO PA26 I/O – – DCD1 I TIOA2 O MCDA2 I/O PWMC1_ I PIO, I, PU,
PWMFI1 ST
70 J10 N12 VDDIO GPIO_AD PA27 I/O – – DTR1 O TIOB2 I/O MCDA3 I/O ISI_D7 I PIO, I, PU,
ST
112 C9 C11 VDDIO GPIO PA28 I/O – – DSR1 I TCLK1 I MCCDA I/O PWMC1_ I PIO, I, PU,
PWMFI2 ST
116 A10 A11 VDDIO GPIO PA30 I/O WKUP11(1 I PWMC0_ O PWMC1_ I MCDA0 I/O I2SC0_D O O PIO, I, PU,
) PWML2 PWMEXTR ST
G0
118 C8 C10 VDDIO GPIO_AD PA31 I/O – – SPI0_NP I/O PCK2 O MCDA1 I/O PWMC1_ O PIO, I, PU,
CS1 PWMH2 ST
...........continued
LQFP Pin LFBGA/ UFBGA Power Rail I/O Type Primary Alternate PIO PIO PIO PIO Reset
TFBGA Ball Peripheral Peripheral Peripheral Peripheral State
Ball A B C D
Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal, Dir,
PU, PD,
HiZ, ST
21 H4 H2 VDDIO GPIO PB0 I/O AFE0_AD1 I PWMC0_ O – – RXD0 I TF I/O PIO, I, PU,
0/ PWMH0 ST
RTCOUT
0(7)
20 G3 H1 VDDIO GPIO PB1 I/O AFE1_AD0 I PWMC0_ O GTSUCO O TXD0 I/O TK I/O PIO, I, PU,
/ RTCOUT PWMH1 MP ST
1(7)
26 J2 K1 VDDIO GPIO PB2 I/O AFE0_AD5 I CANTX0 O – – CTS0 I SPI0_NP I/O PIO, I, PU,
(5) CS0 ST
31 J3 L1 VDDIO GPIO_AD PB3 I/O AFE0_AD2 I CANRX0 I PCK2 O RTS0 O ISI_D2 I PIO, I, PU,
/ ST
WKUP12(6
)
105 A12 C13 VDDIO GPIO_ML PB4 I/O TDI(9) I TWD1 I/O PWMC0_ O MLBCLK I TXD1 I/O PIO, I, PU,
B PWMH2 ST
109 C10 C12 VDDIO GPIO_ML PB5 I/O TDO/TRA O TWCK1 O PWMC0_ O MLBDAT I/O TD O O, PU
B CESWO/ PWML0
WKUP13(9
)
87 G12 J10 VDDIO GPIO PB12 I/O ERASE(9) I PWMC0_ O GTSUCO O – – PCK0 O PIO, I, PD,
PWML1 MP ST
144 B2 A1 VDDIO GPIO_AD PB13 I/O DAC0(11) O PWMC0_ O PCK0 O SCK0 I/O – – PIO, I, PU,
PWML2 ST
82 J12 K13 VDDIO GPIO_AD PC8 I/O – – NWR0/N O TIOA7 I/O – – – – PIO, I, PU,
WE ST
86 G11 J11 VDDIO GPIO_AD PC9 I/O – – NANDOE O TIOB7 I/O – – – – PIO, I, PU,
ST
90 F10 H12 VDDIO GPIO_AD PC10 I/O – – NANDWE O TCLK7 I – – – – PIO, I, PU,
ST
94 F11 F13 VDDIO GPIO_AD PC11 I/O – – NRD O TIOA8 I/O – – – – PIO, I, PU,
ST
17 F4 G2 VDDIO GPIO_AD PC12 I/O AFE1_AD3 I NCS3 O TIOB8 I/O CANRX1 I – – PIO, I, PU,
(5) ST
97 E10 F12 VDDIO GPIO_AD PC14 I/O – – NCS0 O TCLK8 I CANTX1 O – – PIO, I, PU,
ST
...........continued
LQFP Pin LFBGA/ UFBGA Power Rail I/O Type Primary Alternate PIO PIO PIO PIO Reset
TFBGA Ball Peripheral Peripheral Peripheral Peripheral State
Ball A B C D
Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal, Dir,
PU, PD,
HiZ, ST
100 D11 E12 VDDIO GPIO_AD PC16 I/O – – A21/NAN O – – – – – – PIO, I, PU,
DALE ST
103 B12 E10 VDDIO GPIO_AD PC17 I/O – – A22/NAN O – – – – – – PIO, I, PU,
DCLE ST
111 B10 B12 VDDIO GPIO_AD PC18 I/O – – A0/NBS0 O PWMC0_ O – – – – PIO, I, PU,
PWML1 ST
130 B6 D7 VDDIO GPIO_AD PC24 I/O – – A6 O TIOB3 I/O SPI1_SP O – – PIO, I, PU,
CK ST
133 C5 C6 VDDIO GPIO_AD PC25 I/O – – A7 O TCLK3 I SPI1_NP I/O – – PIO, I, PU,
CS0 ST
13 F2 F4 VDDIO GPIO_AD PC26 I/O AFE1_AD7 I A8 O TIOA4 I/O SPI1_MIS I – – PIO, I, PU,
(5) O ST
12 E2 F3 VDDIO GPIO_AD PC27 I/O AFE1_AD8 I A9 O TIOB4 I/O SPI1_MO O – – PIO, I, PU,
(5) SI ST
76 L12 L13 VDDIO GPIO_AD PC28 I/O – – A10 O TCLK4 I SPI1_NP I/O – – PIO, I, PU,
CS1 ST
16 F3 G1 VDDIO GPIO_AD PC29 I/O AFE1_AD4 I A11 O TIOA5 I/O SPI1_NP O – – PIO, I, PU,
(5) CS2 ST
15 F1 G3 VDDIO GPIO_AD PC30 I/O AFE1_AD5 I A12 O TIOB5 I/O SPI1_NP O – – PIO, I, PU,
(5) CS3 ST
1 D4 B1 VDDIO GPIO_AD PD0 I/O DAC1(11) I GTXCK I PWMC1_ O SPI1_NP I/O DCD0 I PIO, I, PU,
PWML0 CS1 ST
132 B5 B6 VDDIO GPIO PD1 I/O – – GTXEN O PWMC1_ O SPI1_NP I/O DTR0 O PIO, I, PU,
PWMH0 CS2 ST
131 A5 A6 VDDIO GPIO PD2 I/O – – GTX0 O PWMC1_ O SPI1_NP I/O DSR0 I PIO, I, PU,
PWML1 CS3 ST
128 B7 B7 VDDIO GPIO PD3 I/O – – GTX1 O PWMC1_ O UTXD4 O RI0 I PIO, I, PU,
PWMH1 ST
126 D6 C8 VDDIO GPIO_CL PD4 I/O – – GRXDV I PWMC1_ O TRACED 0 O DCD2 I PIO, I, PU,
K PWML2 ST
125 D7 B8 VDDIO GPIO_CL PD5 I/O – – GRX0 I PWMC1_ O TRACED 1 O DTR2 O PIO, I, PU,
K PWMH2 ST
121 A8 B9 VDDIO GPIO_CL PD6 I/O – – GRX1 I PWMC1_ O TRACED 2 O DSR2 I PIO, I, PU,
K PWML3 ST
119 B8 A10 VDDIO GPIO_CL PD7 I/O – – GRXER I PWMC1_ O TRACED 3 O RI2 I PIO, I, PU,
K PWMH3 ST
113 E9 A12 VDDIO GPIO_CL PD8 I/O – – GMDC O PWMC0_ I – – TRACEC O PIO, I, PU,
K PWMFI1 LK ST
110 D9 A13 VDDIO GPIO_CL PD9 I/O – – GMDIO I/O PWMC0_ I AFE1_AD I – – PIO, I, PU,
K PWMFI2 TRG ST
101 C12 D13 VDDIO GPIO_ML PD10 I/O – – GCRS I PWMC0_ O TD O MLBSIG I/O PIO, I, PD,
B PWML0 ST
98 E11 E13 VDDIO GPIO_AD PD11 I/O – – GRX2 I PWMC0_ O GTSUCO O ISI_D5 I PIO, I, PU,
PWMH0 MP ST
92 G10 G13 VDDIO GPIO_AD PD12 I/O – – GRX3 I CANTX1 O SPI0_NP O ISI_D6 I PIO, I, PU,
CS2 ST
...........continued
LQFP Pin LFBGA/ UFBGA Power Rail I/O Type Primary Alternate PIO PIO PIO PIO Reset
TFBGA Ball Peripheral Peripheral Peripheral Peripheral State
Ball A B C D
Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal, Dir,
PU, PD,
HiZ, ST
106 A11 D11 VDDIO GPIO_AD PD15 I/O – – GTX2 O RXD2 I NWR1/N O – – PIO, I, PU,
BS1 ST
78 K11 K10 VDDIO GPIO_AD PD16 I/O – – GTX3 O TXD2 I/O – O – – PIO, I, PU,
ST
74 L11 M13 VDDIO GPIO_AD PD17 I/O – – GTXER O SCK2 I/O – O – – PIO, I, PU,
ST
69 M10 M11 VDDIO GPIO_AD PD18 I/O – – NCS1/SD O RTS2 O URXD4 I – – PIO, I, PU,
CS ST
67 M9 L10 VDDIO GPIO_AD PD19 I/O – – NCS3 O CTS2 I UTXD4 O – – PIO, I, PU,
ST
65 K9 K9 VDDIO GPIO PD20 I/O – – PWMC0_ O SPI0_MIS I/O GTSUCO O – – PIO, I, PU,
PWMH0 O MP ST
63 H9 L9 VDDIO GPIO_AD PD21 I/O – – PWMC0_ O SPI0_MO I/O TIOA11 I/O ISI_D1 I PIO, I, PU,
PWMH1 SI ST
60 M8 N9 VDDIO GPIO_AD PD22 I/O – – PWMC0_ O SPI0_SP O TIOB11 I/O ISI_D0 I PIO, I, PU,
PWMH2 CK ST
55 M6 K7 VDDIO GPIO_AD PD24 I/O – – PWMC0_ O RF I/O TCLK11 I ISI_HSYN I PIO, I, PU,
PWML0 C ST
52 M5 L6 VDDIO GPIO_AD PD25 I/O – – PWMC0_ O SPI0_NP I/O URXD2 I ISI_VSYN I PIO, I, PU,
PWML1 CS1 C ST
47 J6 M5 VDDIO GPIO_AD PD27 I/O – – PWMC0_ O SPI0_NP O TWD2 O ISI_D8 I PIO, I, PU,
PWML3 CS3 ST
71 K10 M12 VDDIO GPIO_AD PD28 I/O WKUP5(1) I URXD3 I - I TWCK2 O ISI_D9 I PIO, I, PU,
ST
2 D3 C3 VDDIO GPIO_AD PD31 I/O – – QIO3 I/O UTXD3 O PCK2 O ISI_D11 I PIO, I, PU,
ST
4 C2 C2 VDDIO GPIO_AD PE0 I/O AFE1_AD I D8 I/O TIOA9 I/O I2SC1_W I/O – – PIO, I, PU,
11(5) S ST
6 A1 D2 VDDIO GPIO_AD PE1 I/O – – D9 I/O TIOB9 I/O I2SC1_D O O – – PIO, I, PU,
ST
7 B1 D1 VDDIO GPIO_AD PE2 I/O – – D10 I/O TCLK9 I I2SC1_DI I – – PIO, I, PU,
ST
10 E3 F1 VDDIO GPIO_AD PE3 I/O AFE1_AD I D11 I/O TIOA10 I/O – – – – PIO, I, PU,
10(5) ST
27 K1 K2 VDDIO GPIO_AD PE4 I/O AFE0_AD I D12 I/O TIOB10 I/O – – – – PIO, I, PU,
4(5) ST
28 L1 K3 VDDIO GPIO_AD PE5 I/O AFE0_AD I D13 I/O TCLK10 I/O – – – – PIO, I, PU,
3(5) ST
...........continued
LQFP Pin LFBGA/ UFBGA Power Rail I/O Type Primary Alternate PIO PIO PIO PIO Reset
TFBGA Ball Peripheral Peripheral Peripheral Peripheral State
Ball A B C D
Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal, Dir,
PU, PD,
HiZ, ST
Notes:
1. WKUPx can be used if the PIO Controller defines the I/O line as “input”.
2. To select this extra function, refer to the 32.5.14. Parallel Capture Mode section in the Parallel Input/Output
Controller (PIO) chapter.
3. PIODCEN1/PIODCx has priority over WKUPx. Refer to the 32.5.14. Parallel Capture Mode section in the PIO
chapter.
4. Refer to the 23.4.2. Slow Clock Generator section in the Supply Controller (SUPC) chapter.
5. To select this extra function, refer to the 33.5.2.1. I/O Lines section in the External Bus Interface (EBI) chapter.
This selection is independent of the PIO line configuration. PIO lines must be configured according to required
settings (PU or PD).
6. Analog input has priority over WKUPx pin. To select the analog input, refer to the 33.5.2.1. I/O Lines section in
the EBI chapter. WKUPx can be used if the PIO controller defines the I/O line as “input”.
7. Analog input has priority over RTCOUTx pin. To select the analog input, refer to the 33.5.2.1. I/O Lines
section in the EBI chapter. Refer to the 27.5.8. Waveform Generation section in the Real-Time Clock (RTC)
chapter to select RTCOUTx.
8. Analog input has priority over WKUPx pin. To select the analog input, refer to the 33.5.2.1. I/O Lines section in
the EBI chapter. To select PIODCEN2, refer to the 32.5.14. Parallel Capture Mode in the PIO chapter.
9. Refer to the System I/O Configuration Register (19.4.7. CCFG_SYSIO) in the Bus Matrix (MATRIX) chapter.
10. Refer to the 30.5.3. Main Crystal Oscillator section in the Clock Generator chapter. This selection is
independent of the PIO line configuration. PIO lines must be configured according to XINxx (I) and XOUTxx
(O).
11. DAC0 is selected when DACC_CHER.CH0 is set. DAC1 is selected when DACC_CHER.CH1 is set. Refer to
the DACC Channel Enable Register in the Digital-to-Analog Converter Controller (DACC) chapter.
76 50
100 26
1 25
A B C D E F G H J K
BALL A1
72 D8 D8 VDDIO GPIO_AD PA0 I/O WKUP0(1) I PWMC0_PWMH0 O TIOA0 I/O A17 O I2SC0_MCK – PIO, I, PU, ST
70 C10 C10 VDDIO GPIO_AD PA1 I/O WKUP1(1) I PWMC0_PWML0 O TIOB0 I/O A18 O I2SC0_CK – PIO, I, PU, ST
66 D10 D10 VDDIO GPIO PA2 I/O WKUP2(1) I PWMC0_PWMH1 O – – DATRG I – – PIO, I, PU, ST
64 F9 F9 VDDIO GPIO_AD PA3 I/O PIODC0(2) I TWD0 I/O LONCOL1 I PCK2 O – – PIO, I, PU, ST
55 H10 H10 VDDIO GPIO PA4 I/O WKUP3/ I TWCK0 O TCLK0 I UTXD1 O – – PIO, I, PU, ST
PIODC1(3)
52 H9 H9 VDDIO GPIO_AD PA5 I/O WKUP4/ I PWMC1_PWML3 O ISI_D4 I URXD1 I – – PIO, I, PU, ST
PIODC2(3)
54 J9 J9 VDDIO GPIO_AD PA9 I/O WKUP6/ I URXD0 I ISI_D3 I PWMC0_PWMFI0 I – – PIO, I, PU, ST
PIODC3(3)
44 J8 J8 VDDIO GPIO_AD PA11 I/O WKUP7/ I QCS O PWMC0_PWMH0 O PWMC1_PWML0 O – – PIO, I, PU, ST
PIODC5(3)
48 K10 K10 VDDIO GPIO_AD PA12 I/O PIODC6(2) I QIO1 I/O PWMC0_PWMH1 O PWMC1_PWMH0 O – – PIO, I, PU, ST
27 G5 G5 VDDIO GPIO_AD PA13 I/O PIODC7(2) I QIO0 I/O PWMC0_PWMH2 O PWMC1_PWML1 O – – PIO, I, PU, ST
34 H6 H6 VDDIO GPIO_CLK PA14 I/O WKUP8/ I QSCK O PWMC0_PWMH3 O PWMC1_PWMH1 O – – PIO, I, PU, ST
PIODCEN1(3)
33 J6 J6 VDDIO GPIO_AD PA15 I/O – I D14 I/O TIOA1 I/O PWMC0_PWML3 O I2SC0_WS – PIO, I, PU, ST
30 J5 J5 VDDIO GPIO_AD PA16 I/O – I D15 I/O TIOB1 I/O PWMC0_PWML2 O I2SC0_DI – PIO, I, PU, ST
16 G1 G1 VDDIO GPIO_AD PA17 I/O AFE0_AD6(5) I QIO2 I/O PCK1 O PWMC0_PWMH3 O – – PIO, I, PU, ST
15 G2 G2 VDDIO GPIO_AD PA18 I/O AFE0_AD7(5) I PWMC1_PWMEXTRG1 I PCK2 O A14 O – – PIO, I, PU, ST
14 F1 F1 VDDIO GPIO_AD PA19 I/O AFE0_AD8/ I – – PWMC0_PWML0 O A15 O I2SC1_MCK – PIO, I, PU, ST
WKUP9(6)
13 F2 F2 VDDIO GPIO_AD PA20 I/O AFE0_AD9/ I – – PWMC0_PWML1 O A16 O I2SC1_CK – PIO, I, PU, ST
WKUP10(6)
21 J1 J1 VDDIO GPIO_AD PA21 I/O AFE0_AD1/ I RXD1 I PCK1 O PWMC1_PWMFI0 I – – PIO, I, PU, ST
PIODCEN2(8)
26 J3 J3 VDDIO GPIO_AD PA22 I/O PIODCCLK(2) I RK I/O PWMC0_PWMEXTRG1 I NCS2 O – – PIO, I, PU, ST
31 K5 K5 VDDIO GPIO_AD PA23 I/O – – SCK1 I/O PWMC0_PWMH0 O A19 O PWMC1_PWML2 O PIO, I, PU, ST
38 K7 K7 VDDIO GPIO_AD PA24 I/O – – RTS1 O PWMC0_PWMH1 O A20 O ISI_PCK I PIO, I, PU, ST
40 H7 H7 VDDIO GPIO_AD PA25 I/O – – CTS1 I PWMC0_PWMH2 O A23 O MCCK O PIO, I, PU, ST
42 K8 K8 VDDIO GPIO PA26 I/O – – DCD1 I TIOA2 O MCDA2 I/O PWMC1_PWMFI1 I PIO, I, PU, ST
50 H8 H8 VDDIO GPIO_AD PA27 I/O – – DTR1 O TIOB2 I/O MCDA3 I/O ISI_D7 PIO, I, PU, ST
79 A9 A9 VDDIO GPIO PA28 I/O – – DSR1 I TCLK1 I MCCDA I/O PWMC1_PWMFI2 I PIO, I, PU, ST
82 C7 C7 VDDIO GPIO PA30 I/O WKUP11(1) I PWMC0_PWML2 O PWMC1_PWMEXTRG0 I MCDA0 I/O I2SC0_D0 – PIO, I, PU, ST
83 A7 A7 VDDIO GPIO_AD PA31 I/O – – SPI0_NPCS1 I/O PCK2 O MCDA1 I/O PWMC1_PWMH2 O PIO, I, PU, ST
12 E1 E1 VDDIO GPIO PB0 I/O AFE0_AD10/ I PWMC0_PWMH0 O – – RXD0 I TF I/O PIO, I, PU, ST
RTCOUT0(7)
11 E2 E2 VDDIO GPIO PB1 I/O AFE1_AD0/ I PWMC0_PWMH1 O GTSUCOMP O TXD0 I/O TK I/O PIO, I, PU, ST
RTCOUT1(7)
17 H1 H1 VDDIO GPIO PB2 I/O AFE0_AD5(5) I CANTX0– O– – – CTS0 I SPI0_NPCS0 I/O PIO, I, PU, ST
20 H2 H2 VDDIO GPIO_AD PB3 I/O AFE0_AD2/ I CANRX0– I– PCK2 O RTS0 O ISI_D2 I PIO, I, PU, ST
WKUP12(6)
74 B9 B9 VDDIO GPIO_MLB PB4 I/O TDI(9) I TWD1 I/O PWMC0_PWMH2 O MLBCLK– I– TXD1 I/O PIO, I, PD, ST
...........continued
LQFP Pin VFBGA TFBGA Power Rail I/O Type Primary Alternate PIO Peripheral A PIO Peripheral B PIO Peripheral C PIO Peripheral D Reset State
Ball Ball
Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal, Dir, PU,
PD, HiZ, ST
61 F8 F8 VDDIO GPIO PB12 I/O ERASE(9) I PWMC0_PWML1 O GTSUCOMP O – – PCK0 O PIO, I, PD, ST
100 B2 B2 VDDIO GPIO_AD PB13 I/O DAC0(11) O PWMC0_PWML2 O PCK0 O SCK0 I/O – – PIO, I, PU, ST
1 B1 C1 VDDIO GPIO_AD PD0 I/O DAC1(11) I GTXCK I PWMC1_PWML0 O SPI1_NPCS1 DCD0 I PIO, I, PU, ST
92 D3 D2 VDDIO GPIO PD1 I/O – – GTXEN O PWMC1_PWMH0 O SPI1_NPCS2 I/O DTR0 O PIO, I, PU, ST
91 E3 E3 VDDIO GPIO PD2 I/O – – GTX0 O PWMC1_PWML1 O SPI1_NPCS3 I/O DSR0 I PIO, I, PU, ST
89 B5 B5 VDDIO GPIO PD3 I/O – – GTX1 O PWMC1_PWMH1 O UTXD4 O RI0 I PIO, I, PU, ST
88 A5 A5 VDDIO GPIO_CLK PD4 I/O – – GRXDV I PWMC1_PWML2 O TRACED0 O DCD2 I PIO, I, PU, ST
87 D5 D5 VDDIO GPIO_CLK PD5 I/O – – GRX0 I PWMC1_PWMH2 O TRACED1 O DTR2 O PIO, I, PU, ST
85 B6 B6 VDDIO GPIO_CLK PD6 I/O – – GRX1 I PWMC1_PWML3 O TRACED2 O DSR2 I PIO, I, PU, ST
84 A8 A6 VDDIO GPIO_CLK PD7 I/O – – GRXER I PWMC1_PWMH3 O TRACED3 O RI2 I PIO, I, PU, ST
78 B8 B8 VDDIO GPIO_CLK PD9 I/O – – GMDIO I/O PWMC0_PWMFI2 AFE1_ADTRG I – O PIO, I, PU, ST
71 C9 C9 VDDIO GPIO_MLB PD10 I/O – – GCRS I PWMC0_PWML0 O TD O MLBSIG– I/O– PIO, I, PD, ST
69 D9 D9 VDDIO GPIO_AD PD11 I/O – – GRX2 I PWMC0_PWMH0 O GTSUCOMP O ISI_D5 I PIO, I, PU, ST
65 E10 E10 VDDIO GPIO_AD PD12 I/O – – GRX3 I CANTX1– O– SPI0_NPCS2 O ISI_D6 I PIO, I, PU, ST
75 B10 B10 VDDIO GPIO_AD PD15 I/O – – GTX2 O RXD2 I NWR1/NBS1 O – – PIO, I, PU, ST
53 J10 J10 VDDIO GPIO_AD PD17 I/O – – GTXER SCK2 I/O – O – – PIO, I, PU, ST
45 K3 K3 VDDIO GPIO PD20 I/O – – PWMC0_PWMH0 O SPI0_MISO I/O GTSUCOMP O – – PIO, I, PU, ST
43 H5 H5 VDDIO GPIO_AD PD21 I/O – – PWMC0_PWMH1 O SPI0_MOSI I/O TIOA11 I/O ISI_D1 I PIO, I, PU, ST
41 J4 J4 VDDIO GPIO_AD PD22 I/O – – PWMC0_PWMH2 O SPI0_SPCK O TIOB11 I/O ISI_D0 I PIO, I, PU, ST
37 G4 G4 VDDIO GPIO_AD PD24 I/O – – PWMC0_PWML0 O RF I/O TCLK11 I ISI_HSYNC I PIO, I, PU, ST
35 H3 H3 VDDIO GPIO_AD PD25 I/O – – PWMC0_PWML1 O SPI0_NPCS1 I/O URXD2 I ISI_VSYNC I PIO, I, PU, ST
32 H4 H4 VDDIO GPIO_AD PD27 I/O – – PWMC0_PWML3 O SPI0_NPCS3 O TWD2 O ISI_D8 I PIO, I, PU, ST
51 J7 J7 VDDIO GPIO_AD PD28 I/O WKUP5(1) URXD3 I CANRX1 I– TWCK2 O ISI_D9 I PIO, I, PU, ST
2 C1 B1 VDDIO GPIO_AD PD31 I/O – – QIO3 I/O UTXD3 O PCK2 O ISI_D11 I PIO, I, PU, ST
...........continued
LQFP Pin VFBGA TFBGA Power Rail I/O Type Primary Alternate PIO Peripheral A PIO Peripheral B PIO Peripheral C PIO Peripheral D Reset State
Ball Ball
Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal, Dir, PU,
PD, HiZ, ST
97 A3 A3 – VBG VBG I – – – – – – – – – – –
Notes:
1. WKUPx can be used if the PIO Controller defines the I/O line as “input”.
2. To select this extra function, refer to the 32.5.14. Parallel Capture Mode section in the “Parallel Input/Output
Controller (PIO)” chapter.
3. PIODCEN1/PIODCx has priority over WKUPx. Refer to the 32.5.14. Parallel Capture Mode section in the
“PIO” chapter.
4. Refer to the 23.4.2. Slow Clock Generator section in the “Supply Controller (SUPC)” chapter.
5. To select this extra function, refer to the 33.5.2.1. I/O Lines section in the “External Bus Interface (EBI)”
chapter. This selection is independent of the PIO line configuration. PIO lines must be configured according to
required settings (PU or PD).
6. Analog input has priority over WKUPx pin. To select the analog input, refer to the 33.5.2.1. I/O Lines section in
the “EBI” chapter. WKUPx can be used if the PIO controller defines the I/O line as “input”.
7. Analog input has priority over RTCOUTx pin. To select the analog input, refer to the 33.5.2.1. I/O Lines
section in the “EBI” chapter. Refer to the 27.5.8. Waveform Generation section in the “Real-Time Clock (RTC)”
chapter to select RTCOUTx.
8. Analog input has priority over WKUPx pin. To select the analog input, refer to the 33.5.2.1. I/O Lines section in
the “EBI” chapter. To select PIODCEN2, refer to the 32.5.14. Parallel Capture Mode in the “PIO” chapter.
9. Refer to the System I/O Configuration Register (19.4.7. CCFG_SYSIO) in the “Bus Matrix (MATRIX)” chapter.
10. Refer to the 30.5.3. Main Crystal Oscillator section in the “Clock Generator” chapter. This selection is
independent of the PIO line configuration. PIO lines must be configured according to XINxx (I) and XOUTxx
(O).
11. DAC0 is selected when DACC_CHER.CH0 is set. DAC1 is selected when DACC_CHER.CH1 is set. Refer to
the DACC Channel Enable Register in the “Digital-to-Analog Converter Controller (DACC)” chapter.
49 32
64 17
1 16
40 40 VDDIO GPIO_AD PA3 I/O PIODC0(1) I TWD0(2) I/O LONCOL1 I PCK2 O – – PIO, I, PU,
ST
34 34 VDDIO GPIO PA4 I/O WKUP3/ I TWCK0 O TCLK0 I UTXD1 O – – PIO, I, PU,
PIODC1(2) ST
32 32 VDDIO GPIO_AD PA5 I/O WKUP4/ I PWMC1_P O ISI_D4 I URXD1 I – – PIO, I, PU,
PIODC2(2) WML3 ST
33 33 VDDIO GPIO_AD PA9 I/O WKUP6/ I URXD0 I ISI_D3 I PWMC0_P I – – PIO, I, PU,
PIODC3(2) WM FI0 ST
...........continued
LQFP Pin QFN Pin Power Rail I/O Type Primary Alternate PIO Peripheral A PIO Peripheral B PIO Peripheral CDir PIO Peripheral DDir Reset State
(11)
Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal, Dir,
PU, PD,
HiZ, ST
27 27 VDDIO GPIO_AD PA11 I/O WKUP7/ I QCS O PWMC0_P O PWMC1_P O – – PIO, I, PU,
PIODC5(2) WMH0 WM L0 ST
29 29 VDDIO GPIO_AD PA12 I/O PIODC6(1) I QIO1 I/O PWMC0_P O PWMC1_P O – – PIO, I, PU,
WMH1 WM H0 ST
18 18 VDDIO GPIO_AD PA13 I/O PIODC7(1) I QIO0 I/O PWMC0_P O PWMC1_P O – – PIO, I, PU,
WMH2 WM L1 ST
19 19 VDDIO GPIO_CLK PA14 I/O WKUP8/ I QSCK O PWMC0_P O PWMC1_P O – – PIO, I, PU,
PIODCEN WMH3 WM H1 ST
1(2)
12 12 VDDIO GPIO_AD PA21 I/O AFE0_AD1/ I RXD1 I PCK1 O PWMC1_P I – – PIO, I, PU,
PIODCEN2( WM FI0 ST
7)
23 23 VDDIO GPIO_AD PA24 I/O – – RTS1 O PWMC0_P O A20 O ISI_PCK I PIO, I, PU,
WMH1 ST
30 30 VDDIO GPIO_AD PA27 I/O – – DTR1 O TIOB2 I/O – I/O ISI_D7 I PIO, I, PU,
ST
8 8 VDDIO GPIO PB0 I/O AFE0_AD10 I PWMC0_P O – – RXD0 I TF I/O PIO, I, PU,
/ WMH0 ST
RTCOUT0(
6)
7 7 VDDIO GPIO PB1 I/O AFE1_AD0/ I PWMC0_P O GTSUCOM O TXD0 I/O TK I/O PIO, I, PU,
RTCOUT1( WMH1 P ST
6)
9 9 VDDIO GPIO PB2 I/O AFE0_AD5( I CANTX0 O – – CTS0 I – I/O PIO, I, PU,
4) ST
11 11 VDDIO GPIO_AD PB3 I/O AFE0_AD2/ I CANRX0 I PCK2 O RTS0 O ISI_D2 I PIO, I, PU,
WKUP ST
12(6)
46 46 VDDIO GPIO_MLB PB4 I/O TDI(8) I TWD1 I/O PWMC0_P O MLBCLK I TXD1 I/O PIO, I, PD,
WMH2 ST
- -
38 38 VDDIO GPIO PB12 I/O ERASE(8) I PWMC0_P O GTSUCOM O – – PCK0 O PIO, I, PD,
WML1 P ST
1 2 VDDIO GPIO_AD PD0 I/O DAC1(11) I GTXCK I PWMC1_P O – I/O DCD0 I PIO, I, PU,
WML0 ST
57 57 VDDIO GPIO PD1 I/O – – GTXEN O PWMC1_P O – I/O DTR0 O PIO, I, PU,
WMH0 ST
56 56 VDDIO GPIO PD2 I/O – – GTX0 O PWMC1_P O – I/O DSR0 I PIO, I, PU,
WML1 ST
55 55 VDDIO GPIO PD3 I/O – – GTX1 O PWMC1_P O UTXD4 O RI0 I PIO, I, PU,
WMH1 ST
...........continued
LQFP Pin QFN Pin Power Rail I/O Type Primary Alternate PIO Peripheral A PIO Peripheral B PIO Peripheral CDir PIO Peripheral DDir Reset State
(11)
Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal Dir Signal, Dir,
PU, PD,
HiZ, ST
48 48 VDDIO GPIO_CLK PD9 I/O – – GMDIO I/O PWMC0_P I AFE1_ADT I – – PIO, I, PU,
WMFI2 RG ST
44 44 VDDIO GPIO_MLB PD10 I/O – – GCRS I PWMC0_P O TD O MLBSIG I/O PIO, I, PD,
WML0 ST
- -
43 43 VDDIO GPIO_AD PD11 I/O – – GRX2 I PWMC0_P O GTSUCOM O ISI_D5 I PIO, I, PU,
WMH0 P ST
26 26 VDDIO GPIO_AD PD21 I/O – – PWMC0_P O – I/O TIOA11 I/O ISI_D1 I PIO, I, PU,
WMH1 ST
25 25 VDDIO GPIO_AD PD22 I/O – – PWMC0_P O – O TIOB11 I/O ISI_D0 I PIO, I, PU,
WMH2 ST
22 22 VDDIO GPIO_AD PD24 I/O – – PWMC0_P O RF I/O TCLK11 I ISI_HSYNC I PIO, I, PU,
WML0 ST
20 20 VDDIO GPIO_AD PD25 I/O – – PWMC0_P O – I/O URXD2 I ISI_VSYNC I PIO, I, PU,
WML1 ST
2 3 VDDIO GPIO_AD PD31 I/O – – QIO3 I/O UTXD3 O PCK2 O ISI_D11 I PIO, I, PU,
ST
-- 62 -- VBG VBG I – – – – – - – – – – –
Notes:
1. To select this extra function, refer to the 32.5.14. Parallel Capture Mode section in the “Parallel Input/Output
Controller (PIO)” chapter.
2. PIODCEN1/PIODCx has priority over WKUPx. Refer to the 32.5.14. Parallel Capture Mode section in the
“PIO” chapter.
3. Refer to the 23.4.2. Slow Clock Generator section in the “Supply Controller (SUPC)” chapter.
4. To select this extra function, refer to the 33.5.2.1. I/O Lines section in the “External Bus Interface (EBI)”
chapter. This selection is independent of the PIO line configuration. PIO lines must be configured according to
required settings (PU or PD).
5. Analog input has priority over WKUPx pin. To select the analog input, refer to the 33.5.2.1. I/O Lines section in
the “EBI” chapter. WKUPx can be used if the PIO controller defines the I/O line as “input”.
6. Analog input has priority over RTCOUTx pin. To select the analog input, refer to the 33.5.2.1. I/O Lines
section in the “EBI” chapter. Refer to the 27.5.8. Waveform Generation section in the “Real-Time Clock (RTC)”
chapter to select RTCOUTx.
7. Analog input has priority over WKUPx pin. To select the analog input, refer to the 33.5.2.1. I/O Lines section in
the “EBI” chapter. To select PIODCEN2, refer to the 32.5.14. Parallel Capture Mode in the “PIO” chapter.
8. Refer to the System I/O Configuration Register (19.4.7. CCFG_SYSIO) in the “Bus Matrix (MATRIX)” chapter.
9. Refer to the 30.5.3. Main Crystal Oscillator section in the Clock Generator chapter. This selection is
independent of the PIO line configuration. PIO lines must be configured according to XINxx (I) and XOUTxx
(O).
10. DAC0 is selected when DACC_CHER.CH0 is set. DAC1 is selected when DACC_CHER.CH1 is set. Refer to
the DACC Channel Enable Register in the “Digital-to-Analog Converter Controller (DACC)” chapter.
11. The exposed pad of the QFN64 package MUST be connected to ground.
Note: Pinout limitations prevent full support of USART functionality. The following table lists which USART functions
are available.
Table 6-4. USART Functions
7. Power Considerations
7.2.1 Powerup
VDDIO and VDDIN must rise simultaneously, prior to VDDCORE, VDDPLL and VDDUTMIC rising. This is respected
if VDDCORE, VDDPLL and VDDUTMIC are supplied by the embedded voltage regulator.
If VDDCORE is powered by an external voltage regulator, VDDIO and VDDIN must reach their minimum operating
voltage before VDDCORE has reached VDDCOREmin. The minimum slope for VDDCORE is defined by:
VDDCOREmin − VT+min / tRESmin
If VDDCORE rises at the same time as VDDIO and VDDIN, the minimum and maximum rising slopes of VDDIO and
VDDIN must be respected. Refer to the section “DC Characteristics”.
In order to prevent any overcurrent at powerup, it is required that VREFP rises simultaneously with VDDIO and
VDDIN.
VDDx(min) VDDCORE
VDDPLL
VDDUTMIC
VDDy(min)
VT+
Time (t)
tRST
Related Links
57.2. DC Characteristics
23.4.6. Backup Power Supply Reset
23.4.6.1. Raising the Backup Power Supply
7.2.2 Powerdown
If VDDCORE, VDDPLL and VDDUTMIC are not supplied by the embedded voltage regulator, VDDIO, VDDIN,
VDDPLLUSB and VDDUTMII should fall simultaneously, prior to VDDCORE, VDDPLL and VDDUTMIC falling. The
VDDCORE falling slope must not be faster than 20V/ms.
In order to prevent any overcurrent at powerdown, it is required that VREFP falls simultaneously with VDDIO and
VDDIN.
Figure 7-2. Powerdown Sequence
Supply (V)
VDDIO
VDDIN
VDDPLLUSB
VDDUTMII
VDDx(min)
VDDCORE
VDDPLL
VDDUTMIC
VDDy(min)
Time (t)
To save the power consumption of the backup SRAM, the user can disable the backup SRAM power switch by
clearing the bit SRAMON in the Supply Controller Mode Register (SUPC_MR). By default, after VDDIO rises, the
backup SRAM power switch is enabled.
In Wait mode, the clocks of the core, peripherals and memories are stopped. However, the core, peripherals and
memories power supplies are still powered.
Wait mode is entered when the WAITMODE bit is set in CKGR_MOR and the field FLPM is configured to 00 or 01 in
the PMC Fast Startup Mode register (PMC_FSMR).
The Cortex-M is able to handle external events or internal events to wake up the core. This is done by configuring
the external lines WKUP0–13 as fast startup wake-up pins (refer to the “Fast Startup” section). RTC or RTT alarms
or USB wake-up events can be used to wake up the processor. Resume from Wait mode is also achieved when a
debug request occurs and the bit CDBGPWRUPREQ is set in the processor.
To enter Wait mode, first, select the Main RC oscillator as Main Clock and perform the following steps:
1. Configure the FLPM field in the PMC_FSMR.
2. Set Flash Wait State at 0.
3. Set HCLK = MCK by configuring MDIV to 0 in the PMC Host Clock register (PMC_MCKR).
4. Set the WAITMODE bit in the PMC Clock Generator Main Oscillator register (CKGR_MOR).
5. Wait for MCKRDY = 1 in the PMC Status register (PMC_SR).
Note: Internal main clock resynchronization cycles are necessary between writing the MOSCRCEN bit and the entry
in Wait mode. Depending on the user application, waiting for the MOSCRCEN bit to be cleared is recommended to
ensure that the core will not execute undesired instructions.
Backup Mode ON OFF OFF SUPC_CR.VROFF = 1 WKUP0–13 pins Reset Previous state PIOA, PIOB, < 2 ms
(Not powered) SLEEPDEEP = 1 (see Note 1) Supply Monitor maintained PIOC, PIOD &
PIOE
RTC alarm
inputs with
RTT alarm pullups
Wait Mode w/ ON ON Powered PMC_MCKR.MDIV = 0 WKUP0–13 pins Clocked back Previous state Unchanged < 10 μs
Flash in Deep (Not clocked) , CKGR_MOR.WAITMODE =1 RTC (see Note 3) maintained
Power-down , SLEEPDEEP = 0 RTT
Mode , PMC_FSMR.LPM = 1
USBHS
, PMC_FSMR.FLPM = 1 (see Note 1)
Processor debug (see Note 6)
...........continued
Mode SUPC, 32 kHz Regulator Core Mode Entry Configuration Potential Core at PIO State while PIO State at Wakeup Time
Oscillator, Memory Wakeup Wakeup in Low-Power Wakeup (see Note 2)
RTC, RTT Peripherals Sources Mode
Backup SRAM
(BRAM),
Backup
Registers
(GPBR),
POR
(Backup Area)
Wait Mode w/ ON ON Powered PMC_MCKR.MDIV = 0 WKUP0–13 pins Clocked back Previous state Unchanged < 10 μs
Flash in (Not clocked) , CKGR_MOR.WAITMODE =1 RTC (see Note 3) maintained
Standby Mode , SLEEPDEEP = 0
RTT
, PMC_FSMR.LPM = 1
, PMC_FSMR.FLPM = 0 (see Note 1) USBHS
Sleep Mode ON ON Powered WFI Any enabled Interrupt Clocked back Previous state Unchanged (see Note 5)
(Not clocked) (see SLEEPDEEP = 0 maintained
Note 4) PMC_FSMR.LPM = 0 (see Note 1)
Notes:
1. The bit SLEEPDEEP is in the Cortex-M7 System Control Register.
2. When considering wakeup time, the time required to start the PLL is not taken into account. Once started,
the device works with the Main RC oscillator. The user has to add the PLL startup time if it is needed in the
system. The wakeup time is defined as the time taken for wakeup until the first instruction is fetched.
3. HCLK = MCK. The user may need to revert back to the previous clock configuration.
4. Depends on MCK frequency.
5. In this mode, the core is supplied and not clocked. Some peripherals can be clocked.
6. Resume from Wait mode if a debug request occurs (CDBGPWRUPREQ is set in the processor).
7. CAN wake-up requires the use of any WKUP0–13 pin.
8. Input/Output Lines
The SAM E70/S70/V70/V71 features both general purpose I/Os (GPIO) and system I/Os. GPIOs can have alternate
functionality due to multiplexing capabilities of the PIO controllers. The same PIO line can be used, whether in I/O
mode or by the multiplexed peripherals. System I/Os include pins such as test pins, oscillators, erase or analog
inputs.
RSERIAL
Receiver
Driver with PCB Trace
ZOUT ~ 10 Ohms Z0 ~ 50 Ohms
Notes:
1. If the PB12 pin is used as PIO input in user applications, a low level must be ensured at start up to prevent
Flash erase before the user application sets the PB12 pin into PIO mode.
2. Refer to 23.4.2. Slow Clock Generator.
3. Refer to 30.5.3. Main Crystal Oscillator.
4. If not used then the corresponding PIO pin must be setup as an output and attached to a dedicated trace on
the board to reduce current consumption.
9. Interconnect
The system architecture is based on the ARM Cortex-M7 processor connected to the main AHB Bus Matrix, the
embedded Flash, the multi-port SRAM and the ROM.
The 32-bit AHBP interface is a single 32-bit wide interface that accesses the peripherals connected on the main
Bus Matrix. It is used only for data access. Instruction fetches are never performed on the AHBP interface. The bus,
AHBP or AXIM, accessing the peripheral memory area [0x40000000 to 0x60000000] is selected in the AHBP control
register.
The 32-bit AHBS interface provides system access to the ITCM, D1TCM, and D0TCM. It is connected on the main
Bus Matrix and allows the XDMA to transfer from memory or peripherals to the instruction or data TCMs.
The 64-bit AXIM interface is a single 64-bit wide interface connected through two ports of the AXI Bridge to the main
AHB Bus Matrix and to two ports of the multi-port SRAM. The AXIM interface allows:
• Instruction fetches
• Data cache linefills and evictions
• Non-cacheable normal-type memory data accesses
• Device and strongly-ordered type data accesses, generally to peripherals
The interleaved multi-port SRAM optimizes the Cortex-M7 accesses to the internal SRAM.
The interconnect of the other Hosts and Clients is described in 19. Bus Matrix (MATRIX).
The figure below shows the connections of the different Cortex-M7 ports.
Figure 9-1. Interconnect Block Diagram
TPIU In-Circuit Emulator
Multi-Port SRAM
ITCM
Cortex-M7 Processor TCM
NVIC ETM Interface 64-bit
fMAX 300 MHz TCM SRAM
Flash ROM
DTCM
MPU FPU
2 x 32-bit
16 Kbytes 16 Kbytes
DCache + ECC ICache + ECC
32-bit 32-bit
32-bit 32-bit
M M S S S S S
ISI
59
0x40050000
GMAC
0x40054000 39
TC3_CH0
50
+0x40
TC3_CH1
51
+0x80
TC3_CH2
0x40058000 52
SPI1
42
0x4005C000
PWM1
60
11. Memories
ITCM DTCM SRAM for 384K RAM-based SRAM for 256K RAM-based GPNVM Bits [8:7]
0 0 384 256 0
32 32 320 192 1
64 64 256 128 2
128 128 128 0 3
Accesses made to TCM regions when the relevant TCM is disabled and accesses made to the Code and SRAM
region above the TCM size limit are performed on the AHB matrix, i.e., on internal Flash or on ROM depending on
remap GPNVM bit.
Accesses made to the SRAM above the size limit will not generate aborts.
The Memory Protection Unit (MPU) can to be used to protect these areas.
The ROM may also be mapped at 0x00000000 depending on GPNVM bit setting and ITCM use.
The figure below illustrates the organization of the Flash depending on its size.
...........continued
Flash Size (Kbytes) Number of Lock Bits Lock Region Size
1024 64 16 Kbytes
512 32 16 Kbytes
Asserting the ERASE pin clears the lock bits, thus unlocking the entire Flash.
...........continued
I/O Line System Function
PA7 PGMD0
PA8 PGMD1
PA9 PGMD2
PA10 PGMD3
PA11 PGMD4
PA12 PGMD5
PA13 PGMD6
PA14 PGMD7
PD0 PGMD8
PD1 PGMD9
PD2 PGMD10
PD3 PGMD11
PD4 PGMD12
PD5 PGMD13
PD6 PGMD14
PD7 PGMD15
5:2 Free
6 Reserved
...........continued
GPNVM Bit Function
8:7 TCM configuration
00: 0 Kbytes DTCM + 0 Kbytes ITCM (default)
01: 32 Kbytes DTCM + 32 Kbytes ITCM
10: 64 Kbytes DTCM + 64 Kbytes ITCM
11: 128 Kbytes DTCM + 128 Kbytes ITCM
Note: After programming, reboot must be done.
...........continued
Function Application Description Event Source Event
Destination
Security General- Immediate GPBR clear PIO WKUP0/1 GPBR
purpose (asynchronous) on tamper detection
through WKUP0/1 IO pins (see Note
5)
Measurement Power factor Duty cycle output waveform ACC PWM0
trigger correction correction
PIO PA10, PA22 PWM0
(DC-DC, Trigger source selection in PWM (see
lighting, etc.) Notes 7, 8) ACC PWM1
PIO PA30, PA18 PWM1
General- Trigger source selection in AFEC (see PIO AFE0_ADTRG AFEC0
purpose Note 9)
TC0.Ch0 (TIOA0) AFEC0
TC0.Ch1 (TIOA1) AFEC0
TC0.Ch2 (TIOA2) AFEC0
ACC AFEC0
Motor control ADC-PWM synchronization (see PWM0 Event Line 0 and AFEC0
Notes 12, 14) Trigger source 1
selection in AFEC (see Note 9)
General- Trigger source selection in AFEC (see PIO AFE1_ADTRG AFEC1
purpose Note 9)
TC1.Ch0 (TIOA3) AFEC1
TC1.Ch1 (TIOA4) AFEC1
TC1.Ch2 (TIOA5) AFEC1
ACC AFEC1
Motor control ADC-PWM synchronization (see PWM1 Event Line AFEC1
Notes 12, 14) 0 and 1
Trigger source selection in AFEC (see
Note 9)
General- Temperature sensor RTC RTCOUT0 AFEC0 and
purpose Low-speed measurement (see Notes AFEC1
10, 11)
Conversion General- Trigger source selection in DACC TC0.Ch0-2 (TIOA0, DACC
trigger purpose (Digital-to-Analog Converter TIOA1, TIOA2)
Controller) (see Note 13)
PIO DATRG DACC
PWM0 Event Line 0 and DACC
1(14)
PWM1 Event Line 0 and DACC
1(14)
Image capture Low-cost Direct image transfer from sensor to PIO DMA
image sensor system memory via DMA(15) PA3/4/5/9/10/11/12/13,
PA22, PA14, PA21
...........continued
Function Application Description Event Source Event
Destination
Delay Motor control Propagation delay of external PWM0 Comparator TC0.Ch0
measurement components (IOs, power transistor Output OC0 TIOA0 and
bridge driver, etc.) See Notes 16, 17) TIOB0
PWM0 Comparator TC0.Ch1
Output OC1 TIOA1 and
TIOB1
PWM0 Comparator TC0.Ch2
Output OC2 TIOA2 and
TIOB2
PWM1 Comparator TC1.Ch0
Output OC0 TIOA3 and
TIOB3
PWM1 Comparator TC1.Ch1
Output OC1 TIOA4 and
TIOB4
PWM1 Comparator TC1.Ch2
Output OC2 TIOA5 and
TIOB5
PWM0 Comparator TC2.Ch0
Output OC0 TIOA6 and
TIOB6
PWM0 Comparator TC2.Ch1
Output OC1 TIOA7 and
TIOB7
PWM0 Comparator TC2.Ch2
Output OC2 TIOA8 and
TIOB8
PWM1 Comparator TC3.Ch0
Output OC0 TIOA9 and
TIOB9
PWM1 Comparator TC3.Ch1
Output OC1 TIOA10 and
TIOB10
Audio clock Audio GMAC GTSUCOMP signal adaptation GMAC TC3.Ch2
recovery from via TC (TC3.TC_EMR.TRIGSRCB) in GTSUCOMP TIOB11
Ethernet order to drive the clock reference of
the external PLL for the audio clock
Direct Memory General- Peripheral trigger event generation to USART, UART, TWIHS, XDMA
Access purpose transfer data to/from system memory SPI, QSPI, AFEC, TC
(see Note 18) (Capture), SSC, HSMCI,
DAC, AES, PWM, PIO,
I2SC
Notes:
1. Refer to 31.15. Main Crystal Oscillator Failure Detection.
2. Refer to 50.5.4. Fault Inputs and 50.6.2.7. Fault Protection.
3. Refer to 53.6.4. Fault Mode.
4. Refer to 53.5.4. Fault Output.
5. Refer to 23.4.9.2. Low-power Tamper Detection and Anti-Tampering and 29.3.1. SYS_GPBRx.
6. Refer to 49.6.18. Fault Mode.
7. Refer to 50.7.49. PWM_ETRGx.
8. Refer to 50.6.5. PWM External Trigger Mode.
9. Refer to 51.6.6. Conversion Triggers and 51.7.2. AFEC_MR.
10. Refer to 57.10. Temperature Sensor.
11. Refer to 27.5.8. Waveform Generation.
12. Refer to 50.7.36. PWM_CMPVx and 50.6.4. PWM Event Lines.
13. Refer to 52.7.3. DACC_TRIGR.
14. Refer to 50.6.3. PWM Comparison Units and 50.6.4. PWM Event Lines.
15. Refer to 32.5.14. Parallel Capture Mode.
16. Refer to 50.6.2.2. Comparator.
17. Refer to 49.6.14. Synchronization with PWM.
18. Refer to 35. DMA Controller (XDMAC).
13.2.1 Power-on-Reset
The Power-on-Reset (POR) monitors VDDIO and VDDCORE. It is always activated and monitors voltage at start up
but also during power down. If VDDIO or VDDCORE goes below the threshold voltage, the entire chip is Reset. For
more information, refer to 57. Electrical Characteristics for SAM V70/V71.
14. Peripherals
...........continued
Instance ID Instance Name NVIC Interrupt PMC Description
Clock Control
26 TC1_CHANNEL0 X X 16-bit Timer Counter 1, Channel 0
27 TC1_CHANNEL1 X X 16-bit Timer Counter 1, Channel 1
28 TC1_CHANNEL2 X X 16-bit Timer Counter 1, Channel 2
29 AFEC0 X X Analog Front-End Controller
30 DACC X X Digital-to-Analog Converter
31 PWM0 X X Pulse-Width Modulation Controller
32 ICM X X Integrity Check Monitor
33 ACC X X Analog Comparator Controller
34 USBHS X X USB Host/Device Controller
35 MCAN0 X X CAN IRQ Line 0
36 MCAN0 INT1 – CAN IRQ Line 1
37 MCAN1 X X CAN IRQ Line 0
38 MCAN1 INT1 – CAN IRQ Line 1
39 GMAC X X Ethernet MAC
40 AFEC1 X X Analog Front End Controller
41 TWIHS2 X X Two-wire Interface
42 SPI1 X X Serial Peripheral Interface
43 QSPI X X Quad I/O Serial Peripheral Interface
44 UART2 X X Universal Asynchronous Receiver/Transmitter
45 UART3 X X Universal Asynchronous Receiver/Transmitter
46 UART4 X X Universal Asynchronous Receiver/Transmitter
47 TC2_CHANNEL0 X X 16-bit Timer Counter 2, Channel 0
48 TC2_CHANNEL1 X X 16-bit Timer Counter 2, Channel 1
49 TC2_CHANNEL2 X X 16-bit Timer Counter 2, Channel 2
50 TC3_CHANNEL0 X X 16-bit Timer Counter 3, Channel 0
51 TC3_CHANNEL1 X X 16-bit Timer Counter 3, Channel 1
52 TC3_CHANNEL2 X X 16-bit Timer Counter 3, Channel 2
53 MLB X X MediaLB IRQ 0
54 MLB X – MediaLB IRQ 1
55 – X – Reserved
56 AES X X Advanced Encryption Standard
57 TRNG X X True Random Number Generator
58 XDMAC X X DMA Controller
59 ISI X X Image Sensor Interface
...........continued
Instance ID Instance Name NVIC Interrupt PMC Description
Clock Control
60 PWM1 X X Pulse-Width Modulation Controller
61 ARM FPU – Arm Floating Point Unit interrupt associated with
OFC, UFC, IOC, DZC and IDC bits.
62 Reserved – – –
63 RSWDT X – Reinforced Safety Watchdog Timer
64 ARM CCW – Arm Cache ECC Warning
65 ARM CCF – Arm Cache ECC Fault
66 GMAC Q1 – GMAC Queue 1 Interrupt signal toggled on a
DMA write to the first word of each DMA data
buffer associated with queue 1.
67 GMAC Q2 – GMAC Queue 2 Interrupt signal toggled on a
DMA write to the first word of each DMA data
buffer associated with queue 2.
68 ARM IXC – Floating Point Unit Interrupt IXC associated with
FPU cumulative exception bit.
69 I2SC0 X X Inter-IC Sound Controller
70 I2SC1 X X Inter-IC Sound Controller
71 GMAC Q3 – GMAC Queue 3 Interrupt signal toggled on a
DMA write to the first word of each DMA data
buffer associated with queue 3
72 GMAC Q4 – GMAC Queue 4 Interrupt signal toggled on a
DMA write to the first word of each DMA data
buffer associated with queue 4
73 GMAC Q5 – GMAC Queue 5 Interrupt signal toggled on a
DMA write to the first word of each DMA data
buffer associated with queue 5
Features Configuration
Debug
Comparator set Full comparator set: 4 DWT and 8 FPB comparators
ETM support Instruction ETM interface
Internal Trace support (ITM) ITM and DWT trace functionality implemented
CTI and WIC Not embedded
TCM
ITCM max size 128 KB
DTCM max size 256 KB
Cache
Cache size 16 KB for instruction cache, 16 KB for data cache
Number of sets 256 for instruction cache, 128 for data cache
Number of ways 2 for instruction cache, 4 for data cache
Number of words per cache line 8 words (32 bytes)
ECC on Cache Embedded
NVIC
IRQ number 74
IRQ priority levels 8
MPU
Number of regions 16
FPU
FPU precision Single and double precision
AHB Port
AHBP addressing size 512 MB
16.1 Description
The device features a number of complementary debug and test capabilities. The Serial Wire Debug Port (SW-DP)
is used for standard debugging functions, such as downloading code and single-stepping through programs. It also
embeds a serial wire trace.
TCK/SWCLK
TDI
POR
Reset
and
Test TST
Embedded TRACED0–3
Cortex-M7 Trace PIO
Macrocell
TRACECLK
PCK3
Host Debugger
PC
Serial Wire
Debug Port
Emulator/Probe
Serial Wire
Debug Port
Connector
Microchip MCU
Test Adaptor
Tester
JTAG
Probe
JTAG
Chip n Chip 2
Connector
Time Stamping
Data Sampler
SW-DP is selected when JTAGSEL is low. It is not possible to switch directly between SW-DP and JTAG boundary
scan operations. A chip reset must be performed after JTAGSEL is changed.
– Enable ITM.
– Enable Synchronization packets.
– Enable SWO behavior.
– Fix the ATB ID to 1.
3. Write 0x1 into the Trace Enable register:
– Enable the Stimulus port 0.
4. Write 0x1 into the Trace Privilege register:
– Stimulus port 0 only accessed in privileged mode (Clearing a bit in this register will result in the
corresponding stimulus port being accessible in user mode.)
5. Write into the Stimulus port 0 register: TPIU (Trace Port Interface Unit)
The TPIU acts as a bridge between the on-chip trace data and the Instruction Trace Macrocell (ITM).
The TPIU formats and transmits trace data off-chip at frequencies asynchronous to the core.
31 30 29 28 27 26 25 24
VERSION PART NUMBER
23 22 21 20 19 18 17 16
PART NUMBER
15 14 13 12 11 10 9 8
PART NUMBER MANUFACTURER IDENTITY
7 6 5 4 3 2 1 0
MANUFACTURER IDENTITY 1
PART NUMBER
0x5B3D
JTAG ID Code
0x5B3D_D03F
17.1 Description
The SAM-BA Boot Program integrates an array of programs permitting download and/or upload into the different
memories of the product.
No
Device USB Enumeration Character # received
Setup Successful ? from UART0?
Yes Yes
The SAM-BA boot program looks for a source clock, either from the embedded main oscillator with external crystal
(main oscillator enabled) or from a supported frequency signal applied to the XIN pin (Main oscillator in bypass
mode).
If a clock is supplied by one of the two sources, the boot program checks that the frequency is one of the supported
external frequencies. If the frequency is supported, USB activation is allowed. If no clock is supplied, or if a clock is
supplied but the frequency is not a supported external frequency, the internal 12 MHz RC oscillator is used as the
main clock. In this case, the USB is not activated due to the frequency drift of the 12 MHz RC oscillator.
...........continued
Command Action Arguments Example
G Go Address# G200200#
V Display version No argument V#
• Mode commands:
– Normal mode configures SAM-BA Monitor to send/receive data in binary format
– Terminal mode configures SAM-BA Monitor to send/receive data in ASCII format
• Write commands: Write a byte (O), a halfword (H) or a word (W) to the target
– Address: Address in hexadecimal
– Value: Byte, halfword or word to write in hexadecimal
• Read commands: Read a byte (o), a halfword (h) or a word (w) from the target
– Address: Address in hexadecimal
– Output: The byte, halfword or word read in hexadecimal
• Send a file (S): Send a file to a specified address
– Address: Address in hexadecimal
Note: There is a timeout on this command which is reached when the prompt ‘>’ appears before the end
of the command execution.
• Receive a file (R): Receive data into a file from a specified address
– Address: Address in hexadecimal
– NbOfBytes: Number of bytes in hexadecimal to receive
• Go (G): Jump to a specified address and execute the code
– Address: Address to jump in hexadecimal
• Get Version (V): Return the SAM-BA boot version
Note: In Terminal mode, when the requested command is performed, SAM-BA Monitor adds the following
prompt sequence to its answer: <LF>+<CR>+'>'.
Host Device
ACK
ACK
ACK
EOT
ACK
Unauthorized use of assigned or unassigned USB Vendor ID Numbers and associated Product ID
WARNING
Numbers is strictly prohibited.
Request Definition
GET_DESCRIPTOR Returns the current device configuration value.
SET_ADDRESS Sets the device address for all future device access.
SET_CONFIGURATION Sets the device configuration.
GET_CONFIGURATION Returns the current device configuration value.
GET_STATUS Returns status for the specified recipient.
SET_FEATURE Set or Enable a specific feature.
CLEAR_FEATURE Clear or Disable a specific feature.
The device also handles some class requests defined in the CDC class.
Request Definition
SET_LINE_CODING Configures DTE rate, stop bits, parity and number of character bits.
GET_LINE_CODING Requests current DTE rate, stop bits, parity and number of character bits.
SET_CONTROL_LINE_STATE RS-232 signal used to tell the DCE device the DTE device is now present.
18.1 Description
The Fast Flash Programming Interface (FFPI) provides parallel high-volume programming using a standard gang
programmer. The parallel interface is fully handshaked and the device is considered to be a standard EEPROM.
Additionally, the parallel protocol offers an optimized access to all the embedded Flash functionalities.
Although the Fast Flash Programming mode is a dedicated mode for high volume programming, this mode is not
designed for in-situ programming.
VDDIO TST
VDDIO PGMEN0
VDDIO PGMEN1
VDDCORE
VDDIO
NCMD PGMNCMD
RDY PGMRDY VDDPLL
NOE PGMNOE GND
NVALID PGMNVALID
MODE[3:0] PGMM[3:0]
DATA[15:0] PGMD[15:0]
External XIN
Clock
...........continued
Signal Name Function Type Active Level Comments
VDDIO I/O Lines Power Supply Power – –
VDDCORE Core Power Supply Power – –
VDDPLL PLL Power Supply Power – –
GND Ground Ground – –
Clocks
XIN Main Clock Input Input – –
Test
TST Test Mode Select Input High Must be connected to VDDIO
PGMEN0 Test Mode Select Input Low Must be connected to VDDIO
PGMEN1 Test Mode Select Input High Must be connected to VDDIO
PIO
PGMNCMD Valid command available Input Low Pulled-up input at reset
PGMRDY 0: Device is busy Output High Pulled-up input at reset
1: Device is ready for a new command
PGMNOE Output Enable (active high) Input Low Pulled-up input at reset
PGMNVALID 0: DATA[15:0] is in input mode Output Low Pulled-up input at reset
1: DATA[15:0] is in output mode
PGMM[3:0] Specifies DATA type (see Table 18-2) Input – Pulled-up input at reset
PGMD[15:0] Bidirectional data bus Input/Output – Pulled-up input at reset
When MODE is equal to CMDE, then a new command (strobed on DATA[15:0] signals) is stored in the command
register.
Table 18-3. Command Bit Coding
...........continued
DATA[15:0] Symbol Command Executed
0x0012 WP Write Page Flash
0x0022 WPL Write Page and Lock Flash
0x0032 EWP Erase Page and Write Page
0x0042 EWPL Erase Page and Write Page then Lock
0x0013 EA Erase All
0x0014 SLB Set Lock Bit
0x0024 CLB Clear Lock Bit
0x0015 GLB Get Lock Bit
0x0034 SGPB Set General Purpose NVM bit
0x0044 CGPB Clear General Purpose NVM bit
0x0025 GGPB Get General Purpose NVM bit
0x0054 SSE Set Security Bit
0x0035 GSE Get Security Bit
0x001F WRAM Write Memory
0x001E GVE Get Version
NCMD 2 4
3 5
RDY
NOE
NVALID
DATA[15:0]
1
MODE[3:0]
NCMD 2 12
3 13
RDY
NOE 5 9
NVALID 7 11
4 6 8 10
MODE[3:0] ADDR
...........continued
Step Programmer Action Device Action DATA I/O
4 Sets DATA signal in tristate Waits for NOE Low Input
5 Clears NOE signal – Tristate
6 Waits for NVALID low Sets DATA bus in output mode and outputs the flash contents. Output
7 – Clears NVALID signal Output
8 Reads value on DATA Bus Waits for NOE high Output
9 Sets NOE signal – Output
10 Waits for NVALID high Sets DATA bus in input mode X
11 Sets DATA in output mode Sets NVALID signal Input
12 Sets NCMD signal Waits for NCMD high Input
13 Waits for RDY high Sets RDY signal Input
The Flash command Write Page and Lock (WPL) is equivalent to the Flash Write Command. However, the lock bit
is automatically set at the end of the Flash write operation. As a lock region is composed of several pages, the
programmer writes to the first pages of the lock region using Flash write commands and writes to the last page of the
lock region using a Flash write and lock command.
The Flash command Erase Page and Write (EWP) is equivalent to the Flash Write Command. However, before
programming the load buffer, the page is erased.
The Flash command Erase Page and Write the Lock (EWPL) combines EWP and WPL commands.
Lock bits can be read using Get Lock Bit command (GLB). The nth lock bit is active when the bit n of the bit mask is
set.
Table 18-10. Get Lock Bit Command
General-purpose NVM bits can be read using the Get GPNVM Bit command (GGPB). The nth GP NVM bit is active
when bit n of the bit mask is set.
Table 18-12. Get GP NVM Bit Command
Once the security bit is set, it is not possible to access FFPI. The only way to erase the security bit is to erase the
Flash.
To erase the Flash, perform the following steps:
1. Power off the chip.
2. Power on the chip with TST = 0.
3. Assert the ERASE signal for at least the ERASE pin assertion time as defined in the section “Electrical
Characteristics”.
4. Power off the chip.
Return to FFPI mode to check that the Flash is erased.
19.1 Description
The Bus Matrix (MATRIX) implements a multi-layer AHB, based on the AHB-Lite protocol, that enables parallel
access paths between multiple AHB Hosts and Clients in a system, thus increasing the overall bandwidth. The
MATRIX interconnects 13 AHB Hosts to 9 AHB Clients. The normal latency to connect a Host to a Client is one cycle.
The exception is the default Host of the accessed Client which is connected directly (zero cycle latency).
The MATRIX user interface is compliant with ARM Advanced Peripheral Bus.
...........continued
Host Index Name
7 Media LB
8 USB DMA
9 Ethernet MAC DMA
10 CAN0 DMA
11 CAN1 DMA
12 Cortex-M7
Hosts 0 1 2 3 4 5 6 7 8 9 10 11 12
Clients Cortex- Cortex- Cortex-M7 ICM Central Central ISI MediaLB USB GMAC CAN0 CAN1 Cortex-
M7 M7 Peripheral DMA IF0 DMA IF1 DMA DMA DMA DMA DMA DMA M7
Port
0 Internal – – – X X – – – – – – – –
SRAM
1 Internal – – – – – X X X X X X X –
SRAM
2 Internal ROM X – – – – – – – – – – – –
3 Internal Flash X – – X – X – – X X – – –
4 USB HS – X – – – – – – – – – – –
Dual Port
RAM
...........continued
Hosts 0 1 2 3 4 5 6 7 8 9 10 11 12
5 External Bus – X – X X X X X X X X X –
Interface
6 QSPI – – – X – X – – X X – – X
7 Peripheral – X X – – X – – – – – – –
Bridge
8 Cortex-M7 – – – X X – X X X X X X –
AHB Client
(AHBS) (see
Note)
Note: For the connection of the Cortex-M7 processor to the SRAM, refer to the sections “Interconnect” and
“Memories”, sub-section “Embedded Memories”.
Related Links
11.1. Embedded Memories
19.3.3 Arbitration
The MATRIX provides an arbitration technique that reduces latency when conflicting cases occur; for example. when
two or more Hosts try to access the same Client at the same time. One arbiter per AHB Client is provided, so that
each Client is arbitrated differently.
The MATRIX provides the user with two arbitration types for each Client:
1. Round-robin Arbitration (default)
2. Fixed Priority Arbitration
Each algorithm may be complemented by selecting a default Host configuration for each Client.
When re-arbitration is required, specific conditions apply. Refer to the "Arbitration Rules" section.
5. 16-beat bursts: predetermined end of burst is generated at the end of each 16-beat boundary during INCR
transfer.
6. 32-beat bursts: predetermined end of burst is generated at the end of each 32-beat boundary during INCR
transfer.
7. 64-beat bursts: predetermined end of burst is generated at the end of each 64-beat boundary during INCR
transfer.
8. 128-beat bursts: predetermined end of burst is generated at the end of each 128-beat boundary during INCR
transfer.
The use of undefined length16-beat bursts, or less, is discouraged since this decreases the overall bus bandwidth
due to arbitration and Client latencies at each first access of a burst.
If the Host does not permanently and continuously request the same Client or has an intrinsically limited average
throughput, the ULBT should be left at its default unlimited value, knowing that the AHB specification natively limits all
word bursts to 256 beats and double-word bursts to 128 beats because of its 1-Kbyte address boundaries.
Unless duly needed, the ULBT should be left at its default value of 0 for power saving.
This selection is made through the ULBT field of the Host Configuration Registers (MATRIX_MCFG).
This feature does not prevent a Client from locking its access indefinitely.
WARNING
If more than one Host requests the Client bus, regardless of the respective Hosts priorities, no Host will be granted
the Client bus for two consecutive runs. A Host can only get back-to-back grants so long as it is the only requesting
Host.
7:0 ULBT[2:0]
15:8
0x00 MATRIX_MCFG0
23:16
31:24
...
7:0 ULBT[2:0]
15:8
0x30 MATRIX_MCFG12
23:16
31:24
0x34
... Reserved
0x3F
7:0 SLOT_CYCLE[6:0]
15:8 SLOT_CYCLE[8:7]
0x40 MATRIX_SCFG0
23:16 FIXED_DEFMSTR[3:0] DEFMSTR_TYPE[1:0]
31:24
7:0 SLOT_CYCLE[6:0]
15:8 SLOT_CYCLE[8:7]
0x44 MATRIX_SCFG1
23:16 FIXED_DEFMSTR[3:0] DEFMSTR_TYPE[1:0]
31:24
7:0 SLOT_CYCLE[6:0]
15:8 SLOT_CYCLE[8:7]
0x48 MATRIX_SCFG2
23:16 FIXED_DEFMSTR[3:0] DEFMSTR_TYPE[1:0]
31:24
7:0 SLOT_CYCLE[6:0]
15:8 SLOT_CYCLE[8:7]
0x4C MATRIX_SCFG3
23:16 FIXED_DEFMSTR[3:0] DEFMSTR_TYPE[1:0]
31:24
7:0 SLOT_CYCLE[6:0]
15:8 SLOT_CYCLE[8:7]
0x50 MATRIX_SCFG4
23:16 FIXED_DEFMSTR[3:0] DEFMSTR_TYPE[1:0]
31:24
7:0 SLOT_CYCLE[6:0]
15:8 SLOT_CYCLE[8:7]
0x54 MATRIX_SCFG5
23:16 FIXED_DEFMSTR[3:0] DEFMSTR_TYPE[1:0]
31:24
7:0 SLOT_CYCLE[6:0]
15:8 SLOT_CYCLE[8:7]
0x58 MATRIX_SCFG6
23:16 FIXED_DEFMSTR[3:0] DEFMSTR_TYPE[1:0]
31:24
7:0 SLOT_CYCLE[6:0]
15:8 SLOT_CYCLE[8:7]
0x5C MATRIX_SCFG7
23:16 FIXED_DEFMSTR[3:0] DEFMSTR_TYPE[1:0]
31:24
7:0 SLOT_CYCLE[6:0]
15:8 SLOT_CYCLE[8:7]
0x60 MATRIX_SCFG8
23:16 FIXED_DEFMSTR[3:0] DEFMSTR_TYPE[1:0]
31:24
0x64
... Reserved
0x7F
7:0 M1PR[1:0] M0PR[1:0]
15:8 M3PR[1:0] M2PR[1:0]
0x80 MATRIX_PRAS0
23:16 M5PR[1:0] M4PR[1:0]
31:24 M7PR[1:0] M6PR[1:0]
...........continued
...........continued
Name: MATRIX_MCFGx
Offset: 0x00 + x*0x04 [x=0..12]
Reset: 0x00000004
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
ULBT[2:0]
Access R/W R/W R/W
Reset 1 0 0
Name: MATRIX_SCFGx
Offset: 0x40 + x*0x04 [x=0..8]
Reset: 0x000201FE
Property: Read/Write
For Clients 2 and 3 (x = 2,3) the default value is 0x0002_01FF, making the default value of DEFMSTR_TYPE = 2
(FIXED).
This register can only be written if the WPEN bit is cleared in the Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
FIXED_DEFMSTR[3:0] DEFMSTR_TYPE[1:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 1 0
Bit 15 14 13 12 11 10 9 8
SLOT_CYCLE[8:7]
Access R/W R/W
Reset 0 1
Bit 7 6 5 4 3 2 1 0
SLOT_CYCLE[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1
If SLOT_CYCLE = 0, the slot cycle limit feature is disabled and bursts always complete unless broken according to
the ULBT.
This limit has been placed in order to enforce arbitration so as to meet potential latency constraints of Hosts waiting
for Client access.
This limit must not be too small. Unreasonably small values break every burst and the MATRIX arbitrates without
performing any data transfer. The default maximum value is usually an optimal conservative choice.
In most cases, this feature is not needed and must be disabled for power saving, for additional information, refer to
“Slot Cycle Limit Arbitration” .
Name: MATRIX_PRASx
Offset: 0x80 + x*0x08 [x=0..8]
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPE bit is cleared in the Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
M7PR[1:0] M6PR[1:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 23 22 21 20 19 18 17 16
M5PR[1:0] M4PR[1:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 15 14 13 12 11 10 9 8
M3PR[1:0] M2PR[1:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
M1PR[1:0] M0PR[1:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bits 0:1, 4:5, 8:9, 12:13, 16:17, 20:21, 24:25, 28:29 – MxPR Host x Priority
Fixed priority of Host x for accessing the selected Client. The higher the number, the higher the priority.
All the Hosts programmed with the same MxPR value for the Client make up a priority pool.
Round-robin arbitration is used in the lowest (MxPR = 0) and highest (MxPR = 3) priority pools.
Fixed priority is used in intermediate priority pools (MxPR = 1) and (MxPR = 2).
See “Arbitration Priority Scheme” for details.
Name: MATRIX_PRBSx
Offset: 0x84 + x*0x08 [x=0..8]
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPE bit is cleared in the Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
M12PR[1:0]
Access R/W R/W
Reset 0 0
Bit 15 14 13 12 11 10 9 8
M11PR[1:0] M10PR[1:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
M9PR[1:0] M8PR[1:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Name: MATRIX_MRCR
Offset: 0x0100
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RCB12 RCB11 RCB10 RCB9 RCB8
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RCB7 RCB6 RCB5 RCB4 RCB3 RCB2 RCB1 RCB0
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: CCFG_CAN0
Offset: 0x0110
Reset: 0x2040019D
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
CAN0DMABA[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 1 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CAN0DMABA[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 1 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Reserved[8]
Access R/W
Reset 1
Bit 7 6 5 4 3 2 1 0
Reserved[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 0 0 1 1 1 0 1
Name: CCFG_SYSIO
Offset: 0x0114
Reset: 0x20400000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
CAN1DMABA[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 1 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CAN1DMABA[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 1 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
SYSIO12
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
SYSIO7 SYSIO6 SYSIO5 SYSIO4
Access R/W R/W R/W R/W
Reset 0 0 0 0
Name: CCFG_PCCR
Offset: 0x0118
Reset: 0x00022224
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
I2SC1CC I2SC0CC TC0CC
Access R/W R/W R/W
Reset 0 0 0
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
Access
Reset
Name: CCFG_DYNCKG
Offset: 0x011C
Reset: 0x00000007
Property: Read/Write
Note: Clearing this register optimizes the power consumption of the system bus circuitry.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
EFCCKG BRIDCKG MATCKG
Access R/W R/W R/W
Reset 1 1 1
Name: CCFG_SMCNFCS
Offset: 0x0124
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
SMC_NFCS3 SMC_NFCS2 SMC_NFCS1 SMC_NFCS0
Access R/W R/W R/W R/W
Reset 0 0 0 0
Name: MATRIX_WPMR
Offset: 0x01E4
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
WPKEY[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WPKEY[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPKEY[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPEN
Access R/W
Reset 0
Name: MATRIX_WPSR
Offset: 0x01E8
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
WPVSRC[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPVSRC[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPVS
Access R
Reset 0
20.1 Description
The USB Transmitter Macrocell Interface (UTMI) registers manage specific aspects of the integrated USB transmitter
macrocell functionality not controlled in USB sections.
0x00
... Reserved
0x0F
7:0 APPSTART ARIE RESx
15:8
0x10 UTMI_OHCIICR
23:16 UDPPUDIS
31:24
0x14
... Reserved
0x2F
7:0 FREQ[1:0]
15:8
0x30 UTMI_CKTRIM
23:16
31:24
Name: UTMI_OHCIICR
Offset: 0x10
Reset: 0x0
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
UDPPUDIS
Access R/W
Reset 0
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
APPSTART ARIE RESx
Access R/W R/W R/W
Reset 0 0 0
Bit 5 – APPSTART Reserved
Value Description
0 Must write 0.
Name: UTMI_CKTRIM
Offset: 0x30
Reset: 0x00010000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
FREQ[1:0]
Access R/W R/W
Reset 0 0
21.1 Description
Chip Identifier (CHIPID) registers are used to recognize the device and its revision. These registers provide the sizes
and types of the on-chip memories, as well as the set of embedded peripherals.
Two CHIPID registers are embedded: Chip ID Register (CHIPID_CIDR) and Chip ID Extension Register
(CHIPID_EXID). Both registers contain a hard-wired value that is read-only.
The CHIPID_CIDR register contains the following fields:
• VERSION: Identifies the revision of the silicon
• EPROC: Indicates the embedded ARM processor
• NVPTYP and NVPSIZ: Identify the type of embedded non-volatile memory and the size
• SRAMSIZ: Indicates the size of the embedded SRAM
• ARCH: Identifies the set of embedded peripherals
• EXT: Shows the use of the extension identifier register
The CHIPID_EXID register is device-dependent and reads 0 if CHIPID_CIDR.EXT = 0.
...........continued
Chip Name CHIPID_CIDR CHIPID_EXID
(see Notes 1 and 2)
Name: CHIPID_CIDR
Offset: 0x0
Reset: -
Property: Read-only
Bit 31 30 29 28 27 26 25 24
EXT NVPTYP[2:0] ARCH[7:4]
Access R R R R R R R R
Reset
Bit 23 22 21 20 19 18 17 16
ARCH[3:0] SRAMSIZ[3:0]
Access R R R R R R R R
Reset
Bit 15 14 13 12 11 10 9 8
NVPSIZ2[3:0] NVPSIZ[3:0]
Access R R R R R R R R
Reset
Bit 7 6 5 4 3 2 1 0
EPROC[2:0] VERSION[4:0]
Access R R R R R R R R
Reset
Name: CHIPID_EXID
Offset: 0x4
Reset: -
Property: Read-only
Bit 31 30 29 28 27 26 25 24
EXID[31:24]
Access R R R R R R R R
Reset
Bit 23 22 21 20 19 18 17 16
EXID[23:16]
Access R R R R R R R R
Reset
Bit 15 14 13 12 11 10 9 8
EXID[15:8]
Access R R R R R R R R
Reset
Bit 7 6 5 4 3 2 1 0
EXID[7:0]
Access R R R R R R R R
Reset
22.1 Description
The Enhanced Embedded Flash Controller (EEFC) provides the interface of the Flash block with the 32-bit internal
bus.
Its 128-bit wide memory interface increases performance. It also manages the programming, erasing, locking and
unlocking sequences of the Flash using a full set of commands. One of the commands returns the embedded Flash
descriptor definition that informs the system about the Flash organization, thus making the software generic.
ea
Ar
e
od
C
@FBA+0x010
@FBA+0x000
Write “Stop Unique Identifier”
(Flash Command SPUI) Write “Start Unique Identifier”
(Flash Command STUI)
@FBA+0x3FF
a
A re
er
ifi
t
en
Id
e
qu
@FBA+0x010
ni
U
Page (m-1)
ARM Request
(32-bit)
@0 @+4 @ +8 @+12 @+16 @+20 @+24 @+28 @+32
anticipation of @16-31
Data to ARM XXX Bytes 0–3 Bytes 4–7 Bytes 8–11 Bytes 12–15 Bytes 16–19 Bytes 20–23 Bytes 24–27 Bytes 28–31
Note: When FWS is equal to '0', all the accesses are performed in a single-cycle access.
Figure 22-4. Code Read Optimization for FWS = 3
Host Clock
ARM Request
(32-bit)
@+4 @+8 @+12 @+16 @+20 @+24 @+28 @+32 @+36 @+40 @+44 @+48 @+52
@0 wait 3 cycles before
128-bit data is stable anticipation of @16-31 anticipation of @32-47
@0/4/8/12 are ready
@16/20/24/28 are ready
Flash Access Bytes 0–15 Bytes 16–31 Bytes 32–47 Bytes 48–63
Data to ARM XXX 0–3 4–7 8–11 12–15 16–19 20–23 24–27 28–31 32–35 36–39 40–43 44–47 48–51
Note: When FWS is between 1 and 3, in case of sequential reads, the first access takes (FWS + 1) cycles. The
following accesses take only one cycle.
Flash Memory
128-bit words
B0 B1 B2 B3 B4 B5 B6 B7 P0 P1 P2 P3 P4 P5 P6 P7
ARM Request
(32-bit)
@Byte 0 @4 @8 @ 12 @ 16 @ 20 @ 24 @ 28 @ 32 @ 36
Data to ARM XXX Bytes 0–3 4–7 8–11 12–15 16–19 20–23 24–27 28–31 32–35
...........continued
Command Value Mnemonic
Erase Pages 0x07 EPA
Set Lock Bit 0x08 SLB
Clear Lock Bit 0x09 CLB
Get Lock Bit 0x0A GLB
Set GPNVM Bit 0x0B SGPB
Clear GPNVM Bit 0x0C CGPB
Get GPNVM Bit 0x0D GGPB
Start Read Unique Identifier 0x0E STUI
Stop Read Unique Identifier 0x0F SPUI
Get CALIB Bit 0x10 GCALB
Erase Sector 0x11 ES
Write User Signature 0x12 WUS
Erase User Signature 0x13 EUS
Start Read User Signature 0x14 STUS
Stop Read User Signature 0x15 SPUS
To execute one of these commands, select the required command using the FCMD field in the Flash Command
register (EEFC_FCR). As soon as EEFC_FCR is written, the FRDY flag and the FVALUE field in the Flash Result
register (EEFC_FRR) are automatically cleared. Once the current command has completed, the FRDY flag is
automatically set. If an interrupt has been enabled by setting the bit EEFC_FMR.FRDY, the corresponding interrupt
line of the interrupt controller is activated (This is true for all commands except for the STUI command. The FRDY
flag is not set when the STUI command has completed).
All the commands are protected by the same keyword, which must be written in the eight highest bits of EEFC_FCR.
Writing EEFC_FCR with data that does not contain the correct key and/or with an invalid command has no effect
on the whole memory plane, but the FCMDE flag is set in the Flash Status register (EEFC_FSR). This flag is
automatically cleared by a read access to EEFC_FSR.
When the current command writes or erases a page in a locked region, the command has no effect on the whole
memory plane, but the FLOCKE flag is set in EEFC_FSR. This flag is automatically cleared by a read access to
EEFC_FSR.
No
Check if FRDY flag Set
Yes
No
Check if FRDY flag Set
Yes
Yes
Check if FLOCKE flag Set Locking region violation
No
Yes
Check if FCMDE flag Set Bad keyword violation
No
Command Successful
...........continued
Symbol Word Index Description
FL_NB_PLANE 3 Number of planes
FL_PLANE[0] 4 Number of bytes in the plane
FL_NB_LOCK 4 + FL_NB_PLANE Number of lock bits. A bit is associated with a lock region. A lock bit is
used to prevent write or erase operations in the lock region.
FL_LOCK[0] 4 + FL_NB_PLANE + 1 Number of bytes in the first lock region
When a ‘Write Page’ (WP) command is issued, the EEFC starts the programming sequence and all the bits written at
‘0’ in the latch buffer are cleared in the Flash memory array.
During programming, that is, until EEFC_FSR.FDRY rises, access to the Flash is not allowed.
CA FE CA FE FF FF FF FF
CA FE CA FE 0xX1C FF FF FF FF 0xX1C
CA FE CA FE 0xX18 FF FF FF FF 0xX18
address space
CA FE CA FE 0xX14 for FF FF FF FF 0xX14
CA FE CA FE 0xX10 Page N FF FF FF FF 0xX10
CA FE CA FE 0xX0C FF FF FF FF 0xX0C
CA FE CA FE 0xX08 FF FF FF FF 0xX08
CA FE CA FE 0xX04 FF FF FF FF 0xX04
CA FE CA FE 0xX00 FF FF FF FF 0xX00
Before programming: Unerased page in Flash array Step 1: Flash array after page erase
DE CA DE CA DE CA DE CA
DE CA DE CA 0xX1C DE CA DE CA 0xX1C
DE CA DE CA 0xX18 DE CA DE CA 0xX18
address space address space
DE CA DE CA 0xX14 for DE CA DE CA 0xX14 for
DE CA DE CA 0xX10 latch buffer DE CA DE CA 0xX10 Page N
DE CA DE CA 0xX0C DE CA DE CA 0xX0C
DE CA DE CA 0xX08 DE CA DE CA 0xX08
DE CA DE CA 0xX04 DE CA DE CA 0xX04
DE CA DE CA 0xX00 DE CA DE CA 0xX00
Step 2: Writing a page in the latch buffer Step 3: Page in Flash array after issuing
WP command and FRDY=1
FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF 0xX1C
FF FF FF FF FF FF FF FF 0xX18
address space
FF FF FF FF for FF FF FF FF 0xX14
FF FF FF FF Page N FF FF FF FF 0xX10
FF FF FF FF CA FE CA FE 0xX0C
FF FF FF FF CA FE CA FE 0xX08
FF FF FF FF CA FE CA FE 0xX04
FF FF FF FF CA FE CA FE 0xX00
Step 1: Flash array after page erase Step 2: Flash array after programming
128-bit at address 0xX00 (write latch buffer + WP)
32 bits wide
FF FF FF FF
CA FE CA FE 0xX1C
CA FE CA FE 0xX18
CA FE CA FE 0xX14
CA FE CA FE 0xX10
CA FE CA FE 0xX0C
CA FE CA FE 0xX08
CA FE CA FE 0xX04
CA FE CA FE 0xX00
FF FF FF FF 0xX1C FF FF FF FF 0xX1C
FF FF FF FF 0xX18 FF FF FF FF 0xX18
4 x 32 bits
FF FF FF FF 0xX14 FF FF FF FF 0xX14
FF FF FF FF 0xX10 FF FF FF FF 0xX10
FF FF FF FF 0xX0C CA FE FF FF 0xX0C
FF FF FF FF 0xX08 FF FF CA FE 0xX08
4 x 32 bits
CA FE CA FE 0xX04 FF FF FF FF 0xX04
CA FE CA FE 0xX00 FF FF FF FF 0xX00
Case 1: 2 x 32 bits modified, not crossing 128-bit boundary Case 2: 2 x 32 bits modified, not crossing 128-bit boundary
User programs WP, Flash Controller sends Write Word User programs WP, Flash Controller sends Write Word
=> Only 1 word programmed => programming period reduced => Only 1 word programmed => programming period reduced
FF FF FF FF 0xX1C FF FF FF FF 0xX1C
FF FF FF FF 0xX18 FF FF FF FF 0xX18
4 x 32 bits
CA FE CA FE 0xX14 FF FF FF FF 0xX14
CA FE CA FE 0xX10 FF FF FF FF 0xX10
CA FE CA FE 0xX0C
0xX0C CA FE CA FE
CA FE CA FE 0xX08 CA FE CA FE 0xX08
4 x 32 bits
FF FF FF FF 0xX04 CA FE CA FE 0xX04
FF FF FF FF 0xX00 CA FE CA FE 0xX00
Case 3: 4 x 32 bits modified across 128-bit boundary Case 4: 4 x 32 bits modified, not crossing 128-bit boundary
User programs WP, Flash Controller sends WP User programs WP, Flash Controller sends Write Word
=> Whole page programmed => Only 1 word programmed => programming period reduced
FF FF FF FF FF FF FF FF
FF FF FF FF 0xX1C xx xx xx xx 0xX1C
4 x 32 bits = FF FF FF FF 0xX18 xx xx xx xx 0xX18
address space
1 Flash word FF FF FF FF 0xX14 xx xx xx xx 0xX14
for
FF FF FF FF 0xX10 Page N xx xx xx 55 0xX10
xx xx xx xx 0xX0C xx xx xx xx 0xX0C
4 x 32 bits = xx xx xx xx 0xX08 xx xx xx xx 0xX08
1 Flash word
xx xx xx xx 0xX04 xx xx xx xx 0xX04
xx xx xx AA 0xX00 xx xx xx AA 0xX00
Step 1: Flash array after programming first byte (0xAA) Step 2: Flash array after programming second byte (0x55)
128-bit used at address 0xX00 (write latch buffer + WP) 128-bit used at address 0xX10 (write latch buffer + WP)
Note: The byte location shown here is for example only, it can be any byte location within a 64-bit word
Note: If one sub-sector is locked within the first sector, the Erase Sector (ES) command cannot be processed on
non-locked sub-sectors of the first sector. All the lock bits of the first sector must be cleared prior to issuing an ES
command on the first sector. After the ES command has been issued, the first sector lock bits must be reverted to the
state before clearing them.
If the processor is fetching code from the Flash memory while the EPA or ES command is being executed, the
processor accesses are stalled until the EPA command is completed. To avoid stalling the processor, the code can be
run out of internal SRAM.
The following are the erase sequence:
1. Erase starts immediately one of the erase commands and the FARG field are written in EEFC_FCR.
For the EPA command, the two lowest bits of the FARG field define the number of pages to be erased
(FARG[1:0]), see table below.
Table 22-3. EEFC_FCR.FARG Field for EPA Command
...........continued
FARG[1:0] Number of pages to be erased with EPA command
3 32 pages (not valid for small 8-KB sectors)
2. When erasing is completed, the EEFC_FSR.FRDY bit rises. If an interrupt has been enabled by setting the
EEFC_FMR.FRDY bit, the interrupt line of the interrupt controller is activated.
Three errors can be detected in EEFC_FSR after an erasing sequence:
• Command Error: A bad keyword has been written in EEFC_FCR.
• Lock Error: At least one page to be erased belongs to a locked region. The erase command has been refused,
no page has been erased. A command must be run previously to unlock the corresponding region.
• Flash Error: At the end of the erase period, the EraseVerify test of the Flash memory has failed. After a first
programming pulse, a Verify is applied. The memory is read, to compare both programmed and expected
values. If that comparison fails, a second programming pulse is applied, and so on, until a maximum pulse
number is reached. At this time, if the memory is still not containing what is expected, the FLERR flag is set
high.
1. Execute the ‘Get Lock Bit’ command by writing EEFC_FCR.FCMD with the GLB command. Field
EEFC_FCR.FARG is meaningless.
2. Lock bits can be read by the software application in EEFC_FRR. The first word read corresponds to the 32
first lock bits, next reads providing the next 32 lock bits as long as it is meaningful. Extra reads to EEFC_FRR
return 0.
For example, if the third bit of the first word read in EEFC_FRR is set, the third lock region is locked.
Two errors can be detected in EEFC_FSR after a programming sequence:
• Command Error: A bad keyword has been written in EEFC_FCR.
• Flash Error: At the end of the programming, the EraseVerify or WriteVerify test of the Flash memory has failed.
After a first programming pulse, a Verify is applied. The memory is read, to compare both programmed and
expected values. If that comparison fails, a second programming pulse is applied, and so on, until a maximum
pulse number is reached. At this time, if the memory is still not containing what is expected, the FLERR flag is
set high.
Note: Access to the Flash in read is permitted when a ‘Set Lock Bit’, ‘Clear Lock Bit’ or ‘Get Lock Bit’ command
is executed.
The status of GPNVM bits can be returned by the EEFC. The sequence is the following:
1. Execute the ‘Get GPNVM Bit’ command by writing EEFC_FCR.FCMD with the GGPB command. Field
EEFC_FCR.FARG is meaningless.
2. GPNVM bits can be read by the software application in EEFC_FRR. The first word read corresponds to the 32
first GPNVM bits, following reads provide the next 32 GPNVM bits as long as it is meaningful. Extra reads to
EEFC_FRR return 0.
For example, if the third bit of the first word read in EEFC_FRR is set, the third GPNVM bit is active.
One error can be detected in EEFC_FSR after a programming sequence:
• Command Error: A bad keyword has been written in EEFC_FCR.
Note: Access to the Flash in read is permitted when a ‘Set GPNVM Bit’, ‘Clear GPNVM Bit’ or ‘Get GPNVM Bit’
command is executed.
Related Links
11. Memories
addresses of the memory plane for code, but the unique identifier area is physically different from the memory
plane for code.
3. To stop reading the unique identifier area, execute the ‘Stop Read Unique Identifier’ command by writing
EEFC_FCR.FCMD with the SPUI command. Field EEFC_FCR.FARG is meaningless.
4. When the SPUI command has been executed, the bit EEFC_FSR.FRDY rises. If an interrupt was enabled by
setting the bit EEFC_FMR.FRDY, the interrupt line of the interrupt controller is activated.
Note: During the sequence, the software cannot be fetched from the Flash.
7:0 FRDY
15:8 FWS[3:0]
0x00 EEFC_FMR
23:16 SCOD
31:24 CLOE
7:0 FCMD[7:0]
15:8 FARG[7:0]
0x04 EEFC_FCR
23:16 FARG[15:8]
31:24 FKEY[7:0]
7:0 FLERR FLOCKE FCMDE FRDY
15:8
0x08 EEFC_FSR
23:16 MECCEMSB UECCEMSB MECCELSB UECCELSB
31:24
7:0 FVALUE[7:0]
15:8 FVALUE[15:8]
0x0C EEFC_FRR
23:16 FVALUE[23:16]
31:24 FVALUE[31:24]
0x10
... Reserved
0xE3
7:0 WPEN
15:8 WPKEY[7:0]
0xE4 EEFC_WPMR
23:16 WPKEY[15:8]
31:24 WPKEY[23:16]
Name: EEFC_FMR
Offset: 0x00
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the “EEFC Write Protection Mode Register” .
Bit 31 30 29 28 27 26 25 24
CLOE
Access R/W
Reset
Bit 23 22 21 20 19 18 17 16
SCOD
Access R/W
Reset
Bit 15 14 13 12 11 10 9 8
FWS[3:0]
Access R/W R/W R/W R/W
Reset
Bit 7 6 5 4 3 2 1 0
FRDY
Access R/W
Reset
Name: EEFC_FCR
Offset: 0x04
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
FKEY[7:0]
Access W W W W W W W W
Reset – – – – – – – –
Bit 23 22 21 20 19 18 17 16
FARG[15:8]
Access W W W W W W W W
Reset – – – – – – – –
Bit 15 14 13 12 11 10 9 8
FARG[7:0]
Access W W W W W W W W
Reset – – – – – – – –
Bit 7 6 5 4 3 2 1 0
FCMD[7:0]
Access W W W W W W W W
Reset – – – – – – – –
WP, WPL, EWP, Programming FARG must be written with the page number to be programmed
EWPL commands
SLB, CLB Lock bit commands FARG defines the page number to be locked or unlocked
SGPB, CGPB GPNVM commands FARG defines the GPNVM number to be programmed
Name: EEFC_FSR
Offset: 0x08
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
MECCEMSB UECCEMSB MECCELSB UECCELSB
Access R R R R
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
FLERR FLOCKE FCMDE FRDY
Access R R R R
Reset
Bit 19 – MECCEMSB Multiple ECC Error on MSB Part of the Memory Flash Data Bus (cleared on read)
Value Description
0 No multiple error detected on 64 MSB part of the Flash memory data bus since the last read of
EEFC_FSR.
1 Multiple errors detected and NOT corrected on 64 MSB part of the Flash memory data bus since the
last read of EEFC_FSR.
Bit 18 – UECCEMSB Unique ECC Error on MSB Part of the Memory Flash Data Bus (cleared on read)
Value Description
0 No unique error detected on 64 MSB data bus of the Flash memory since the last read of EEFC_FSR.
1 One unique error detected but corrected on 64 MSB data bus of the Flash memory since the last read
of EEFC_FSR.
Bit 17 – MECCELSB Multiple ECC Error on LSB Part of the Memory Flash Data Bus (cleared on read)
Value Description
0 No multiple error detected on 64 LSB part of the Flash memory data bus since the last read of
EEFC_FSR.
1 Multiple errors detected and NOT corrected on 64 LSB part of the Flash memory data bus since the
last read of EEFC_FSR.
Bit 16 – UECCELSB Unique ECC Error on LSB Part of the Memory Flash Data Bus (cleared on read)
Value Description
0 No unique error detected on 64 LSB data bus of the Flash memory since the last read of EEFC_FSR.
1 One unique error detected but corrected on 64 LSB data bus of the Flash memory since the last read
of EEFC_FSR.
Value Description
1 A Flash memory error occurred at the end of programming (EraseVerify or WriteVerify test has failed).
Name: EEFC_FRR
Offset: 0x0C
Property: Read-only
Bit 31 30 29 28 27 26 25 24
FVALUE[31:24]
Access R R R R R R R R
Reset
Bit 23 22 21 20 19 18 17 16
FVALUE[23:16]
Access R R R R R R R R
Reset
Bit 15 14 13 12 11 10 9 8
FVALUE[15:8]
Access R R R R R R R R
Reset
Bit 7 6 5 4 3 2 1 0
FVALUE[7:0]
Access R R R R R R R R
Reset
Name: EEFC_WPMR
Offset: 0xE4
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
WPKEY[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset
Bit 23 22 21 20 19 18 17 16
WPKEY[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset
Bit 15 14 13 12 11 10 9 8
WPKEY[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset
Bit 7 6 5 4 3 2 1 0
WPEN
Access R/W
Reset
23.1 Description
The Supply Controller (SUPC) controls the supply voltages of the system and manages the Backup mode. In this
mode, current consumption is reduced to a few microamps for backup power retention. Exit from this mode is
possible on multiple wakeup sources. The SUPC also generates the slow clock by selecting either the slow RC
oscillator or the 32.768 kHz crystal oscillator.
Supply Controller
supc_irq
Power-On Reset por_core_out
Interrupt
VDDCORE Controller
BODDIS BODRSTEN
bod_out
Brown-Out
Detector SMRSTEN vddcore_nreset
VDDCORE SMIEN
Reset
Supply Controller
SMSMPL SMTH
Monitor
Controller
Programmable
Supply Monitor
VDDIO sm_out
NRST
proc_nreset
periph_nreset
Zero-Power ice_nreset
por_io_out
Power-On Reset
VDDIO
SLCK
XTALSEL
OSCBYPASS
Slow SLCK
XIN32 Real-Time
32.768 kHz Clock Timer
Crystal Oscillator
XOUT32 Controller
Slow RC Oscillator
sm_out rtt_alarm
SMEN RTTEN
WKUP0-WKUP13 Real-Time
LPDBC Wakeup rtc_alarm Clock
LPDBCEN0 Controller
LPDBCEN1 RTCEN
RTCOUT0
LPDBCCLR
RTCOUT1
WKUPEN0..15
WKUPT0..15 clear
WKUPDBC General-Purpose
Backup
Backup Registers
BKUPRETON Mode
Backup
VDDIO Power Switch 1 SRAM
Backup Area
ONREG VROFF
0
VDDCORE
VDDIN
wake_up
VDDOUT
23.4.1 Overview
The device is divided into two power supply areas:
• VDDIO power supply: includes the Supply Controller, part of the Reset Controller, the slow clock switch, the
general-purpose backup registers, the supply monitor and the clock which includes the Real-time Timer and the
Real-time Clock.
• Core power supply: includes part of the Reset Controller, the Brownout Detector, the processor, the SRAM
memory, the Flash memory and the peripherals.
The Supply Controller (SUPC) controls the supply voltage of the core power supply. The SUPC intervenes when the
VDDIO power supply rises (when the system is starting) or when Backup mode is entered.
The SUPC also integrates the slow clock generator, which is based on a 32.768 kHz crystal oscillator, and a slow
RC oscillator. The slow clock defaults to the slow RC oscillator, but the software can enable the 32.768 kHz crystal
oscillator and select it as the slow clock source.
The SUPC and the VDDIO power supply have a reset circuitry based on a zero-power power-on reset cell. The
zero-power power-on reset allows the SUPC to start correctly as soon as the VDDIO voltage becomes valid.
At startup of the system, once the backup voltage VDDIO is valid and the slow RC oscillator is stabilized, the SUPC
starts up the core by sequentially enabling the internal voltage regulator. The SUPC waits until the core voltage
VDDCORE is valid, then releases the reset signal of the core vddcore_nreset signal.
Once the system has started, the user should program a supply monitor and/or a brownout detector. If the
supply monitor detects a voltage level on VDDIO that is too low, the SUPC asserts the reset signal of the core
vddcore_nreset signal until VDDIO is valid. Likewise, if the brownout detector detects a core voltage level VDDCORE
that is too low, the SUPC asserts the reset signal vddcore_nreset until VDDCORE is valid.
When Backup mode is entered, the SUPC sequentially asserts the reset signal of the core power supply
vddcore_nreset and disables the voltage regulator, in order to supply only the VDDIO power supply. Current
consumption is reduced to a few microamps for the backup part retention. Exit from this mode is possible on multiple
wakeup sources including an event on WKUP pins, or a clock alarm. To exit this mode, the SUPC operates in the
same way as system startup.
The user can also set the 32.768 kHz crystal oscillator in Bypass mode instead of connecting a crystal. In this case,
the user has to provide the external clock signal on XIN32. The input characteristics of the XIN32 pin are given in
the section “Electrical Characteristics”. To enter Bypass mode, the OSCBYPASS bit in the Mode register (SUPC_MR)
must be set before setting XTALSEL.
Related Links
57. Electrical Characteristics for SAM V70/V71
58. Electrical Characteristics for SAM E70/S70
VDDIO
Main Supply
ADC, DAC
Analog Comp.
VDDIN
VDDOUT Voltage
Regulator
VDDCORE Supply VDDCORE
VDDPLL
VDDUTMIC
Note: Restrictions
With main supply < 3.0V, USB is not usable.
With main supply < 2.7V, MediaLB is not usable.
With main supply < 2.0V, ADC, DAC and Analog comparator are not usable.
With main supply and VDDIN > 3V, all peripherals are usable.
When no separate backup supply for VDDIO is used, since the external voltage applied on VDDIO is kept, all of the
I/O configurations (i.e., WKUP pin configuration) are maintained in Backup mode. When not using backup batteries,
VDDIORDY is set so the user does not need to program it.
Figure 23-3. No Separate Backup Supply Powering Scheme
VDDUTMII
USB
Transceivers
VDDIO
Main Supply
ADC, DAC
Analog Comp.
VDDIN
VDDOUT
Voltage
Regulator
VDDCORE
VDDPLL
VDDUTMIC
Note: Restrictions
with main supply < 2.0 V, USB and ADC/DAC and analog comparator are not usable.
With main supply > 2.0V and < 3V, USB is not usable.
With main supply < 2.7V, MediaLB is not usable.
With main supply > 3V, all peripherals are usable.
The following figure illustrates an example of the powering scheme when using a backup battery. Since the PIO state
is preserved when in Backup mode, any free PIO line can be used to switch off the external regulator by driving the
PIO line at low level (PIO is input, pull-up enabled after backup reset). System wakeup can be performed using a
wakeup pin (WKUPx). See the "Wakeup Sources" section for further details.
VDDIO
Backup
Battery +
ADC, DAC
- Analog Comp.
VDDIN
VDDPLL
VDDUTMIC
PIOx (Output)
Note: The two diodes provide a “switchover circuit” between the backup battery
and the main supply when the system is put in Backup mode.
3.3 V
Threshold
0V
Read SUPC_SR
Related Links
57. Electrical Characteristics for SAM V70/V71
58. Electrical Characteristics for SAM E70/S70
Zero-Power POR
Backup Power Supply
Zero-Power Power-On
Reset Cell output
22 - 42 kHz Slow RC
Oscillator output
vr_on
Fast RC
Oscillator output
bodcore_in
vddcore_nreset
RSTC.ERSTL
default = 2
NRST
(no ext. drive assumed)
periph_nreset
proc_nreset
Note: After “proc_nreset” rising, the core starts fetching instructions from Flash.
RTCEN
rtc_alarm
RTTEN
rtt_alarm
Low-power LPDBC
WKUPT1
Tamper Detection RTCOUT0
Logic LPDBCS1
LPDBCEN1
Falling/Rising
Edge Detect Debouncer
WKUPT0
WKUPEN0 WKUPIS0
Falling/Rising WKUPDBC
WKUP0
Edge Detect
SLCK WKUPS
WKUPT1 WKUPEN1 WKUPIS1
Debouncer
WKUPT13 LPDBCCLR
WKUPEN13 WKUPIS13
Falling/Rising
WKUP13 Edge Detect
If an enabled WKUP pin is asserted for a duration longer than the debouncing period, a wakeup of the core power
supply is started and the signals, WKUP0 to WKUPx as shown in “Wakeup Sources”, are latched in SUPC_SR.
This allows the user to identify the source of the wakeup. However, if a new wakeup condition occurs, the primary
information is lost. No new wakeup can be detected since the primary wakeup condition has disappeared.
Before instructing the system to enter Backup mode, if the field SUPC_WUMR.WKUPDBC > 0, it must be checked
that none of the WKUPx pins that are enabled for a wakeup (exit from Backup mode) holds an active polarity. This is
checked by reading the pin status in the PIO Controller. If SUPC_WUIR.WKUPENx=1 and the pin WKUPx holds an
active polarity, the system must not be instructed to enter Backup mode.
Figure 23-8. Entering and Exiting Backup Mode with a WKUP Pin
WKUPDBC > 0
WKUPTx=0
WKUPx Edge detect + Edge detect +
debounce time debounce time
VROFF=1 VROFF=1
MCU
RTCOUTx
Pull-up
Resistor
WKUP0
Pull-up
Resistor
GND WKUP1
GND
GND
Figure 23-10. Low-power Debouncer (Push-to-Break Switch, Pull-down Resistors)
MCU
RTCOUTx
WKUP0
WKUP1
Pull-down
Resistors GND
GND GND
The debouncing period duration is configurable. The period is set for all debouncers (i.e., the duration cannot be
adjusted for each debouncer). The number of successive identical samples to wake up the system can be configured
from 2 up to 8 in SUPC_WUMR.LPDBC. The period of time between two samples can be configured by programming
RTC_MR.TPERIOD. Power parameters can be adjusted by modifying the period of time in RTC_MR.THIGH.
The wakeup polarity of the inputs can be independently configured by writing SUPC_WUMR.WKUPT0 and/ or
SUPC_WUMR.WKUPT1.
In order to determine which wakeup/tamper pin triggers the system wakeup, a status flag is associated for each
low-power debouncer. These flags are read in SUPC_SR.
A debounce event (tamper detection) can perform an immediate clear (0 delay) on the first half the general-purpose
backup registers (GPBR). SUPC_WUMR.LPDBCCLR bit must be set.
Note that it is not mandatory to use the RTCOUTx pin when using the WKUP0/WKUP1 pins as tampering inputs
in any mode. Using the RTCOUTx pin provides a “sampling mode” to further reduce the power consumption
of the tamper detection circuitry. If RTCOUTx is not used, the RTC must be configured to create an internal
sampling point for the debouncer logic. The period of time between two samples can be configured by programming
RTC_MR.TPERIOD.
The following figure illustrates the use of WKUPx without the RTCOUTx pin.
MCU
Pull-up
Resistor
WKUP0
Pull-up
Resistor
GND WKUP1
GND
GND
Related Links
27. Real-time Clock (RTC)
Notes:
1. See the section "Reset Controller (RSTC)".
2. See the section "Real Time Timer (RTT)".
3. See the section "Real Time Clock (RTC)".
4. See the section "General Purpose Backup Registers (GPBR)".
Name: SUPC_CR
Offset: 0x00
Property: Write-only
Bit 31 30 29 28 27 26 25 24
KEY[7:0]
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
XTALSEL VROFF
Access W W
Reset
Name: SUPC_SMMR
Offset: 0x04
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
SMIEN SMRSTEN SMSMPL[2:0]
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SMTH[3:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Name: SUPC_MR
Offset: 0x08
Reset: 0x00005A00
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
KEY[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
OSCBYPASS BKUPRETON
Access R/W R/W
Reset 0 0
Bit 15 14 13 12 11 10 9 8
ONREG BODDIS BODRSTEN
Access R/W R/W R/W
Reset 1 0 1
Bit 7 6 5 4 3 2 1 0
Access
Reset
Value Description
1 (DISABLE): The core brownout detector is disabled.
Name: SUPC_WUMR
Offset: 0x0C
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
LPDBC[2:0]
Access R/W R/W R/W
Reset 0 0 0
Bit 15 14 13 12 11 10 9 8
WKUPDBC[2:0]
Access R/W R/W R/W
Reset 0 0 0
Bit 7 6 5 4 3 2 1 0
LPDBCCLR LPDBCEN1 LPDBCEN0 RTCEN RTTEN SMEN
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: SUPC_WUIR
Offset: 0x10
Reset: 0x00000000
Property: Read/Write
This register is located in the VDDIO domain. This register can only be written if the WPEN bit is cleared in the
System Controller Write Protection Mode Register (SYSC_WPMR).
Bit 31 30 29 28 27 26 25 24
WKUPT[13:8]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WKUPT[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 –
Bit 15 14 13 12 11 10 9 8
WKUPEN[13:8]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WKUPEN[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 –
Name: SUPC_SR
Offset: 0x14
Reset: 0x00000000
Property: Read-only
Note: Because of the asynchronism between the Slow Clock (SLCK) and the System Clock (MCK), the status
register flag reset is taken into account only 2 slow clock cycles after the read of the SUPC_SR.
This register is located in the VDDIO domain.
Bit 31 30 29 28 27 26 25 24
WKUPIS[13:8]
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WKUPIS[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
LPDBCS1 LPDBCS0
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
OSCSEL SMOS SMS SMRSTS BODRSTS SMWS WKUPS
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Name: SYSC_WPMR
Offset: 0xD4
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
WPKEY[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WPKEY[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPKEY[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPEN
Access R?W
Reset 0
24.1 Description
The Watchdog Timer (WDT) is used to prevent system lock-up if the software becomes trapped in a deadlock. It
features a 12-bit down counter that allows a watchdog period of up to 16 seconds (slow clock around 32 kHz). It can
generate a general reset or a processor reset only. In addition, it can be stopped while the processor is in Debug
mode or Sleep mode (Idle mode).
write WDT_MR
WDT_MR
WDV
WDT_CR
WDRSTT reload
1 0
12-bit Down
Counter
WDT_MR
reload
WDD Current
1/128 SLCK
Value
<= WDD
WDT_MR
WDRSTEN
=0
wdt_fault
(to Reset Controller)
set
WDUNF wdt_int
set reset
WDERR
read WDT_SR reset WDFIEN
or
reset WDT_MR
if WDRSTEN is 1
FFF
Forbidden
Window
WDD
Permitted
Window
WDT_CR.WDRSTT=1
Watchdog
Fault
7:0 WDRSTT
15:8
0x00 WDT_CR
23:16
31:24 KEY[7:0]
7:0 WDV[7:0]
15:8 WDDIS WDRSTEN WDFIEN WDV[11:8]
0x04 WDT_MR
23:16 WDD[7:0]
31:24 WDIDLEHLT WDDBGHLT WDD[11:8]
7:0 WDERR WDUNF
15:8
0x08 WDT_SR
23:16
31:24
Name: WDT_CR
Offset: 0x00
Reset: –
Property: Write-only
The WDT_CR register values must not be modified within three slow clock periods following a restart of the watchdog
performed by a write access in WDT_CR. Any modification will cause the watchdog to trigger an end of period earlier
than expected.
Bit 31 30 29 28 27 26 25 24
KEY[7:0]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 –
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
WDRSTT
Access W
Reset –
Name: WDT_MR
Offset: 0x04
Reset: 0x3FFF2FFF
Property: Read/Write Once
The first write access prevents any further modification of the value of this register. Read accesses remain possible.
The WDT_MR register values must not be modified within three slow clock periods following a restart of the
watchdog performed by a write access in WDT_CR. Any modification will cause the watchdog to trigger an end
of period earlier than expected.
Bit 31 30 29 28 27 26 25 24
WDIDLEHLT WDDBGHLT WDD[11:8]
Access R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1
Bit 23 22 21 20 19 18 17 16
WDD[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8
WDDIS WDRSTEN WDFIEN WDV[11:8]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 1 0 1 1 1 1
Bit 7 6 5 4 3 2 1 0
WDV[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Value Description
1 A watchdog fault (underflow or error) triggers a watchdog reset.
Name: WDT_SR
Offset: 0x08
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
WDERR WDUNF
Access R R
Reset 0 0
25.1 Description
The Reinforced Safety Watchdog Timer (RSWDT) works in parallel with the Watchdog Timer (WDT) to reinforce safe
watchdog operations.
The RSWDT can be used to reinforce the safety level provided by the WDT in order to prevent system lock-up if
the software becomes trapped in a deadlock. The RSWDT works in a fully operable mode, independent of the WDT.
The RSWDT clock source is automatically selected from either the Slow RC oscillator clock, or from the Main RC
oscillator divided clock to get an equivalent Slow RC oscillator clock. If the WDT clock source (for example, the 32
kHz crystal oscillator) fails, the system lock-up is no longer monitored by the WDT because the RSWDT performs the
monitoring. Thus, there is no lack of safety regardless of the external operating conditions. The RSWDT shares the
same features as the WDT (i.e., a 12-bit down counter that allows a watchdog period of up to 16 seconds with slow
clock at 32.768 kHz). It can generate a general reset or a processor reset only. In addition, it can be stopped while
the processor is in Debug mode or Idle mode.
WDV
divider
RSWDT_CR
reload
WDRSTT 1 0 Automatic selection
[CKGR_MOR.MOSCRCEN = 0
and
(WDT_MR.WDDIS
or
SUPC_MR.XTALSEL = 1)]
12-bit Down
Counter
reload 0
Current
Value 1/128
1 slow RC clock
RSWDT_MR
WDRSTEN
= 0
rswdt_fault
(to Reset Controller)
(ORed with wdt_fault)
set
WDUNF rswdt_int
reset
WDFIEN
read RSWDT_SR
or RSWDT_MR
reset
In normal operation, the user reloads the watchdog at regular intervals before the timer underflow occurs, by setting
the RSWDT_CR.WDRSTT bit. The watchdog counter is then immediately reloaded from the RSWDT_MR and
restarted, and the slow clock 128 divider is reset and restarted. The RSWDT_CR is write-protected. As a result,
writing the RSWDT_CR without the correct hard-coded key has no effect. If an underflow does occur, the “wdt_fault”
signal to the Reset Controller is asserted if the RSWDT_MR.WDRSTEN is set. Moreover, Watchdog Underflow
(WDUNF) is set in the Status Register (RSWDT_SR).
The status bits WDUNF and WDERR trigger an interrupt, provided the WDFIEN bit is set in the RSWDT_MR. The
signal “wdt_fault” to the Reset Controller causes a Watchdog reset if the WDRSTEN bit. For additional information,
refer to the section “Reset Controller (RSTC)”. In this case, the processor and the RSWDT are reset, and the
WDUNF and WDERR flags are reset.
If a reset is generated or if the RSWDT_SR is read, the status bits are reset, the interrupt is cleared, and the
“wdt_fault” signal to the reset controller is deasserted
Writing the RSWDT_MR reloads and restarts the down counter.
The the RSWDT is disabled after any power-on sequence.
While the processor is in Debug state or in Idle mode, the counter may be stopped depending on the value
programmed for the WDIDLEHLT and WDDBGHLT bits in the RSWDT_MR.
if WDRSTEN is 1
0xFFF
RSWDT_CR.WDRSTT = 1
Watchdog
Fault
Related Links
26. Reset Controller (RSTC)
7:0 WDRSTT
15:8
0x00 RSWDT_CR
23:16
31:24 KEY[7:0]
7:0 WDV[7:0]
15:8 WDDIS WDRSTEN WDFIEN WDV[11:8]
0x04 RSWDT_MR
23:16 ALLONES[7:0]
31:24 WDIDLEHLT WDDBGHLT ALLONES[11:8]
7:0 WDUNF
15:8
0x08 RSWDT_SR
23:16
31:24
Name: RSWDT_CR
Offset: 0x00
Property: Write-only
Bit 31 30 29 28 27 26 25 24
KEY[7:0]
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
WDRSTT
Access W
Reset
Name: RSWDT_MR
Offset: 0x04
Reset: 0x3FFFAFFF
Property: Read/Write Once
Note: The first write access prevents any further modification of the value of this register; read accesses remain
possible. The WDV value must not be modified within three slow clock periods following a restart of the watchdog
performed by means of a write access in the RSWDT_CR, else the watchdog may trigger an end of period earlier
than expected.
Bit 31 30 29 28 27 26 25 24
WDIDLEHLT WDDBGHLT ALLONES[11:8]
Access
Reset 1 1 1 1 1 1
Bit 23 22 21 20 19 18 17 16
ALLONES[7:0]
Access
Reset 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8
WDDIS WDRSTEN WDFIEN WDV[11:8]
Access
Reset 1 1 0 1 1 1 1
Bit 7 6 5 4 3 2 1 0
WDV[7:0]
Access
Reset 1 1 1 1 1 1 1 1
Value Description
1 A Watchdog fault (underflow or error) asserts interrupt.
Name: RSWDT_SR
Offset: 0x08
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
WDUNF
Access R
Reset 0
26.1 Description
The Reset Controller (RSTC), driven by Power-On Reset (POR) cells, software, external reset pin and peripheral
events, handles all the resets of the system without any external components. It reports which reset occurred last.
The RSTC also drives simultaneously the external reset and the peripheral and processor resets.
From wd_fault
watchdog
SLCK
26.4.1 Overview
The RSTC is made up of an NRST manager and a reset state manager. It runs at SLCK frequency and generates the
following reset signals:
• proc_nreset: Processor reset line (also resets the Watchdog Timer)
• periph_nreset: Affects the whole set of embedded peripherals
• nrst_out: Drives the NRST pin
Note: proc_nreset and periph_nreset are driven in the same way.
These reset signals are asserted by the RSTC, either on events generated by peripherals, events on the NRST pin,
or on a software action. The reset state manager controls the generation of reset signals and provides a signal to the
NRST manager when an assertion of the NRST pin is required.
The NRST manager shapes the NRST assertion during a programmable time, thus controlling external device resets.
The RSTC Mode register (RSTC_MR), used to configure the RSTC, is powered with VDDIO, so that its configuration
is saved as long as VDDIO is on.
URSTS
RSTC
NRSTL RSTC_MR Other Interrupt line
interrupt
URSTEN
sources
user_reset
NRST RSTC_MR
ERSTL
nrst_out
External Reset Timer exter_nreset
This feature allows the RSTC to shape the NRST pin level, and thus to guarantee that the NRST line is driven low for
a time compliant with potential external devices connected on the system reset.
RSTC_MR is backed up, making it possible to use the value of ERSTL to shape the system powerup reset for
devices requiring a longer startup time than that of the MCU.
When WDT_MR.WDRSTEN is written to ‘0’, the watchdog fault has no impact on the RSTC.
After a watchdog overflow occurs, the report on the RSTC_SR.RSTTYP may differ (either WDT_RST or USER_RST)
depending on the external components driving the NRST pin. For example, if the NRST line is driven through a
resistor and a capacitor (NRST pin debouncer), the reported value is USER_RST if the low to high transition is
greater than one SLCK cycle.
Figure 26-4. Watchdog Reset Timing Diagram
SLCK
WDT Fault
Main RC
Oscillator
Any Any
MCK Frequency. Frequency.
Processor and
Peripherals Inactive Active Inactive
Reset Line
Min = 2 SLCK cycles if ERSTL=0 (e.g. 8 if ERSTL=2)
SLCK
Up to 1 SLCK cycle
Write RSTC_CR
Main RC
Oscillator
Any Any
MCK Frequency. Frequency.
Processor and
Peripherals Inactive Active Inactive
Reset Line
Min = 2 SLCK cycles if ERSTL=0 (e.g. 8 if ERSTL=2)
NRST
(nrst_out) Inactive Active Inactive
if EXTRST=1
RSTC_SR.SRCMP
SLCK
2 SLCK cycles
NRST pin
Main RC
Oscillator
Any Any
MCK Frequency. Frequency.
Name: RSTC_CR
Offset: 0x00
Property: Write-only
Bit 31 30 29 28 27 26 25 24
KEY[7:0]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 –
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
EXTRST PROCRST
Access W W
Reset – –
Name: RSTC_SR
Offset: 0x04
Reset: 0x00000000
Property: Read-only
The register reset value assumes that a general reset has been performed; it is subject to change if other types of
reset are generated.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
SRCMP NRSTL
Access R R
Reset 0 0
Bit 15 14 13 12 11 10 9 8
RSTTYP[2:0]
Access R R R
Reset 0 0 0
Bit 7 6 5 4 3 2 1 0
URSTS
Access R
Reset 0
Value Description
0 No high-to-low edge on NRST happened since the last read of RSTC_SR.
1 At least one high-to-low transition of NRST has been detected since the last read of RSTC_SR.
Name: RSTC_MR
Offset: 0x08
Reset: 0x00000001
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the System Controller Write Protection Mode Register
(SYSC_WPMR).
Bit 31 30 29 28 27 26 25 24
KEY[7:0]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
ERSTL[3:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
URSTIEN URSTEN
Access R/W R/W
Reset 0 1
27.1 Description
The Real-time Clock (RTC) peripheral is designed for very low power consumption. For optimal functionality, the RTC
requires an accurate external 32.768 kHz clock, which can be provided by a crystal oscillator.
It combines a complete time-of-day clock with alarm and a Gregorian or Persian calendar, complemented by a
programmable periodic interrupt. The alarm and calendar registers are accessed by a 32-bit data bus.
The time and calendar values are coded in binary-coded decimal (BCD) format. The time format can be 24-hour
mode or 12-hour mode with an AM/PM indicator.
Updating time and calendar fields and configuring the alarm fields are performed by a parallel capture on the 32-bit
data bus. An entry control is performed to avoid loading registers with incompatible BCD format data or with an
incompatible date according to the current month/year/century.
A clock divider calibration circuitry can be used to compensate for crystal oscillator frequency variations.
An RTC output can be programmed to generate several waveforms, including a prescaled clock derived from 32.768
kHz.
Entry Interrupt
System Bus User Interface Alarm RTC Interrupt
Control Control
27.4.2 Interrupt
Within the System Controller, the RTC interrupt is OR-wired with all the other module interrupts.
Only one System Controller interrupt line is connected on one of the internal sources of the interrupt controller.
RTC interrupt requires the interrupt controller to be programmed first.
When a System Controller interrupt occurs, the service routine must first determine the cause of the interrupt. This is
done by reading each status register of the System Controller peripherals successively.
27.5.2 Timing
The RTC is updated in real time at one-second intervals in Normal mode for the counters of seconds, at one-minute
intervals for the counter of minutes and so on.
Due to the asynchronous operation of the RTC with respect to the rest of the chip, to be certain that the value read
in the RTC registers (century, year, month, date, day, hours, minutes, seconds) are valid and stable, it is necessary
to read these registers twice. If the data is the same both times, then it is valid. Therefore, a minimum of two and a
maximum of three accesses are required.
27.5.3 Alarm
The RTC has five programmable fields: month, date, hours, minutes and seconds.
Each of these fields can be enabled or disabled to match the alarm condition:
• If all the fields are enabled, an alarm flag is generated (the corresponding flag is asserted and an interrupt
generated if enabled) at a given month, date, hour/minute/second.
• If only the “seconds” field is enabled, then an alarm is generated every minute.
Depending on the combination of fields enabled, a large number of possibilities are available to the user ranging from
minutes to 365/366 days.
Hour, minute and second matching alarms (SECEN, MINEN, HOUREN) can be enabled independently of SEC, MIN,
HOUR fields.
Note: To change one of the SEC, MIN, HOUR, DATE, MONTH fields, it is recommended to disable the field before
changing the value and then re-enable it after the change has been made. This requires up to three accesses to the
RTC_TIMALR or RTC_CALALR. The first access clears the enable corresponding to the field to change (SECEN,
MINEN, HOUREN, DATEEN, MTHEN). If the field is already cleared, this access is not required. The second access
performs the change of the value (SEC, MIN, HOUR, DATE, MONTH). The third access is required to re-enable the
field by writing 1 in SECEN, MINEN, HOUREn, DATEEN, MTHEN fields.
27.5.6.1 Description
The update of the time/calendar must be synchronized on a second periodic event by either polling the RTC_SR.SEC
status bit or by enabling the SECEN interrupt in the RTC_IER register.
Once the second event occurs, the user must stop the RTC by setting the corresponding field in the Control Register
(RTC_CR). Bit UPDTIM must be set to update time fields (hour, minute, second) and bit UPDCAL must be set to
update calendar fields (century, year, month, date, day).
The ACKUPD bit must then be read to 1 by either polling the RTC_SR or by enabling the ACKUPD interrupt in
the RTC_IER. Once ACKUPD is read to 1, it is mandatory to clear this flag by writing the corresponding bit in the
RTC_SCCR, after which the user can write to the Time Register, the Calendar Register, or both. Only the ACKUPD
interrupt can be enabled while updating time/calendar, all others RTC interrupts must be disabled.
Once the update is finished, the user must write UPDTIM and/or UPDCAL to 0 in the RTC_CR.
The timing sequence of the time/calendar update is described in the figure below.
When entering the programming mode of the calendar fields, the time fields remain enabled and both the time and
the calendar fields are stopped. This is due to the location of the calendar logical circuity (downstream for low-power
considerations). It is highly recommended to prepare all the fields to be updated before entering programming mode.
In successive update operations, the user must wait for at least one second after resetting the UPDTIM/UPDCAL bit
in the RTC_CR before setting these bits again. This is done by waiting for the SEC flag in the RTC_SR before setting
the UPDTIM/UPDCAL bit. After resetting UPDTIM/UPDCAL, the SEC flag must also be cleared.
Figure 27-2. Time/Calendar Update Timing Diagram
Read RTC_SR
Polling or
IRQ (if enabled)
No
ACKUPD
= 1?
Yes
End
RTC
32.768 kHz
Integrator CORRECTION, HIGHPPM
Comparator NEGPPM
Other Logic
Phase adjustment
(~4 ms) 32.768 kHz -50 ppm
-25 ppm
Internal 1 Hz clock
is adjusted
Time Time
-50 ppm correction period
User configurable period -25 ppm correction period
(integer multiple of 1s or 20s)
Crystal clock
NEGATIVE CORRECTION
1.003906 second
The inaccuracy of a crystal oscillator at typical room temperature (±20 ppm at 20–25 °C) can be compensated if a
reference clock/signal is used to measure such inaccuracy. This kind of calibration operation can be set up during the
final product manufacturing by means of measurement equipment embedding such a reference clock. The correction
of value must be programmed into the (RTC_MR), and this value is kept as long as the circuitry is powered (backup
area). Removing the backup power supply cancels this calibration. This room temperature calibration can be further
processed by means of the networking capability of the target application.
To ease the comparison of the inherent crystal accuracy with the reference clock/signal during manufacturing, an
internal prescaled 32.768 kHz clock derivative signal can be assigned to drive RTC output. To accommodate the
measure, several clock frequencies can be selected among 1 Hz, 32 Hz, 64 Hz, 512 Hz.
The clock calibration correction drives the internal RTC counters but can also be observed in the RTC output when
one of the following three frequencies 1 Hz, 32 Hz or 64 Hz is configured. The correction is not visible in the RTC
output if 512 Hz frequency is configured.
Note: This adjustment does not consider the temperature variation.
The frequency drift (up to -200 ppm) due to temperature variation can be compensated using a reference time if
the application can access such a reference. If a reference time cannot be used, a temperature sensor can be
placed close to the crystal oscillator in order to get the operating temperature of the crystal oscillator. Once obtained,
the temperature may be converted using a lookup table (describing the accuracy/temperature curve of the crystal
oscillator used) and RTC_MR configured accordingly. The calibration can be performed on-the-fly. This adjustment
method is not based on a measurement of the crystal frequency/drift and therefore can be improved by means of the
networking capability of the target application.
If no crystal frequency adjustment has been done during manufacturing, it is still possible to do it. In the case where
a reference time of the day can be obtained through LAN/WAN network, it is possible to calculate the drift of the
application crystal oscillator by comparing the values read on RTC Time Register (RTC_TIMR) and programming the
HIGHPPM and CORRECTION fields on RTC_MR according to the difference measured between the reference time
and those of RTC_TIMR.
‘0’ 0 ‘0’ 0
1 Hz 1 1 Hz 1
32 Hz 2 32 Hz 2
64 Hz 3 64 Hz 3
RTCOUT0 RTCOUT1
512 Hz 4 512 Hz 4
toggle_alarm 5 toggle_alarm 5
flag_alarm 6 flag_alarm 6
pulse 7 pulse 7
RTC_MR(OUT0) RTC_MR(OUT1)
flag_alarm
RTC_SCCR(ALRCLR) RTC_SCCR(ALRCLR)
toggle_alarm
pulse
Thigh
Tperiod Tperiod
Name: RTC_CR
Offset: 0x00
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the System Controller Write Protection Mode Register
(SYSC_WPMR).
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
CALEVSEL[1:0]
Access R/W R/W
Reset 0 0
Bit 15 14 13 12 11 10 9 8
TIMEVSEL[1:0]
Access R/W R/W
Reset 0 0
Bit 7 6 5 4 3 2 1 0
UPDCAL UPDTIM
Access R/W R/W
Reset 0 0
Value Description
0 No effect or, if UPDTIM has been previously written to 1, stops the update procedure.
1 Stops the RTC time counting.
Name: RTC_MR
Offset: 0x04
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the System Controller Write Protection Mode Register
(SYSC_WPMR).
Bit 31 30 29 28 27 26 25 24
TPERIOD[1:0] THIGH[2:0]
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
OUT1[2:0] OUT0[2:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
HIGHPPM CORRECTION[6:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NEGPPM PERSIAN HRMOD
Access R/W R/W R/W
Reset 0 0 0
Value Description
1 12-hour mode is selected.
Name: RTC_TIMR
Offset: 0x08
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
AMPM HOUR[5:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
MIN[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SEC[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Name: RTC_CALR
Offset: 0x0C
Reset: 0x01E11320
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
DATE[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 1
Bit 23 22 21 20 19 18 17 16
DAY[2:0] MONTH[4:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 0 0 0 0 1
Bit 15 14 13 12 11 10 9 8
YEAR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 1 0 0 1 1
Bit 7 6 5 4 3 2 1 0
CENT[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 1 0 0 0 0 0
Name: RTC_TIMALR
Offset: 0x10
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the System Controller Write Protection Mode Register
(SYSC_WPMR).
To change one of the SEC, MIN, HOUR fields, it is recommended to disable the field before changing the value and
then re-enable it after the change has been made. This requires up to three accesses to the RTC_TIMALR. The first
access clears the enable corresponding to the field to change (SECEN, MINEN, HOUREN). If the field is already
cleared, this access is not required. The second access performs the change of the value (SEC, MIN, HOUR). The
third access is required to re-enable the field by writing 1 in SECEN, MINEN, HOUREN fields.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
HOUREN AMPM HOUR[5:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
MINEN MIN[6:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SECEN SEC[6:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Value Description
0 The second-matching alarm is disabled.
1 The second-matching alarm is enabled.
Name: RTC_CALALR
Offset: 0x14
Reset: 0x01010000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the System Controller Write Protection Mode Register
(SYSC_WPMR).
To change one of the DATE, MONTH fields, it is recommended to disable the field before changing the value and
then re-enable it after the change has been made. This requires up to three accesses to the RTC_CALALR. The first
access clears the enable corresponding to the field to change (DATEEN, MTHEN). If the field is already cleared, this
access is not required. The second access performs the change of the value (DATE, MONTH). The third access is
required to re-enable the field by writing 1 in DATEEN, MTHEN fields.
Bit 31 30 29 28 27 26 25 24
DATEEN DATE[5:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 1
Bit 23 22 21 20 19 18 17 16
MTHEN MONTH[4:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 1
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
Access
Reset
Name: RTC_SR
Offset: 0x18
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
TDERR CALEV TIMEV SEC ALARM ACKUPD
Access R R R R R R
Reset 0 0 0 0 0 0
Name: RTC_SCCR
Offset: 0x1C
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
TDERRCLR CALCLR TIMCLR SECCLR ALRCLR ACKCLR
Access W W W W W W
Reset – – – – – –
Name: RTC_IER
Offset: 0x20
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
TDERREN CALEN TIMEN SECEN ALREN ACKEN
Access W W W W W W
Reset – – – – – –
Name: RTC_IDR
Offset: 0x24
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
TDERRDIS CALDIS TIMDIS SECDIS ALRDIS ACKDIS
Access W W W W W W
Reset – – – – – –
Name: RTC_IMR
Offset: 0x28
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
TDERR CAL TIM SEC ALR ACK
Access R R R R R R
Reset 0 0 0 0 0 0
Name: RTC_VER
Offset: 0x2C
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
NVCALALR NVTIMALR NVCAL NVTIM
Access R R R R
Reset 0 0 0 0
28.1 Description
The Real-time Timer (RTT) is built around a 32-bit counter used to count roll-over events of the programmable 16-bit
prescaler driven from the 32-kHz slow clock source. It generates a periodic interrupt and/or triggers an alarm on a
programmed value.
The RTT can also be configured to be driven by the 1Hz RTC signal, thus taking advantage of a calibrated 1Hz clock.
The slow clock source can be fully disabled to reduce power consumption when only an elapsed seconds count is
required.
RTT_MR
reload RTTINCIEN
SLCK 16-bit
Prescaler
0 set
RTT_MR RTT_SR RTTINC
RTC 1Hz
RTTRST 1 0 reset
RTT_MR
1 0 rtt_int
RTC1HZ
32-bit
Counter read
RTT_MR
RTT_SR
ALMIEN
reset
RTT_VR CRTV
RTT_SR ALMS
set
rtt_alarm
=
RTT_AR ALMV
The real-time 32-bit counter can also be supplied by the 1Hz RTC clock. This mode is interesting when the RTC
1Hz is calibrated (CORRECTION field ≠ 0 in RTC_MR) in order to guaranty the synchronism between RTC and RTT
counters.
Setting the RTC1HZ bit in the RTT_MR drives the 32-bit RTT counter from the 1Hz RTC clock. In this mode, the
RTPRES field has no effect on the 32-bit counter.
The prescaler roll-over generates an increment of the real-time timer counter if RTC1HZ = 0. Otherwise, if RTC1HZ
= 1, the RTT counter is incremented every second. The RTTINC bit is set independently from the 32-bit counter
increment.
The RTT can also be used as a free-running timer with a lower time-base. The best accuracy is achieved by writing
RTPRES to 3 in RTT_MR.
Programming RTPRES to 1 or 2 is forbidden.
If the RTT is configured to trigger an interrupt, the interrupt occurs two slow clock cycles after reading the RTT_SR.
To prevent several executions of the interrupt handler, the interrupt must be disabled in the interrupt handler and
re-enabled when the RTT_SR is cleared.
The CRTV field can be read at any time in the RTT Value register (RTT_VR). As this value can be updated
asynchronously with the Host Clock, the CRTV field must be read twice at the same value to read a correct value.
The current value of the counter is compared with the value written in the RTT Alarm register (RTT_AR). If the
counter value matches the alarm, the ALMS bit in the RTT_SR is set. The RTT_AR is set to its maximum value
(0xFFFFFFFF) after a reset.
The ALMS flag is always a source of the RTT alarm signal that may be used to exit the system from low power
modes (see the Real-time Timer Block Diagram above).
The alarm interrupt must be disabled (ALMIEN must be cleared in RTT_MR) when writing a new ALMV value in the
RTT_AR.
The RTTINC bit can be used to start a periodic interrupt, the period being one second when the RTPRES field value
= 0x8000 and the slow clock = 32.768 kHz.
The RTTINCIEN bit must be cleared prior to writing a new RTPRES value in the RTT_MR.
Reading the RTT_SR automatically clears the RTTINC and ALMS bits.
Writing the RTTRST bit in the RTT_MR immediately reloads and restarts the clock divider with the new programmed
value. This also resets the 32-bit counter.
When not used, the RTT can be disabled in order to suppress dynamic power consumption in this module. This can
be achieved by setting the RTTDIS bit in the RTT_MR.
RTPRES - 1
Prescaler
RTTINC (RTT_SR)
ALMS (RTT_SR)
APB Interface
7:0 RTPRES[7:0]
15:8 RTPRES[15:8]
0x00 RTT_MR
23:16 RTTDIS RTTRST RTTINCIEN ALMIEN
31:24 RTC1HZ
7:0 ALMV[7:0]
15:8 ALMV[15:8]
0x04 RTT_AR
23:16 ALMV[23:16]
31:24 ALMV[31:24]
7:0 CRTV[7:0]
15:8 CRTV[15:8]
0x08 RTT_VR
23:16 CRTV[23:16]
31:24 CRTV[31:24]
7:0 RTTINC ALMS
15:8
0x0C RTT_SR
23:16
31:24
Name: RTT_MR
Offset: 0x00
Reset: 0x00008000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
RTC1HZ
Access R/W
Reset 0
Bit 23 22 21 20 19 18 17 16
RTTDIS RTTRST RTTINCIEN ALMIEN
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RTPRES[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RTPRES[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: RTT_AR
Offset: 0x04
Reset: 0xFFFFFFFF
Property: Read/Write
The alarm interrupt must be disabled (ALMIEN must be cleared in RTT_MR) when writing a new ALMV value.
Bit 31 30 29 28 27 26 25 24
ALMV[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Bit 23 22 21 20 19 18 17 16
ALMV[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8
ALMV[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Bit 7 6 5 4 3 2 1 0
ALMV[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Name: RTT_VR
Offset: 0x08
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
CRTV[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CRTV[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CRTV[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CRTV[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: RTT_SR
Offset: 0x0C
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
RTTINC ALMS
Access R R
Reset 0 0
29.1 Description
The System Controller embeds 128 bits of General Purpose Backup registers organized as 8 32-bit registers.
It is possible to generate an immediate clear of the content of General Purpose Backup registers 0 to 3 (first half) if
a Low-power Debounce event is detected on one of the wakeup pins, WKUP0 or WKUP1. The content of the other
General Purpose Backup registers (second half) remains unchanged.
The Supply Controller module must be programmed accordingly. In the register SUPC_WUMR in the Supply
Controller module, LPDBCCLR, LPDBCEN0 and/or LPDBCEN1 bit must be configured to 1 and LPDBC must be
other than 0.
If a Tamper event has been detected, it is not possible to write to the General Purpose Backup registers while the
LPDBCS0 or LPDBCS1 flags are not cleared in the Supply Controller Status Register (SUPC_SR).
7:0 GPBR_VALUE[7:0]
15:8 GPBR_VALUE[15:8]
0x00 SYS_GPBRx
23:16 GPBR_VALUE[23:16]
31:24 GPBR_VALUE[31:24]
Name: SYS_GPBRx
Offset: 0x00
Reset: 0
Property: R/W
These registers are reset at first power-up and on each loss of VDDIO.
Bit 31 30 29 28 27 26 25 24
GPBR_VALUE[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
GPBR_VALUE[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
GPBR_VALUE[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
GPBR_VALUE[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
30.1 Description
The Clock Generator user interface is embedded within the Power Management Controller and is described in Power
Management Controller (PMC) User Interface. However, the Clock Generator registers are named CKGR_.
SUPC_CR.XTALSEL
Slow RC
0
Oscillator
Main RC 0
Oscillator
CKGR_MOR.MOSCXTBY
Main Clock (MAINCK)
XIN Main
Crystal 1
XOUT Oscillator
USB UTMI
UPLL Clock (UPLLCK)
PLL
Status Control
Power
Management
Controller
User Interface
Compared to the 32.768 kHz crystal oscillator, this oscillator offers a faster startup time and is less exposed to
the external environment, as it is fully integrated. However, its output frequency is subject to larger variations with
supply voltage, temperature and manufacturing process. Therefore, the user must take these variations into account
when this oscillator is used as a time base (startup counter, frequency monitor, etc.). Refer to the section “Electrical
Characteristics”.
This oscillator is disabled by clearing the SUPC_CR.XTALSEL.
Related Links
57. Electrical Characteristics for SAM V70/V71
58. Electrical Characteristics for SAM E70/S70
CKGR_MOR
MAINCK
MOSCXTEN
Main Clock
1
XIN
Main Crystal
Oscillator
XOUT
By default, SEL4/SEL8/SEL12 are cleared, so the Main RC oscillator is driven with the factory-programmed Flash
calibration bits which are programmed during chip production.
Note: These factory-programmed calibration bitfields can be read through the EEFC using the Get CALIB bit
command (GCALB).
In order to calibrate the oscillator lower frequency, SEL4 must be set to ‘1’ and a valid frequency value must be
configured in CAL4. Likewise, SEL8/12 must be set to ‘1’ and a trim value must be configured in CAL8/12 in order to
adjust the other frequencies of the oscillator.
It is possible to adjust the oscillator frequency while operating from this oscillator. For example, when running on
lowest frequency, it is possible to change the CAL4 value if SEL4 is set in PMC_OCR.
At any time, the user can measure the main RC oscillator output frequency by means of the Main Frequency Counter
(refer to "Main Frequency Counter"). Once the frequency measurement is done, the main RC oscillator calibration
field (CALx) can be adjusted accordingly to correct this oscillator output frequency.
Related Links
57. Electrical Characteristics for SAM V70/V71
58. Electrical Characteristics for SAM E70/S70
• Switch MAINCK to the Main RC oscillator and keep the Main Crystal Oscillator on
• Switch off the Main Crystal Oscillator is a third separate step
PMC_SR
Main Crystal
SLCK Oscillator Startup MOSCXTS
Counter
CKGR_MOR
MOSCRCEN
CKGR_MOR CKGR_MCFR
MOSCXTEN RCMEAS
CKGR_MOR
MOSCSEL
CKGR_MCFR
Main RC Reference MAINF
0 Clock
Oscillator
Main Frequency
Counter CKGR_MCFR
MAINFRDY
Main Crystal 1
Oscillator
CCSS
CKGR_MCFR
CKGR_PLLAR
PLLACOUNT
PMC_SR
PLLA
SLCK LOCKA
Counter
Whenever the PLL is re-enabled or one of its parameters is changed, the LOCK (LOCKA) bit in PMC_SR is
automatically cleared. The values written in the PLLCOUNT field (PLLACOUNT) in CKGR_PLLR (CKGR_PLLAR)
are loaded in the PLL counter. The PLL counter then decrements at the speed of SLCK until it reaches ‘0’. At this
time, PMC_SR.LOCK is set and can trigger an interrupt to the processor. The user has to load the number of SLCK
cycles required to cover the PLL transient time into the PLLCOUNT field.
To avoid programming the PLL with a multiplication factor that is too high, the user can saturate the multiplication
factor value sent to the PLL by setting the PLLA_MMAX field in the PLL Maximum Multiplier Value Register
(PMC_PMMR).
It is forbidden to change the MAINCK characteristics (oscillator selection, frequency adjustment of the Main RC
oscillator) when:
• MAINCK is selected as the PLLA clock source, and
• MCK is sourced from PLLA.
To change the MAINCK characteristics, the user must:
1. Switch the MCK source to MAINCK by writing a ‘1’ to PMC_MCKR.CSS.
2. Change the Main RC oscillator frequency (MOSCRCF) or oscillator selection (MOSCSEL) in CKGR_MOR.
3. Wait for MOSCRCS (if frequency changes) or MOSCSELS (if oscillator selection changes) in PMC_SR.
4. Disable and then enable the PLL.
5. Wait for the LOCK flag in PMC_SR.
6. Switch back MCK to the PLLA by writing the appropriate value to PMC_MCKR.CSS.
CKGR_UCKR
UPLLCOUNT
PMC_SR
UTMI PLL
SLCK LOCKU
Counter
31.1 Description
The Power Management Controller (PMC) optimizes power consumption by controlling all system and user
peripheral clocks. The PMC enables/disables the clock inputs to many of the peripherals and the Cortex-M7
processor.
The Supply Controller selects either the Slow RC oscillator or the 32.768 kHz crystal oscillator as the source of
SLCK. The unused oscillator is disabled automatically so that power consumption is optimized.
By default, at startup, the chip runs out of MCK using the Main RC oscillator running at 12 MHz.
Slow RC
Oscillator
0
Divider
/2 SysTick External Clock
Slow Clock (SLCK)
(PMC_SCER/SCDR)
PLLA PLLACK (to I/O pins GCLKEN(PID)
PCKx and MCK
MCK
GCLKDIV(PID)
peripherals)
PMC_MCKR CSS PRES
Divider GCLKCSS(PID)
UPLLDIV2
/1, /2
The SysTick counter may miss a number of counts if an external clock source is selected when entering the sleep
mode.
Refer to the section “Arm Cortex-M7 Processor” for details on selecting the SysTick external clock.
Related Links
15. Arm Cortex-M7
Note: USB, GMAC and MLB do not require PCKx to operate independently of core and bus peripherals.
• Peripheral clocks (periph_clk[PID]), routed to every peripheral and derived from the Host clock (MCK), and
• Generic clocks (GCLK[PID]), routed to I2SC0 and I2SC1. These clocks are independent of the core and bus
clocks (HCLK, MCK and periph_clk[PID]). They are generated by selection and division of the following sources:
SLCK, MAINCK, UPLLCKDIV, PLLACK and MCK. Refer to the description of each peripheral for the limitation to
be applied to GCLK[PID] compared to periph_clk[PID].
To configure a peripheral’s clocks, PMC_PCR.CMD must be written to ‘1’ and PMC_PCR.PID must be written with
the index of the corresponding peripheral. All other configuration fields must be correctly set.
To read the current clock configuration of a peripheral, PMC_PCR.CMD must be written to ‘0’ and PMC_PCR.PID
must be written with the index of the corresponding peripheral regardless of the values of other fields. This write does
not modify the configuration of the peripheral. The PMC_PCR can then be read to know the configuration status of
the corresponding PID.
The user can also enable and disable these clocks by configuring the Peripheral Clock Enable (PMC_PCERx) and
Peripheral Clock Disable (PMC_PCDRx) registers. The status of the peripheral clock activity can be read in the
Peripheral Clock Status registers (PMC_PCSRx).
When a peripheral or a generic clock is disabled, it is immediately stopped. These clocks are disabled after a reset.
To stop a peripheral clock, it is recommended that the system software wait until the peripheral has executed its
last programmed operation before disabling the clock. This is to avoid data corruption or erroneous behavior of the
system.
The bit number in PMC_PCERx, PMC_PCDRx, and PMC_PCSRx is the Peripheral Identifier defined at the product
level. The bit number corresponds to the interrupt source number assigned to the peripheral.
31.10.1 Description
The asynchronous partial wakeup wakes up a peripheral in a fully asynchronous way when activity is detected on
the communication line. The asynchronous partial wakeup function automatically manages the peripheral clock. It
reduces overall power consumption of the system by clocking peripherals only when needed.
Asynchronous partial wakeup can be enabled in Wait mode (SleepWalking), or in Active mode.
Only the following peripherals can be configured with asynchronous partial wakeup: UARTx and TWIHSx.
The peripheral selected for asynchronous partial wakeup must first be configured so that its clock is enabled. To do
so, write a ‘1’ to the appropriate PIDx bit in PMC_PCER registers.
peripheral_clock
peripheral
clock request
peripheral
wakeup request
The wakeup request wakes up the system
and resets the sleepwalking status of the
peripheral peripheral
sleepwalking status
peripheral_clock
Peripheral
clock request
Peripheral
wakeup request
The wakeup request resets the
Peripheral SleepWalking status of the peripheral
SleepWalking status
To instruct the device to enter Wait mode, refer to section “Power Considerations”.
A fast startup occurs upon the detection of a programmed level on one of the 14 wakeup inputs (WKUP) or upon an
active alarm from the RTC, RTT and USB Controller. The polarity of each of the 14 wakeup inputs is programmable in
the PMC Fast Startup Polarity Register (PMC_FSPR).
The duration of the WKUPx pins active level must be greater than four MAINCK cycles.
WARNING
The fast startup circuitry, as shown in the following figure, is fully asynchronous and provides a fast startup signal to
the PMC. As soon as the fast startup signal is asserted, the Main RC oscillator restarts automatically.
When entering Wait mode, the embedded Flash can be placed in one of the low-power modes (Deep-powerdown or
Standby mode) with PMC_FSMR.FLPM. FLPM can be configured at any time and its value will be applied to the next
Wait mode period.
The power consumption reduction is optimal when PMC_FSMR.FLPM is configured to ‘1’ (Deep-powerdown mode).
If the field is configured to ‘0’ (Standby mode), the power consumption is slightly higher than in Deep-powerdown
mode.
When PMC_FSMR.FLPM is configured to ‘2’, the Wait mode Flash power consumption is equivalent to that of the
Active mode when there is no read access on the Flash.
Figure 31-4. Fast Startup Circuitry
FSTT0
WKUP0
FSTP0 FSTT13
WKUP13
FSTP13
FSTT14
FSTP14 FSTT15
fast_restart
Processor
CDBGPWRUPREQ
FSTP15 RTTAL
RTT Alarm
RTCAL
RTC Alarm
USBAL
The user interface does not provide any status for fast startup. The status can be read in the PIO Controller and the
status registers of the RTC, RTTand USB Controller.
Related Links
7. Power Considerations
Slow
Clock
CFDS
If the Main crystal oscillator is selected as the source clock of MAINCK (CKGR_MOR.MOSCSEL = 1), and if the
MCK source is PLLACK or UPLLCKDIV (CSS = 2 or 3), a clock failure detection automatically forces MAINCK to be
the source clock for MCK. Then, regardless of the PMC configuration, a clock failure detection automatically forces
the Main RC oscillator to be the source clock for MAINCK. If the Main RC oscillator is disabled when a clock failure
detection occurs, it is automatically re-enabled by the clock failure detection mechanism.
Two Slow RC oscillator clock cycles are necessary to detect and switch from the Main crystal oscillator to the Main
RC oscillator if the source of MCK is MAINCK, or three Slow RC oscillator clock cycles if the source of MCK is
PLLACK or UPLLCKDIV.
A clock failure detection activates a fault output that is connected to the Pulse Width Modulator (PWM) Controller.
With this connection, the PWM controller is able to force its outputs and to protect the driven device, if a clock failure
is detected.
Read CKGR_MCFR until the MAINFRDY field is set, after which the user can read CKGR_MCFR.MAINF by
performing an additional read. This provides the number of Main clock cycles that have been counted during a
period of 16 SLCK cycles.
If MAINF = 0, switch MAINCK to the Main RC Oscillator by clearing CKGR_MOR.MOSCSEL. If MAINF ≠ 0,
proceed to Step 6.
6. Set PLLA and Divider (if not required, proceed to Step 7.):
All parameters needed to configure PLLA and the divider are located in CKGR_PLLAR.
CKGR_PLLAR.DIVA is used to control the divider. This parameter can be programmed between 0 and 127.
Divider output is divider input divided by DIVA parameter. By default, DIVA field is cleared which means that
the divider and PLLA are turned off.
CKGR_PLLAR.MULA is the PLLA multiplier factor. This parameter can be programmed between 0 and 62.
If MULA is cleared, PLLA will be turned off, otherwise the PLLA output frequency is PLLA input frequency
multiplied by (MULA + 1).
CKGR_PLLAR.PLLACOUNT specifies the number of SLCK cycles before PMC_SR.LOCKA is set after
CKGR_PLLAR has been written.
Once CKGR_PLLAR has been written, the user must wait for PMC_SR.LOCKA to be set. This can be done
either by polling PMC_SR.LOCKA or by waiting for the interrupt line to be raised if the associated interrupt
source (LOCKA) has been enabled in PMC_IER. All fields in CKGR_PLLAR can be programmed in a single
write operation. If MULA or DIVA is modified, the LOCKA bit goes low to indicate that PLLA is not yet ready.
When PLLA is locked, LOCKA is set again. The user must wait for the LOCKA bit to be set before using the
PLLA output clock.
7. Select MCK and HCLK:
MCK and HCLK are configurable via PMC_MCKR.
CSS is used to select the clock source of MCK and HCLK. By default, the selected clock source is MAINCK.
PRES is used to define the HCLK and MCK prescaler.s The user can choose between different values (1, 2, 3,
4, 8, 16, 32, 64). Prescaler output is the selected clock source frequency divided by the PRES value.
MDIV is used to define the MCK divider. It is possible to choose between different values (0, 1, 2, 3). MCK
output is the HCLK frequency divided by 1, 2, 3 or 4, depending on the value programmed in MDIV.
By default, MDIV is cleared, which indicates that the HCLK is equal to MCK.
Once the PMC_MCKR has been written, the user must wait for PMC_SR.MCKRDY to be set. This can be
done either by polling PMC_SR.MCKRDY or by waiting for the interrupt line to be raised if the associated
interrupt source (MCKRDY) has been enabled in PMC_IER. PMC_MCKR must not be programmed in a single
write operation. The programming sequence for PMC_MCKR is as follows:
If a new value for PMC_MCKR.CSS corresponds to any of the available PLL clocks:
a. Program PMC_MCKR.PRES.
b. Wait for PMC_SR.MCKRDY to be set.
c. Program PMC_MCKR.MDIV.
d. Wait for PMC_SR.MCKRDY to be set.
e. Program PMC_MCKR.CSS.
f. Wait for PMC_SR.MCKRDY to be set.
If a new value for PMC_MCKR.CSS corresponds to MAINCK or SLCK:
a. Program PMC_MCKR.CSS.
b. Wait for PMC_SR.MCKRDY to be set.
c. Program PMC_MCKR.PRES.
d. Wait for PMC_SR.MCKRDY to be set.
If CSS, MDIV or PRES are modified at any stage, the MCKRDY bit goes low to indicate that MCK and HCLK
are not yet ready. The user must wait for MCKRDY bit to be set again before using MCK and HCLK.
Note: If PLLA clock was selected as MCK and the user decides to modify it by writing a new value into
CKGR_PLLAR, the MCKRDY flag will go low while PLLA is unlocked. Once PLLA is locked again, LOCKA
goes high and MCKRDY is set.
While PLLA is unlocked, MCK selection is automatically changed to SLCK for PLLA. For further information,
see "Clock Switching Waveforms".
MCK is MAINCK divided by 2.
8. Select the Programmable clocks (PCKx):
PCKx are controlled via registers PMC_SCER, PMC_SCDR and PMC_SCSR.
PCKx can be enabled and/or disabled via PMC_SCER and PMC_SCDR. Three PCKx can be used.
PMC_SCSR indicates which PCKx is enabled. By default all PCKx are disabled.
PMC_PCKx registers are used to configure PCKx.
PMC_PCKx.CSS is used to select the PCKx divider source. Several clock options are available:
– MAINCK
– SLCK
– MCK
– PLLACK
– UPLLCKDIV
SLCK is the default clock source.
PMC_PCKx.PRES is used to control the PCKx prescaler. It is possible to choose between different
values (1 to 256). PCKx output is prescaler input divided by PRES. By default, the PRES value is cleared
which means that PCKx is equal to Slow clock.
Once PMC_PCKx has been configured, the corresponding PCKx must be enabled and the user must
wait for PMC_SR.PCKRDYx to be set. This can be done either by polling PMC_SR.PCKRDYx or by
waiting for the interrupt line to be raised if the associated interrupt source (PCKRDYx) has been enabled
in PMC_IER. All parameters in PMC_PCKx can be programmed in a single write operation.
If the PMC_PCKx.CSS and PMC_PCKx.PRES parameters are to be modified, the corresponding PCKx
must be disabled first. The parameters can then be modified. Once this has been done, the user must
re-enable PCKx and wait for the PCKRDYx bit to be set.
9. Enable the peripheral clocks
Once all of the previous steps have been completed, the peripheral clocks can be enabled and/or disabled via
registers PMC_PCERx and PMC_PCDRx.
...........continued
From MAINCK SLCK PLL Clock
PLL Clock 0.5 x MAINCK + 2.5 x PLL Clock + See the following table.
4 x SLCK + 5 x SLCK +
PLLCOUNT x SLCK + PLLCOUNT x SLCK
2.5 x PLL Clock
Notes:
1. PLL designates any available PLL of the Clock Generator.
2. PLLCOUNT designates either PLLACOUNT or UPLLCOUNT.
Table 31-3. Clock Switching Timings Between Two PLLs (Worst Case)
PLLx Clock
LOCK
MCKRDY
MCK
Write PMC_MCKR
Figure 31-7. Switch Host Clock (MCK) from Main Clock (MAINCK) to Slow Clock
Slow Clock
MAINCK
MCKRDY
MCK
Write PMC_MCKR
Slow Clock
PLLA Clock
LOCKA
MCKRDY
MCK
Slow Clock
Write CKGR_PLLAR
PCKRDY
PCKx Output
Write PMC_SCER
PCKx is enabled
7:0 USBCLK
15:8 PCK7 PCK6 PCK5 PCK4 PCK3 PCK2 PCK1 PCK0
0x00 PMC_SCER
23:16
31:24
7:0 USBCLK
15:8 PCK7 PCK6 PCK5 PCK4 PCK3 PCK2 PCK1 PCK0
0x04 PMC_SCDR
23:16
31:24
7:0 USBCLK HCLKS
15:8 PCK7 PCK6 PCK5 PCK4 PCK3 PCK2 PCK1 PCK0
0x08 PMC_SCSR
23:16
31:24
0x0C
... Reserved
0x0F
7:0 PID7
15:8 PID15 PID14 PID13 PID12 PID11 PID10 PID9 PID8
0x10 PMC_PCER0
23:16 PID23 PID22 PID21 PID20 PID19 PID18 PID17 PID16
31:24 PID31 PID30 PID29 PID28 PID27 PID26 PID25 PID24
7:0 PID7
15:8 PID15 PID14 PID13 PID12 PID11 PID10 PID9 PID8
0x14 PMC_PCDR0
23:16 PID23 PID22 PID21 PID20 PID19 PID18 PID17 PID16
31:24 PID31 PID30 PID29 PID28 PID27 PID26 PID25 PID24
7:0 PID7
15:8 PID15 PID14 PID13 PID12 PID11 PID10 PID9 PID8
0x18 PMC_PCSR0
23:16 PID23 PID22 PID21 PID20 PID19 PID18 PID17 PID16
31:24 PID31 PID30 PID29 PID28 PID27 PID26 PID25 PID24
7:0
15:8
0x1C CKGR_UCKR
23:16 UPLLCOUNT[3:0] UPLLEN
31:24
7:0 MOSCRCF[2:0] MOSCRCEN WAITMODE MOSCXTBY MOSCXTEN
15:8 MOSCXTST[7:0]
0x20 CKGR_MOR
23:16 KEY[7:0]
31:24 XT32KFME CFDEN MOSCSEL
7:0 MAINF[7:0]
15:8 MAINF[15:8]
0x24 CKGR_MCFR
23:16 RCMEAS MAINFRDY
31:24 CCSS
7:0 DIVA[7:0]
15:8 PLLACOUNT[5:0]
0x28 CKGR_PLLAR
23:16 MULA[7:0]
31:24 ONE MULA[10:8]
0x2C
... Reserved
0x2F
7:0 PRES[2:0] CSS[1:0]
15:8 UPLLDIV2 MDIV[1:0]
0x30 PMC_MCKR
23:16
31:24
0x34
... Reserved
0x37
...........continued
7:0 USBS
15:8 USBDIV[3:0]
0x38 PMC_USB
23:16
31:24
0x3C
... Reserved
0x3F
7:0 PRES[3:0] CSS[2:0]
15:8 PRES[7:4]
0x40 PMC_PCKx [x=0..7]
23:16
31:24
0x44
... Reserved
0x5F
7:0 LOCKU MCKRDY LOCKA MOSCXTS
15:8 PCKRDY7 PCKRDY6 PCKRDY5 PCKRDY4 PCKRDY3 PCKRDY2 PCKRDY1 PCKRDY0
0x60 PMC_IER
23:16 XT32KERR CFDEV MOSCRCS MOSCSELS
31:24
7:0 LOCKU MCKRDY LOCKA MOSCXTS
15:8 PCKRDY7 PCKRDY6 PCKRDY5 PCKRDY4 PCKRDY3 PCKRDY2 PCKRDY1 PCKRDY0
0x64 PMC_IDR
23:16 XT32KERR CFDEV MOSCRCS MOSCSELS
31:24
7:0 OSCSELS LOCKU MCKRDY LOCKA MOSCXTS
15:8 PCKRDY7 PCKRDY6 PCKRDY5 PCKRDY4 PCKRDY3 PCKRDY2 PCKRDY1 PCKRDY0
0x68 PMC_SR
23:16 XT32KERR FOS CFDS CFDEV MOSCRCS MOSCSELS
31:24
7:0 LOCKU MCKRDY LOCKA MOSCXTS
15:8 PCKRDY7 PCKRDY6 PCKRDY5 PCKRDY4 PCKRDY3 PCKRDY2 PCKRDY1 PCKRDY0
0x6C PMC_IMR
23:16 XT32KERR CFDEV MOSCRCS MOSCSELS
31:24
7:0 FSTT7 FSTT6 FSTT5 FSTT4 FSTT3 FSTT2 FSTT1 FSTT0
15:8 FSTT15 FSTT14 FSTT13 FSTT12 FSTT11 FSTT10 FSTT9 FSTT8
0x70 PMC_FSMR
23:16 FFLPM FLPM[1:0] LPM USBAL RTCAL RTTAL
31:24
7:0 FSTP7 FSTP6 FSTP5 FSTP4 FSTP3 FSTP2 FSTP1 FSTP0
15:8 FSTP15 FSTP14 FSTP13 FSTP12 FSTP11 FSTP10 FSTP9 FSTP8
0x74 PMC_FSPR
23:16
31:24
7:0 FOCLR
15:8
0x78 PMC_FOCR
23:16
31:24
0x7C
... Reserved
0xE3
7:0 WPEN
15:8 WPKEY[7:0]
0xE4 PMC_WPMR
23:16 WPKEY[15:8]
31:24 WPKEY[23:16]
7:0 WPVS
15:8 WPVSRC[7:0]
0xE8 PMC_WPSR
23:16 WPVSRC[15:8]
31:24
0xEC
... Reserved
0xFF
...........continued
...........continued
7:0 AIP
15:8
0x0144 PMC_SLPWK_AIPR
23:16
31:24
Name: PMC_SCER
Offset: 0x0000
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
PCK7 PCK6 PCK5 PCK4 PCK3 PCK2 PCK1 PCK0
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
USBCLK
Access W
Reset
Bits 8, 9, 10, 11, 12, 13, 14, 15 – PCK Programmable Clock x Output Enable
Value Description
0 No effect.
1 Enables the corresponding Programmable Clock output.
Name: PMC_SCDR
Offset: 0x0004
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
PCK7 PCK6 PCK5 PCK4 PCK3 PCK2 PCK1 PCK0
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
USBCLK
Access W
Reset
Bits 8, 9, 10, 11, 12, 13, 14, 15 – PCK Programmable Clock x Output Disable
Value Description
0 No effect.
1 Disables the corresponding Programmable Clock output.
Name: PMC_SCSR
Offset: 0x0008
Reset: 0x00000001
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
PCK7 PCK6 PCK5 PCK4 PCK3 PCK2 PCK1 PCK0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
USBCLK HCLKS
Access R R
Reset 0 1
Bits 8, 9, 10, 11, 12, 13, 14, 15 – PCK Programmable Clock x Output Status
Value Description
0 The corresponding Programmable Clock output is disabled.
1 The corresponding Programmable Clock output is enabled.
Name: PMC_PCER0
Offset: 0x0010
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
PID31 PID30 PID29 PID28 PID27 PID26 PID25 PID24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
PID23 PID22 PID21 PID20 PID19 PID18 PID17 PID16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
PID15 PID14 PID13 PID12 PID11 PID10 PID9 PID8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
PID7
Access W
Reset
Bits 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – PIDx Peripheral Clock x
Enable
Value Description
0 No effect.
1 Enables the corresponding peripheral clock.
Notes:
1. PIDx refers to identifiers defined in the section “Peripheral Identifiers”. Other peripherals can be
enabled in PMC_PCER1 (see 31.20.23. PMC_PCER1).
2. Programming the control bits of the Peripheral ID that are not implemented has no effect on the
behavior of the PMC.
Name: PMC_PCDR0
Offset: 0x0014
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
PID31 PID30 PID29 PID28 PID27 PID26 PID25 PID24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
PID23 PID22 PID21 PID20 PID19 PID18 PID17 PID16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
PID15 PID14 PID13 PID12 PID11 PID10 PID9 PID8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
PID7
Access W
Reset
Bits 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – PIDx Peripheral Clock x
Disable
Value Description
0 No effect.
1 Disables the corresponding peripheral clock.
Note: PIDx refers to identifiers defined in the section “Peripheral Identifiers”. Other peripherals can be
disabled in PMC_PCDR1 (see 31.20.24. PMC_PCDR1).
Name: PMC_PCSR0
Offset: 0x0018
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
PID31 PID30 PID29 PID28 PID27 PID26 PID25 PID24
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PID23 PID22 PID21 PID20 PID19 PID18 PID17 PID16
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PID15 PID14 PID13 PID12 PID11 PID10 PID9 PID8
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PID7
Access R
Reset 0
Bits 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – PIDx Peripheral Clock x Status
Value Description
0 The corresponding peripheral clock is disabled.
1 The corresponding peripheral clock is enabled.
Note: PIDx refers to identifiers defined in the section “Peripheral Identifiers”. Other peripherals status
can be read in PMC_PCSR1 (see PMC Peripheral Clock Status Register 1).
Name: CKGR_UCKR
Offset: 0x001C
Reset: 0x10200800
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
UPLLCOUNT[3:0] UPLLEN
Access R/W R/W R/W R/W R/W
Reset 0 0 1 0 0
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
Access
Reset
Name: CKGR_MOR
Offset: 0x0020
Reset: 0x00000008
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
XT32KFME CFDEN MOSCSEL
Access R/W R/W R/W
Reset 0 0 0
Bit 23 22 21 20 19 18 17 16
KEY[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
MOSCXTST[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
MOSCRCF[2:0] MOSCRCEN WAITMODE MOSCXTBY MOSCXTEN
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 1 0 0 0
Name: CKGR_MCFR
Offset: 0x0024
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
CCSS
Access R/W
Reset 0
Bit 23 22 21 20 19 18 17 16
RCMEAS MAINFRDY
Access R/W R/W
Reset 0 0
Bit 15 14 13 12 11 10 9 8
MAINF[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
MAINF[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: CKGR_PLLAR
Offset: 0x0028
Reset: 0x00003F00
Property: Read/Write
Possible limitations on PLLA input frequencies and multiplier factors should be checked before using the PMC.
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
ONE MULA[10:8]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 23 22 21 20 19 18 17 16
MULA[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PLLACOUNT[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1
Bit 7 6 5 4 3 2 1 0
DIVA[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: PMC_MCKR
Offset: 0x0030
Reset: 0x00000001
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
UPLLDIV2 MDIV[1:0]
Access R/W R/W R/W
Reset 0 0 0
Bit 7 6 5 4 3 2 1 0
PRES[2:0] CSS[1:0]
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 1
Name: PMC_USB
Offset: 0x0038
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
USBDIV[3:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
USBS
Access R/W
Reset 0
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
PRES[7:4]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PRES[3:0] CSS[2:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Name: PMC_IER
Offset: 0x0060
Property: Write-only
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Enables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
XT32KERR CFDEV MOSCRCS MOSCSELS
Access W W W W
Reset
Bit 15 14 13 12 11 10 9 8
PCKRDY7 PCKRDY6 PCKRDY5 PCKRDY4 PCKRDY3 PCKRDY2 PCKRDY1 PCKRDY0
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
LOCKU MCKRDY LOCKA MOSCXTS
Access W W W W
Reset
Bits 8, 9, 10, 11, 12, 13, 14, 15 – PCKRDY Programmable Clock Ready x Interrupt Enable
Name: PMC_IDR
Offset: 0x0064
Property: Write-only
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Disables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
XT32KERR CFDEV MOSCRCS MOSCSELS
Access W W W W
Reset
Bit 15 14 13 12 11 10 9 8
PCKRDY7 PCKRDY6 PCKRDY5 PCKRDY4 PCKRDY3 PCKRDY2 PCKRDY1 PCKRDY0
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
LOCKU MCKRDY LOCKA MOSCXTS
Access W W W W
Reset
Bits 8, 9, 10, 11, 12, 13, 14, 15 – PCKRDY Programmable Clock Ready x Interrupt Disable
Name: PMC_SR
Offset: 0x0068
Reset: 0x01030008
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
XT32KERR FOS CFDS CFDEV MOSCRCS MOSCSELS
Access R R R R R R
Reset 0 0 0 0 1 1
Bit 15 14 13 12 11 10 9 8
PCKRDY7 PCKRDY6 PCKRDY5 PCKRDY4 PCKRDY3 PCKRDY2 PCKRDY1 PCKRDY0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
OSCSELS LOCKU MCKRDY LOCKA MOSCXTS
Access R R R R R
Reset 0 0 1 0 0
Bits 8, 9, 10, 11, 12, 13, 14, 15 – PCKRDY Programmable Clock Ready Status
Value Description
0 Programmable Clock x is not ready.
1 Programmable Clock x is ready.
Name: PMC_IMR
Offset: 0x006C
Reset: 0x00000000
Property: Read-only
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Enables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
XT32KERR CFDEV MOSCRCS MOSCSELS
Access R R R R
Reset 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PCKRDY7 PCKRDY6 PCKRDY5 PCKRDY4 PCKRDY3 PCKRDY2 PCKRDY1 PCKRDY0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
LOCKU MCKRDY LOCKA MOSCXTS
Access R R R R
Reset 0 0 0 0
Bits 8, 9, 10, 11, 12, 13, 14, 15 – PCKRDY Programmable Clock Ready x Interrupt Mask
Name: PMC_FSMR
Offset: 0x0070
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
FFLPM FLPM[1:0] LPM USBAL RTCAL RTTAL
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
FSTT15 FSTT14 FSTT13 FSTT12 FSTT11 FSTT10 FSTT9 FSTT8
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
FSTT7 FSTT6 FSTT5 FSTT4 FSTT3 FSTT2 FSTT1 FSTT0
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 – FSTT Fast Startup Input Enable
Value Description
0 The corresponding wake-up input has no effect on the PMC.
1 The corresponding wake-up input enables a fast restart signal to the PMC.
Name: PMC_FSPR
Offset: 0x0074
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
FSTP15 FSTP14 FSTP13 FSTP12 FSTP11 FSTP10 FSTP9 FSTP8
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
FSTP7 FSTP6 FSTP5 FSTP4 FSTP3 FSTP2 FSTP1 FSTP0
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 – FSTP Fast Startup Input Polarity x bits
Defines the active polarity of the corresponding wake-up input. If the corresponding wake-up input is enabled and at
the FSTP level, it enables a fast restart signal.
Name: PMC_FOCR
Offset: 0x0078
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
FOCLR
Access W
Reset
Name: PMC_WPMR
Offset: 0x00E4
Reset: 0x0
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
WPKEY[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WPKEY[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPKEY[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPEN
Access R/W
Reset 0
Name: PMC_WPSR
Offset: 0x00E8
Reset: 0x0
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
WPVSRC[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPVSRC[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPVS
Access R
Reset 0
Name: PMC_PCER1
Offset: 0x0100
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
PID62 PID60 PID59 PID58 PID57 PID56
Access W W W W W W
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PID53 PID52 PID51 PID50 PID49 PID48
Access W W W W W W
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PID47 PID46 PID45 PID44 PID43 PID42 PID41 PID40
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PID39 PID37 PID35 PID34 PID33 PID32
Access W W W W W W
Reset 0 0 0 0 0 0
Bits 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 – PIDx Peripheral Clock x Enable
Value Description
0 No effect.
1 The corresponding peripheral clock is enabled.
Note: “PIDx” refers to identifiers as defined in the section “Peripheral Identifiers”.
Value Description
1 The corresponding peripheral clock is enabled.
Note: “PIDx” refers to identifiers as defined in the section “Peripheral Identifiers”.
Name: PMC_PCDR1
Offset: 0x104
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PCM Write Protection Mode Register
Bit 31 30 29 28 27 26 25 24
PID62 PID60 PID59 PID58 PID57 PID56
Access W W W W W W
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PID53 PID52 PID51 PID50 PID49 PID48
Access W W W W W W
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PID47 PID46 PID45 PID44 PID43 PID42 PID41 PID40
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PID39 PID37 PID35 PID34 PID33 PID32
Access W W W W W W
Reset 0 0 0 0 0 0
Bits 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 – PIDx Peripheral Clock x Disable
Value Description
0 No effect.
1 The corresponding peripheral clock is disabled.
Note: “PIDx” refers to identifiers as defined in the section “Peripheral Identifiers”.
Value Description
1 The corresponding peripheral clock is disabled.
Note: “PIDx” refers to identifiers as defined in the section “Peripheral Identifiers”.
Name: PMC_PCSR1
Offset: 0x0108
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
PID62 PID60 PID59 PID58 PID57 PID56
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PID53 PID52 PID51 PID50 PID49 PID48
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PID47 PID46 PID45 PID44 PID43 PID42 PID41 PID40
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PID39 PID37 PID35 PID34 PID33 PID32
Access R R R R R R
Reset 0 0 0 0 0 0
Bits 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 – PIDx Peripheral Clock x Status
Value Description
0 The corresponding peripheral clock is disabled.
1 The corresponding peripheral clock is enabled.
Note: “PIDx” refers to identifiers as defined in the section “Peripheral Identifiers”.
Value Description
1 The corresponding peripheral clock is enabled.
Note: “PIDx” refers to identifiers as defined in the section “Peripheral Identifiers”.
Name: PMC_PCR
Offset: 0x010C
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
GCLKEN EN GCLKDIV[7:4]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
GCLKDIV[3:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CMD GCLKCSS[2:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PID[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 28 – EN Enable
Value Description
0 Selected Peripheral clock is disabled.
1 Selected Peripheral clock is enabled.
Bit 12 – CMD Command
Value Description
0 Read mode.
1 Write mode.
Name: PMC_OCR
Offset: 0x0110
Reset: 0x00404040
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
SEL12 CAL12[6:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 1 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
SEL8 CAL8[6:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 1 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SEL4 CAL4[6:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 1 0 0 0 0 0 0
Name: PMC_SLPWK_ER0
Offset: 0x0114
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
PID31 PID30 PID29 PID28 PID27 PID26 PID25 PID24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
PID23 PID22 PID21 PID20 PID19 PID18 PID17 PID16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
PID15 PID14 PID13 PID12 PID11 PID10 PID9 PID8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
PID7
Access W
Reset
Bits 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – PIDx Peripheral x
SleepWalking Enable
Not all PIDs can be configured with asynchronous partial wake-up.
Only the following PID can be configured with asynchronous partial wake-up: UARTx and TWIHSx.
The clock of the peripheral must be enabled before using its asynchronous partial wake-up (SleepWalking) function
(its associated PIDx field in PMC Peripheral Clock Status Register 0 or PMC Peripheral Clock Status Register 1 is set
to ‘1’).
Value Description
0 No effect.
1 The asynchronous partial wakeup (SleepWalking) function of the corresponding peripheral is enabled.
Note: “PIDx” refers to identifiers as defined in the section “Peripheral Identifiers”
Name: PMC_SLPWK_ER1
Offset: 0x0134
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
PID63 PID62 PID60 PID59 PID58 PID57 PID56
Access W W W W W W W
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PID53 PID52 PID51 PID50 PID49 PID48
Access W W W W W W
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PID47 PID46 PID45 PID44 PID43 PID42 PID41 PID40
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PID39 PID37
Access W W
Reset 0 0
Bits 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 – PIDx Peripheral SleepWalking x Enable
Value Description
0 No effect.
1 The asynchronous partial wakeup (SleepWalking) function of the corresponding peripheral is enabled.
Note: “PIDx” refers to identifiers as defined in the section “Peripheral Identifiers”
Name: PMC_SLPWK_DR0
Offset: 0x0118
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
PID31 PID30 PID29 PID28 PID27 PID26 PID25 PID24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
PID23 PID22 PID21 PID20 PID19 PID18 PID17 PID16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
PID15 PID14 PID13 PID12 PID11 PID10 PID9 PID8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
PID7
Access W
Reset
Bits 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – PIDx Peripheral x
SleepWalking Disable
Not all PIDs can be configured with asynchronous partial wake-up.
Only the following PIDs can be configured with asynchronous partial wake-up: UARTx and TWIHSx.
Value Description
0 No effect.
1 The asynchronous partial wakeup (SleepWalking) function of the corresponding peripheral is disabled.
Note: “PIDx” refers to identifiers as defined in the section “Peripheral Identifiers”.
Name: PMC_SLPWK_DR1
Offset: 0x0138
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
PID63 PID62 PID60 PID59 PID58 PID57 PID56
Access W W W W W W W
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PID53 PID52 PID51 PID50 PID49 PID48
Access W W W W W W
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PID47 PID46 PID45 PID44 PID43 PID42 PID41 PID40
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PID39 PID37 PID35 PID34 PID33 PID32
Access W W W W W W
Reset 0 0 0 0 0 0
Bits 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 – PIDx Peripheral SleepWalking x Disable
Value Description
0 No effect.
1 The asynchronous partial wakeup (SleepWalking) function of the corresponding peripheral is disabled.
Note: “PIDx” refers to identifiers as defined in the section “Peripheral Identifiers”.
Value Description
1 The asynchronous partial wakeup (SleepWalking) function of the corresponding peripheral is disabled.
Note: “PIDx” refers to identifiers as defined in the section “Peripheral Identifiers”.
Name: PMC_SLPWK_SR0
Offset: 0x011C
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
PID31 PID30 PID29 PID28 PID27 PID26 PID25 PID24
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PID23 PID22 PID21 PID20 PID19 PID18 PID17 PID16
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PID15 PID14 PID13 PID12 PID11 PID10 PID9 PID8
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PID7
Access R
Reset 0
Bits 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – PIDx Peripheral x
SleepWalking Status
Not all PIDs can be configured with asynchronous partial wake-up.
Only the following PIDs can be configured with asynchronous partial wake-up: UARTx and TWIHSx.
Value Description
0 The asynchronous partial wake-up (SleepWalking) function of the peripheral is currently disabled or
the peripheral enabled for asynchronous partial wake-up (SleepWalking) cleared the PIDn bit upon
detection of a wake-up condition.
1 The asynchronous partial wake-up (SleepWalking) function of the peripheral is currently enabled.
Note: “PIDx” refers to identifiers as defined in the section “Peripheral Identifiers”.
Name: PMC_SLPWK_SR1
Offset: 0x013C
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
PID63 PID62 PID60 PID59 PID58 PID57 PID56
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PID53 PID52 PID51 PID50 PID49 PID48
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PID47 PID46 PID45 PID44 PID43 PID42 PID41 PID40
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PID39 PID37 PID35 PID34 PID33 PID32
Access R R R R R R
Reset 0 0 0 0 0 0
Bits 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 – PIDx Peripheral SleepWalking x Status
Value Description
0 The asynchronous partial wake-up (SleepWalking) function of the peripheral is currently disabled or
the peripheral enabled for asynchronous partial wake-up (SleepWalking) cleared the PIDn bit upon
detection of a wake-up condition.
1 The asynchronous partial wake-up (SleepWalking) function of the peripheral is currently enabled.
Note: “PIDx” refers to identifiers as defined in the section “Peripheral Identifiers”.
Value Description
0 The asynchronous partial wake-up (SleepWalking) function of the peripheral is currently disabled or
the peripheral enabled for asynchronous partial wake-up (SleepWalking) cleared the PIDn bit upon
detection of a wake-up condition.
1 The asynchronous partial wake-up (SleepWalking) function of the peripheral is currently enabled.
Note: “PIDx” refers to identifiers as defined in the section “Peripheral Identifiers”.
Name: PMC_SLPWK_ASR0
Offset: 0x0120
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
PID31 PID30 PID29 PID28 PID27 PID26 PID25 PID24
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PID23 PID22 PID21 PID20 PID19 PID18 PID17 PID16
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PID15 PID14 PID13 PID12 PID11 PID10 PID9 PID8
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PID7
Access R
Reset 0
Bits 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – PIDx Peripheral x Activity
Status
Only the following PIDs can be configured with asynchronous partial wake-up: UARTx and TWIHSx.
All other PIDs are always read at ‘0’.
Value Description
0 The peripheral x is not currently active. The asynchronous partial wake-up (SleepWalking) function can
be activated.
1 The peripheral x is currently active. The asynchronous partial wake-up (SleepWalking) function must
not be activated.
Note: “PIDx” refers to identifiers as defined in the section “Peripheral Identifiers”.
Name: PMC_PMMR
Offset: 0x0130
Reset: 0x000007FF
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the PMC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
PLLA_MMAX[10:8]
Access R/W R/W R/W
Reset 1 1 1
Bit 7 6 5 4 3 2 1 0
PLLA_MMAX[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Name: PMC_SLPWK_ASR1
Offset: 0x0140
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
PID63 PID62 PID60 PID59 PID58 PID57 PID56
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PID53 PID52 PID51 PID50 PID49 PID48
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PID47 PID46 PID45 PID44 PID43 PID42 PID41 PID40
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PID39 PID37 PID35 PID34 PID33 PID32
Access R R R R R R
Reset 0 0 0 0 0 0
Bits 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 – PIDx Peripheral Activity x Status
Value Description
0 The peripheral x is not currently active. The asynchronous partial wake-up (SleepWalking) function can
be activated.
1 The peripheral x is currently active. The asynchronous partial wake-up (SleepWalking) function must
not be activated.
Note: “PIDx” refers to identifiers as defined in the section “Peripheral Identifiers”.
Value Description
0 The peripheral x is not currently active. The asynchronous partial wake-up (SleepWalking) function can
be activated.
1 The peripheral x is currently active. The asynchronous partial wake-up (SleepWalking) function must
not be activated.
Note: “PIDx” refers to identifiers as defined in the section “Peripheral Identifiers”.
Name: PMC_SLPWK_AIPR
Offset: 0x0144
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
AIP
Access R
Reset
32.1 Description
The Parallel Input/Output Controller (PIO) manages up to fully programmable input/output lines. Each I/O line may be
dedicated as a general-purpose I/O or be assigned to a function of an embedded peripheral. This ensures effective
optimization of the pins of the product.
Each I/O line is associated with a bit number in all of the 32-bit registers of the 32-bit wide user interface.
Each I/O line of the PIO Controller features the following:
• An input change interrupt enabling level change detection on any I/O line
• Additional Interrupt modes enabling rising edge, falling edge, low-level or high-level detection on any I/O line
• A glitch filter providing rejection of glitches lower than one-half of peripheral clock cycle
• A debouncing filter providing rejection of unwanted pulses from key or push button operations
• Multi-drive capability similar to an open drain I/O line
• Control of the I/O line pullup and pulldown
• Input visibility and output control
The PIO Controller also features a synchronous output providing up to bits of data output in a single write operation.
An 8-bit Parallel Capture mode is also available which can be used to interface a CMOS digital image sensor, an
ADC, a DSP synchronous port in Synchronous mode, etc.
PIODCCLK
Data
PIODC[7:0]
DMA Parallel Capture
Events Mode PIODCEN1
PIODCEN2
PIO Interrupt
Interrupt Controller
Data, Enable
Up to x
peripheral IOs
Embedded
Peripheral
PIN 0
Data, Enable
PIN 1
Up to x
Embedded peripheral IOs
Peripheral PIN x-1
PIO_ODSR[n] 1 Pad
PIO_CODR[n] 1
PIO_PPDER[n] Integrated
PIO_PPDSR[n] Pull-Down
Resistor
PIO_PPDDR[n]
GND
Peripheral A Input
Peripheral B Input
Peripheral C Input
Peripheral D Input
PIO_PDSR[n]
PIO_ISR[n]
0 (Up to 32 possible inputs)
D Q D Q EVENT
Peripheral Clock Programmable DFF DFF DETECTOR
0 Glitch PIO Interrupt
or 1
Slow Clock Peripheral Clock
Debouncing
Clock div_slck Filter Resynchronization
1 PIO_IER[0]
Divider Stage
PIO_SCDR PIO_IMR[0]
PIO_IFER[n] PIO_IDR[0]
PIO_IFSR[n]
PIO_IFSCER[n] PIO_ISR[31]
PIO_IFDR[n]
PIO_IFSCSR[n]
PIO_IER[31]
PIO_IFSCDR[n]
PIO_IMR[31]
PIO_IDR[31]
Similarly, writing in the PIO_SODR and PIO_CODR affects the PIO_ODSR. This is important as it defines the first
level driven on the I/O line.
Peripheral clock
PIO_ODSR
2 cycles 2 cycles
PIO_PDSR
32.5.8 Inputs
The level on each I/O line can be read through PIO_PDSR. This register indicates the level of the I/O lines regardless
of their configuration, whether uniquely as an input, or driven by the PIO Controller, or driven by a peripheral.
Reading the I/O line levels requires the clock of the PIO Controller to be enabled, otherwise PIO_PDSR reads the
levels present on the I/O line at the time the clock was disabled.
The selection between glitch filtering or debounce filtering is done by writing in the PIO Input Filter Slow Clock
Disable Register (PIO_IFSCDR) and the PIO Input Filter Slow Clock Enable Register (PIO_IFSCER). Writing
PIO_IFSCDR and PIO_IFSCER, respectively, sets and clears bits in the Input Filter Slow Clock Status Register
(PIO_IFSCSR).
The current selection status can be checked by reading the PIO_IFSCSR.
• If PIO_IFSCSR[i] = 0: The glitch filter can filter a glitch with a duration of less than 1/2 Host clock period.
• If PIO_IFSCSR[i] = 1: The debouncing filter can filter a pulse with a duration of less than 1/2 programmable
divided slow clock period.
For the debouncing filter, the period of the divided slow clock is defined by writing in the DIV field of the Slow Clock
Divider Debouncing Register (PIO_SCDR):
tdiv_slck = ((DIV + 1) × 2) × tslck
When the glitch or debouncing filter is enabled, a glitch or pulse with a duration of less than 1/2 selected clock
cycle (selected clock represents peripheral clock or divided slow clock depending on PIO_IFSCDR and PIO_IFSCER
programming) is automatically rejected, while a pulse with a duration of one selected clock (peripheral clock or
divided slow clock) cycle or more is accepted. For pulse durations between 1/2 selected clock cycle and one selected
clock cycle, the pulse may or may not be taken into account, depending on the precise timing of its occurrence. Thus
for a pulse to be visible, it must exceed one selected clock cycle, whereas for a glitch to be reliably filtered out, its
duration must not exceed 1/2 selected clock cycle.
The filters also introduce some latencies, illustrated in the following two figures.
The glitch filters are controlled by the Input Filter Enable Register (PIO_IFER), the Input Filter Disable Register
(PIO_IFDR) and the Input Filter Status Register (PIO_IFSR). Writing PIO_IFER and PIO_IFDR respectively sets and
clears bits in PIO_IFSR. This last register enables the glitch filter on the I/O lines.
When the glitch and/or debouncing filter is enabled, it does not modify the behavior of the inputs on the peripherals.
It acts only on the value read in PIO_PDSR and on the input change interrupt detection. The glitch and debouncing
filters require that the peripheral clock is enabled.
Figure 32-4. Input Glitch Filter Timing
PIO_IFCSR = 0
Peripheral clcok
up to 1.5 cycles
Pin Level
1 cycle 1 cycle 1 cycle 1 cycle
PIO_PDSR
if PIO_IFSR = 0
2 cycles 1 cycle
Pin Level
Falling Edge 0
Detector
0
PIO_REHLSR[0]
1
PIO_FRLHSR[0] Event detection on line 0
PIO_FELLSR[0] 1
0
Resynchronized input on line 0 High Level
1
Detector
Low Level 0
Detector
PIO_LSR[0]
PIO_ELSR[0] PIO_AIMER[0]
PIO_ESR[0] PIO_AIMMR[0]
PIO_AIMDR[0]
Edge
Detector
Configuration Description
Interrupt Mode All the interrupt sources are enabled by writing 32’hFFFF_FFFF in PIO_IER.
Then the additional Interrupt mode is enabled for lines 0 to 7 by writing 32’h0000_00FF in
PIO_AIMER.
Edge or Level Lines 3, 4 and 5 are configured in level detection by writing 32’h0000_0038 in PIO_LSR.
Detection The other lines are configured in edge detection by default, if they have not been
previously configured. Otherwise, lines 0, 1, 2, 6 and 7 must be configured in edge
detection by writing 32’h0000_00C7 in PIO_ESR.
Falling/Rising Edge Lines 0, 2, 4, 5 and 7 are configured in rising edge or high-level detection by writing
or Low/High-Level 32’h0000_00B5 in PIO_REHLSR.
Detection The other lines are configured in falling edge or low-level detection by default if they have
not been previously configured. Otherwise, lines 1, 3 and 6 must be configured in falling
edge/low-level detection by writing 32’h0000_004A in PIO_FELLSR.
Figure 32-7. Input Change Interrupt Timings When No Additional Interrupt Modes
Peripheral clock
Pin Level
PIO_ISR
32.5.14.1 Overview
The PIO Controller integrates an interface able to read data from a CMOS digital image sensor, a high-speed
parallel ADC, a DSP synchronous port in Synchronous mode, etc. For better understanding and to ease reading, the
following description uses an example with a CMOS digital image sensor.
PIO Controller
Parallel Capture
Mode CMOS Digital
PIODCCLK PCLK Image Sensor
Data
PIODC[7:0] DATA[7:0]
DMA
Events
PIODCEN1 VSYNC
PIODCEN2 HSYNC
Figure 32-9. PIO Controller Connection with CMOS Digital Image Sensor
PIO Controller
Parallel Capture
Mode CMOS Digital
PIODCCLK PCLK Image Sensor
Data
PIODCEN2 HSYNC
As soon as the Parallel Capture mode is enabled by writing a one to the PCEN bit in PIO_PCMR, the I/O lines
connected to the sensor clock (PIODCCLK), the sensor data (PIODC[7:0]) and the sensor data enable signals
(PIODCEN1 and PIODCEN2) are configured automatically as inputs. To know which I/O lines are associated with the
sensor clock, the sensor data and the sensor data enable signals, refer to the I/O multiplexing table(s) in the section
“Package and Pinout”.
Once enabled, the Parallel Capture mode samples the data at rising edge of the sensor clock and resynchronizes it
with the peripheral clock domain.
The size of the data which can be read in PIO_PCRHR can be programmed using the DSIZE field in PIO_PCMR.
If this data size is larger than 8 bits, then the Parallel Capture mode samples several sensor data to form a
concatenated data of size defined by DSIZE. Then this data is stored in PIO_PCRHR and the flag DRDY is set to one
in PIO_PCISR.
The Parallel Capture mode can be associated with a reception channel of the DMA Controller. This performs
reception transfer from Parallel Capture mode to a memory buffer without any intervention from the CPU.
The Parallel Capture mode can be associated with a reception channel of the Peripheral DMA Controller (PDC). This
performs reception transfer from Parallel Capture mode to a memory buffer without any intervention from the CPU.
Transfer status signals from PDC are available in PIO_PCISR through the flags ENDRX and RXBUFF.
The Parallel Capture mode can take into account the sensor data enable signals or not. If the bit ALWYS is set to
zero in PIO_PCMR, the Parallel Capture mode samples the sensor data at the rising edge of the sensor clock only if
both data enable signals are active (at one). If the bit ALWYS is set to one, the Parallel Capture mode samples the
sensor data at the rising edge of the sensor clock whichever the data enable signals are.
The Parallel Capture mode can sample the sensor data only one time out of two. This is particularly useful when the
user wants only to sample the luminance Y of a CMOS digital image sensor which outputs a YUV422 data stream.
If the HALFS bit is set to zero in PIO_PCMR, the Parallel Capture mode samples the sensor data in the conditions
described above. If the HALFS bit is set to one in PIO_PCMR, the Parallel Capture mode samples the sensor data in
the conditions described above, but only one time out of two. Depending on the FRSTS bit in PIO_PCMR, the sensor
can either sample the even or odd sensor data. If sensor data are numbered in the order that they are received with
an index from zero to n, if FRSTS equals zero then only data with an even index are sampled. If FRSTS equals one,
then only data with an odd index are sampled. If data is ready in PIO_PCRHR and it is not read before a new data is
stored in PIO_PCRHR, then an overrun error occurs. The previous data is lost and the OVRE flag in PIO_PCISR is
set to one. This flag is automatically reset when PIO_PCISR is read (reset after read).
The flags DRDY and OVRE can be a source of the PIO interrupt.
The flags DRDY, OVRE, ENDRX and RXBUFF can be a source of the PIO interrupt.
PIODCLK
PIODC[7:0] 0x01 0x12 0x23 0x34 0x45 0x56 0x67 0x78 0x89
PIODCEN1
PIODCEN2
DRDY (PIO_PCISR)
Read of PIO_PCISR
PIODCLK
PIODC[7:0] 0x01 0x12 0x23 0x34 0x45 0x56 0x67 0x78 0x89
PIODCEN1
PIODCEN2
DRDY (PIO_PCISR)
Read of PIO_PCISR
Figure 32-12. Parallel Capture Mode Waveforms (DSIZE = 2, ALWYS = 0, HALFS = 1, FRSTS = 0)
MCK
PIODCLK
PIODC[7:0] 0x01 0x12 0x23 0x34 0x45 0x56 0x67 0x78 0x89
PIODCEN1
PIODCEN2
DRDY (PIO_PCISR)
Read of PIO_PCISR
Figure 32-13. Parallel Capture Mode Waveforms (DSIZE = 2, ALWYS = 0, HALFS = 1, FRSTS = 1)
MCK
PIODCLK
PIODC[7:0] 0x01 0x12 0x23 0x34 0x45 0x56 0x67 0x78 0x89
PIODCEN1
PIODCEN2
DRDY (PIO_PCISR)
Read of PIO_PCISR
32.5.14.3 Restrictions
• Configuration fields DSIZE, ALWYS, HALFS and FRSTS in PIO_PCMR can be changed ONLY if the Parallel
Capture mode is disabled at this time (PCEN = 0 in PIO_PCMR).
• The frequency of peripheral clock must be strictly superior to two times the frequency of the clock of the device
which generates the parallel data.
• Four output signals on I/O lines 4 to 7 (to drive LEDs for example), driven high and low, no pullup resistor, no
pulldown resistor
• Four input signals on I/O lines 8 to 11 (to read push-button states for example), with pullup resistors, glitch filters
and input change interrupts
• Four input signals on I/O line 12 to 15 to read an external device status (polled, thus no input change interrupt),
no pullup resistor, no glitch filter
• I/O lines 16 to 19 assigned to peripheral A functions with pullup resistor
• I/O lines 20 to 23 assigned to peripheral B functions with pulldown resistor
• I/O lines 24 to 27 assigned to peripheral C with input change interrupt, no pullup resistor and no pulldown
resistor
• I/O lines 28 to 31 assigned to peripheral D, no pullup resistor and no pulldown resistor
Table 32-3. Programming Example
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x00 PIO_PER
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x04 PIO_PDR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x08 PIO_PSR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
0x0C
... Reserved
0x0F
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x10 PIO_OER
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x14 PIO_ODR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x18 PIO_OSR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
0x1C
... Reserved
0x1F
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x20 PIO_IFER
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x24 PIO_IFDR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x28 PIO_IFSR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
0x2C
... Reserved
0x2F
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x30 PIO_SODR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
...........continued
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x34 PIO_CODR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x38 PIO_ODSR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x3C PIO_PDSR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x40 PIO_IER
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x44 PIO_IDR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x48 PIO_IMR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x4C PIO_ISR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x50 PIO_MDER
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x54 PIO_MDDR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x58 PIO_MDSR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
0x5C
... Reserved
0x5F
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x60 PIO_PUDR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x64 PIO_PUER
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x68 PIO_PUSR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
0x6C
... Reserved
0x6F
...........continued
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x70 PIO_ABCDSR0
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x74 PIO_ABCDSR1
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
0x78
... Reserved
0x7F
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x80 PIO_IFSCDR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x84 PIO_IFSCER
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x88 PIO_IFSCSR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 DIV[7:0]
15:8 DIV[13:8]
0x8C PIO_SCDR
23:16
31:24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x90 PIO_PPDDR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x94 PIO_PPDER
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0x98 PIO_PPDSR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
0x9C
... Reserved
0x9F
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0xA0 PIO_OWER
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0xA4 PIO_OWDR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0xA8 PIO_OWSR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
0xAC
... Reserved
0xAF
...........continued
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0xB0 PIO_AIMER
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0xB4 PIO_AIMDR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0xB8 PIO_AIMMR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
0xBC
... Reserved
0xBF
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0xC0 PIO_ESR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0xC4 PIO_LSR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0xC8 PIO_ELSR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
0xCC
... Reserved
0xCF
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0xD0 PIO_FELLSR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0xD4 PIO_REHLSR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0xD8 PIO_FRLHSR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
0xDC
... Reserved
0xDF
7:0 P7 P6 P5 P4 P3 P2 P1 P0
15:8 P15 P14 P13 P12 P11 P10 P9 P8
0xE0 PIO_LOCKSR
23:16 P23 P22 P21 P20 P19 P18 P17 P16
31:24 P31 P30 P29 P28 P27 P26 P25 P24
7:0 WPEN
15:8 WPKEY[7:0]
0xE4 PIO_WPMR
23:16 WPKEY[15:8]
31:24 WPKEY[23:16]
7:0 WPVS
15:8 WPVSRC[7:0]
0xE8 PIO_WPSR
23:16 WPVSRC[15:8]
31:24
...........continued
0xEC
... Reserved
0xFF
7:0 SCHMITT7 SCHMITT6 SCHMITT5 SCHMITT4 SCHMITT3 SCHMITT2 SCHMITT1 SCHMITT0
15:8 SCHMITT15 SCHMITT14 SCHMITT13 SCHMITT12 SCHMITT11 SCHMITT10 SCHMITT9 SCHMITT8
0x0100 PIO_SCHMITT
23:16 SCHMITT23 SCHMITT22 SCHMITT21 SCHMITT20 SCHMITT19 SCHMITT18 SCHMITT17 SCHMITT16
31:24 SCHMITT31 SCHMITT30 SCHMITT29 SCHMITT28 SCHMITT27 SCHMITT26 SCHMITT25 SCHMITT24
0x0104
... Reserved
0x0117
7:0 LINE7 LINE6 LINE5 LINE4 LINE3 LINE2 LINE1 LINE0
15:8 LINE15 LINE14 LINE13 LINE12 LINE11 LINE10 LINE9 LINE8
0x0118 PIO_DRIVER
23:16 LINE23 LINE22 LINE21 LINE20 LINE19 LINE18 LINE17 LINE16
31:24 LINE31 LINE30 LINE29 LINE28 LINE27 LINE26 LINE25 LINE24
0x011C
... Reserved
0x014F
7:0 DSIZE[1:0] PCEN
15:8 FRSTS HALFS ALWYS
0x0150 PIO_PCMR
23:16
31:24
7:0 RXBUFF ENDRX OVRE DRDY
15:8
0x0154 PIO_PCIER
23:16
31:24
7:0 RXBUFF ENDRX OVRE DRDY
15:8
0x0158 PIO_PCIDR
23:16
31:24
7:0 RXBUFF ENDRX OVRE DRDY
15:8
0x015C PIO_PCIMR
23:16
31:24
7:0 RXBUFF ENDRX OVRE DRDY
15:8
0x0160 PIO_PCISR
23:16
31:24
7:0 RDATA[7:0]
15:8 RDATA[15:8]
0x0164 PIO_PCRHR
23:16 RDATA[23:16]
31:24 RDATA[31:24]
Name: PIO_PER
Offset: 0x0000
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PIO Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Enable
Value Description
0 No effect.
1 Enables the PIO to control the corresponding pin (disables peripheral control of the pin).
Name: PIO_PDR
Offset: 0x0004
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PIO Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Disable
Value Description
0 No effect.
1 Disables the PIO from controlling the corresponding pin (enables peripheral control of the pin).
Name: PIO_PSR
Offset: 0x0008
Property: Read-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access R R R R R R R R
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access R R R R R R R R
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access R R R R R R R R
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access R R R R R R R R
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Status
Value Description
0 PIO is inactive on the corresponding I/O line (peripheral is active).
1 PIO is active on the corresponding I/O line (peripheral is inactive).
Name: PIO_OER
Offset: 0x0010
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PIO Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Output
Enable
Value Description
0 No effect.
1 Enables the output on the I/O line.
Name: PIO_ODR
Offset: 0x0014
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PIO Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Output
Disable
Value Description
0 No effect.
1 Disables the output on the I/O line.
Name: PIO_OSR
Offset: 0x0018
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Output
Status
Value Description
0 The I/O line is a pure input.
1 The I/O line is enabled in output.
Name: PIO_IFER
Offset: 0x0020
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PIO Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Input
Filter Enable
Value Description
0 No effect.
1 Enables the input glitch filter on the I/O line.
Name: PIO_IFDR
Offset: 0x0024
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PIO Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Input
Filter Disable
Value Description
0 No effect.
1 Disables the input glitch filter on the I/O line.
Name: PIO_IFSR
Offset: 0x0028
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Input
Filter Status
Value Description
0 The input glitch filter is disabled on the I/O line.
1 The input glitch filter is enabled on the I/O line.
Name: PIO_SODR
Offset: 0x0030
Property: Write-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Set
Output Data
Value Description
0 No effect.
1 Sets the data to be driven on the I/O line.
Name: PIO_CODR
Offset: 0x0034
Property: Write-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Clear
Output Data
Value Description
0 No effect.
1 Clears the data to be driven on the I/O line.
Name: PIO_ODSR
Offset: 0x0038
Property: Read-only
or Read/Write
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Output
Data Status
Value Description
0 The data to be driven on the I/O line is 0.
1 The data to be driven on the I/O line is 1.
Name: PIO_PDSR
Offset: 0x003C
Property: Read-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access R R R R R R R R
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access R R R R R R R R
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access R R R R R R R R
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access R R R R R R R R
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Output
Data Status
Value Description
0 The I/O line is at level 0.
1 The I/O line is at level 1.
Name: PIO_IER
Offset: 0x0040
Property: Write-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Input
Change Interrupt Enable
Value Description
0 No effect.
1 Enables the input change interrupt on the I/O line.
Name: PIO_IDR
Offset: 0x0044
Property: Write-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Input
Change Interrupt Disable
Value Description
0 No effect.
1 Disables the input change interrupt on the I/O line.
Name: PIO_IMR
Offset: 0x0048
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Input
Change Interrupt Mask
Value Description
0 Input change interrupt is disabled on the I/O line.
1 Input change interrupt is enabled on the I/O line.
Name: PIO_ISR
Offset: 0x004C
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Input
Change Interrupt Status
Value Description
0 No input change has been detected on the I/O line since PIO_ISR was last read or since reset.
1 At least one input change has been detected on the I/O line since PIO_ISR was last read or since
reset.
Name: PIO_MDER
Offset: 0x0050
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PIO Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Multi-drive Enable
Value Description
0 No effect.
1 Enables multi-drive on the I/O line.
Name: PIO_MDDR
Offset: 0x0054
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PIO Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Multi-drive Disable
Value Description
0 No effect.
1 Disables multi-drive on the I/O line.
Name: PIO_MDSR
Offset: 0x0058
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Multi-drive Status
Value Description
0 The multi-drive is disabled on the I/O line. The pin is driven at high- and low-level.
1 The multi-drive is enabled on the I/O line. The pin is driven at low-level only.
Name: PIO_PUDR
Offset: 0x0060
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PIO Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Pull-Up Disable
Value Description
0 No effect.
1 Disables the pullup resistor on the I/O line.
Name: PIO_PUER
Offset: 0x0064
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PIO Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Pull-Up Enable
Value Description
0 No effect.
1 Enables the pullup resistor on the I/O line.
Name: PIO_PUSR
Offset: 0x0068
Property: Read-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access R R R R R R R R
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access R R R R R R R R
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access R R R R R R R R
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access R R R R R R R R
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Pull-Up Status
Value Description
0 Pullup resistor is enabled on the I/O line.
1 Pullup resistor is disabled on the I/O line.
Name: PIO_ABCDSR0
Offset: 0x0070
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the PIO Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Peripheral Select
If the same bit is set to '0' in PIO_ABCDSR1:
0: Assigns the I/O line to the Peripheral A function.
1: Assigns the I/O line to the Peripheral B function.
If the same bit is set to '1' in PIO_ABCDSR1:
0: Assigns the I/O line to the Peripheral C function.
1: Assigns the I/O line to the Peripheral D function.
Name: PIO_ABCDSR1
Offset: 0x0074
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the PIO Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Peripheral Select
If the same bit is set to '0' in PIO_ABCDSR0:
0: Assigns the I/O line to the Peripheral A function.
1: Assigns the I/O line to the Peripheral C function.
If the same bit is set to '1' in PIO_ABCDSR0:
0: Assigns the I/O line to the Peripheral B function.
1: Assigns the I/O line to the Peripheral D function.
Name: PIO_IFSCDR
Offset: 0x0080
Property: Write-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Peripheral Clock Glitch Filtering Select
Value Description
0 No effect.
1 The glitch filter is able to filter glitches with a duration < tperipheral clock/2.
Name: PIO_IFSCER
Offset: 0x0084
Property: Write-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Slow
Clock Debouncing Filtering Select
Value Description
0 No effect.
1 The debouncing filter is able to filter pulses with a duration < tdiv_slck/2.
Name: PIO_IFSCSR
Offset: 0x0088
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Glitch
or Debouncing Filter Selection Status
Value Description
0 The glitch filter is able to filter glitches with a duration < tperipheral clock/2.
1 The debouncing filter is able to filter pulses with a duration < tdiv_slck/2.
Name: PIO_SCDR
Offset: 0x008C
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
DIV[13:8]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DIV[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: PIO_PPDDR
Offset: 0x0090
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PIO Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Pull-Down Disable
Value Description
0 No effect.
1 Disables the pull-down resistor on the I/O line.
Name: PIO_PPDER
Offset: 0x0094
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PIO Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Pull-Down Enable
Value Description
0 No effect.
1 Enables the pull-down resistor on the I/O line.
Name: PIO_PPDSR
Offset: 0x0098
Property: Read-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access R R R R R R R R
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access R R R R R R R R
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access R R R R R R R R
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access R R R R R R R R
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Pull-Down Status
Value Description
0 Pull-down resistor is enabled on the I/O line.
1 Pull-down resistor is disabled on the I/O line.
Name: PIO_OWER
Offset: 0x00A0
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PIO Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Output
Write Enable
Value Description
0 No effect.
1 Enables writing PIO_ODSR for the I/O line.
Name: PIO_OWDR
Offset: 0x00A4
Property: Write-only
This register can only be written if the WPEN bit is cleared in the PIO Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Output
Write Disable
Value Description
0 No effect.
1 Disables writing PIO_ODSR for the I/O line.
Name: PIO_OWSR
Offset: 0x00A8
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Output
Write Status
Value Description
0 Writing PIO_ODSR does not affect the I/O line.
1 Writing PIO_ODSR affects the I/O line.
Name: PIO_AIMER
Offset: 0x00B0
Property: Write-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Additional Interrupt Modes Enable
Value Description
0 No effect.
1 The interrupt source is the event described in PIO_ELSR and PIO_FRLHSR.
Name: PIO_AIMDR
Offset: 0x00B4
Property: Write-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Additional Interrupt Modes Disable
Value Description
0 No effect.
1 The Interrupt mode is set to the default Interrupt mode (Both-edge Detection).
Name: PIO_AIMMR
Offset: 0x00B8
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO I/O
Line Index
Selects the I/O event type triggering an interrupt.
Value Description
0 The interrupt source is a both-edge detection event.
1 The interrupt source is described by the registers PIO_ELSR and PIO_FRLHSR.
Name: PIO_ESR
Offset: 0x00C0
Property: Write-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Edge
Interrupt Selection
Value Description
0 No effect.
1 The interrupt source is an edge-detection event.
Name: PIO_LSR
Offset: 0x00C4
Property: Write-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Level
Interrupt Selection
Value Description
0 No effect.
1 The interrupt source is a level-detection event.
Name: PIO_ELSR
Offset: 0x00C8
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Edge/Level Interrupt Source Selection
Value Description
0 The interrupt source is an edge-detection event.
1 The interrupt source is a level-detection event.
Name: PIO_FELLSR
Offset: 0x00D0
Property: Write-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Falling
Edge/Low-Level Interrupt Selection
Value Description
0 No effect.
1 The interrupt source is set to a falling edge detection or low-level detection event, depending on
PIO_ELSR.
Name: PIO_REHLSR
Offset: 0x00D4
Property: Write-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access W W W W W W W W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Rising
Edge/High-Level Interrupt Selection
Value Description
0 No effect.
1 The interrupt source is set to a rising edge detection or high-level detection event, depending on
PIO_ELSR.
Name: PIO_FRLHSR
Offset: 0x00D8
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO
Edge/Level Interrupt Source Selection
Value Description
0 The interrupt source is a falling edge detection (if PIO_ELSR = 0) or low-level detection event (if
PIO_ELSR = 1).
1 The interrupt source is a rising edge detection (if PIO_ELSR = 0) or high-level detection event (if
PIO_ELSR = 1).
Name: PIO_LOCKSR
Offset: 0x00E0
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
P31 P30 P29 P28 P27 P26 P25 P24
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
P23 P22 P21 P20 P19 P18 P17 P16
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
P15 P14 P13 P12 P11 P10 P9 P8
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
P7 P6 P5 P4 P3 P2 P1 P0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – P PIO Lock
Status
Value Description
0 The I/O line is not locked.
1 The I/O line is locked.
Name: PIO_WPMR
Offset: 0x00E4
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
WPKEY[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WPKEY[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPKEY[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPEN
Access R/W
Reset 0
Name: PIO_WPSR
Offset: 0x00E8
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
WPVSRC[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPVSRC[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPVS
Access R
Reset 0
Name: PIO_SCHMITT
Offset: 0x0100
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
SCHMITT31 SCHMITT30 SCHMITT29 SCHMITT28 SCHMITT27 SCHMITT26 SCHMITT25 SCHMITT24
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
SCHMITT23 SCHMITT22 SCHMITT21 SCHMITT20 SCHMITT19 SCHMITT18 SCHMITT17 SCHMITT16
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
SCHMITT15 SCHMITT14 SCHMITT13 SCHMITT12 SCHMITT11 SCHMITT10 SCHMITT9 SCHMITT8
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SCHMITT7 SCHMITT6 SCHMITT5 SCHMITT4 SCHMITT3 SCHMITT2 SCHMITT1 SCHMITT0
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – SCHMITT
PIO Schmitt Trigger Control
Value Description
0 Schmitt trigger is enabled.
1 Schmitt trigger is disabled.
Name: PIO_DRIVER
Offset: 0x0118
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
LINE31 LINE30 LINE29 LINE28 LINE27 LINE26 LINE25 LINE24
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset
Bit 23 22 21 20 19 18 17 16
LINE23 LINE22 LINE21 LINE20 LINE19 LINE18 LINE17 LINE16
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset
Bit 15 14 13 12 11 10 9 8
LINE15 LINE14 LINE13 LINE12 LINE11 LINE10 LINE9 LINE8
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset
Bit 7 6 5 4 3 2 1 0
LINE7 LINE6 LINE5 LINE4 LINE3 LINE2 LINE1 LINE0
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – LINE Drive
of PIO Line
Value Name Description
0 LOW_DRIVE Lowest drive
1 HIGH_DRIVE Highest drive
Name: PIO_PCMR
Offset: 0x0150
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the PIO Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
FRSTS HALFS ALWYS
Access R/W R/W R/W
Reset 0 0 0
Bit 7 6 5 4 3 2 1 0
DSIZE[1:0] PCEN
Access R/W R/W R/W
Reset 0 0 0
Value Description
1 The Parallel Capture mode is enabled.
Name: PIO_PCIER
Offset: 0x0154
Property: Write-only
The following configuration values are valid for all listed bit names of this register:
0: No effect
1: Enables the corresponding interrupt
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
RXBUFF ENDRX OVRE DRDY
Access W W W W
Reset
Name: PIO_PCIDR
Offset: 0x0158
Property: Write-only
The following configuration values are valid for all listed bit names of this register:
0: No effect
1: Disables the corresponding interrupt
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
RXBUFF ENDRX OVRE DRDY
Access W W W W
Reset
Name: PIO_PCIMR
Offset: 0x015C
Reset: 0x00000000
Property: Read-only
The following configuration values are valid for all listed bit names of this register:
0: Corresponding interrupt is not enabled.
1: Corresponding interrupt is enabled.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
RXBUFF ENDRX OVRE DRDY
Access R R R R
Reset 0 0 0 0
Name: PIO_PCISR
Offset: 0x0160
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
RXBUFF ENDRX OVRE DRDY
Access R R R R
Reset 0 0 0 0
Name: PIO_PCRHR
Offset: 0x0164
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
RDATA[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RDATA[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RDATA[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RDATA[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
33.1 Description
The External Bus Interface (EBI) is designed to ensure the successful data transfer between several external devices
and the embedded Memory Controller of an Arm-based device.
The Static Memory is an external Memory Controller on the EBI. This external Memory Controller is capable of
handling several types of external memory and peripheral devices, such as SRAM, PROM, EPROM, EEPROM, and
Flash. The EBI operates with a 1.8V or 3.3V power supply.
Note: The SAMV7x devices operates at 3.3V only.
The EBI also supports the NAND Flash protocols through integrated circuitry that reduces the requirements for
external components. Additionally, the EBI handles data transfers with up to six external devices, each assigned to
six address spaces defined by the embedded Memory Controller. Data transfers are performed through a 16-bit or
32-bit data bus, an address bus of up to 24 bits, up to four chip select lines (NCS[3:0]) and several control pins that
are generally multiplexed between the different external Memory Controllers.
NAND Flash
Logic NCS3/NANDCS
NANDOE
NANDWE
Chip Select A21/NANDALE
Address Decoders
Assignor
A22/NANDCLE
A[23:20]
NWAIT
User Interface
APB
...........continued
Name Function Type Active Level
A0–A23 Address Bus Output
NWAIT External Wait Signal Input Low
SMC
NCS0–EBI_NCS3 Chip Select Lines Output Low
NWR0–NWR1 Write Signals Output Low
NRD Read Signal Output Low
NWE Write Enable Output Low
NBS0–NBS1 Byte Mask Signals Output Low
EBI for NAND Flash Support
NANDCS NAND Flash Chip Select Line Output Low
NANDOE NAND Flash Output Enable Output Low
NANDWE NAND Flash Write Enable Output Low
The connection of some signals through the MUX logic is not direct and depends on the Memory Controller in use at
the moment.
The following table details the connections between the SMC Memory Controller and the EBI pins.
Table 33-2. EBI Pins and Memory Controllers I/O Lines Connections
Note: NWR1 enables upper byte writes. NWR0 enables lower byte writes.
Table 33-4. EBI Pins and External Device Connections
...........continued
Signals: Power supply Pins of the Interfaced Device
EBI_
NAND Flash
Controller NFC
A22/NANDCLE VDDIO CLE
A23 VDDIO –
NCS0 VDDIO –
NCS1 VDDIO –
NCS2 VDDIO –
NCS3/NANDCS VDDIO CE
NANDOE VDDIO OE
NANDWE VDDIO WE
NRD VDDIO –
NWR0/NWE VDDIO –
NWR1/NBS1 VDDIO –
Pxx VDDIO CE
Pxx VDDIO RDY
To ensure that the processor preserves transaction order and thus the correct NAND Flash behavior, the NAND Flash
address space is to be declared in the Memory Protection Unit (MPU) as “Device” or “Strongly-ordered” memory.
Refer to the ARM Cortex-M7 Technical Reference Manual (ARM DDI 0489) available on www.arm.com.
External Bus Interface
The NAND Flash Chip Select (NANDCS) is driven by the Static Memory Controller on the NCS0, NCS1, NCS2 or
NCS3 address space depending on value of SMC_SMCSx bits. For example, programming the SMC_NFC3 field in
the CCFG_SMCNFCS Register in the Chip Configuration User Interface to the appropriate value enables the NAND
Flash logic. For details on this register, refer to 19. Bus Matrix (MATRIX). Access to an external NAND Flash device
is then made by accessing the address space reserved to NCS3 (i.e., between 0x6300 0000 and 0x6FFF FFFF).
The NAND Flash logic drives the read and write command signals of the SMC on the NANDOE and NANDWE
signals when the required SMC_NFCSx signal is active. NANDOE and NANDWE are invalidated as soon as the
transfer address fails to lie in the selected NCSx address space. For details on these waveforms, refer to 34. Static
Memory Controller (SMC).
NAND Flash Signals
The address latch enable and command latch enable signals on the NAND Flash device are driven by address bits
A22 and A21 of the EBI address bus. The command, address or data words on the data bus of the NAND Flash
device are distinguished by using their address within the NCSx address space. The chip enable (CE) signal of the
device and the ready/busy (R/B) signals are connected to PIO lines. The CE signal then remains asserted even when
NCSx is not selected, preventing the device from returning to standby mode.
34.1 Description
The External Bus Interface (EBI) is designed to ensure the successful data transfer between several external devices
and the ARM-based microcontroller. The Static Memory Controller (SMC) is part of the EBI.
The SMC handles several types of external memory and peripheral devices, such as SRAM, PSRAM, PROM,
EPROM, EEPROM, LCD Module, NOR Flash and NAND Flash.
The SMC generates the signals that control the access to the external memory devices or peripheral devices. It has
4 chip selects, a 24-bit address bus, and a configurable 8 or 16-bit data bus. Separate read and write control signals
allow for direct memory and peripheral interfacing. Read and write signal waveforms are fully adjustable.
The SMC can manage wait requests from external devices to extend the current access. The SMC is provided
with an automatic Slow clock mode. In Slow clock mode, it switches from user-programmed waveforms to slow-rate
specific waveforms on read and write signals. The SMC supports asynchronous burst read in Page mode access for
page sizes up to 32 bytes.
The external data bus can be scrambled/unscrambled by means of user keys.
...........continued
Name Description Type Active Level
NWAIT External Wait Signal Input Low
NANDCS NAND Flash Chip Select Line Output Low
NANDOE NAND Flash Output Enable Output Low
NANDWE NAND Flash Write Enable Output Low
NANDALE NAND Flash Address Latch Enable Output –
NANDCLE NAND Flash Command Latch Enable Output –
NCS[0] - NCS[3]
NRD
SMC NWE
A[23:0]
D[15:0] NCS3
Memory Enable
NCS2
Memory Enable
NCS1
Memory Enable
NCS0
Memory Enable
Output Enable
Write Enable
24
A[23:0]
16 or 8
D[15:0] or D[7:0]
D[7:0] D[7:0]
A[18:2] A[18:2]
A1 A1
SMC A0 A0
D[15:0] D[15:0]
A[19:2] A[18:1]
A1 A[0]
D[7:0] D[7:0]
D[15:8]
A[24:2] A[23:1]
SMC A1 A[0]
NWR0 Write Enable
NWR1
NRD Read Enable
NCS[3] Memory Enable
D[15:8]
A[23:1]
A[0]
Write Enable
Read Enable
Memory Enable
NCSx NANDOE
NANDOE
NRD
NANDWE
NANDWE
NWE
• This restriction has been removed for “CE don’t care” NAND Flash devices. The NCSx signal can be directly
connected to the CE pin of the NAND Flash device.
The following figure illustrates both topologies: Standard and “CE don’t care” NAND Flash.
Figure 34-6. Standard and “CE don’t care” NAND Flash Application Examples
D[7:0] D[7:0]
AD[7:0] AD[7:0]
A[22:21] A[22:21]
ALE ALE
CLE CLE
NCSx NCSx
Not Connected CE
SMC SMC
NANDOE NANDOE
NOE NOE
NANDWE NANDWE
NWE NWE
PIO CE
Related Links
19. Bus Matrix (MATRIX)
Hardware Configuration
Figure 34-7. 8-bit NAND Flash
D[0..7]
U1 K9F2G08U0M
CLE 16 29 D0
CLE I/O0 D1
ALE 17 ALE I/O1 30
NANDOE 8 31 D2
RE I/O2 D3
NANDWE 18 WE I/O3 32
(ANY PIO) 9 41 D4
CE I/O4 D5
I/O5 42
7 43 D6
(ANY PIO) R/B I/O6
R1 10K 44 D7
I/O7
3V3 19 WP
R2 10K N.C 48
N.C 47
1 N.C N.C 46
2 N.C N.C 45
3 N.C N.C 40
4 N.C N.C 39
5 N.C PRE 38
6 N.C N.C 35
10 N.C N.C 34
11 N.C N.C 33
14 N.C N.C 28
15 N.C N.C 27 3V3
20 N.C
21 N.C VCC 37
22 N.C VCC 12
23 C2
N.C
24 N.C
25 36 100NF
N.C VSS
26 N.C VSS 13
C1
100NF
2 Gb
TSOP48 PACKAGE
Software Configuration
Perform the following configuration:
1. Select the chip select used to drive the NAND Flash by setting the bit CCFG_SMCNFCS.SMC_NFCSx.
2. Reserve A21 / A22 for ALE / CLE functions. Address and Command Latches are controlled by setting the
address bits A21 and A22, respectively, during accesses.
3. NANDOE and NANDWE signals are multiplexed with PIO lines. Thus, the dedicated PIOs must be
programmed in Peripheral mode in the PIO controller.
4. Configure a PIO line as an input to manage the Ready/Busy signal.
5. Configure SMC CS3 Setup, Pulse, Cycle and Mode according to NAND Flash timings, the data bus width and
the system bus frequency.
In this example, the NAND Flash is not addressed as a “CE don’t care”. To address it as a “CE don’t care”, connect
NCS3 (if SMC_NFCS3 is set) to the NAND Flash CE.
Hardware Configuration
Figure 34-8. NOR Flash
D[0..7]
A[0..21]
U1
A0 D0
A0 DQ0 D1
A1
A1 DQ1 D2
A2
A2 DQ2 D3
A3
A3 DQ3 D4
A4
A4 DQ4 D5
A5
A5 DQ5 D6
A6
A6 DQ6 D7
A7
A7 DQ7
A8
A8
A9
A9
A10
A10
A11
A11
A12
A12
A13
A13
A14
A14
A15
A15
A16
A16
A17
A17
A18
A18
A19
A19
A20 3V3
A20
A21
A21
VCCQ
NRST RESET
NWE WE
WP VCC C2
3V3 VPP 100NF
NCS0 CE
NRD OE VSS
VSS C1
100NF
Software Configuration
Configure the SMC CS0 Setup, Pulse, Cycle, and Mode, depending on Flash timings and system bus frequency.
MCK
A[23:0]
NRD
NCS
D[7:0]
NRD_CYCLE
MCK
A[23:0]
NRD
NCS
D[7:0]
Figure 34-11. SMC_MODE.READ_MODE = 1: Data is sampled by SMC before the rising edge of NRD
MCK
A[23:0]
NRD
NCS
tPACC
D[7:0]
Data Sampling
MCK
A[23:0]
NRD
NCS
tPACC
D[7:0]
Data Sampling
MCK
A[23:0]
NWE
NCS
NWE_CYCLE
Figure 34-14. Null Setup and Hold Values of NCS and NWE in Write Cycle
MCK
A[23:0]
NWE
NCS
D[7:0]
MCK
A[23:0]
NWE
NCS
D[7:0]
MCK
A[23:0]
NWE
NCS
D[7:0]
• NWE_CYCLE
The following table shows how the timing parameters are coded and their permitted range.
Table 34-4. Coding and Range of Timing Parameters
The scrambling/unscrambling function can be enabled or disabled by configuring the CSxSE bits in the SMC Off-Chip
Memory Scrambling Register (SMC_OCMS).
When multiple chip selects are handled, the scrambling function per chip select is configurable using the CSxSE bits
in the SMC_OCMS register.
The scrambling method depends on two user-configurable key registers, SMC_KEY1 and SMC_KEY2 plus a random
value depending on device processing characteristics. These key registers cannot be read. They can be written once
after a system reset.
The scrambling user key or the seed for key generation must be securely stored in a reliable non-volatile memory in
order to recover data from the off-chip memory. Any data scrambled with a given key cannot be recovered if the key
is lost.
MCK
A[23:0]
NRD
NWE
NCS0
NCS2
NRD_CYCLE NWE_CYCLE
D[7:0]
• if the write controlling signal has no hold time and the read controlling signal has no setup time (Figure 34-18).
• in NCS Write controlled mode (SMC_MODE.WRITE_MODE = 0), if there is no hold timing on the NCS signal
and the NCS_RD_SETUP parameter is set to 0, regardless of the Read mode (Figure 34-19). The write
operation must end with a NCS rising edge. Without an Early Read Wait State, the write operation could not
complete properly.
• in NWE controlled mode (SMC_MODE.WRITE_MODE = 1) and if there is no hold timing (NWE_HOLD = 0), the
feedback of the write control signal is used to control address, data, and chip select lines. If the external write
control signal is not inactivated as expected due to load capacitances, an Early Read Wait State is inserted and
address, data and control signals are maintained one more cycle. See Figure 34-20.
Figure 34-18. Early Read Wait State: Write with No Hold Followed by Read with No Setup
MCK
A[23:0]
NWE
NRD
no hold
no setup
D[7:0]
Figure 34-19. Early Read Wait State: NCS-controlled write with no hold followed by a read with no NCS
setup
MCK
A[23:0]
NCS
NRD
no hold no setup
D[7:0]
Figure 34-20. Early Read Wait State: NWE-controlled write with no hold followed by a read with one
set-up cycle
MCK
A[25:2]
D[7:0]
34.12.1 SMC_MODE.READ_MODE
Setting SMC_MODE.READ_MODE to 1 indicates to the SMC that the NRD signal is responsible for turning off the
tri-state buffers of the external memory device. The Data Float Period then begins after the rising edge of the NRD
signal and lasts SMC_MODE.TDF_CYCLES MCK cycles.
When the read operation is controlled by the NCS signal (SMC_MODE.READ_MODE = 0), the TDF field gives the
number of MCK cycles during which the data bus remains busy after the rising edge of NCS.
Figure 34-21 illustrates the Data Float Period in NRD-controlled mode (SMC_MODE.READ_MODE =1), assuming
a data float period of 2 cycles (SMC_MODE.TDF_CYCLES = 2). Figure 34-22 shows the read operation when
controlled by NCS (SMC_MODE.READ_MODE = 0) and SMC_MODE.TDF_CYCLES = 3.
Figure 34-21. TDF Period in NRD Controlled Read Access (TDF = 2)
MCK
A[23:0]
NRD
NCS
tpacc
D[7:0]
MCK
A[23:0]
NWE
NCS
D[7:0]
MCK
NRD
NRD_HOLD= 4
NWE
NWE_SETUP= 3
NCS0
TDF_CYCLES = 6
D[7:0]
read access on NCS0 (NRD controlled) Read to Write write access on NCS0 (NWE controlled)
Wait State
MCK
A[23:0]
D[7:0]
Figure 34-25. TDF Mode = 0: TDF wait states between a read and a write access on different chip selects
MCK
A[23:0]
D[7:0]
Figure 34-26. TDF Mode = 0: TDF wait states between read and write accesses on the same chip select
MCK
A[23:0]
D[7:0]
34.13.1 Restriction
When SMC_MODE.EXNW_MODE is enabled, it is mandatory to program at least one hold cycle for the read/write
controlling signal. For that reason, the NWAIT signal cannot be used in Page mode (34.15. Asynchronous Page
Mode), or in Slow clock mode (”Slow Clock Mode”).
The NWAIT signal is assumed to be a response of the external device to the read/write request of the SMC. Then
NWAIT is examined by the SMC only in the pulse state of the read or write controlling signal. The assertion of the
NWAIT signal outside the expected period has no impact on SMC behavior.
Figure 34-27. Write Access with NWAIT Assertion in Frozen Mode (SMC_MODE.EXNW_MODE = 10)
MCK
A[23:0]
FROZEN STATE
4 3 2 1 1 1 1 0
NWE
6 5 4 3 2 2 2 2 1 0
NCS
D[7:0]
NWAIT
internally synchronized
NWAIT signal
Write cycle
EXNW_MODE = 10 (Frozen)
WRITE_MODE = 1 (NWE_controlled)
NWE_PULSE = 5
NCS_WR_PULSE = 7
Figure 34-28. Read Access with NWAIT Assertion in Frozen Mode (SMC_MODE.EXNW_MODE = 10)
MCK
A[23:0]
FROZEN STATE
NCS 2 2 2 1 0
4 3
2 1 0
1 0
NRD
5 5 5 4 3 2 1 0
NWAIT
internally synchronized
NWAIT signal
Read cycle
EXNW_MODE = 10 (Frozen)
READ_MODE = 0 (NCS_controlled)
Assertion is ignored
NRD_PULSE = 2, NRD_HOLD = 6
NCS_RD_PULSE =5, NCS_RD_HOLD =3
If asserted, the SMC suspends the access as shown in Figure 34-29 and Figure 34-30. After deassertion, the access
is completed: the hold step of the access is performed.
This mode must be selected when the external device uses deassertion of the NWAIT signal to indicate its ability to
complete the read or write operation.
If the NWAIT signal is deasserted before the end of the pulse, or asserted after the end of the pulse of the controlling
read/write signal, it has no impact on the access length as shown in Figure 34-30.
Figure 34-29. NWAIT Assertion in Write Access: Ready Mode (SMC_MODE.EXNW_MODE = 11)
MCK
A[23:0]
Wait STATE
4 3 2 1 0 0 0
NWE
6 5 4 3 2 1 1 1 0
NCS
D[7:0]
NWAIT
internally synchronized
NWAIT signal
Write cycle
NWE_PULSE = 5
NCS_WR_PULSE = 7
Figure 34-30. NWAIT Assertion in Read Access: Ready Mode (SMC_MODE.EXNW_MODE = 11)
MCK
A[23:0]
Wait STATE
6 5 4 3 2 1 0 0
NCS
6 5 4 3 2 1 1 0
NRD
NWAIT
internally synchronized
NWAIT signal
Read cycle
MCK
A[23:0]
WAIT STATE
4 3 2 1 0 0 0
NRD
minimal pulse length
NWAIT
Read cycle
EXNW_MODE = 10 or 11
READ_MODE = 1 (NRD_controlled)
NRD_PULSE = 5
MCK MCK
A[23:0] A[23:0]
NRD
NWE 1 1 1
1 1
NCS
NCS
NRD_CYCLE = 2
NWE_CYCLE = 3
Table 34-6. Read and Write Timing Parameters in Slow Clock Mode
34.14.2 Switching from (to) Slow Clock Mode to (from) Normal Mode
When switching from Slow clock mode to Normal mode, the current Slow clock mode transfer is completed at a high
clock rate, with the set of Slow clock mode parameters (see Figure 34-33). The external device may not be fast
enough to support such timings.
Figure 34-34 illustrates the recommended procedure to switch from one mode to the other.
Figure 34-33. Clock Rate Transition Occurs while the SMC is Performing a Write Operation
Slow Clock Mode
internal signal from PMC
MCK
A[23:0]
NWE
1 1 1 1 1 1 2 3 2
NCS
NWE_CYCLE = 3 NWE_CYCLE = 7
SLOW CLOCK MODE WRITE SLOW CLOCK MODE WRITE NORMAL MODE WRITE
This write cycle finishes with the slow clock mode set Slow clock mode
of parameters after the clock rate transition transition is detected:
Reload Configuration Wait State
Figure 34-34. Recommended Procedure to Switch from Slow Clock Mode to Normal Mode or from Normal
Mode to Slow Clock Mode
Slow Clock Mode
internal signal from PMC
MCK
A[23:0]
NWE
1 1 1 2 3 2
NCS
Page Size Page Address (see Note) Data Address in the Page
4 bytes A[23:2] A[1:0]
8 bytes A[23:3] A[2:0]
16 bytes A[23:4] A[3:0]
32 bytes A[23:5] A[4:0]
Figure 34-35. Page Mode Read Protocol (Address MSB and LSB are defined in Table 34-7)
MCK
A[MSB]
A[LSB]
NRD
D[7:0]
The NRD and NCS signals are held low during all read transfers, whatever the programmed values of the setup and
hold timings in the User Interface may be. Moreover, the NRD and NCS timings are identical. The pulse length of the
first access to the page is defined with the NCS_RD_PULSE field of the SMC_PULSE register. The pulse length of
subsequent accesses within the page are defined using the NRD_PULSE parameter.
In Page mode, the programming of the read timings is described in the following table:
Table 34-8. Programming of Read Timings in Page Mode
The SMC does not check the coherency of timings. It will always apply the NCS_RD_PULSE timings as page access
timing (tpa) and the NRD_PULSE for accesses to the page (tsa), even if the programmed value for tpa is shorter than
the programmed value for tsa.
If the MSB of addresses are different, the SMC performs the access of a new page. In the same way, if the chip
select is different from the previous access, a page break occurs. If two sequential accesses are made to the Page
mode memory, but separated by an other internal or external peripheral access, a page break occurs on the second
access because the chip select of the device was deasserted between both accesses.
Figure 34-36. Access to Non-Sequential Data within the Same Page
MCK
A[2], A1, A0 A1 A3 A7
NRD
NCS
D[7:0] D1 D3 D7
7:0 NWE_SETUP[5:0]
15:8 NCS_WR_SETUP[5:0]
0x00 SMC_SETUP0
23:16 NRD_SETUP[5:0]
31:24 NCS_RD_SETUP[5:0]
7:0 NWE_PULSE[6:0]
15:8 NCS_WR_PULSE[6:0]
0x04 SMC_PULSE0
23:16 NRD_PULSE[6:0]
31:24 NCS_RD_PULSE[6:0]
7:0 NWE_CYCLE[7:0]
NWE_CYCLE[
15:8
8]
0x08 SMC_CYCLE0
23:16 NRD_CYCLE[7:0]
NRD_CYCLE[
31:24
8]
WRITE_MOD
7:0 EXNW_MODE[1:0] READ_MODE
E
0x0C SMC_MODE0 15:8 DBW BAT
23:16 TDF_MODE TDF_CYCLES[3:0]
31:24 PS[1:0] PMEN
7:0 NWE_SETUP[5:0]
15:8 NCS_WR_SETUP[5:0]
0x10 SMC_SETUP1
23:16 NRD_SETUP[5:0]
31:24 NCS_RD_SETUP[5:0]
7:0 NWE_PULSE[6:0]
15:8 NCS_WR_PULSE[6:0]
0x14 SMC_PULSE1
23:16 NRD_PULSE[6:0]
31:24 NCS_RD_PULSE[6:0]
7:0 NWE_CYCLE[7:0]
NWE_CYCLE[
15:8
8]
0x18 SMC_CYCLE1
23:16 NRD_CYCLE[7:0]
NRD_CYCLE[
31:24
8]
WRITE_MOD
7:0 EXNW_MODE[1:0] READ_MODE
E
0x1C SMC_MODE1 15:8 DBW BAT
23:16 TDF_MODE TDF_CYCLES[3:0]
31:24 PS[1:0] PMEN
7:0 NWE_SETUP[5:0]
15:8 NCS_WR_SETUP[5:0]
0x20 SMC_SETUP2
23:16 NRD_SETUP[5:0]
31:24 NCS_RD_SETUP[5:0]
7:0 NWE_PULSE[6:0]
15:8 NCS_WR_PULSE[6:0]
0x24 SMC_PULSE2
23:16 NRD_PULSE[6:0]
31:24 NCS_RD_PULSE[6:0]
7:0 NWE_CYCLE[7:0]
NWE_CYCLE[
15:8
8]
0x28 SMC_CYCLE2
23:16 NRD_CYCLE[7:0]
NRD_CYCLE[
31:24
8]
...........continued
WRITE_MOD
7:0 EXNW_MODE[1:0] READ_MODE
E
0x2C SMC_MODE2 15:8 DBW BAT
23:16 TDF_MODE TDF_CYCLES[3:0]
31:24 PS[1:0] PMEN
7:0 NWE_SETUP[5:0]
15:8 NCS_WR_SETUP[5:0]
0x30 SMC_SETUP3
23:16 NRD_SETUP[5:0]
31:24 NCS_RD_SETUP[5:0]
7:0 NWE_PULSE[6:0]
15:8 NCS_WR_PULSE[6:0]
0x34 SMC_PULSE3
23:16 NRD_PULSE[6:0]
31:24 NCS_RD_PULSE[6:0]
7:0 NWE_CYCLE[7:0]
NWE_CYCLE[
15:8
8]
0x38 SMC_CYCLE3
23:16 NRD_CYCLE[7:0]
NRD_CYCLE[
31:24
8]
WRITE_MOD
7:0 EXNW_MODE[1:0] READ_MODE
E
0x3C SMC_MODE3 15:8 DBW BAT
23:16 TDF_MODE TDF_CYCLES[3:0]
31:24 PS[1:0] PMEN
0x40
... Reserved
0x7F
7:0 SMSE
15:8 CS3SE CS2SE CS1SE CS0SE
0x80 SMC_OCMS
23:16
31:24
7:0 KEY1[7:0]
15:8 KEY1[15:8]
0x84 SMC_KEY1
23:16 KEY1[23:16]
31:24 KEY1[31:24]
7:0 KEY2[7:0]
15:8 KEY2[15:8]
0x88 SMC_KEY2
23:16 KEY2[23:16]
31:24 KEY2[31:24]
0x8C
... Reserved
0xE3
7:0 WPEN
15:8 WPKEY[7:0]
0xE4 SMC_WPMR
23:16 WPKEY[15:8]
31:24 WPKEY[23:16]
7:0 WPVS
15:8 WPVSRC[7:0]
0xE8 SMC_WPSR
23:16 WPVSRC[15:8]
31:24
Name: SMC_SETUP
Offset: 0x00 + n*0x10 [n=0..3]
Reset: 0x01010101
Property: R/W
This register can only be written if the WPEN bit is cleared in the “SMC Write Protection Mode Register” .
Bit 31 30 29 28 27 26 25 24
NCS_RD_SETUP[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 1
Bit 23 22 21 20 19 18 17 16
NRD_SETUP[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 1
Bit 15 14 13 12 11 10 9 8
NCS_WR_SETUP[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 1
Bit 7 6 5 4 3 2 1 0
NWE_SETUP[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 1
Name: SMC_PULSE
Offset: 0x04 + n*0x10 [n=0..3]
Reset: 0x01010101
Property: R/W
This register can only be written if the WPEN bit is cleared in the “SMC Write Protection Mode Register” .
Bit 31 30 29 28 27 26 25 24
NCS_RD_PULSE[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 1
Bit 23 22 21 20 19 18 17 16
NRD_PULSE[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 1
Bit 15 14 13 12 11 10 9 8
NCS_WR_PULSE[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 1
Bit 7 6 5 4 3 2 1 0
NWE_PULSE[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 1
Name: SMC_CYCLE
Offset: 0x08 + n*0x10 [n=0..3]
Reset: 0x00030003
Property: R/W
This register can only be written if the WPEN bit is cleared in the “SMC Write Protection Mode Register” .
Bit 31 30 29 28 27 26 25 24
NRD_CYCLE[8]
Access R/W
Reset 0
Bit 23 22 21 20 19 18 17 16
NRD_CYCLE[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 1 1
Bit 15 14 13 12 11 10 9 8
NWE_CYCLE[8
]
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
NWE_CYCLE[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 1 1
Name: SMC_MODE
Offset: 0x0C + n*0x10 [n=0..3]
Reset: 0x10001003
Property: R/W
This register can only be written if the WPEN bit is cleared in the “SMC Write Protection Mode Register” .
The user must confirm the SMC configuration by writing any one of the SMC_MODE registers.
Bit 31 30 29 28 27 26 25 24
PS[1:0] PMEN
Access R/W R/W R/W
Reset
Bit 23 22 21 20 19 18 17 16
TDF_MODE TDF_CYCLES[3:0]
Access R/W R/W R/W R/W R/W
Reset
Bit 15 14 13 12 11 10 9 8
DBW BAT
Access R/W R/W
Reset
Bit 7 6 5 4 3 2 1 0
EXNW_MODE[1:0] WRITE_MODE READ_MODE
Access R/W R/W R/W R/W
Reset
Name: SMC_OCMS
Offset: 0x80
Reset: 0x00000000
Property: Read/Write
Note: This register can only be written if the WPEN bit is cleared in the SMC Write Protection Mode Register
(34.16.1.8. SMC_WPMR).
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
CS3SE CS2SE CS1SE CS0SE
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SMSE
Access R/W
Reset 0
Name: SMC_KEY1
Offset: 0x84
Reset: 0x00000000
Property: Write-once
Note:
1. ‘Write-once’ access indicates that the first write access after a system reset prevents any further modification
of the value of this register.
Bit 31 30 29 28 27 26 25 24
KEY1[31:24]
Access
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
KEY1[23:16]
Access
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
KEY1[15:8]
Access
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
KEY1[7:0]
Access
Reset 0 0 0 0 0 0 0 0
Name: SMC_KEY2
Offset: 0x88
Reset: 0x00000000
Property: Write-once
Note: ‘Write-once’ access indicates that the first write access after a system reset prevents any further modification
of the value of this register.
Bit 31 30 29 28 27 26 25 24
KEY2[31:24]
Access
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
KEY2[23:16]
Access
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
KEY2[15:8]
Access
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
KEY2[7:0]
Access
Reset 0 0 0 0 0 0 0 0
Name: SMC_WPMR
Offset: 0xE4
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
WPKEY[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WPKEY[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPKEY[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPEN
Access R/W
Reset 0
Name: SMC_WPSR
Offset: 0xE8
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
WPVSRC[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPVSRC[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPVS
Access R
Reset 0
35.1 Description
The DMA Controller (XDMAC) is a -protocol central direct memory access controller. It performs peripheral data
transfer and memory move operations over one or two bus ports through the unidirectional communication channel.
Each channel is fully programmable and provides both peripheral or memory-to-memory transfers. The channel
features are configurable at implementation.
DMA DMA
Interrupt Interrupt
...........continued
Peripheral Name Transfer Type HW Interface Number (XDMAC_CC.PERID)
PWM0 Transmit 13
TWIHS0 Transmit 14
TWIHS0 Receive 15
TWIHS1 Transmit 16
TWIHS1 Receive 17
TWIHS2 Transmit 18
TWIHS2 Receive 19
UART0 Transmit 20
UART0 Receive 21
UART1 Transmit 22
UART1 Receive 23
UART2 Transmit 24
UART2 Receive 25
UART3 Transmit 26
UART3 Receive 27
UART4 Transmit 28
UART4 Receive 29
DACC Transmit 30
SSC Transmit 32
SSC Receive 33
PIOA Receive 34
AFEC0 Receive 35
AFEC1 Receive 36
AES Transmit 37
AES Receive 38
PWM1 Transmit 39
TC0.Ch0 Receive 40
TC1.Ch0 Receive 41
TC2.Ch0 Receive 42
TC3.Ch0 Receive 43
I2SC0 Transmit Left 44
I2SC0 Receive Left 45
I2SC1 Transmit Left 46
I2SC1 Receive Left 47
I2SC0 Transmit Right 48
...........continued
Peripheral Name Transfer Type HW Interface Number (XDMAC_CC.PERID)
I2SC0 Receive Right 49
I2SC1 Transmit Right 50
I2SC1 Receive Right 51
Host Transfer
Host Transfer
This indicates that the linked list is disabled and striding is disabled.
9. Enable the Block interrupt by writing a ‘1’ to XDMAC_CIEx.BIE, enable the Channel x Interrupt Enable bit by
writing a ‘1’ to XDMAC_GIEx.IEx.
10. Enable channel x by writing a ‘1’ to the XDMAC_GE.ENx. XDMAC_GS.STx is set by hardware.
11. Once completed, the DMA channel sets XDMAC_CISx.BIS (End of Block Interrupt Status bit) and generates
an interrupt. XDMAC_GS.STx is cleared by hardware. The software can either wait for an interrupt or poll the
channel status bit.
...........continued
Channel Next Descriptor Offset Structure member Name
View 2 Structure DSCR_ADDR+0x00 Next Descriptor Address Member MBR_NDA
DSCR_ADDR+0x04 Microblock Control Member MBR_UBC
DSCR_ADDR+0x08 Source Address Member MBR_SA
DSCR_ADDR+0x0C Destination Address Member MBR_DA
DSCR_ADDR+0x10 Configuration Register MBR_CFG
View 3 Structure DSCR_ADDR+0x00 Next Descriptor Address Member MBR_NDA
DSCR_ADDR+0x04 Microblock Control Member MBR_UBC
DSCR_ADDR+0x08 Source Address Member MBR_SA
DSCR_ADDR+0x0C Destination Address Member MBR_DA
DSCR_ADDR+0x10 Configuration Member MBR_CFG
DSCR_ADDR+0x14 Block Control Member MBR_BC
DSCR_ADDR+0x18 Data Stride Member MBR_DS
DSCR_ADDR+0x1C Source Microblock Stride Member MBR_SUS
DSCR_ADDR+0x20 Destination Microblock Stride Member MBR_DUS
ConfigurationMember (MBR_CFG):
MBR_CFGis similar to the XDMAC_CCx register. During the descriptor fetch, the value of MBR_CFG is copied to the
XDMAC_CCx register.
Name: MBR_UBC
Property: Read-only
Bit 31 30 29 28 27 26 25 24
NVIEW[1:0] NDEN NSEN NDE
Access R R R R R
Reset
Bit 23 22 21 20 19 18 17 16
UBLEN[23:16]
Access R R R R R R R R
Reset
Bit 15 14 13 12 11 10 9 8
UBLEN[15:8]
Access R R R R R R R R
Reset
Bit 7 6 5 4 3 2 1 0
UBLEN[7:0]
Access R R R R R R R R
Reset
XDMAC_CUBCx.UBLEN
XDMAC_CCx.INITD
XDMAC_CNDAx.NDA buffer1.nda
1.nda buffer0.nda
...........continued
...........continued
7:0 SDS_MSP[7:0]
XDMAC_CDS_MSP 15:8 SDS_MSP[15:8]
0x7C
0 23:16 DDS_MSP[7:0]
31:24 DDS_MSP[15:8]
7:0 SUBS[7:0]
15:8 SUBS[15:8]
0x80 XDMAC_CSUS0
23:16 SUBS[23:16]
31:24
7:0 DUBS[7:0]
15:8 DUBS[15:8]
0x84 XDMAC_CDUS0
23:16 DUBS[23:16]
31:24
0x88
... Reserved
0x8F
7:0 ROIE WBIE RBIE FIE DIE LIE BIE
15:8
0x90 XDMAC_CIE1
23:16
31:24
7:0 ROID WBEID RBEID FID DID LID BID
15:8
0x94 XDMAC_CID1
23:16
31:24
7:0 ROIM WBEIM RBEIM FIM DIM LIM BIM
15:8
0x98 XDMAC_CIM1
23:16
31:24
7:0 ROIS WBEIS RBEIS FIS DIS LIS BIS
15:8
0x9C XDMAC_CIS1
23:16
31:24
7:0 SA[7:0]
15:8 SA[15:8]
0xA0 XDMAC_CSA1
23:16 SA[23:16]
31:24 SA[31:24]
7:0 DA[7:0]
15:8 DA[15:8]
0xA4 XDMAC_CDA1
23:16 DA[23:16]
31:24 DA[31:24]
7:0 NDA[5:0] NDAIF
15:8 NDA[13:6]
0xA8 XDMAC_CNDA1
23:16 NDA[21:14]
31:24 NDA[29:22]
7:0 NDVIEW[1:0] NDDUP NDSUP NDE
15:8
0xAC XDMAC_CNDC1
23:16
31:24
7:0 UBLEN[7:0]
15:8 UBLEN[15:8]
0xB0 XDMAC_CUBC1
23:16 UBLEN[23:16]
31:24
7:0 BLEN[7:0]
15:8 BLEN[11:8]
0xB4 XDMAC_CBC1
23:16
31:24
7:0 MEMSET SWREQ DSYNC MBSIZE[1:0] TYPE
15:8 DIF SIF DWIDTH[1:0] CSIZE[2:0]
0xB8 XDMAC_CC1
23:16 WRIP RDIP INITD DAM[1:0] SAM[1:0]
31:24 PERID[6:0]
...........continued
7:0 SDS_MSP[7:0]
XDMAC_CDS_MSP 15:8 SDS_MSP[15:8]
0xBC
1 23:16 DDS_MSP[7:0]
31:24 DDS_MSP[15:8]
7:0 SUBS[7:0]
15:8 SUBS[15:8]
0xC0 XDMAC_CSUS1
23:16 SUBS[23:16]
31:24
7:0 DUBS[7:0]
15:8 DUBS[15:8]
0xC4 XDMAC_CDUS1
23:16 DUBS[23:16]
31:24
0xC8
... Reserved
0xCF
7:0 ROIE WBIE RBIE FIE DIE LIE BIE
15:8
0xD0 XDMAC_CIE2
23:16
31:24
7:0 ROID WBEID RBEID FID DID LID BID
15:8
0xD4 XDMAC_CID2
23:16
31:24
7:0 ROIM WBEIM RBEIM FIM DIM LIM BIM
15:8
0xD8 XDMAC_CIM2
23:16
31:24
7:0 ROIS WBEIS RBEIS FIS DIS LIS BIS
15:8
0xDC XDMAC_CIS2
23:16
31:24
7:0 SA[7:0]
15:8 SA[15:8]
0xE0 XDMAC_CSA2
23:16 SA[23:16]
31:24 SA[31:24]
7:0 DA[7:0]
15:8 DA[15:8]
0xE4 XDMAC_CDA2
23:16 DA[23:16]
31:24 DA[31:24]
7:0 NDA[5:0] NDAIF
15:8 NDA[13:6]
0xE8 XDMAC_CNDA2
23:16 NDA[21:14]
31:24 NDA[29:22]
7:0 NDVIEW[1:0] NDDUP NDSUP NDE
15:8
0xEC XDMAC_CNDC2
23:16
31:24
7:0 UBLEN[7:0]
15:8 UBLEN[15:8]
0xF0 XDMAC_CUBC2
23:16 UBLEN[23:16]
31:24
7:0 BLEN[7:0]
15:8 BLEN[11:8]
0xF4 XDMAC_CBC2
23:16
31:24
7:0 MEMSET SWREQ DSYNC MBSIZE[1:0] TYPE
15:8 DIF SIF DWIDTH[1:0] CSIZE[2:0]
0xF8 XDMAC_CC2
23:16 WRIP RDIP INITD DAM[1:0] SAM[1:0]
31:24 PERID[6:0]
...........continued
7:0 SDS_MSP[7:0]
XDMAC_CDS_MSP 15:8 SDS_MSP[15:8]
0xFC
2 23:16 DDS_MSP[7:0]
31:24 DDS_MSP[15:8]
7:0 SUBS[7:0]
15:8 SUBS[15:8]
0x0100 XDMAC_CSUS2
23:16 SUBS[23:16]
31:24
7:0 DUBS[7:0]
15:8 DUBS[15:8]
0x0104 XDMAC_CDUS2
23:16 DUBS[23:16]
31:24
0x0108
... Reserved
0x010F
7:0 ROIE WBIE RBIE FIE DIE LIE BIE
15:8
0x0110 XDMAC_CIE3
23:16
31:24
7:0 ROID WBEID RBEID FID DID LID BID
15:8
0x0114 XDMAC_CID3
23:16
31:24
7:0 ROIM WBEIM RBEIM FIM DIM LIM BIM
15:8
0x0118 XDMAC_CIM3
23:16
31:24
7:0 ROIS WBEIS RBEIS FIS DIS LIS BIS
15:8
0x011C XDMAC_CIS3
23:16
31:24
7:0 SA[7:0]
15:8 SA[15:8]
0x0120 XDMAC_CSA3
23:16 SA[23:16]
31:24 SA[31:24]
7:0 DA[7:0]
15:8 DA[15:8]
0x0124 XDMAC_CDA3
23:16 DA[23:16]
31:24 DA[31:24]
7:0 NDA[5:0] NDAIF
15:8 NDA[13:6]
0x0128 XDMAC_CNDA3
23:16 NDA[21:14]
31:24 NDA[29:22]
7:0 NDVIEW[1:0] NDDUP NDSUP NDE
15:8
0x012C XDMAC_CNDC3
23:16
31:24
7:0 UBLEN[7:0]
15:8 UBLEN[15:8]
0x0130 XDMAC_CUBC3
23:16 UBLEN[23:16]
31:24
7:0 BLEN[7:0]
15:8 BLEN[11:8]
0x0134 XDMAC_CBC3
23:16
31:24
7:0 MEMSET SWREQ DSYNC MBSIZE[1:0] TYPE
15:8 DIF SIF DWIDTH[1:0] CSIZE[2:0]
0x0138 XDMAC_CC3
23:16 WRIP RDIP INITD DAM[1:0] SAM[1:0]
31:24 PERID[6:0]
...........continued
7:0 SDS_MSP[7:0]
XDMAC_CDS_MSP 15:8 SDS_MSP[15:8]
0x013C
3 23:16 DDS_MSP[7:0]
31:24 DDS_MSP[15:8]
7:0 SUBS[7:0]
15:8 SUBS[15:8]
0x0140 XDMAC_CSUS3
23:16 SUBS[23:16]
31:24
7:0 DUBS[7:0]
15:8 DUBS[15:8]
0x0144 XDMAC_CDUS3
23:16 DUBS[23:16]
31:24
0x0148
... Reserved
0x014F
7:0 ROIE WBIE RBIE FIE DIE LIE BIE
15:8
0x0150 XDMAC_CIE4
23:16
31:24
7:0 ROID WBEID RBEID FID DID LID BID
15:8
0x0154 XDMAC_CID4
23:16
31:24
7:0 ROIM WBEIM RBEIM FIM DIM LIM BIM
15:8
0x0158 XDMAC_CIM4
23:16
31:24
7:0 ROIS WBEIS RBEIS FIS DIS LIS BIS
15:8
0x015C XDMAC_CIS4
23:16
31:24
7:0 SA[7:0]
15:8 SA[15:8]
0x0160 XDMAC_CSA4
23:16 SA[23:16]
31:24 SA[31:24]
7:0 DA[7:0]
15:8 DA[15:8]
0x0164 XDMAC_CDA4
23:16 DA[23:16]
31:24 DA[31:24]
7:0 NDA[5:0] NDAIF
15:8 NDA[13:6]
0x0168 XDMAC_CNDA4
23:16 NDA[21:14]
31:24 NDA[29:22]
7:0 NDVIEW[1:0] NDDUP NDSUP NDE
15:8
0x016C XDMAC_CNDC4
23:16
31:24
7:0 UBLEN[7:0]
15:8 UBLEN[15:8]
0x0170 XDMAC_CUBC4
23:16 UBLEN[23:16]
31:24
7:0 BLEN[7:0]
15:8 BLEN[11:8]
0x0174 XDMAC_CBC4
23:16
31:24
7:0 MEMSET SWREQ DSYNC MBSIZE[1:0] TYPE
15:8 DIF SIF DWIDTH[1:0] CSIZE[2:0]
0x0178 XDMAC_CC4
23:16 WRIP RDIP INITD DAM[1:0] SAM[1:0]
31:24 PERID[6:0]
...........continued
7:0 SDS_MSP[7:0]
XDMAC_CDS_MSP 15:8 SDS_MSP[15:8]
0x017C
4 23:16 DDS_MSP[7:0]
31:24 DDS_MSP[15:8]
7:0 SUBS[7:0]
15:8 SUBS[15:8]
0x0180 XDMAC_CSUS4
23:16 SUBS[23:16]
31:24
7:0 DUBS[7:0]
15:8 DUBS[15:8]
0x0184 XDMAC_CDUS4
23:16 DUBS[23:16]
31:24
0x0188
... Reserved
0x018F
7:0 ROIE WBIE RBIE FIE DIE LIE BIE
15:8
0x0190 XDMAC_CIE5
23:16
31:24
7:0 ROID WBEID RBEID FID DID LID BID
15:8
0x0194 XDMAC_CID5
23:16
31:24
7:0 ROIM WBEIM RBEIM FIM DIM LIM BIM
15:8
0x0198 XDMAC_CIM5
23:16
31:24
7:0 ROIS WBEIS RBEIS FIS DIS LIS BIS
15:8
0x019C XDMAC_CIS5
23:16
31:24
7:0 SA[7:0]
15:8 SA[15:8]
0x01A0 XDMAC_CSA5
23:16 SA[23:16]
31:24 SA[31:24]
7:0 DA[7:0]
15:8 DA[15:8]
0x01A4 XDMAC_CDA5
23:16 DA[23:16]
31:24 DA[31:24]
7:0 NDA[5:0] NDAIF
15:8 NDA[13:6]
0x01A8 XDMAC_CNDA5
23:16 NDA[21:14]
31:24 NDA[29:22]
7:0 NDVIEW[1:0] NDDUP NDSUP NDE
15:8
0x01AC XDMAC_CNDC5
23:16
31:24
7:0 UBLEN[7:0]
15:8 UBLEN[15:8]
0x01B0 XDMAC_CUBC5
23:16 UBLEN[23:16]
31:24
7:0 BLEN[7:0]
15:8 BLEN[11:8]
0x01B4 XDMAC_CBC5
23:16
31:24
7:0 MEMSET SWREQ DSYNC MBSIZE[1:0] TYPE
15:8 DIF SIF DWIDTH[1:0] CSIZE[2:0]
0x01B8 XDMAC_CC5
23:16 WRIP RDIP INITD DAM[1:0] SAM[1:0]
31:24 PERID[6:0]
...........continued
7:0 SDS_MSP[7:0]
XDMAC_CDS_MSP 15:8 SDS_MSP[15:8]
0x01BC
5 23:16 DDS_MSP[7:0]
31:24 DDS_MSP[15:8]
7:0 SUBS[7:0]
15:8 SUBS[15:8]
0x01C0 XDMAC_CSUS5
23:16 SUBS[23:16]
31:24
7:0 DUBS[7:0]
15:8 DUBS[15:8]
0x01C4 XDMAC_CDUS5
23:16 DUBS[23:16]
31:24
0x01C8
... Reserved
0x01CF
7:0 ROIE WBIE RBIE FIE DIE LIE BIE
15:8
0x01D0 XDMAC_CIE6
23:16
31:24
7:0 ROID WBEID RBEID FID DID LID BID
15:8
0x01D4 XDMAC_CID6
23:16
31:24
7:0 ROIM WBEIM RBEIM FIM DIM LIM BIM
15:8
0x01D8 XDMAC_CIM6
23:16
31:24
7:0 ROIS WBEIS RBEIS FIS DIS LIS BIS
15:8
0x01DC XDMAC_CIS6
23:16
31:24
7:0 SA[7:0]
15:8 SA[15:8]
0x01E0 XDMAC_CSA6
23:16 SA[23:16]
31:24 SA[31:24]
7:0 DA[7:0]
15:8 DA[15:8]
0x01E4 XDMAC_CDA6
23:16 DA[23:16]
31:24 DA[31:24]
7:0 NDA[5:0] NDAIF
15:8 NDA[13:6]
0x01E8 XDMAC_CNDA6
23:16 NDA[21:14]
31:24 NDA[29:22]
7:0 NDVIEW[1:0] NDDUP NDSUP NDE
15:8
0x01EC XDMAC_CNDC6
23:16
31:24
7:0 UBLEN[7:0]
15:8 UBLEN[15:8]
0x01F0 XDMAC_CUBC6
23:16 UBLEN[23:16]
31:24
7:0 BLEN[7:0]
15:8 BLEN[11:8]
0x01F4 XDMAC_CBC6
23:16
31:24
7:0 MEMSET SWREQ DSYNC MBSIZE[1:0] TYPE
15:8 DIF SIF DWIDTH[1:0] CSIZE[2:0]
0x01F8 XDMAC_CC6
23:16 WRIP RDIP INITD DAM[1:0] SAM[1:0]
31:24 PERID[6:0]
...........continued
7:0 SDS_MSP[7:0]
XDMAC_CDS_MSP 15:8 SDS_MSP[15:8]
0x01FC
6 23:16 DDS_MSP[7:0]
31:24 DDS_MSP[15:8]
7:0 SUBS[7:0]
15:8 SUBS[15:8]
0x0200 XDMAC_CSUS6
23:16 SUBS[23:16]
31:24
7:0 DUBS[7:0]
15:8 DUBS[15:8]
0x0204 XDMAC_CDUS6
23:16 DUBS[23:16]
31:24
Name: XDMAC_GTYPE
Offset: 0x00
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
NB_REQ[6:0]
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
FIFO_SZ[10:3]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
FIFO_SZ[2:0] NB_CH[4:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: XDMAC_GCFG
Offset: 0x04
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
BXKBEN
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
CGDISIF CGDISFIFO CGDISPIPE CGDISREG
Access R/W R/W R/W R/W
Reset 0 0 0 0
Name: XDMAC_GWAC
Offset: 0x08
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
PW3[3:0] PW2[3:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PW1[3:0] PW0[3:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: XDMAC_GIE
Offset: 0x0C
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
IE6 IE5 IE4 IE3 IE2 IE1 IE0
Access W W W W W W W
Reset – – – – – – –
Name: XDMAC_GID
Offset: 0x10
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
ID6 ID5 ID4 ID3 ID2 ID1 ID0
Access W W W W W W W
Reset – – – – – – –
Name: XDMAC_GIM
Offset: 0x14
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
IM6 IM5 IM4 IM3 IM2 IM1 IM0
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Name: XDMAC_GIS
Offset: 0x18
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
IS6 IS5 IS4 IS3 IS2 IS1 IS0
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Name: XDMAC_GE
Offset: 0x1C
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
EN6 EN5 EN4 EN3 EN2 EN1 EN0
Access W W W W W W W
Reset – – – – – – –
Name: XDMAC_GD
Offset: 0x20
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
DI6 DI5 DI4 DI3 DI2 DI1 DI0
Access W W W W W W W
Reset – – – – – – –
Name: XDMAC_GS
Offset: 0x24
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
ST6 ST5 ST4 ST3 ST2 ST1 ST0
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Name: XDMAC_GRS
Offset: 0x28
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
RS6 RS5 RS4 RS3 RS2 RS1 RS0
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Name: XDMAC_GWS
Offset: 0x2C
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
WS6 WS5 WS4 WS3 WS2 WS1 WS0
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Name: XDMAC_GRWS
Offset: 0x30
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
RWS6 RWS5 RWS4 RWS3 RWS2 RWS1 RWS0
Access W W W W W W W
Reset – – – – – – –
Name: XDMAC_GRWR
Offset: 0x34
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
RWR6 RWR5 RWR4 RWR3 RWR2 RWR1 RWR0
Access W W W W W W W
Reset – – – – – – –
Name: XDMAC_GSWR
Offset: 0x38
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
SWREQ6 SWREQ5 SWREQ4 SWREQ3 SWREQ2 SWREQ1 SWREQ0
Access W W W W W W W
Reset – – – – – – –
Name: XDMAC_GSWS
Offset: 0x3C
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
SWRS6 SWRS5 SWRS4 SWRS3 SWRS2 SWRS1 SWRS0
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Name: XDMAC_GSWF
Offset: 0x40
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
SWF6 SWF5 SWF4 SWF3 SWF2 SWF1 SWF0
Access W W W W W W W
Reset – – – – – – –
Name: XDMAC_CIE
Offset: 0x50 + n*0x40 [n=0..6]
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
ROIE WBIE RBIE FIE DIE LIE BIE
Access W W W W W W W
Reset – – – – – – –
Name: XDMAC_CID
Offset: 0x54 + n*0x40 [n=0..6]
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
ROID WBEID RBEID FID DID LID BID
Access W W W W W W W
Reset – – – – – – –
Name: XDMAC_CIM
Offset: 0x58 + n*0x40 [n=0..6]
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
ROIM WBEIM RBEIM FIM DIM LIM BIM
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Name: XDMAC_CIS
Offset: 0x5C + n*0x40 [n=0..6]
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
ROIS WBEIS RBEIS FIS DIS LIS BIS
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Value Description
1 End of linked list condition has occurred since the last read of the Status register.
Name: XDMAC_CSA
Offset: 0x60 + n*0x40 [n=0..6]
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
SA[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
SA[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
SA[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SA[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: XDMAC_CDA
Offset: 0x64 + n*0x40 [n=0..6]
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
DA[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
DA[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
DA[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DA[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: XDMAC_CNDA
Offset: 0x68 + n*0x40 [n=0..6]
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
NDA[29:22]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NDA[21:14]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NDA[13:6]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NDA[5:0] NDAIF
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Name: XDMAC_CNDC
Offset: 0x6C + n*0x40 [n=0..6]
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
NDVIEW[1:0] NDDUP NDSUP NDE
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
Name: XDMAC_CUBC
Offset: 0x70 + n*0x40 [n=0..6]
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
UBLEN[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
UBLEN[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
UBLEN[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: XDMAC_CBC
Offset: 0x74 + n*0x40 [n=0..6]
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
BLEN[11:8]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
BLEN[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: XDMAC_CC
Offset: 0x78 + n*0x40 [n=0..6]
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
PERID[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WRIP RDIP INITD DAM[1:0] SAM[1:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
DIF SIF DWIDTH[1:0] CSIZE[2:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
MEMSET SWREQ DSYNC MBSIZE[1:0] TYPE
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
35.9.29 XDMAC Channel x Data Stride Memory Set Pattern Register [x = 0..6]
Name: XDMAC_CDS_MSP
Offset: 0x7C + n*0x40 [n=0..6]
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
DDS_MSP[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
DDS_MSP[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
SDS_MSP[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SDS_MSP[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: XDMAC_CSUS
Offset: 0x80 + n*0x40 [n=0..6]
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
SUBS[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
SUBS[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SUBS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: XDMAC_CDUS
Offset: 0x84 + n*0x40 [n=0..6]
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
DUBS[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
DUBS[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DUBS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
36.1 Description
The Image Sensor Interface (ISI) connects a CMOS-type image sensor to the processor and provides image capture
in various formats. The ISI performs data conversion, if necessary, before the storage in memory through DMA.
The ISI supports color CMOS image sensor and grayscale image sensors with a reduced set of functionalities.
In Grayscale mode, the data stream is stored in memory without any processing, hence is not compatible with the
LCD controller.
Internal FIFOs on the preview and codec paths are used to store the incoming data. The RGB output on the preview
path is compatible with the LCD controller. This module outputs the data in RGB format (LCD compatible) and has
scaling capabilities to make it compliant to the LCD display resolution, refer to the table RGB Format in Default Mode,
RGB_CFG = 00, No Swap).
Several input formats, such as preprocessed RGB or YCbCr are supported through the data bus interface.
The ISI supports two synchronization modes:
• Hardware with ISI_VSYNC and ISI_HSYNC signals
• International Telecommunication Union Recommendation ITU-R BT.656-4 Start-of-Active-Video (SAV) and End-
of-Active-Video (EAV) synchronization sequence
Using EAV/SAV for synchronization reduces the pin count (ISI_VSYNC, ISI_HSYNC not used). The polarity of the
synchronization pulse is programmable to comply with the sensor signals.
Table 36-1. I/O Description
data[11..0] ISI_DATA[11..0]
CLK ISI_MCK
PCLK ISI_PCK
VSYNC ISI_VSYNC
HSYNC ISI_HSYNC
APB bus
Hsync/Line enable Timing Signals
Vsync/Frame enable Interface Configuration APB
Camera Registers Interface
Interrupt
Controller Camera
Interrupt Request Line
CCIR-656
APB
Embedded Timing From Clock Domain
Decoder(SAV/EAV) Rx buffers
Pixel AHB
Clock Domain Clock Domain
CMOS Sensor Preview path
Frame Rate
Pixel input Clipping + Color Rx Direct
up to 12 bits 2-D Image Pixel Camera
Conversion Display
AHB bus
Scaler Formatter AHB
YCbCr 4:2:2 YCC to RGB FIFO
Pixel Sampling Core Host
8:8:8 Module Video Interface
RGB 5:6:5
Arbiter Scatter
Clipping + Color Packed Rx Direct Mode
Conversion Formatter Capture Support
RGB to YCC FIFO
CMOS Sensor
Pixel Clock Codec path
input codec_on
ISI_VSYNC
1 line
ISI_HSYNC
ISI_PCK
ISI_DATA[7..0] Y Cb Y Cr Y Cb Y Cr Y Cb Y Cr
There are two timing reference signals, one at the beginning of each video data block SAV (0xFF000080) and one at
the end of each video data block EAV (0xFF00009D). Only data sent between EAV and SAV is captured. Horizontal
blanking and vertical blanking are ignored. Use of the SAV and EAV synchronization eliminates the ISI_VSYNC
and ISI_HSYNC signals from the interface, thereby reducing the pin count. In order to retrieve both frame and line
synchronization properly, at least one line of vertical blanking is mandatory.
The data timing using EAV/SAV sequence synchronization are shown in the following figure.
Figure 36-4. SAV and EAV Sequence Synchronization
ISII_PCK
ISI_DATA[7..0] FF 00 00 80 Y Cb Y Cr Y Cb Y Cr Y Y Cr Y Cb FF 00 00 9D
SAV Active Video EAV
Mode Byte D7 D6 D5 D4 D3 D2 D1 D0
RGB 8:8:8 Byte 0 R7(i) R6(i) R5(i) R4(i) R3(i) R2(i) R1(i) R0(i)
Byte 1 G7(i) G6(i) G5(i) G4(i) G3(i) G2(i) G1(i) G0(i)
Byte 2 B7(i) B6(i) B5(i) B4(i) B3(i) B2(i) B1(i) B0(i)
Byte 3 R7(i+1) R6(i+1) R5(i+1) R4(i+1) R3(i+1) R2(i+1) R1(i+1) R0(i+1)
RGB 5:6:5 Byte 0 R4(i) R3(i) R2(i) R1(i) R0(i) G5(i) G4(i) G3(i)
Byte 1 G2(i) G1(i) G0(i) B4(i) B3(i) B2(i) B1(i) B0(i)
Byte 2 R4(i+1) R3(i+1) R2(i+1) R1(i+1) R0(i+1) G5(i+1) G4(i+1) G3(i+1)
Byte 3 G2(i+1) G1(i+1) G0(i+1) B4(i+1) B3(i+1) B2(i+1) B1(i+1) B0(i+1)
Mode Byte D7 D6 D5 D4 D3 D2 D1 D0
RGB 5:6:5 Byte 0 G2(i) G1(i) G0(i) R4(i) R3(i) R2(i) R1(i) R0(i)
Byte 1 B4(i) B3(i) B2(i) B1(i) B0(i) G5(i) G4(i) G3(i)
Byte 2 G2(i+1) G1(i+1) G0(i+1) R4(i+1) R3(i+1) R2(i+1) R1(i+1) R0(i+1)
Byte 3 B4(i+1) B3(i+1) B2(i+1) B1(i+1) B0(i+1) G5(i+1) G4(i+1) G3(i+1)
Table 36-5. RGB Format in Default Mode, RGB_CFG = 00, Swap Activated
Mode Byte D7 D6 D5 D4 D3 D2 D1 D0
RGB 8:8:8 Byte 0 R0(i) R1(i) R2(i) R3(i) R4(i) R5(i) R6(i) R7(i)
Byte 1 G0(i) G1(i) G2(i) G3(i) G4(i) G5(i) G6(i) G7(i)
Byte 2 B0(i) B1(i) B2(i) B3(i) B4(i) B5(i) B6(i) B7(i)
Byte 3 R0(i+1) R1(i+1) R2(i+1) R3(i+1) R4(i+1) R5(i+1) R6(i+1) R7(i+1)
RGB 5:6:5 Byte 0 G3(i) G4(i) G5(i) R0(i) R1(i) R2(i) R3(i) R4(i)
Byte 1 B0(i) B1(i) B2(i) B3(i) B4(i) G0(i) G1(i) G2(i)
Byte 2 G3(i+1) G4(i+1) G5(i+1) R0(i+1) R1(i+1) R2(i+1) R3(i+1) R4(i+1)
Byte 3 B0(i+1) B1(i+1) B2(i+1) B3(i+1) B4(i+1) G0(i+1) G1(i+1) G2(i+1)
The RGB 5:6:5 input format is processed to be displayed as RGB 5:6:5 format, compliant with the 16-bit mode of the
LCD controller.
36.5.3 Clocks
The sensor Host clock (ISI_MCK) can be generated either by the Power Management Controller (PMC) through a
Programmable Clock output (using PID=59) or by an external oscillator connected to the sensor.
None of the sensors embed a power management controller, so providing the clock by the APMC is a simple and
efficient way to control power consumption of the system.
Care must be taken when programming the system clock. The ISI has two clock domains, the sensor Host clock and
the pixel clock provided by sensor. The two clock domains are not synchronized, but the sensor Host clock must be
faster than the pixel clock.
OUTPUT INPUT 352 × 288 640 × 480 800 × 600 1280 × 1024 1600 × 1200 2048 × 1536
VGA F — 16 20 32 40 51
640 × 480
QVGA F 16 32 40 64 80 102
320 × 240
CIF F 16 26 33 56 66 85
352 × 288
Example:
Input 1280 × 1024 Output = 640 × 480
Hratio = 1280/640 = 2
Vratio = 1024/480 = 2.1333
The decimation factor is 2 so 32/16.
Figure 36-5. Resize Examples
1280 32/16 decimation
640
1024 480
352
1024 288
R C0 0 C1 Y − Yoff
G = C0 −C2 −C3 × Cb − Cboff
B C0 C4 0 Cr − Croff
31 30 29 28 27 26 25 24
Pixel 0 [11:4]
23 22 21 20 19 18 17 16
Pixel 0 [3:0] – – – –
15 14 13 12 11 10 9 8
Pixel 1 [11:4]
7 6 5 4 3 2 1 0
Pixel 1 [3:0] – – – –
31 30 29 28 27 26 25 24
Pixel 1 [11:4]
23 22 21 20 19 18 17 16
Pixel 1 [3:0] – – – –
15 14 13 12 11 10 9 8
Pixel 0 [11:4]
7 6 5 4 3 2 1 0
Pixel 0 [3:0] – – – –
Table 36-10. Grayscale Memory Mapping Configuration for 12-bit Data (ISI_CFG2.GS_MODE = 1: one pixel per
word)
31 30 29 28 27 26 25 24
Pixel 0 [11:4]
23 22 21 20 19 18 17 16
Pixel 0 [3:0] – – – –
15 14 13 12 11 10 9 8
– – – – – – – –
7 6 5 4 3 2 1 0
– – – – – – – –
31 30 29 28 27 26 25 24
Pixel 3
23 22 21 20 19 18 17 16
Pixel 2
15 14 13 12 11 10 9 8
Pixel 1
7 6 5 4 3 2 1 0
Pixel 0
This mode of operation improves flexibility of image buffer location and allows the user to allocate two or more frame
buffers. The destination frame buffers are defined by a series of Frame Buffer Descriptors (FBD). Each FBD controls
the transfer of one entire frame and then optionally loads a further FBD to switch the DMA operation at another frame
buffer address. The FBD is defined by a series of three words. The first word defines the current frame buffer address
(named DMA_X_ADDR register), the second defines control information (named DMA_X_CTRL register) and the
third defines the next descriptor address (named DMA_X_DSCR). DMA Transfer mode with linked list support is
available for both codec and preview datapaths. The data to be transferred described by an FBD requires several
burst accesses. In the following example, the use of two ping-pong frame buffers is described.
Example:
The first FBD, stored at address 0x00030000, defines the location of the first frame buffer. This address is
programmed in the ISI user interface DMA_P_DSCR. To enable the descriptor fetch operation, the value 0x00000001
must be written to the DMA_P_CTRL register. LLI_0 and LLI_1 are the two descriptors of the linked list.
Destination address: frame buffer ID0 0x02A000 (LLI_0.DMA_P_ADDR)
Transfer 0 Control Information, fetch and writeback: 0x00000003 (LLI_0.DMA_P_CTRL)
Next FBD address: 0x00030010 (LLI_0.DMA_P_DSCR)
The second FBD, stored at address 0x00030010, defines the location of the second frame buffer.
Destination address: frame buffer ID1 0x0003A000 (LLI_1.DMA_P_ADDR)
Transfer 1 Control information fetch and writeback: 0x00000003 (LLI_1.DMA_P_CTRL)
The third FBD address: 0x00030000, wrapping to first FBD (LLI_1.DMA_P_DSCR)
Using this technique, several frame buffers can be configured through the linked list. The following figure illustrates
a typical three-frame buffer application. Frame n is mapped to frame buffer 0, frame n+1 is mapped to frame buffer
1, frame n+2 is mapped to frame buffer 2 and further frames wrap. A codec request occurs, and the full-size 4:2:2
encoded frame is stored in a dedicated memory space.
frame n-1 frame n frame n+1 frame n+2 frame n+3 frame n+4
Memory Space
Frame Buffer 3
Frame Buffer 0
LCD
Frame Buffer 1
4:2:2 Image
Full ROI
...........continued
Name: ISI_CFG1
Offset: 0x00
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
SFD[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
SLD[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
THMASK[1:0] FULL DISCR FRATE[2:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CRC_SYNC EMB_SYNC GRAYLE PIXCLK_POL VSYNC_POL HSYNC_POL
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Value Description
0 No CRC correction is performed on embedded synchronization.
1 CRC correction is performed. If the correction is not possible, the current frame is discarded and the
CRC_ERR bit is set in the ISI_SR.
Name: ISI_CFG2
Offset: 0x04
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
RGB_CFG[1:0] YCC_SWAP[1:0] IM_HSIZE[10:8]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
IM_HSIZE[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
COL_SPACE RGB_SWAP GRAYSCALE RGB_MODE GS_MODE IM_VSIZE[10:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
IM_VSIZE[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: ISI_PSIZE
Offset: 0x08
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
PREV_HSIZE[9:8]
Access R/W R/W
Reset 0 0
Bit 23 22 21 20 19 18 17 16
PREV_HSIZE[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PREV_VSIZE[9:8]
Access R/W R/W
Reset 0 0
Bit 7 6 5 4 3 2 1 0
PREV_VSIZE[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: ISI_PDECF
Offset: 0x0C
Reset: 0x00000010
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
DEC_FACTOR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 1 0 0 0 0
Name: ISI_Y2R_SET0
Offset: 0x10
Reset: 0x6832CC95
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
C3[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 1 1 0 1 0 0 0
Bit 23 22 21 20 19 18 17 16
C2[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 1 1 0 0 1 0
Bit 15 14 13 12 11 10 9 8
C1[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 0 0 1 1 0 0
Bit 7 6 5 4 3 2 1 0
C0[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 0 0 1 0 1 0 1
Name: ISI_Y2R_SET1
Offset: 0x14
Reset: 0x00007102
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Cboff Croff Yoff C4[8]
Access R/W R/W R/W R/W
Reset 1 1 1 1
Bit 7 6 5 4 3 2 1 0
C4[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 1 0
Name: ISI_R2Y_SET0
Offset: 0x18
Reset: 0x01324145
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Roff
Access R/W
Reset 1
Bit 23 22 21 20 19 18 17 16
C2[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 1 1 0 0 1 0
Bit 15 14 13 12 11 10 9 8
C1[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 1 0 0 0 0 0 1
Bit 7 6 5 4 3 2 1 0
C0[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 1 0 0 0 1 0 1
Name: ISI_R2Y_SET1
Offset: 0x1C
Reset: 0x01245E38
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Goff
Access R/W
Reset 1
Bit 23 22 21 20 19 18 17 16
C5[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 1 0 0 1 0 0
Bit 15 14 13 12 11 10 9 8
C4[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 1 0 1 1 1 1 0
Bit 7 6 5 4 3 2 1 0
C3[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 1 1 1 0 0 0
Name: ISI_R2Y_SET2
Offset: 0x20
Reset: 0x01384A4B
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Boff
Access R/W
Reset 1
Bit 23 22 21 20 19 18 17 16
C8[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 1 1 1 0 0 0
Bit 15 14 13 12 11 10 9 8
C7[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 1 0 0 1 0 1 0
Bit 7 6 5 4 3 2 1 0
C6[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 1 0 0 1 0 1 1
Name: ISI_CR
Offset: 0x24
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
ISI_CDC
Access W
Reset –
Bit 7 6 5 4 3 2 1 0
ISI_SRST ISI_DIS ISI_EN
Access W W W
Reset – – –
Name: ISI_SR
Offset: 0x28
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
FR_OVR CRC_ERR C_OVR P_OVR
Access R R R R
Reset 0 0 0 0
Bit 23 22 21 20 19 18 17 16
SIP CXFR_DONE PXFR_DONE
Access R R R
Reset 0 0 0
Bit 15 14 13 12 11 10 9 8
VSYNC CDC_PND
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
SRST DIS_DONE ENABLE
Access R R R
Reset 0 0 0
Value Description
0 The clock domain synchronization process is terminated.
1 This bit is set when the clock domain synchronization operation occurs. No modification of the channel
status is allowed when this bit is set, to guarantee data integrity.
Name: ISI_IER
Offset: 0x2C
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
FR_OVR CRC_ERR C_OVR P_OVR
Access W W W W
Reset – – – –
Bit 23 22 21 20 19 18 17 16
CXFR_DONE PXFR_DONE
Access W W
Reset – –
Bit 15 14 13 12 11 10 9 8
VSYNC
Access W
Reset –
Bit 7 6 5 4 3 2 1 0
SRST DIS_DONE
Access W W
Reset – –
Value Description
1 Enables the corresponding interrupt.
Name: ISI_IDR
Offset: 0x30
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
FR_OVR CRC_ERR C_OVR P_OVR
Access W W W W
Reset – – – –
Bit 23 22 21 20 19 18 17 16
CXFR_DONE PXFR_DONE
Access W W
Reset – –
Bit 15 14 13 12 11 10 9 8
VSYNC
Access W
Reset –
Bit 7 6 5 4 3 2 1 0
SRST DIS_DONE
Access W W
Reset – –
Value Description
1 Disables the corresponding interrupt.
Name: ISI_IMR
Offset: 0x34
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
FR_OVR CRC_ERR C_OVR P_OVR
Access R R R R
Reset 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CXFR_DONE PXFR_DONE
Access R R
Reset 0 0
Bit 15 14 13 12 11 10 9 8
VSYNC
Access R
Reset 0
Bit 7 6 5 4 3 2 1 0
SRST DIS_DONE
Access R R
Reset 0 0
Value Description
1 The Preview DMA Transfer Completed interrupt is enabled.
Name: ISI_DMA_CHER
Offset: 0x38
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
C_CH_EN P_CH_EN
Access W W
Reset – –
Name: ISI_DMA_CHDR
Offset: 0x3C
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
C_CH_DIS P_CH_DIS
Access W W
Reset – –
Name: ISI_DMA_CHSR
Offset: 0x40
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
C_CH_S P_CH_S
Access R R
Reset 0 0
Name: ISI_DMA_P_ADDR
Offset: 0x44
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
P_ADDR[29:22]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
P_ADDR[21:14]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
P_ADDR[13:6]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
P_ADDR[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: ISI_DMA_P_CTRL
Offset: 0x48
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
P_DONE P_IEN P_WB P_FETCH
Access R/W R/W R/W R/W
Reset 0 0 0 0
Name: ISI_DMA_P_DSCR
Offset: 0x4C
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
P_DSCR[29:22]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
P_DSCR[21:14]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
P_DSCR[13:6]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
P_DSCR[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: ISI_DMA_C_ADDR
Offset: 0x50
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
C_ADDR[29:22]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
C_ADDR[21:14]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
C_ADDR[13:6]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
C_ADDR[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: ISI_DMA_C_CTRL
Offset: 0x54
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
C_DONE C_IEN C_WB C_FETCH
Access R/W R/W R/W R/W
Reset 0 0 0 0
Name: ISI_DMA_C_DSCR
Offset: 0x58
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
C_DSCR[29:22]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
C_DSCR[21:14]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
C_DSCR[13:6]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
C_DSCR[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: ISI_WPMR
Offset: 0xE4
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
WPKEY[23:16]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WPKEY[15:8]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPKEY[7:0]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPEN
Access R/W
Reset 0
Name: ISI_WPSR
Offset: 0xE8
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
WPVSRC[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPVSRC[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPVS
Access R
Reset 0
37.1 Description
The Ethernet Media Access Controller (GMAC) module implements a 10/100 Mbps Ethernet MAC, compatible with
the IEEE 802.3 standard. The GMAC can operate in either half or full duplex mode at all supported speeds.
Status &
Statistic
Registers
Register
APB
Interface
MDIO
Control
Registers
MAC Transmitter
AHB DMA FIFO
AHB Media Interface
Interface Interface
MAC Receiver
Frame Filtering
Packet Buffer
Memories
Note:
1. Input only. GTXCK must be provided with a 25 MHz / 50 MHz external crystal oscillator for MII / RMII
interfaces, respectively.
The 46 lower bits roll over when they have counted to 1s. The timer increments by a programmable period (to
approximately 15.2fs resolution) with each MCK period and can also be adjusted in 1ns resolution (incremented or
decremented) through APB register accesses.
buffers are filled until the frame is complete and the final buffer descriptor status word contains the complete frame
status. See the following table for details of the receive buffer descriptor list.
Table 37-2. Receive Buffer Descriptor Entry
Bit Function
Word 0
31:2 Address of beginning of buffer
1 Wrap—marks last descriptor in receive buffer descriptor list.
0 Ownership—needs to be zero for the GMAC to write data to the receive buffer. The GMAC sets this to one
once it has successfully written a frame to memory.
Software has to clear this bit before the buffer can be used again.
Word 1
31 Global all ones broadcast address detected
30 Multicast hash match
29 Unicast hash match
28 –
27 Specific Address Register match found, bit 25 and bit 26 indicate which Specific Address Register causes
the match.
26:25 Specific Address Register match. Encoded as follows:
00: Specific Address Register 1 match
01: Specific Address Register 2 match
10: Specific Address Register 3 match
11: Specific Address Register 4 match
If more than one specific address is matched only one is indicated with priority 4 down to 1.
24 This bit has a different meaning depending on whether RX checksum offloading is enabled.
With RX checksum offloading disabled: (bit 24 clear in Network Configuration Register)
Type ID register match found, bit 22 and bit 23 indicate which type ID register causes the match.
With RX checksum offloading enabled: (bit 24 set in Network Configuration Register)
0: The frame was not SNAP encoded and/or had a VLAN tag with the Canonical Format Indicator (CFI) bit
set.
1: The frame was SNAP encoded and had either no VLAN tag or a VLAN tag with the CFI bit not set.
...........continued
Bit Function
23:22 This bit has a different meaning depending on whether RX checksum offloading is enabled.
With RX checksum offloading disabled: (bit 24 clear in Network Configuration)
Type ID register match. Encoded as follows:
00: Type ID register 1 match
01: Type ID register 2 match
10: Type ID register 3 match
11: Type ID register 4 match
If more than one Type ID is matched only one is indicated with priority 4 down to 1.
With RX checksum offloading enabled: (bit 24 set in Network Configuration Register)
00: Neither the IP header checksum nor the TCP/UDP checksum was checked.
01: The IP header checksum was checked and was correct. Neither the TCP nor UDP checksum was
checked.
10: Both the IP header and TCP checksum were checked and were correct.
11: Both the IP header and UDP checksum were checked and were correct.
21 VLAN tag detected—type ID of 0x8100. For packets incorporating the stacked VLAN processing feature, this
bit will be set if the second VLAN tag has a type ID of 0x8100
20 Priority tag detected—type ID of 0x8100 and null VLAN identifier. For packets incorporating the stacked
VLAN processing feature, this bit will be set if the second VLAN tag has a type ID of 0x8100 and a null
VLAN identifier.
19:17 VLAN priority—only valid if bit 21 is set.
16 Canonical format indicator (CFI) bit (only valid if bit 21 is set).
15 End of frame—when set the buffer contains the end of a frame. If end of frame is not set, then the only valid
status bit is start of frame (bit 14).
14 Start of frame—when set the buffer contains the start of a frame. If both bits 15 and 14 are set, the buffer
contains a whole frame.
13 This bit has a different meaning depending on whether jumbo frames and ignore FCS modes are enabled. If
neither mode is enabled this bit will be zero.
With jumbo frame mode enabled: (bit 3 set in Network Configuration Register) Additional bit for length of
frame (bit[13]), that is concatenated with bits[12:0]
With ignore FCS mode enabled and jumbo frames disabled: (bit 26 set in Network Configuration Register
and bit 3 clear in Network Configuration Register) This indicates per frame FCS status as follows:
0: Frame had good FCS
1: Frame had bad FCS, but was copied to memory as ignore FCS enabled.
12:0 These bits represent the length of the received frame which may or may not include FCS depending on
whether FCS discard mode is enabled.
With FCS discard mode disabled: (bit 17 clear in Network Configuration Register)
Least significant 12 bits for length of frame including FCS. If jumbo frames are enabled, these 12 bits are
concatenated with bit[13] of the descriptor above.
With FCS discard mode enabled: (bit 17 set in Network Configuration Register)
Least significant 12 bits for length of frame excluding FCS. If jumbo frames are enabled, these 12 bits are
concatenated with bit[13] of the descriptor above.
Each receive AHB buffer start location is a word address. The start of the first AHB buffer in a frame can be
offset by up to three Bytes, depending on the value written to bits 14 and 15 of the Network Configuration register
(GMAC_NCFGR). If the start location of the AHB buffer is offset, the available length of the first AHB buffer is
reduced by the corresponding number of Bytes.
To receive frames, the AHB buffer descriptors must be initialized by writing an appropriate address to bits 31:2 in the
first word of each list entry. Bit 0 must be written with zero. Bit 1 is the wrap bit and indicates the last entry in the
buffer descriptor list.
The start location of the receive buffer descriptor list must be written with the receive buffer queue base address
before reception is enabled (receive enable in the Network Control register GMAC_NCR). Once reception is enabled,
any writes to the Receive Buffer Queue Base Address register (GMAC_RBQB) are ignored. When read, it will return
the current pointer position in the descriptor list, though this is only valid and stable when receive is disabled.
If the filter block indicates that a frame should be copied to memory, the receive data DMA operation starts writing
data into the receive buffer. If an error occurs, the buffer is recovered.
An internal counter within the GMAC represents the receive buffer queue pointer and it is not visible through the CPU
interface. The receive buffer queue pointer increments by two words after each buffer has been used. It re-initializes
to the receive buffer queue base address if any descriptor has its wrap bit set.
As receive AHB buffers are used, the receive AHB buffer manager sets bit zero of the first word of the descriptor to
logic one indicating the AHB buffer has been used.
Software should search through the “used” bits in the AHB buffer descriptors to find out how many frames have been
received, checking the start of frame and end of frame bits.
When the DMA is configured in the packet buffer Partial Store And Forward mode, received frames are written out to
the AHB buffers as soon as enough frame data exists in the packet buffer. For both cases, this may mean several full
AHB buffers are used before some error conditions can be detected. If a receive error is detected the receive buffer
currently being written will be recovered. Previous buffers will not be recovered. As an example, when receiving
frames with cyclic redundancy check (CRC) errors or excessive length, it is possible that a frame fragment might be
stored in a sequence of AHB receive buffers. Software can detect this by looking for start of frame bit set in a buffer
following a buffer with no end of frame bit set.
To function properly, a 10/100 Ethernet system should have no excessive length frames or frames greater than 128
Bytes with CRC errors. Collision fragments will be less than 128 Bytes long, therefore it will be a rare occurrence to
find a frame fragment in a receive AHB buffer, when using the default value of 128 Bytes for the receive buffers size.
When in packet buffer full store and forward mode, only good received frames are written out of the DMA, so no
fragments will exist in the AHB buffers due to MAC receiver errors. There is still the possibility of fragments due to
DMA errors, for example used bit read on the second buffer of a multi-buffer frame.
If bit zero of the receive buffer descriptor is already set when the receive buffer manager reads the location of the
receive AHB buffer, the buffer has been already used and cannot be used again until software has processed the
frame and cleared bit zero. In this case, the “buffer not available” bit in the receive status register is set and an
interrupt triggered. The receive resource error statistics register is also incremented.
When the DMA is configured in the packet buffer full store and forward mode, the user can optionally select whether
received frames should be automatically discarded when no AHB buffer resource is available. This feature is selected
via the DMA Discard Receive Packets bit in the DMA Configuration register (GMAC_DCFGR.DDRP). By default, the
received frames are not automatically discarded. If this feature is off, then received packets will remain to be stored
in the SRAM-based packet buffer until AHB buffer resource next becomes available. This may lead to an eventual
packet buffer overflow if packets continue to be received when bit zero (used bit) of the receive buffer descriptor
remains set.
Note: After a used bit has been read, the receive buffer manager will re-read the location of the receive buffer
descriptor every time a new packet is received. When the DMA is not configured in the packet buffer full store and
forward mode and a used bit is read, the frame currently being received will be automatically discarded.
When the DMA is configured in the packet buffer full store and forward mode, a receive overrun condition occurs
when the receive SRAM-based packet buffer is full, or because HRESP was not OK. In all other modes, a receive
overrun condition occurs when either the AHB bus was not granted quickly enough, or because HRESP was not OK,
or because a new frame has been detected by the receive block, but the status update or write back for the previous
frame has not yet finished. For a receive overrun condition, the receive overrun interrupt is asserted and the buffer
currently being written is recovered. The next frame that is received whose address is recognized reuses the buffer.
In any packet buffer mode, writing a '1' to the Flush Next Package bit in the NCR register (GMAC_NCR.FNP) will
force a packet from the external SRAM-based receive packet buffer to be flushed. This feature is only acted upon
when the RX DMA is not currently writing packet data out to AHB, i.e., it is in an IDLE state. If the RX DMA is active,
GMAC_NCR.FNP=1 is ignored.
Bit Function
Word 0
31:0 Byte address of buffer
Word 1
31 Used—must be zero for the GMAC to read data to the transmit buffer. The GMAC sets this to one for the
first buffer of a frame once it has been successfully transmitted. Software must clear this bit before the buffer
can be used again.
30 Wrap—marks last descriptor in transmit buffer descriptor list. This can be set for any buffer within the frame.
29 Retry limit exceeded, transmit error detected
28 Transmit underrun—occurs when the start of packet data has been written into the FIFO and either HRESP
is not OK, or the transmit data could not be fetched in time, or when buffers are exhausted.
27 Transmit frame corruption due to AHB error—set if an error occurs while midway through reading transmit
frame from the AHB, including HRESP errors and buffers exhausted mid frame (if the buffers run out during
transmission of a frame then transmission stops, FCS shall be bad and GTXER asserted).
Also set if single frame is too large for configured packet buffer memory size.
26 Late collision, transmit error detected. Late collisions only force this status bit to be set in gigabit mode.
25:23 Reserved
...........continued
Bit Function
22:20 Transmit IP/TCP/UDP checksum generation offload errors:
000: No Error.
001: The Packet was identified as a VLAN type, but the header was not fully complete, or had an error in it.
010: The Packet was identified as a SNAP type, but the header was not fully complete, or had an error in it.
011: The Packet was not of an IP type, or the IP packet was invalidly short, or the IP was not of type
IPv4/IPv6.
100: The Packet was not identified as VLAN, SNAP or IP.
101: Non supported packet fragmentation occurred. For IPv4 packets, the IP checksum was generated and
inserted.
110: Packet type detected was not TCP or UDP. TCP/UDP checksum was therefore not generated. For IPv4
packets, the IP checksum was generated and inserted.
111: A premature end of packet was detected and the TCP/UDP checksum could not be generated.
19:17 Reserved
16 No CRC to be appended by MAC. When set, this implies that the data in the buffers already contains a valid
CRC, hence no CRC or padding is to be appended to the current frame by the MAC.
This control bit must be set for the first buffer in a frame and will be ignored for the subsequent buffers of a
frame.
Note that this bit must be clear when using the transmit IP/TCP/UDP checksum generation offload,
otherwise checksum generation and substitution will not occur.
15 Last buffer, when set this bit will indicate the last buffer in the current frame has been reached.
14 Reserved
13:0 Length of buffer
To transmit frames, the buffer descriptors must be initialized by writing an appropriate Byte address to bits [31:0] of
the first word of each descriptor list entry.
The second word of the transmit buffer descriptor is initialized with control information that indicates the length of the
frame, whether or not the MAC is to append CRC and whether the buffer is the last buffer in the frame.
After transmission the status bits are written back to the second word of the first buffer along with the used bit. Bit
31 is the used bit which must be zero when the control word is read if transmission is to take place. It is written to
'1' once the frame has been transmitted. Bits[29:20] indicate various transmit error conditions. Bit 30 is the wrap bit
which can be set for any buffer within a frame. If no wrap bit is encountered the queue pointer continues to increment.
The Transmit Buffer Queue Base Address register can only be updated while transmission is disabled or halted;
otherwise any attempted write will be ignored. When transmission is halted the transmit buffer queue pointer will
maintain its value. Therefore when transmission is restarted the next descriptor read from the queue will be from
immediately after the last successfully transmitted frame. As long as transmit is disabled by writing a '0' to the
Transmit Enable bit in the Network Control register (GMAC_NCR.TXEN), the transmit buffer queue pointer resets to
point to the address indicated by the Transmit Buffer Queue Base Address register (GMAC_TBQB).
Note: Disabling receive does not have the same effect on the receive buffer queue pointer.
Once the transmit queue is initialized, transmit is activated by writing a '1' to the Start Transmission bit of the Network
Control register (GMAC_NCR.TSTART). Transmit is halted when a buffer descriptor with its used bit set is read, a
transmit error occurs, or by writing to the Transmit Halt bit of the Network Control register (GMAC_NCR.THALT).
Transmission is suspended if a pause frame is received while the Transmit Pause Frame bit is '1' in the Network
Configuration register (GMAC_NCR.TXPF). Rewriting the Start bit (GMAC_NCR.TSTART) while transmission is
active is allowed. This is implemented by the Transmit Go variable which is readable in the Transmit Status register
(GMAC_TSR.TXGO). The TXGO variable is reset when:
• Transmit is disabled.
TX GMII
MAC Transmitter
TX Packet
TX Packet
Buffer
Buffer
DPSRAM
TX DMA
APB Status
Register and AHB
AHB
Interface Statistic DMA
Registers
RX DMA
MDIO RX Packet
RX Packet
Control Buffer
Buffer
Interface DPSRAM
RX GMII
MAC Receiver
Frame Filtering
Ethernet MAC
notification is received the frame is flushed from memory to make room for a new frame to be fetched from AHB
system memory.
In Partial Store and Forward mode, a trigger is sent across to the MAC transmitter as soon as sufficient packet
data is available, which will then begin fetching the frame from the packet buffer memory. If, after this point, the
MAC transmitter is able to fetch data from the packet buffer faster than the AHB DMA can fill it, an underflow of
the transmitter is possible. In this case, the transmission is terminated early, and the packet buffer is completely
flushed. Transmission can only be restarted by writing a '1' to the Transmit Start bit in the Network Control register
(GMAC_NCR.TSTART).
In half duplex mode, the frame is kept in the packet buffer until notification is received from the MAC that the frame
data has either been successfully transmitted or can no longer be retransmitted (too many retries in half duplex
mode). When this notification is received the frame is flushed from memory to make room for a new frame to be
fetched from AHB system memory.
In full duplex mode, the frame is removed from the packet buffer on the fly.
Other than underflow, the only MAC related errors that can occur are due to collisions during half duplex
transmissions. When a collision occurs the frame still exists in the packet buffer memory so can be retried directly
from there. After sixteen failed transmit attempts, the frame will be flushed from the packet buffer.
...........continued
Queue Number Queue Size
2 512 bytes
1 512 bytes
0 (lowest priority) 2 KB
In the transmit direction, higher priority queues are always serviced before lower priority queues, with Q0 as lowest
priority and Q as highest priority. This strict priority scheme requires the user to ensure that high priority traffic is
constrained so that lower priority traffic will have required bandwidth. The GMAC DMA will determine the next queue
to service by initiating a sequence of buffer descriptor reads interrogating the ownership bits of each. The buffer
descriptor corresponding to the highest priority queue is read first.
As an example, if the ownership bit of this descriptor is set, the DMA will progress by reading the 2nd highest priority
queue’s descriptor. If that ownership bit read of this lower priority queue is set as well, the DMA will read the 3rd
highest priority queue’s descriptor. If all the descriptors return an ownership bit set, a resource error has occurred, so
an interrupt is generated and transmission is automatically halted. Transmission can only be restarted by writing a '1'
to the Transmission Start bit in the Network Control register (GMAC_NCR.TSTART). The GMAC DMA will need to
identify the highest available queue to transmit from when the TSTART bit is written and the TX is in a halted state, or
when the last word of any packet has been fetched from external AHB memory.
The GMAC transmit DMA maximizes the effectiveness of priority queuing by ensuring that high priority traffic be
transmitted as early as possible after being fetched from AHB. High priority traffic fetched from AHB will be pushed
to the MAC layer, depending on traffic shaping being enabled and the associated credit value for that queue, before
any lower priority traffic that may pre-exist in the transmit SRAM-based packet buffer. This is achieved by separating
the transmit SRAM-based packet buffer into regions, one region per queue. The size of each region determines the
amount of SRAM space allocated per queue.
For each queue, there is an associated Transmit Buffer Queue Base Address register (GMAC_TBQB). For the lowest
priority queue (or the only queue when only one queue is selected), the Transmit Buffer Queue Base Address is
located at address 0x1C. For all other queues, the Transmit Buffer Queue Base Address registers are located at
sequential addresses starting at address 0x440.
In the receive direction each packet is written to AHB data buffers in the order that it is received. For each queue,
there is an independent set of receive AHB buffers for each queue. There is therefore a separate Receive Buffer
Queue Base Address register for each queue (GMAC_RBQBAx). For the lowest priority queue (or the only queue
when only one queue is selected), the Receive Buffer Queue Base Address is located at address 0x18. For all other
queues, the Receive Buffer Queue Base Address registers are located at sequential addresses starting at address
0x480. Every received packet will pass through a programmable screening algorithm which will allocate a particular
queue to that frame. The user interface to the screeners is through two types of programmable registers:
• Screening Type 1 registers: The module features Screening Type 1 registers. Screening Type 1 registers hold
values to match against specific IP and UDP fields of the received frames. The fields matched against are DS
(Differentiated Services field of IPv4 frames), TC (Traffic class field of IPv6 frames) and/or the UDP destination
port.
• Screening Type 2 registers: The module features Screening Type 2 registers GMAC_ST2RPQ. Screening
Type 2 registers operate independently of Screening Type 1 registers and offer additional match capabilities.
Screening Type 2 allows a screen to be configured that is the combination of all or any of the following
comparisons:
– An enable bit VLAN priority, VLANE. A VLAN priority match will be performed if the VLAN priority enable
is set. The extracted priority field in the VLAN header is compared against VLANP in the GMAC_ST2RPQ
itself.
– An enable bit EtherType, ETHE. The EtherType field I2ETH inside the GMAC_ST2RPQ maps to one of
EtherType match registers, GMAC_ST2ER. The extracted EtherType is compared against GMAC_ST2ER
designated by this EtherType field.
– An enable bit Compare A, COMPAE. This bit is associated with a Screening Type 2 Compare Word 0/1
register x, GMAC_ST2CW0/1.
– An enable bit Compare B, COMPBE. This bit is associated with a Screening Type 2 Compare Word 0/1
register x, GMAC_ST2CW0/1.
– An enable bit Compare C, COMPCE. This bit is associated with a Screening Type 2 Compare Word 0/1
register x, GMAC_ST2CW0/1.
Each screener type has an enable bit, a match pattern and a queue number. If a received frame matches on an
enabled screening register, then the frame will be tagged with the queue value in the associated screening register,
and forwarded onto the DMA and subsequently into the external memory associated with that queue. If two screeners
are matched then the one which resides at the lowest register address will take priority so care must be taken on the
selection of the screener location.
When the priority queuing feature is enabled, the number of interrupt outputs from the GMAC core is increased to
match the number of supported queues. The number of Interrupt Status registers is increased by the same number.
Only DMA related events are reported using the individual interrupt outputs, as the GMAC can relate these events
to specific queues. All other events generated within the GMAC are reported in the interrupt associated with the
lowest priority queue. For the lowest priority queue (or the only queue when only 1 queue is selected), the Interrupt
Status register is located at address 0x24. For all other queues, the Interrupt Status register is located at sequential
addresses starting at address 0x400.
Note: The address matching is the first level of filtering. If there is a match, the screeners are the next level of
filtering for routing the data to the appropriate queue. See MAC Filtering Block for more details.
The additional screening done by the functions Compare A, B, and C each have an enable bit and compare register
field. COMPA, COMPB and COMPC in GMAC_ST2RPQ are pointers to a configured offset (OFFSVAL), value
(COMPVAL), and mask (MASKVAL). If enabled, the compare is true if the data at the offset into the frame, ANDed
with MASKVAL, is equal to the value of COMPVAL ANDed with MASKVAL. A 16-bit word comparison is done. The
byte at the offset number of bytes from the index start is compared to bits 7:0 of the configured COMPVAL and
MASKVAL. The byte at the offset number of bytes + 1 from the index start is compared to bits 15:8 of the configured
COMPVAL and MASKVAL.
The offset value in bytes, OFFSVAL, ranges from 0 to 127 bytes from either the start of the frame, the byte after
the EtherType field, the byte after the IP header (IPv4 or IPv6) or the byte after the TCP/UDP header. Note the
logic to decode the IP header or the TCP/UDP header is reused from the TCP/UDP/IP checksum offload logic and
therefore has the same restrictions on use (the main limitation is that IP fragmentation is not supported). Refer to the
Checksum Offload for IP, TCP and UDP section of this documentation for further details.
Compare A, B, and C use a common set of GMAC_ST2CW0/1 registers, thus all COMPA, COMPB and COMPC
fields in the registers GMAC_ST2RPQ point to a single pool of GMAC_ST2CW0/1 registers.
Note that Compare A, B and C together allow matching against an arbitrary 48 bits of data and so can be used to
match against a MAC address.
All enabled comparisons are ANDed together to form the overall type 2 screening match.
transmission, the transmitter will transmit a jam sequence of 32 bits taken from the data register and then retry
transmission after the back off time has elapsed. If the collision occurs during either the preamble or Start Frame
Delimiter (SFD), then these fields will be completed prior to generation of the jam sequence.
The back off time is based on an XOR of the 10 least significant bits of the data coming from the transmit FIFO
interface and a 10-bit pseudo random number generator. The number of bits used depends on the number of
collisions seen. After the first collision 1 bit is used, then the second 2 bits and so on up to the maximum of 10
bits. All 10 bits are used above ten collisions. An error will be indicated and no further attempts will be made if 16
consecutive attempts cause collision. This operation is compliant with the description in Clause 4.2.3.2.5 of the IEEE
802.3 standard which refers to the truncated binary exponential back off algorithm.
In 10/100 mode, both collisions and late collisions are treated identically, and back off and retry will be performed
up to 16 times. This condition is reported in the transmit buffer descriptor word 1 (late collision, bit 26) and also in
the Transmit Status register (late collision, bit 7). An interrupt can also be generated (if enabled) when this exception
occurs, and bit 5 in the Interrupt Status register will be set.
In all modes of operation, if the transmit DMA underruns, a bad CRC is automatically appended using the same
mechanism as jam insertion and the GTXER signal is asserted. For a properly configured system this should never
happen and also it is impossible if configured to use the DMA with packet buffers, as the complete frame is buffered
in local packet buffer memory.
By setting when bit 28 is set in the Network Configuration register, the Inter Packet Gap (IPG) may be stretched
beyond 96 bits depending on the length of the previously transmitted frame and the value written to the IPG Stretch
register (GMAC_IPGS). The least significant 8 bits of the IPG Stretch register multiply the previous frame length
(including preamble). The next significant 8 bits (+1 so as not to get a divide by zero) divide the frame length to
generate the IPG. IPG stretch only works in full duplex mode and when bit 28 is set in the Network Configuration
register. The IPG Stretch register cannot be used to shrink the IPG below 96 bits.
If the back pressure bit is set in the Network Control register, or if the HDFC configuration bit is set in the GMAC_UR
register (10M or 100M half duplex mode), the transmit block transmits 64 bits of data, which can consist of 16 nibbles
of 1011 or in bit rate mode 64 1s, whenever it sees an incoming frame to force a collision. This provides a way of
implementing flow control in half duplex mode.
be transmitted but without the checksum substitution, as typically the reason that the substitution did not occur was
that the protocol was not recognized.
Preamble 55
SFD D5
DA (Octet 0 - LSB) 21
DA (Octet 1) 43
DA (Octet 2) 65
DA (Octet 3) 87
DA (Octet 4) A9
DA (Octet 5 - MSB) CB
SA (LSB) 00 (see Note)
SA 00(see Note)
SA 00(see Note)
SA 00(see Note)
SA 00(see Note)
Copy All Frames bit, whether a hash match is found, a type ID match is identified or if a destination address match is
found.
TPID (Tag Protocol Identifier) 16 bits TCI (Tag Control Information) 16 bits
0x8100 First 3 bits priority, then CFI bit, last 12 bits VID
The VLAN tag is inserted at the 13th byte of the frame adding an extra four bytes to the frame. To support these
extra four bytes, the GMAC can accept frame lengths up to 1536 bytes by setting bit 8 in the Network Configuration
register.
If the VID (VLAN identifier) is null (0x000) this indicates a priority-tagged frame.
The following bits in the receive buffer descriptor status word give information about VLAN tagged frames:-
• Bit 21 set if receive frame is VLAN tagged (i.e., type ID of 0x8100).
• Bit 20 set if receive frame is priority tagged (i.e., type ID of 0x8100 and null VID). (If bit 20 is set, bit 21 will be
set also.)
• Bit 19, 18 and 17 set to priority if bit 21 is set.
• Bit 16 set to CFI if bit 21 is set.
The GMAC can be configured to reject all frames except VLAN tagged frames by setting the discard non-VLAN
frames bit in the Network Configuration register.
The decoding of the ARP fields adjusts automatically if a VLAN tag is detected within the frame. The reserved value
of 0x0000 for the Wake on LAN target address value will not cause an ARP request event, even if matched by the
frame.
A specific address 1 filter match event will occur if all of the following are true:
• Specific address 1 events are enabled through bit 18 of the Wake on LAN register
• The frame's destination address matches the value programmed in the Specific Address 1 registers
A multicast filter match event will occur if all of the following are true:
• Multicast hash events are enabled through bit 19 of the Wake on LAN register
• Multicast hash filtering is enabled through bit 6 of the Network Configuration register
• The frame destination address matches against the multicast hash filter
• The frame destination address is not a broadcast
The GMAC recognizes four different encapsulations for PTP event messages:
1. 1588 version 1 (UDP/IPv4 multicast)
2. 1588 version 2 (UDP/IPv4 multicast)
3. 1588 version 2 (UDP/IPv6 multicast)
4. 1588 version 2 (Ethernet multicast)
Table 37-6. Example of Sync Frame in 1588 Version 1 Format
...........continued
Frame Segment Value
Version PTP (Octet 43) 01
Other stuff (Octets 44–73) —
Control (Octet 74) 01
Other stuff (Octets 75–168) —
For 1588 version 1 messages, sync and delay request frames are indicated by the GMAC if the frame type field
indicates TCP/IP, UDP protocol is indicated, the destination IP address is 224.0.1.129/130/131 or 132, the destination
UDP port is 319 and the control field is correct.
The control field is 0x00 for sync frames and 0x01 for delay request frames.
For 1588 version 2 messages, the type of frame is determined by looking at the message type field in the first byte
of the PTP frame. Whether a frame is version 1 or version 2 can be determined by looking at the version PTP field in
the second byte of both version 1 and version 2 PTP frames.
In version 2 messages sync frames have a message type value of 0x0, delay_req have 0x1, Pdelay_Req have 0x2
and Pdelay_Resp have 0x3.
Table 37-8. Example of Sync Frame in 1588 Version 2 (UDP/IPv4) Format
...........continued
Frame Segment Value
IP stuff (Octets 24–29) —
IP DA (Octets 30–33) E000006B
Source IP port (Octets 34–35) —
Dest IP port (Octets 36–37) 013F
Other stuff (Octets 38–41) —
Message type (Octet 42) 02
Version PTP (Octet 43) 02
...........continued
Frame Segment Value
Dest IP port (Octets 56–57) 013F
Other stuff (Octets 58–61) —
Message type (Octet 62) 03
Other stuff (Octets 63–93) —
Version PTP (Octet 94) 02
For the multicast address 011B19000000 sync and delay request frames are recognized depending on the message
type field, 00 for sync and 01 for delay request.
Table 37-12. Example of Sync Frame in 1588 Version 2 (Ethernet Multicast) Format
Pdelay request frames need a special multicast address so they can pass through ports blocked by the spanning
tree protocol. For the multicast address 0180C200000E sync, Pdelay_Req and Pdelay_Resp frames are recognized
depending on the message type field, 00 for sync, 02 for pdelay request and 03 for pdelay response.
Table 37-13. Example of Pdelay_Req Frame in 1588 Version 2 (Ethernet Multicast) Format
Overview
The TSU consists of a timer and registers to capture the time at which PTP event frames cross the message
timestamp point. An interrupt is issued when a capture register is updated.
The 1588 time stamp unit (TSU) is implemented as a 94-bit timer.
• The 48 upper bits [93:46] of the timer count seconds and are accessible in the GMAC 1588 Timer Seconds High
Register” (GMAC_TSH) and GMAC 1588 Timer Seconds Low Register (GMACTSL).
• The 30 lower bits [45:16] of the timer count nanoseconds and are accessible in the GMAC 1588 Timer
Nanoseconds Register (GMAC_TN).
• The lowest 16 bits [15:0] of the timer count sub-nanoseconds.
The 46 lower bits roll over when they have counted to 1s. An interrupt is generated when the seconds increment. The
timer increments by a programmable period (to approximately 15.2fs resolution) with each MCK period. The timer
value can be read, written and adjusted with 1ns resolution (incremented or decremented) through the APB interface.
Timer Adjustment
The amount by which the timer increments each clock cycle is controlled by the Timer Increment register (GMAC_TI).
Bits [7:0] are the default increment value in nanoseconds. Additional 16 bits of sub-nanosecond resolution are
available using the Timer Increment Sub-Nanoseconds register (GMAC_TISUBN). If the rest of the register is written
with zero, the timer increments by the value in [7:0], plus the value of the GMAC_TISUBN for each clock cycle.
The GMAC_TISUBN allows a resolution of approximately 15fs.
Bits [15:8] of the increment register are the alternative increment value in nanoseconds, and bits [23:16] are the
number of increments after which the alternative increment value is used. If [23:16] are zero the alternative increment
value will never be used.
Taking the example of 10.2MHz, there are 102 cycles every 10µs or 51 cycles every 5µs. So a
timer with a 10.2MHz clock source is constructed by incrementing by 98ns for fifty cycles and then
incrementing by 100ns (98ns × 50 + 100ns = 5000ns). This is programmed by writing the value
0x00326462 to the Timer Increment register (GMAC_TI).
In a second example, a 49.8 MHz clock source requires 20ns for 248 cycles, followed by an
increment of 40ns (20ns × 248 + 40ns = 5000ns). This is programmed by writing the value
0x00F82814 to the GMAC_TI register.
The Number of Increments bit field in the GMAC_TI register is 8 bit in size, so frequencies up to 50MHz are
supported with 200kHz resolution.
Without the alternative increment field the period of the clock would be limited to an integer number of nanoseconds,
resulting in supported clock frequencies of 8, 10, 20, 25, 40, 50, 100, 125, 200 and 250 MHz.
There are six additional 62-bit registerseight additional 80-bit registers that capture the time at which PTP event
frames are transmitted and received. An interrupt is issued when these registers are updated. The TSU timer count
value can be compared to a programmable comparison value. For the comparison, the 48 bits of the seconds value
and the upper 22 bits of the nanoseconds value are used. A signal (GTSUCOMP) is output from the core to indicate
when the TSU timer count value is equal to the comparison value stored in the TSU timer comparison value registers
(GMAC_NSC, GMAC_SCL, and GMAC_SCH). The GTSUCOMP signal can be routed to the Timer peripheral to
automatically toggle pin TIOA11/PD21. This can be used as the reference clock for an external PLL to regenerate
the audio clock in Ethernet AVB.An interrupt can also be generated (if enabled) when the TSU timer count value and
comparison value are equal, mapped to bit 29 of the interrupt status register.
The GMAC supports both hardware controlled pause of the transmitter, upon reception of a pause frame, and
hardware generated pause frame transmission.
If a valid pause frame is received then the Pause Time register is updated with the new frame's pause time,
regardless of whether a previous pause frame is active or not. An interrupt (either bit 12 or bit 13 of the Interrupt
Status register) is triggered when a pause frame is received, but only if the interrupt has been enabled (bit 12
and bit 13 of the Interrupt Mask register). Pause frames received with non zero quantum are indicated through the
interrupt bit 12 of the Interrupt Status register. Pause frames received with zero quantum are indicated on bit 13 of
the Interrupt Status register.
Once the Pause Time register is loaded and the frame currently being transmitted has been sent, no new frames
are transmitted until the pause time reaches zero. The loading of a new pause time, and hence the pausing of
transmission, only occurs when the GMAC is configured for full duplex operation. If the GMAC is configured for half
duplex there will be no transmission pause, but the pause frame received interrupt will still be triggered. A valid pause
frame is defined as having a destination address that matches either the address stored in Specific Address register
1 or if it matches the reserved address of 0x0180C2000001. It must also have the MAC control frame type ID of
0x8808 and have the pause opcode of 0x0001.
Pause frames that have frame check sequence (FCS) or other errors will be treated as invalid and will be discarded.
802.3 Pause frames that are received after Priority-based Flow Control (PFC) has been negotiated will also be
discarded. Valid pause frames received will increment the pause frames received statistic register.
The pause time register decrements every 512 bit times once transmission has stopped. For test purposes, the retry
test bit can be set (bit 12 in the Network Configuration register) which causes the Pause Time register to decrement
every GTXCK cycle once transmission has stopped.
The interrupt (bit 13 in the Interrupt Status register) is asserted whenever the Pause Time register decrements to
zero (assuming it has been enabled by bit 13 in the Interrupt Mask register). This interrupt is also set when a zero
quantum pause frame is received.
The GMAC supports PFC priority-based pause transmission and reception. Before PFC pause frames can be
received, bit 16 of the Network Control register must be set.
The pause quantum registers used in the generated frame will depend on the trigger source for the frame as follows:
• If bit 17 of the Network Control register is written with a one, then the priority enable vector of the priority-based
pause frame will be set equal to the value stored in the Transmit PFC Pause register [7:0]. For each entry equal
to zero in the Transmit PFC Pause register [15:8], the pause quantum field of the pause frame associated with
that entry will be taken from the transmit pause quantum register. For each entry equal to one in the Transmit
PFC Pause register [15:8], the pause quantum associated with that entry will be zero.
• The Transmit Pause Quantum register resets to a value of 0xFFFF giving maximum pause quantum as default.
After transmission, a pause frame transmitted interrupt will be generated (bit 14 of the Interrupt Status register) and
the only statistics register that will be incremented will be the Pause Frames Transmitted register.
PFC Pause frames can also be transmitted by the MAC using normal frame transmission methods.
37.7.1 Initialization
37.7.1.1 Configuration
Initialization of the GMAC configuration (e.g., loop back mode, frequency ratios) must be done while the transmit and
receive circuits are disabled. See the description of the Network Control register and Network Configuration register
earlier in this document.
To change loop back mode, the following sequence of operations must be followed:
Receive Buffer N
37.7.1.6 Interrupts
There are 18 interrupt conditions that are detected within the GMAC. The conditions are ORed to make multiple
interrupts. Depending on the overall system design this may be passed through a further level of interrupt collection
(interrupt controller). On receipt of the interrupt signal, the CPU enters the interrupt handler. Refer to the device
interrupt controller documentation to identify that it is the GMAC that is generating the interrupt. To ascertain which
interrupt, read the Interrupt Status register. Note that in the default configuration this register will clear itself after
being read, though this may be configured to be write-one-to-clear if desired.
At reset all interrupts are disabled. To enable an interrupt, write to Interrupt Enable register with the pertinent interrupt
bit set to 1. To disable an interrupt, write to Interrupt Disable register with the pertinent interrupt bit set to 1. To check
whether an interrupt is enabled or disabled, read Interrupt Mask register. If the bit is set to 1, the interrupt is disabled.
These registers reset to zero on a read and stick at all ones when they count to their maximum value. They should be
read frequently enough to prevent loss of data.
The receive statistics registers are only incremented when the receive enable bit (RXEN) is set in the Network
Control register.
Once a statistics register has been read, it is automatically cleared. When reading the Octets Transmitted and Octets
Received registers, bits 31:0 should be read prior to bits 47:32 to ensure reliable operation.
...........continued
7:0 RPQ[7:0]
15:8 RPQ[15:8]
0x38 GMAC_RPQ
23:16
31:24
7:0 TPQ[7:0]
15:8 TPQ[15:8]
0x3C GMAC_TPQ
23:16
31:24
7:0 TPB1ADR[7:0]
15:8 TPB1ADR[11:8]
0x40 GMAC_TPSF
23:16
31:24 ENTXP
7:0 RPB1ADR[7:0]
15:8 RPB1ADR[11:8]
0x44 GMAC_RPSF
23:16
31:24 ENRXP
7:0 FML[7:0]
15:8 FML[13:8]
0x48 GMAC_RJFML
23:16
31:24
0x4C
... Reserved
0x7F
7:0 ADDR[7:0]
15:8 ADDR[15:8]
0x80 GMAC_HRB
23:16 ADDR[23:16]
31:24 ADDR[31:24]
7:0 ADDR[7:0]
15:8 ADDR[15:8]
0x84 GMAC_HRT
23:16 ADDR[23:16]
31:24 ADDR[31:24]
7:0 ADDR[7:0]
15:8 ADDR[15:8]
0x88 GMAC_SAB1
23:16 ADDR[23:16]
31:24 ADDR[31:24]
7:0 ADDR[7:0]
15:8 ADDR[15:8]
0x8C GMAC_SAT1
23:16
31:24
7:0 ADDR[7:0]
15:8 ADDR[15:8]
0x90 GMAC_SAB2
23:16 ADDR[23:16]
31:24 ADDR[31:24]
7:0 ADDR[7:0]
15:8 ADDR[15:8]
0x94 GMAC_SAT2
23:16
31:24
7:0 ADDR[7:0]
15:8 ADDR[15:8]
0x98 GMAC_SAB3
23:16 ADDR[23:16]
31:24 ADDR[31:24]
7:0 ADDR[7:0]
15:8 ADDR[15:8]
0x9C GMAC_SAT3
23:16
31:24
7:0 ADDR[7:0]
15:8 ADDR[15:8]
0xA0 GMAC_SAB4
23:16 ADDR[23:16]
31:24 ADDR[31:24]
...........continued
7:0 ADDR[7:0]
15:8 ADDR[15:8]
0xA4 GMAC_SAT4
23:16
31:24
7:0 TID[7:0]
15:8 TID[15:8]
0xA8 GMAC_TIDM1
23:16
31:24 ENIDn
7:0 TID[7:0]
15:8 TID[15:8]
0xAC GMAC_TIDM2
23:16
31:24 ENIDn
7:0 TID[7:0]
15:8 TID[15:8]
0xB0 GMAC_TIDM3
23:16
31:24 ENIDn
7:0 TID[7:0]
15:8 TID[15:8]
0xB4 GMAC_TIDM4
23:16
31:24 ENIDn
7:0 IP[7:0]
15:8 IP[15:8]
0xB8 GMAC_WOL
23:16 MTI SA1 ARP MAG
31:24
7:0 FL[7:0]
15:8 FL[15:8]
0xBC GMAC_IPGS
23:16
31:24
7:0 VLAN_TYPE[7:0]
15:8 VLAN_TYPE[15:8]
0xC0 GMAC_SVLAN
23:16
31:24 ESVLAN
7:0 PEV[7:0]
15:8 PQ[7:0]
0xC4 GMAC_TPFCP
23:16
31:24
7:0 ADDR[7:0]
15:8 ADDR[15:8]
0xC8 GMAC_SAMB1
23:16 ADDR[23:16]
31:24 ADDR[31:24]
7:0 ADDR[7:0]
15:8 ADDR[15:8]
0xCC GMAC_SAMT1
23:16
31:24
0xD0
... Reserved
0xDB
7:0 NANOSEC[7:0]
15:8 NANOSEC[15:8]
0xDC GMAC_NSC
23:16 NANOSEC[21:16]
31:24
7:0 SEC[7:0]
15:8 SEC[15:8]
0xE0 GMAC_SCL
23:16 SEC[23:16]
31:24 SEC[31:24]
7:0 SEC[7:0]
15:8 SEC[15:8]
0xE4 GMAC_SCH
23:16
31:24
...........continued
7:0 RUD[7:0]
15:8 RUD[15:8]
0xE8 GMAC_EFTSH
23:16
31:24
7:0 RUD[7:0]
15:8 RUD[15:8]
0xEC GMAC_EFRSH
23:16
31:24
7:0 RUD[7:0]
15:8 RUD[15:8]
0xF0 GMAC_PEFTSH
23:16
31:24
7:0 RUD[7:0]
15:8 RUD[15:8]
0xF4 GMAC_PEFRSH
23:16
31:24
0xF8
... Reserved
0xFF
7:0 TXO[7:0]
15:8 TXO[15:8]
0x0100 GMAC_OTLO
23:16 TXO[23:16]
31:24 TXO[31:24]
7:0 TXO[7:0]
15:8 TXO[15:8]
0x0104 GMAC_OTHI
23:16
31:24
7:0 FTX[7:0]
15:8 FTX[15:8]
0x0108 GMAC_FT
23:16 FTX[23:16]
31:24 FTX[31:24]
7:0 BFTX[7:0]
15:8 BFTX[15:8]
0x010C GMAC_BCFT
23:16 BFTX[23:16]
31:24 BFTX[31:24]
7:0 MFTX[7:0]
15:8 MFTX[15:8]
0x0110 GMAC_MFT
23:16 MFTX[23:16]
31:24 MFTX[31:24]
7:0 PFTX[7:0]
15:8 PFTX[15:8]
0x0114 GMAC_PFT
23:16
31:24
7:0 NFTX[7:0]
15:8 NFTX[15:8]
0x0118 GMAC_BFT64
23:16 NFTX[23:16]
31:24 NFTX[31:24]
7:0 NFTX[7:0]
15:8 NFTX[15:8]
0x011C GMAC_TBFT127
23:16 NFTX[23:16]
31:24 NFTX[31:24]
7:0 NFTX[7:0]
15:8 NFTX[15:8]
0x0120 GMAC_TBFT255
23:16 NFTX[23:16]
31:24 NFTX[31:24]
7:0 NFTX[7:0]
15:8 NFTX[15:8]
0x0124 GMAC_TBFT511
23:16 NFTX[23:16]
31:24 NFTX[31:24]
...........continued
7:0 NFTX[7:0]
15:8 NFTX[15:8]
0x0128 GMAC_TBFT1023
23:16 NFTX[23:16]
31:24 NFTX[31:24]
7:0 NFTX[7:0]
15:8 NFTX[15:8]
0x012C GMAC_TBFT1518
23:16 NFTX[23:16]
31:24 NFTX[31:24]
7:0 NFTX[7:0]
15:8 NFTX[15:8]
0x0130 GMAC_GTBFT1518
23:16 NFTX[23:16]
31:24 NFTX[31:24]
7:0 TXUNR[7:0]
15:8 TXUNR[9:8]
0x0134 GMAC_TUR
23:16
31:24
7:0 SCOL[7:0]
15:8 SCOL[15:8]
0x0138 GMAC_SCF
23:16 SCOL[17:16]
31:24
7:0 MCOL[7:0]
15:8 MCOL[15:8]
0x013C GMAC_MCF
23:16 MCOL[17:16]
31:24
7:0 XCOL[7:0]
15:8 XCOL[9:8]
0x0140 GMAC_EC
23:16
31:24
7:0 LCOL[7:0]
15:8 LCOL[9:8]
0x0144 GMAC_LC
23:16
31:24
7:0 DEFT[7:0]
15:8 DEFT[15:8]
0x0148 GMAC_DTF
23:16 DEFT[17:16]
31:24
7:0 CSR[7:0]
15:8 CSR[9:8]
0x014C GMAC_CSE
23:16
31:24
7:0 RXO[7:0]
15:8 RXO[15:8]
0x0150 GMAC_ORLO
23:16 RXO[23:16]
31:24 RXO[31:24]
7:0 RXO[7:0]
15:8 RXO[15:8]
0x0154 GMAC_ORHI
23:16
31:24
7:0 FRX[7:0]
15:8 FRX[15:8]
0x0158 GMAC_FR
23:16 FRX[23:16]
31:24 FRX[31:24]
7:0 BFRX[7:0]
15:8 BFRX[15:8]
0x015C GMAC_BCFR
23:16 BFRX[23:16]
31:24 BFRX[31:24]
...........continued
7:0 MFRX[7:0]
15:8 MFRX[15:8]
0x0160 GMAC_MFR
23:16 MFRX[23:16]
31:24 MFRX[31:24]
7:0 PFRX[7:0]
15:8 PFRX[15:8]
0x0164 GMAC_PFR
23:16
31:24
7:0 NFRX[7:0]
15:8 NFRX[15:8]
0x0168 GMAC_BFR64
23:16 NFRX[23:16]
31:24 NFRX[31:24]
7:0 NFRX[7:0]
15:8 NFRX[15:8]
0x016C GMAC_TBFR127
23:16 NFRX[23:16]
31:24 NFRX[31:24]
7:0 NFRX[7:0]
15:8 NFRX[15:8]
0x0170 GMAC_TBFR255
23:16 NFRX[23:16]
31:24 NFRX[31:24]
7:0 NFRX[7:0]
15:8 NFRX[15:8]
0x0174 GMAC_TBFR511
23:16 NFRX[23:16]
31:24 NFRX[31:24]
7:0 NFRX[7:0]
15:8 NFRX[15:8]
0x0178 GMAC_TBFR1023
23:16 NFRX[23:16]
31:24 NFRX[31:24]
7:0 NFRX[7:0]
15:8 NFRX[15:8]
0x017C GMAC_TBFR1518
23:16 NFRX[23:16]
31:24 NFRX[31:24]
7:0 NFRX[7:0]
15:8 NFRX[15:8]
0x0180 GMAC_TMXBFR
23:16 NFRX[23:16]
31:24 NFRX[31:24]
7:0 UFRX[7:0]
15:8 UFRX[9:8]
0x0184 GMAC_UFR
23:16
31:24
7:0 OFRX[7:0]
15:8 OFRX[9:8]
0x0188 GMAC_OFR
23:16
31:24
7:0 JRX[7:0]
15:8 JRX[9:8]
0x018C GMAC_JR
23:16
31:24
7:0 FCKR[7:0]
15:8 FCKR[9:8]
0x0190 GMAC_FCSE
23:16
31:24
7:0 LFER[7:0]
15:8 LFER[9:8]
0x0194 GMAC_LFFE
23:16
31:24
...........continued
7:0 RXSE[7:0]
15:8 RXSE[9:8]
0x0198 GMAC_RSE
23:16
31:24
7:0 AER[7:0]
15:8 AER[9:8]
0x019C GMAC_AE
23:16
31:24
7:0 RXRER[7:0]
15:8 RXRER[15:8]
0x01A0 GMAC_RRE
23:16 RXRER[17:16]
31:24
7:0 RXOVR[7:0]
15:8 RXOVR[9:8]
0x01A4 GMAC_ROE
23:16
31:24
7:0 HCKER[7:0]
15:8
0x01A8 GMAC_IHCE
23:16
31:24
7:0 TCKER[7:0]
15:8
0x01AC GMAC_TCE
23:16
31:24
7:0 UCKER[7:0]
15:8
0x01B0 GMAC_UCE
23:16
31:24
0x01B4
... Reserved
0x01BB
7:0 LSBTIR[7:0]
15:8 LSBTIR[15:8]
0x01BC GMAC_TISUBN
23:16
31:24
7:0 TCS[7:0]
15:8 TCS[15:8]
0x01C0 GMAC_TSH
23:16
31:24
0x01C4
... Reserved
0x01CF
7:0 TCS[7:0]
15:8 TCS[15:8]
0x01D0 GMAC_TSL
23:16 TCS[23:16]
31:24 TCS[31:24]
7:0 TNS[7:0]
15:8 TNS[15:8]
0x01D4 GMAC_TN
23:16 TNS[23:16]
31:24 TNS[29:24]
7:0 ITDT[7:0]
15:8 ITDT[15:8]
0x01D8 GMAC_TA
23:16 ITDT[23:16]
31:24 ADJ ITDT[29:24]
7:0 CNS[7:0]
15:8 ACNS[7:0]
0x01DC GMAC_TI
23:16 NIT[7:0]
31:24
...........continued
7:0 RUD[7:0]
15:8 RUD[15:8]
0x01E0 GMAC_EFTSL
23:16 RUD[23:16]
31:24 RUD[31:24]
7:0 RUD[7:0]
15:8 RUD[15:8]
0x01E4 GMAC_EFTN
23:16 RUD[23:16]
31:24 RUD[29:24]
7:0 RUD[7:0]
15:8 RUD[15:8]
0x01E8 GMAC_EFRSL
23:16 RUD[23:16]
31:24 RUD[31:24]
7:0 RUD[7:0]
15:8 RUD[15:8]
0x01EC GMAC_EFRN
23:16 RUD[23:16]
31:24 RUD[29:24]
7:0 RUD[7:0]
15:8 RUD[15:8]
0x01F0 GMAC_PEFTSL
23:16 RUD[23:16]
31:24 RUD[31:24]
7:0 RUD[7:0]
15:8 RUD[15:8]
0x01F4 GMAC_PEFTN
23:16 RUD[23:16]
31:24 RUD[29:24]
7:0 RUD[7:0]
15:8 RUD[15:8]
0x01F8 GMAC_PEFRSL
23:16 RUD[23:16]
31:24 RUD[31:24]
7:0 RUD[7:0]
15:8 RUD[15:8]
0x01FC GMAC_PEFRN
23:16 RUD[23:16]
31:24 RUD[29:24]
0x0200
... Reserved
0x026F
7:0 COUNT[7:0]
15:8 COUNT[15:8]
0x0270 GMAC_RXLPI
23:16
31:24
7:0 LPITIME[7:0]
15:8 LPITIME[15:8]
0x0274 GMAC_RXLPITIME
23:16 LPITIME[23:16]
31:24
7:0 COUNT[7:0]
15:8 COUNT[15:8]
0x0278 GMAC_TXLPI
23:16 COUNT[23:16]
31:24
7:0 LPITIME[7:0]
15:8 LPITIME[15:8]
0x027C GMAC_TXLPITIME
23:16 LPITIME[23:16]
31:24
0x0280
... Reserved
0x03FF
7:0 TCOMP TFC RLEX RXUBR RCOMP
15:8 HRESP ROVR
0x0400 GMAC_ISRPQ1
23:16
31:24
...........continued
...........continued
...........continued
7:0 COMPVAL[7:0]
15:8 COMPVAL[15:8]
0x06E8 GMAC_ST2ER2
23:16
31:24
7:0 COMPVAL[7:0]
15:8 COMPVAL[15:8]
0x06EC GMAC_ST2ER3
23:16
31:24
0x06F0
... Reserved
0x06FF
7:0 MASKVAL[7:0]
15:8 MASKVAL[15:8]
0x0700 GMAC_ST2CW00
23:16 COMPVAL[7:0]
31:24 COMPVAL[15:8]
7:0 OFFSSTRT[0] OFFSVAL[6:0]
15:8 OFFSSTRT[1]
0x0704 GMAC_ST2CW10
23:16
31:24
7:0 MASKVAL[7:0]
15:8 MASKVAL[15:8]
0x0708 GMAC_ST2CW01
23:16 COMPVAL[7:0]
31:24 COMPVAL[15:8]
7:0 OFFSSTRT[0] OFFSVAL[6:0]
15:8 OFFSSTRT[1]
0x070C GMAC_ST2CW11
23:16
31:24
Name: GMAC_NCR
Offset: 0x000
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
FNP TXPBPF ENPBPR
Access R/W R/W R/W
Reset 0 0 0
Bit 15 14 13 12 11 10 9 8
SRTSM TXZQPF TXPF THALT TSTART BP
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WESTAT INCSTAT CLRSTAT MPE TXEN RXEN LBL
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
GRXCK and GTXCK may malfunction as the GMAC is switched into and out of internal loop back. It is important that
receive and transmit circuits have already been disabled when making the switch into and out of internal loop back.
Value Description
0 Loop back local is disabled.
1 Loop back local is enabled.
Name: GMAC_NCFGR
Offset: 0x004
Reset: 0x00080000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
IRXER RXBP IPGSEN IRXFCS EFRHD RXCOEN
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
DCPF DBW[1:0] CLK[2:0] RFCS LFERD
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 1 0 0 0
Bit 15 14 13 12 11 10 9 8
RXBUFO[1:0] PEN RTY GBE MAXFS
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
UNIHEN MTIHEN NBC CAF JFRAME DNVLAN FD SPD
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
If a destination address match is found, the pause frame will be copied to memory. Note that valid pause frames
received will still increment pause statistics and pause the transmission of frames, as required.
Bit 0 – SPD Speed
Writing a '1' selects 100Mbps operation.
Writing a '0' to this bit selects 10Mbps operation.
Name: GMAC_NSR
Offset: 0x008
Reset: 0x000001X0
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
IDLE MDIO
Access R R
Reset 0 0
Name: GMAC_UR
Offset: 0x00C
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
MII
Access R/W
Reset 0
Name: GMAC_DCFGR
Offset: 0x010
Reset: 0x00020704
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
DDRP
Access R/W
Reset 0
Bit 23 22 21 20 19 18 17 16
DRBS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 1 0
Bit 15 14 13 12 11 10 9 8
TXCOEN TXPBMS RXBMS[1:0]
Access R/W R/W R/W R/W
Reset 0 1 1 1
Bit 7 6 5 4 3 2 1 0
ESPA ESMA FBLDO[4:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 1 0 0
Name: GMAC_TSR
Offset: 0x014
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
HRESP
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
LCO UND TXCOMP TFC TXGO RLE COL UBR
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 3 – TXGO Transmit Go
This bit is '1' when transmit is active. When using the DMA interface this bit represents the TXGO variable as
specified in the transmit buffer description.
Name: GMAC_RBQB
Offset: 0x018
Reset: 0x00000000
Property: Read/Write
This register holds the start address of the receive buffer queue (receive buffers descriptor list). The receive buffer
queue base address must be initialized before receive is enabled through bit 2 of the Network Control Register.
Once reception is enabled, any write to the Receive Buffer Queue Base Address Register is ignored. Reading
this register returns the location of the descriptor currently being accessed. This value increments as buffers are
used. Software should not use this register for determining where to remove received frames from the queue as it
constantly changes as new frames are received. Software should instead work its way through the buffer descriptor
queue checking the “used” bits.
In terms of AMBA AHB operation, the descriptors are read from memory using a single 32-bit AHB access. When
the datapath is configured at 64 bits, the descriptors should be aligned at 64-bit boundaries and each pair of 32-bit
descriptors is written to by using a single AHB access. The descriptors should be aligned at 32-bit boundaries and
the descriptors are written to using two individual non sequential accesses for 32-bit datapaths.
Bit 31 30 29 28 27 26 25 24
ADDR[29:22]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
ADDR[21:14]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
ADDR[13:6]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
ADDR[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: GMAC_TBQB
Offset: 0x01C
Reset: 0x00000000
Property: -
This register holds the start address of the transmit buffer queue (transmit buffers descriptor list). The Transmit Buffer
Queue Base Address Register must be initialized before transmit is started through bit 9 of the Network Control
Register. Once transmission has started, any write to the Transmit Buffer Queue Base Address Register is illegal and
therefore ignored.
Note that due to clock boundary synchronization, it takes a maximum of four MCK cycles from the writing of the
transmit start bit before the transmitter is active. Writing to the Transmit Buffer Queue Base Address Register during
this time may produce unpredictable results.
Reading this register returns the location of the descriptor currently being accessed. Since the DMA handles two
frames at once, this may not necessarily be pointing to the current frame being transmitted.
In terms of AMBA AHB operation, the descriptors are written to memory using a single 32-bit AHB access. When
the datapath is configured at 64 bits, the descriptors should be aligned at 64-bit boundaries and each pair of 32-bit
descriptors is read from memory using a single AHB access. The descriptors should be aligned at 32-bit boundaries
and the descriptors are read from memory using two individual non sequential accesses for 32-bit datapaths.
Bit 31 30 29 28 27 26 25 24
ADDR[29:22]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
ADDR[21:14]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
ADDR[13:6]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
ADDR[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: GMAC_RSR
Offset: 0x020
Reset: 0x00000000
Property: -
This register, when read, provides receive status details. Once read, individual bits may be cleared by writing a '1' to
them. It is not possible to set a bit to '1' by writing to this register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
HNO RXOVR REC BNA
Access R/W R/W R/W R/W
Reset 0 0 0 0
Name: GMAC_ISR
Offset: 0x024
Reset: 0x00000000
Property: Read-only
This register indicates the source of the interrupt. An interrupt source must be enabled in the mask register first so
the corresponding bits of this register will be set and the GMAC interrupt signal will be asserted in the system.
Bit 31 30 29 28 27 26 25 24
TSUTIMCMP WOL RXLPISBC SRI PDRSFT PDRQFT
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PDRSFR PDRQFR SFT DRQFT SFR DRQFR
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PFTR PTZ PFNZ HRESP ROVR
Access R R R R R
Reset 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TCOMP TFC RLEX TUR TXUBR RXUBR RCOMP MFS
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
This interrupt is also set if a transmitter status write back has not completed when another status write back is
attempted.
This interrupt is also set when the transmit DMA has written the SOP data into the FIFO and either the AHB bus was
not granted in time for further data, or because an AHB not OK response was returned, or because the used bit was
read.
Name: GMAC_IER
Offset: 0x028
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
TSUTIMCMP WOL RXLPISBC SRI PDRSFT PDRQFT
Access W W R W W W
Reset – – – – – –
Bit 23 22 21 20 19 18 17 16
PDRSFR PDRQFR SFT DRQFT SFR DRQFR
Access W W W W W W
Reset – – – – – –
Bit 15 14 13 12 11 10 9 8
EXINT PFTR PTZ PFNZ HRESP ROVR
Access W W W W W W
Reset – – – – – –
Bit 7 6 5 4 3 2 1 0
TCOMP TFC RLEX TUR TXUBR RXUBR RCOMP MFS
Access W W W W W W W W
Reset – – – – – – – –
Name: GMAC_IDR
Offset: 0x02C
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
TSUTIMCMP WOL RXLPISBC SRI PDRSFT PDRQFT
Access W W R W W W
Reset – – – – – –
Bit 23 22 21 20 19 18 17 16
PDRSFR PDRQFR SFT DRQFT SFR DRQFR
Access W W W W W W
Reset – – – – – –
Bit 15 14 13 12 11 10 9 8
EXINT PFTR PTZ PFNZ HRESP ROVR
Access W W W W W W
Reset – – – – – –
Bit 7 6 5 4 3 2 1 0
TCOMP TFC RLEX TUR TXUBR RXUBR RCOMP MFS
Access W W W W W W W W
Reset – – – – – – – –
Name: GMAC_IMR
Offset: 0x030
Reset: 0x07FFFFFF
Property: Read/Write
This register is a read-only register indicating which interrupts are masked. All bits are set at Reset and can be reset
individually by writing to the Interrupt Enable Register (GMAC_IER), or set individually by writing to the Interrupt
Disable Register (GMAC_IDR).
For test purposes there is a write-only function to this register that allows the bits in the Interrupt Status Register to
be set or cleared, regardless of the state of the mask register. A write to this register directly affects the state of the
corresponding bit in the Interrupt Status Register, causing an interrupt to be generated if a 1 is written.
The following values are valid for all listed bit names of this register when read:
0: The corresponding interrupt is enabled.
1: The corresponding interrupt is not enabled.
Bit 31 30 29 28 27 26 25 24
TSUTIMCMP WOL RXLPISBC SRI PDRSFT PDRQFT
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 1 1 1
Bit 23 22 21 20 19 18 17 16
PDRSFR PDRQFR SFT DRQFT SFR DRQFR
Access R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8
EXINT PFTR PTZ PFNZ HRESP ROVR
Access R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1
Bit 7 6 5 4 3 2 1 0
TCOMP TFC RLEX TUR TXUBR RXUBR RCOMP MFS
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Name: GMAC_MAN
Offset: 0x034
Reset: 0x00000000
Property: Read/Write
This register is a shift register. Writing to it starts a shift operation which is signaled completed when bit 2 is set in
the Network Status Register (GMAC_NSR). It takes about 2000 MCK cycles to complete, when MDC is set for MCK
divide by 32 in the Network Configuration Register. An interrupt is generated upon completion.
During this time, the MSB of the register is output on the MDIO pin and the LSB updated from the MDIO pin with
each MDC cycle. This causes transmission of a PHY management frame on MDIO. Refer also to section 22.2.4.5 of
the IEEE 802.3 standard.
Reading during the shift operation returns the current contents of the shift register. At the end of management
operation, the bits will have shifted back to their original locations. For a read operation, the data bits are updated
with data read from the PHY. It is important to write the correct values to the register to ensure a valid PHY
management frame is produced.
The MDIO interface can read IEEE 802.3 clause 45 PHYs, as well as clause 22 PHYs. To read clause 45 PHYs, bit
30 should be written with a '0' rather than a '1'. To write clause 45 PHYs, bits 31:28 should be written as 0x1:
For a description of MDC generation, see also the 'GMAC Network Configuration Register' (GMAC_NCR)
description.
Bit 31 30 29 28 27 26 25 24
WZO CLTTO OP[1:0] PHYA[4:1]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PHYA[0] REGA[4:0] WTN[1:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
DATA[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DATA[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_RPQ
Offset: 0x038
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RPQ[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RPQ[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TPQ
Offset: 0x03C
Reset: 0x0000FFFF
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
TPQ[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Bit 7 6 5 4 3 2 1 0
TPQ[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Name: GMAC_TPSF
Offset: 0x040
Reset: 0x00000FFF
Property: -
Bit 31 30 29 28 27 26 25 24
ENTXP
Access R/W
Reset 0
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
TPB1ADR[11:8]
Access R/W R/W R/W R/W
Reset 1 1 1 1
Bit 7 6 5 4 3 2 1 0
TPB1ADR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Name: GMAC_RPSF
Offset: 0x044
Reset: 0x00000FFF
Property: -
Bit 31 30 29 28 27 26 25 24
ENRXP
Access R
Reset 0
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RPB1ADR[11:8]
Access R/W R/W R/W R/W
Reset 1 1 1 1
Bit 7 6 5 4 3 2 1 0
RPB1ADR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Name: GMAC_RJFML
Offset: 0x048
Reset: 0x00003FFF
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
FML[13:8]
Access R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1
Bit 7 6 5 4 3 2 1 0
FML[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Name: GMAC_HRB
Offset: 0x080
Reset: 0x00000000
Property: Read/Write
The unicast hash enable (UNIHEN) and the multicast hash enable (MITIHEN) bits in the Network Configuration
Register (GMAC_NCFGR) enable the reception of hash matched frames.
Bit 31 30 29 28 27 26 25 24
ADDR[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
ADDR[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
ADDR[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
ADDR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_HRT
Offset: 0x084
Reset: 0x00000000
Property: Read/Write
The Unicast Hash Enable (UNIHEN) and the Multicast Hash Enable (MITIHEN) bits in the Network Configuration
Register (GMAC_NCFGR) enable the reception of hash matched frames.
Bit 31 30 29 28 27 26 25 24
ADDR[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
ADDR[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
ADDR[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
ADDR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_SABx
Offset: 0x88 + (x-1)*0x08 [x=1..4]
Reset: 0x00000000
Property: Read/Write
The addresses stored in the Specific Address Registers are deactivated at reset or when their corresponding Specific
Address Register Bottom is written. They are activated when Specific Address Register Top is written.
Bit 31 30 29 28 27 26 25 24
ADDR[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
ADDR[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
ADDR[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
ADDR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_SATx
Offset: 0x8C + (x-1)*0x08 [x=1..4]
Reset: 0x00000000
Property: Read/Write
The addresses stored in the Specific Address Registers are deactivated at reset or when their corresponding Specific
Address Register Bottom is written. They are activated when Specific Address Register Top is written.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
ADDR[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
ADDR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TIDMx
Offset: 0xA8 + (x-1)*0x04 [x=1..4]
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
ENIDn
Access R/W
Reset 0
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
TID[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TID[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_WOL
Offset: 0x0B8
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
MTI SA1 ARP MAG
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 15 14 13 12 11 10 9 8
IP[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
IP[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_IPGS
Offset: 0x0BC
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
FL[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
FL[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_SVLAN
Offset: 0x0C0
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
ESVLAN
Access -
Reset 0
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
VLAN_TYPE[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
VLAN_TYPE[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TPFCP
Offset: 0x0C4
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
PQ[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PEV[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_SAMB1
Offset: 0x0C8
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
ADDR[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
ADDR[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
ADDR[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
ADDR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_SAMT1
Offset: 0x0CC
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
ADDR[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
ADDR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_NSC
Offset: 0x0DC
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
NANOSEC[21:16]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NANOSEC[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NANOSEC[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_SCL
Offset: 0x0E0
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
SEC[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
SEC[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
SEC[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SEC[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_SCH
Offset: 0x0E4
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
SEC[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SEC[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_EFTSH
Offset: 0x0E8
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RUD[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RUD[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_EFRSH
Offset: 0x0EC
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RUD[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RUD[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
37.8.36 GMAC PTP Peer Event Frame Transmitted Seconds High Register
Name: GMAC_PEFTSH
Offset: 0x0F0
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RUD[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RUD[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
37.8.37 GMAC PTP Peer Event Frame Received Seconds High Register
Name: GMAC_PEFRSH
Offset: 0x0F4
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RUD[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RUD[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_OTLO
Offset: 0x100
Reset: 0x00000000
Property: -
When reading the Octets Transmitted and Octets Received Registers, bits [31:0] should be read prior to bits [47:32]
to ensure reliable operation.
Bit 31 30 29 28 27 26 25 24
TXO[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
TXO[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
TXO[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TXO[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_OTHI
Offset: 0x104
Reset: 0x00000000
Property: -
When reading the Octets Transmitted and Octets Received Registers, bits [31:0] should be read prior to bits [47:32]
to ensure reliable operation.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
TXO[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TXO[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_FT
Offset: 0x108
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
FTX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
FTX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
FTX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
FTX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_BCFT
Offset: 0x10C
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
BFTX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
BFTX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
BFTX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
BFTX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_MFT
Offset: 0x110
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
MFTX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
MFTX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
MFTX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
MFTX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_PFT
Offset: 0x114
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
PFTX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PFTX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_BFT64
Offset: 0x118
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
NFTX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NFTX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NFTX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NFTX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TBFT127
Offset: 0x11C
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
NFTX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NFTX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NFTX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NFTX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TBFT255
Offset: 0x120
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
NFTX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NFTX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NFTX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NFTX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TBFT511
Offset: 0x124
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
NFTX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NFTX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NFTX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NFTX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TBFT1023
Offset: 0x128
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
NFTX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NFTX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NFTX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NFTX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TBFT1518
Offset: 0x12C
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
NFTX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NFTX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NFTX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NFTX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_GTBFT1518
Offset: 0x130
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
NFTX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NFTX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NFTX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NFTX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bits 31:0 – NFTX[31:0] Greater than 1518 Byte Frames Transmitted without Error
This register counts the number of 1518 or above byte frames successfully transmitted without error i.e., no underrun
and not too many retries.
Name: GMAC_TUR
Offset: 0x134
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
TXUNR[9:8]
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
TXUNR[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_SCF
Offset: 0x138
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
SCOL[17:16]
Access R R
Reset 0 0
Bit 15 14 13 12 11 10 9 8
SCOL[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SCOL[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_MCF
Offset: 0x13C
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
MCOL[17:16]
Access R R
Reset 0 0
Bit 15 14 13 12 11 10 9 8
MCOL[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
MCOL[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_EC
Offset: 0x140
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
XCOL[9:8]
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
XCOL[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_LC
Offset: 0x144
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
LCOL[9:8]
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
LCOL[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_DTF
Offset: 0x148
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
DEFT[17:16]
Access R R
Reset 0 0
Bit 15 14 13 12 11 10 9 8
DEFT[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DEFT[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_CSE
Offset: 0x14C
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
CSR[9:8]
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
CSR[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_ORLO
Offset: 0x150
Reset: 0x00000000
Property: -
When reading the Octets Transmitted and Octets Received Registers, bits [31:0] should be read prior to bits [47:32]
to ensure reliable operation.
Bit 31 30 29 28 27 26 25 24
RXO[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RXO[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RXO[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RXO[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_ORHI
Offset: 0x154
Reset: 0x00000000
Property: -
When reading the Octets Transmitted and Octets Received Registers, bits 31:0 should be read prior to bits 47:32 to
ensure reliable operation.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RXO[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RXO[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_FR
Offset: 0x158
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
FRX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
FRX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
FRX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
FRX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_BCFR
Offset: 0x15C
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
BFRX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
BFRX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
BFRX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
BFRX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_MFR
Offset: 0x160
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
MFRX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
MFRX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
MFRX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
MFRX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_PFR
Offset: 0x164
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
PFRX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PFRX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_BFR64
Offset: 0x168
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
NFRX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NFRX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NFRX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NFRX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TBFR127
Offset: 0x16C
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
NFRX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NFRX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NFRX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NFRX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TBFR255
Offset: 0x170
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
NFRX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NFRX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NFRX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NFRX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TBFR511
Offset: 0x174
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
NFRX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NFRX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NFRX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NFRX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TBFR1023
Offset: 0x178
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
NFRX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NFRX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NFRX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NFRX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TBFR1518
Offset: 0x17C
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
NFRX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NFRX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NFRX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NFRX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TMXBFR
Offset: 0x180
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
NFRX[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NFRX[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NFRX[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NFRX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_UFR
Offset: 0x184
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
UFRX[9:8]
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
UFRX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_OFR
Offset: 0x188
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
OFRX[9:8]
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
OFRX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_JR
Offset: 0x18C
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
JRX[9:8]
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
JRX[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_FCSE
Offset: 0x190
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
FCKR[9:8]
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
FCKR[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_LFFE
Offset: 0x194
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
LFER[9:8]
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
LFER[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_RSE
Offset: 0x198
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RXSE[9:8]
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
RXSE[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_AE
Offset: 0x19C
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
AER[9:8]
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
AER[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_RRE
Offset: 0x1A0
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
RXRER[17:16]
Access R R
Reset 0 0
Bit 15 14 13 12 11 10 9 8
RXRER[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RXRER[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_ROE
Offset: 0x1A4
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RXOVR[9:8]
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
RXOVR[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_IHCE
Offset: 0x1A8
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
HCKER[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TCE
Offset: 0x1AC
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
TCKER[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_UCE
Offset: 0x1B0
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
UCKER[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TISUBN
Offset: 0x1BC
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
LSBTIR[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
LSBTIR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TSH
Offset: 0x1C0
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
TCS[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TCS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TSL
Offset: 0x1D0
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
TCS[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
TCS[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
TCS[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TCS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TN
Offset: 0x1D4
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
TNS[29:24]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
TNS[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
TNS[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TNS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TA
Offset: 0x1D8
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
ADJ ITDT[29:24]
Access W W W W W W W
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
ITDT[23:16]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
ITDT[15:8]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
ITDT[7:0]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TI
Offset: 0x1DC
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
NIT[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
ACNS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CNS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_EFTSL
Offset: 0x1E0
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
RUD[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RUD[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RUD[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RUD[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_EFTN
Offset: 0x1E4
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
RUD[29:24]
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RUD[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RUD[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RUD[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_EFRSL
Offset: 0x1E8
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
RUD[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RUD[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RUD[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RUD[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_EFRN
Offset: 0x1EC
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
RUD[29:24]
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RUD[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RUD[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RUD[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
37.8.93 GMAC PTP Peer Event Frame Transmitted Seconds Low Register
Name: GMAC_PEFTSL
Offset: 0x1F0
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
RUD[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RUD[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RUD[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RUD[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_PEFTN
Offset: 0x1F4
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
RUD[29:24]
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RUD[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RUD[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RUD[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
37.8.95 GMAC PTP Peer Event Frame Received Seconds Low Register
Name: GMAC_PEFRSL
Offset: 0x1F8
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
RUD[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RUD[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RUD[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RUD[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_PEFRN
Offset: 0x1FC
Reset: 0x00000000
Property: -
Bit 31 30 29 28 27 26 25 24
RUD[29:24]
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RUD[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RUD[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RUD[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_RXLPI
Offset: 0x270
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
COUNT[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
COUNT[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_RXLPITIME
Offset: 0x274
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
LPITIME[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
LPITIME[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
LPITIME[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TXLPI
Offset: 0x278
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
COUNT[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
COUNT[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
COUNT[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_TXLPITIME
Offset: 0x27C
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
LPITIME[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
LPITIME[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
LPITIME[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: GMAC_ISRPQx
Offset: 0x0400 + (x-1)*0x04 [x=1..2]
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
HRESP ROVR
Access R/W R/W
Reset 0 0
Bit 7 6 5 4 3 2 1 0
TCOMP TFC RLEX RXUBR RCOMP
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
37.8.102 GMAC Transmit Buffer Queue Base Address Register Priority Queue x
Name: GMAC_TBQBAPQx
Offset: 0x0440 + (x-1)*0x04 [x=1..2]
Reset: 0x00000000
Property: Read/Write
These registers hold the start address of the transmit buffer queues (transmit buffers descriptor lists) for the additional
queues and must be initialized to the address of valid descriptors, even if the priority queues are not used.
Bit 31 30 29 28 27 26 25 24
TXBQBA[29:22]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
TXBQBA[21:14]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
TXBQBA[13:6]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TXBQBA[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
37.8.103 GMAC Receive Buffer Queue Base Address Register Priority Queue x
Name: GMAC_RBQBAPQx
Offset: 0x0480 + (x-1)*0x04 [x=1..2]
Reset: 0x00000000
Property: Read/Write
These registers hold the start address of the receive buffer queues (receive buffers descriptor lists) for the additional
queues used when priority queues are employed.
Bit 31 30 29 28 27 26 25 24
RXBQBA[29:22]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RXBQBA[21:14]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RXBQBA[13:6]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RXBQBA[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: GMAC_RBSRPQx
Offset: 0x04A0 + (x-1)*0x04 [x=1..2]
Reset: 0x00000002
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RBS[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RBS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 1 0
Name: GMAC_CBSCR
Offset: 0x4BC
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
QAE QBE
Access R/W R/W
Reset 0 0
Name: GMAC_CBSISQA
Offset: 0x4C0
Reset: 0x00000000
Property: Read/Write
Credit-based shaping must be disabled in the GMAC_CBSCR before updating this register.
Bit 31 30 29 28 27 26 25 24
IS[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
IS[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
IS[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
IS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_CBSISQB
Offset: 0x4C4
Reset: 0x00000000
Property: Read/Write
Credit-based shaping must be disabled in the GMAC_CBSCR before updating this register.
Bit 31 30 29 28 27 26 25 24
IS[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
IS[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
IS[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
IS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_ST1RPQx
Offset: 0x0500 + x*0x04 [x=0..1]
Reset: 0x00000000
Property: Read/Write
Screening type 1 registers are used to allocate up to priority queues to received frames based on certain IP or UDP
fields of incoming frames.
Bit 31 30 29 28 27 26 25 24
UDPE DSTCE UDPM[15:12]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
UDPM[11:4]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
UDPM[3:0] DSTCM[7:4]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DSTCM[3:0] QNB[2:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Name: GMAC_ST2RPQx
Offset: 0x0540 + x*0x04 [x=0..1]
Reset: 0x00000000
Property: Read/Write
Screening type 2 registers are used to allocate up to 2 priority queues to received frames based on the VLAN priority
field of received Ethernet frames.
Bit 31 30 29 28 27 26 25 24
COMPCE COMPC[4:0] COMPBE
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
COMPB[4:0] COMPAE COMPA[4:3]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
COMPA[2:0] ETHE I2ETH[2:0] VLANE
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
VLANP[2:0] QNB[2:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: GMAC_IERPQx
Offset: 0x0600 + (x-1)*0x04 [x=1..2]
Reset: –
Property: Write-only
The following values are valid for all listed bit names of this register:
0: No effect.
1: Enables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
HRESP ROVR
Access W W
Reset – –
Bit 7 6 5 4 3 2 1 0
TCOMP TFC RLEX RXUBR RCOMP
Access W W W W W
Reset – – – – –
Name: GMAC_IDRPQx
Offset: 0x0620 + (x-1)*0x04 [x=1..2]
Reset: –
Property: Write-only
The following values are valid for all listed bit names of this register:
0: No effect.
1: Disables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
HRESP ROVR
Access W W
Reset – –
Bit 7 6 5 4 3 2 1 0
TCOMP TFC RLEX RXUBR RCOMP
Access W W W W W
Reset – – – – –
Name: GMAC_IMRPQx
Offset: 0x0640 + (x-1)*0x04 [x=1..2]
Reset: 0x00000000
Property: Read/Write
A read of this register returns the value of the receive complete interrupt mask.
A write to this register directly affects the state of the corresponding bit in the Interrupt Status Register, causing an
interrupt to be generated if a '1' is written.
The following values are valid for all listed bit names of this register:
0: Corresponding interrupt is enabled.
1: Corresponding interrupt is disabled.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
HRESP ROVR
Access R/W R/W
Reset 0 0
Bit 7 6 5 4 3 2 1 0
TCOMP AHB RLEX RXUBR RCOMP
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
Name: GMAC_ST2ERx
Offset: 0x06E0 + x*0x04 [x=0..3]
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
COMPVAL[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
COMPVAL[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_ST2CW0x
Offset: 0x0700 + x*0x08 [x=0..1]
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
COMPVAL[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
COMPVAL[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
MASKVAL[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
MASKVAL[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: GMAC_ST2CW1x
Offset: 0x0704 + x*0x08 [x=0..1]
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
OFFSSTRT[1]
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
OFFSSTRT[0] OFFSVAL[6:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
38.1 Description
The USB High-Speed Interface (USBHS) complies with the Universal Serial Bus (USB) 2.0 specification. (1)
Each pipe/endpoint can be configured in one of several USB transfer types. It can be associated with one, two or
three banks of a DPRAM used to store the current data payload. If two or three banks are used, then one DPRAM
bank is read or written by the CPU or the DMA, while the other is read or written by the USBHS core. This feature is
mandatory for isochronous pipes/endpoints.
The following table describes the hardware configuration of the USB MCU device.
Table 38-1. Description of USB Pipes/Endpoints
Pipe/Endpoint Mnemonic Max. Number DMA High Band Max. Pipe/ Type
Banks Width Endpoint Size
0 PEP_0 1 N N 64 Control
1 PEP_1 3 Y Y 1024 Isochronous/Bulk/Interrupt/
Control
2 PEP_2 3 Y Y 1024 Isochronous/Bulk/Interrupt/
Control
3 PEP_3 2 Y Y 1024 Isochronous/Bulk/Interrupt/
Control
4 PEP_4 2 Y Y 1024 Isochronous/Bulk/Interrupt/
Control
5 PEP_5 2 Y Y 1024 Isochronous/Bulk/Interrupt/
Control
6 PEP_6 2 Y Y 1024 Isochronous/Bulk/Interrupt/
Control
7 PEP_7 2 Y Y 1024 Isochronous/Bulk/Interrupt/
Control
8 PEP_8 2 N Y 1024 Isochronous/Bulk/Interrupt/
Control
9 PEP_9 2 N Y 1024 Isochronous/Bulk/Interrupt/
Control
Note:
1. High-bandwidth isochronous transfers supported in device but not host mode.
ctrl
status
HSDP/DP
AHB1 Rd/Wr/Ready
AHB Bus UTMI
DMA HSDM/DM
AHB0
USB2.0
CORE
Host
AHB Bus
AHB
Multiplexer
Client
Local
AHB
Client PEP
interface Alloc
38.5.2 Clocks
The clock for the USBHS bus interface is generated by the Power Management Controller. This clock can be enabled
or disabled in the Power Management Controller. It is recommended to disable the USBHS before disabling the
clock, to avoid freezing the USBHS in an undefined state.
Before enabling the USB clock in the Power Management Controller, the USBHS must be enabled (by writing a one
to the USBHS_CTRL.USBE bit and a zero to the USBHS_CTRL.FRZCLK bit).
The USBHS can work in two modes:
• Normal mode (SPDCONF = 0) where High speed, Full speed and Low speed are available.
• Low-power mode (SPDCONF = 1) where Full speed and Low speed are available.
To ensure successful startup, follow the sequences below:
- In Normal mode:
1. Enable the USBHS peripheral clock. This is done via the register PMC_PCER.
2. Enable the USBHS (UIMOD, USBE = 1, FRZCLK = 0).
3. Enable the UPLL 480 MHz.
4. Wait for the UPLL 480 MHz to be considered as locked by the PMC.
- In Low-power mode:
1. As USB_48M must be set to 48 MHz (refer to the section “Power Management Controller (PMC)”), select
either the PLLA or the UPLL (previously set to ON), and program the PMC_USB register (source selection and
divider).
2. Enable the USBHS peripheral clock (PMC_PCER).
3. Put the USBHS in Low-power mode (SPDCONF = 1).
4. Enable the USBHS (UIMOD, USBE = 1, FRZCLK = 0).
5. Enable the USBCK bit (PMC_SCER).
Related Links
31. Power Management Controller (PMC)
<any
Macro off: other
USBHS_CTRL.USBE = 0 USBHS_CTRL.USBE = 0
state>
Clock stopped:
USBHS_CTRL.FRZCLK = 1
HW
Reset RESET
USBHS_CTRL.USBE = 1
USBHS_CTRL.UIMOD = 1
USBHS_CTRL.USBE = 0
USBHS_CTRL.USBE = 1
USBHS_CTRL.UIMOD = 0
Device USBHS_CTRL_USBE = 0
Host
38.6.1.2 Interrupts
One interrupt vector is assigned to the USB interface. The following figure shows the structure of the USB interrupt
system.
USBHS_DEVEPTISRx.TXINI
USBHS_DEVEPTIMRx.TXINE
USBHS_DEVEPTISRx.RXOUTI USBHS_SR.RDERRI USB General
USBHS_DEVEPTIMRx.RXOUTE USBHS_CTRL.RDERRE Interrupt
USBHS_DEVEPTISRx.RXSTPI
USBHS_DEVEPTIMRx.RXSTPE
USBHS_DEVEPTISRx.UNDERFI
USBHS_DEVEPTIMRx.UNDERFE
USBHS_DEVEPTISRx.NAKOUTI
USBHS_DEVEPTIMRx.NAKOUTE
USBHS_DEVEPTISRx.HBISOINERRI
USBHS_DEVEPTIMRx.HBISOINERRE
USBHS_DEVEPTISRx.NAKINI
USBHS_DEVEPTIMRx.NAKINE
USBHS_DEVEPTISRx.HBISOFLUSHI
USBHS_DEVEPTIMRx.HBISOFLUSHE
USBHS_DEVEPTISRx.OVERFI USB Device
Endpoint X
USBHS_DEVEPTIMRx.OVERFE
Interrupt
USBHS_DEVEPTISRx.STALLEDI
USBHS_DEVEPTIMRx.STALLEDE
USBHS_DEVEPTISRx.CRCERRI
USBHS_DEVEPTIMRx.CRCERRE
USBHS_DEVEPTISRx.SHORTPACKET
USBHS_DEVEPTIMRx.SHORTPACKETE USBHS_DEVIMR.MSOF
USBHS_DEVEPTISRx.DTSEQ=MDATA & UESTAX.RXOUTI USBHS_DEVIMR.MSOFE
USBHS_DEVEPTIMRx.MDATAE USBHS_DEVIMR.SUSP
USBHS_DEVEPTISRx.DTSEQ=DATAX & UESTAX.RXOUTI USBHS_DEVIMR.SUSPE
USBHS_DEVEPTIMRx.DATAXE USBHS_DEVIMR.SOF
USBHS_DEVEPTISRx.TRANSERR USBHS_DEVIMR.SOFE
USBHS_DEVEPTIMRx.TRANSERRE USBHS_DEVIMR.EORST USB
USBHS_DEVEPTISRx.NBUSYBK USBHS_DEVIMR.EORSTE Interrupt
USBHS_DEVEPTIMRx.NBUSYBKE USBHS_DEVIMR.WAKEUP
USBHS_DEVIMR.WAKEUPE USB Device
USBHS_DEVIMR.EORSM Interrupt
USBHS_DEVIMR.EORSME
USBHS_DEVIMR.UPRSM
USBHS_DEVIMR.UPRSME
USBHS_DEVDMASTATUSx.EOT_STA USBHS_DEVIMR.EPXINT
UDDMAX_CONTROL.EOT_IRQ_EN USBHS_DEVIMR.EPXINTE
USBHS_DEVDMASTATUSx.EOCH_BUFF_STA USBHS_DEVIMR.DMAXINT
UDDMAX_CONTROL.EOBUFF_IRQ_EN USB Device USBHS_DEVIMR.DMAXINTE
USBHS_DEVDMASTATUSx.DESC_LD_STA DMA Channel X
UDDMAX_CONTROL.DESC_LD_IRQ_EN Interrupt
USBHS_HSTPIPISRx.RXINI
USBHS_HSTPIPIMRx.RXINE
USBHS_HSTPIPISRx.TXOUTI
USBHS_HSTPIPIMRx.TXOUTE
USBHS_HSTPIPISRx.TXSTPI
USBHS_HSTPIPIMRx.TXSTPE
USBHS_HSTPIPISRx.UNDERFI
USBHS_HSTPIPIMRx.UNDERFIE
USBHS_HSTPIPISRx.PERRI
USBHS_HSTPIPIMRx.PERRE USBHS_HSTISR.DCONNI
USBHS_HSTPIPISRx.NAKEDI USBHS_HSTIMR.DCONNIE
USBHS_HSTPIPIMRx.NAKEDE USBHS_HSTISR.DDISCI
USBHS_HSTPIPISRx.OVERFI USBHS_HSTIMR.DDISCIE
USBHS_HSTPIPIMRx.OVERFIE USBHS_HSTISR.RSTI
USBHS_HSTPIPISRx.RXSTALLDI USBHS_HSTIMR.RSTIE
USBHS_HSTPIPIMRx.RXSTALLDE USBHS_HSTISR.RSMEDI
USBHS_HSTPIPISRx.CRCERRI USB Host
Pipe X USBHS_HSTIMR.RSMEDIE
USBHS_HSTPIPIMRx.CRCERRE USBHS_HSTISR.RXRSMI USB Host
Interrupt Interrupt
USBHS_HSTPIPISRx.SHORTPACKETI USBHS_HSTIMR.RXRSMIE
USBHS_HSTPIPIMRx.SHORTPACKETIE USBHS_HSTISR.HSOFI
USBHS_HSTPIPISRx.NBUSYBK USBHS_HSTIMR.HSOFIE
USBHS_HSTPIPIMRx.NBUSYBKE USBHS_HSTISR.HWUPI
USBHS_HSTIMR.HWUPIE
USBHS_HSTDMASTATUSx.EOT_STA USBHS_HSTISR.PXINT
USBHS_HSTDMACONTROLx.EOT_IRQ_EN USBHS_HSTIMR.PXINTE
USBHS_HSTDMASTATUSx.EOCH_BUFF_STA USBHS_HSTISR.DMAXINT
USBHS_HSTDMACONTROLx.EOBUFF_IRQ_EN USB Host
DMA Channel X USBHS_HSTIMR.DMAXINTE
USBHS_HSTDMASTATUSx.DESC_LD_STA
Interrupt
USBHS_HSTDMACONTROLx.DESC_LD_IRQ_EN
See Interrupts in the Device Operation section and Interrupts in the Host Operation section for further details about
device and host interrupts.
There are two kinds of general interrupts: processing, i.e., their generation is part of the normal processing, and
exception, i.e., errors (not related to CPU exceptions).
PEP4 Conflict
PEP4 PEP4 PEP4 Lost Memory
PEP3 PEP3 (larger size)
PEP3 (ALLOC stays at 1) PEP4
1. Pipes/endpoints 0 to 5 are enabled, configured and allocated in ascending order. Each pipe/endpoint then
owns a memory area in the DPRAM.
2. Pipe/endpoint 3 is disabled, but its memory is kept allocated by the controller.
3. In order to free its memory, its USBHS_DEVEPTCFGx.ALLOC bit is written to zero. The pipe/endpoint 4
memory window slides down, but pipe/endpoint 5 does not move.
4. If the user chooses to reconfigure pipe/endpoint 3 with a larger size, the controller allocates a memory area
after the pipe/endpoint 2 memory area and automatically slides up the pipe/endpoint 4 memory window. Pipe/
endpoint 5 does not move and a memory conflict appears as the memory windows of pipes/endpoints 4 and 5
overlap. The data of these pipes/endpoints is potentially lost.
Note: 1. The data of pipe or endpoint 0 cannot be lost (except if it is de-allocated) as the memory allocation
and de-allocation may affect only higher pipes/endpoints.
Note: 2. Deactivating then reactivating the same pipe/endpoint with the same configuration only modifies
temporarily the controller DPRAM pointer and size for this pipe/endpoint. Nothing changes in the DPRAM.
Higher endpoints seem not to have been moved and their data is preserved as long as nothing has been
written or received into them while changing the allocation state of the first pipe/endpoint.
Note: 3. When the user writes a one to the USBHS_DEVEPTCFGx.ALLOC bit, the Configuration OK Status
bit (USBHS_DEVEPTISRx.CFGOK) is set only if the configured size and number of banks are correct as
compared to the endpoint maximum allowed values and to the maximum FIFO size (i.e., the DPRAM size).
The USBHS_DEVEPTISRx.CFGOK value does not consider memory allocation conflicts.
USBHS_CTRL.USBE = 1
& USBHS_DEVCTRL.DETACH = 0
Idle & Suspend
USBHS_CTRL.USBE = 0 Active
| USBHS_DEVCTRL.DETACH = 1
| Suspend
• In Idle state, the pad is put in Low-power mode, i.e., the differential receiver of the USB pad is off, and internal
pull-downs with a strong value (15 K) are set in HSDP/D and HSDM/DM to avoid floating lines.
• In Active state, the pad is working.
Figure 38-6 illustrates the pad events leading to a PAD state change.
Figure 38-6. Pad Events
Suspend detected Cleared on wakeup
USBHS_DEVISR.SUSP
PAD State
The USBHS_DEVISR.SUSP bit is set and the Wakeup Interrupt (USBHS_DEVISR.WAKEUP) bit is cleared when a
USB “Suspend” state has been detected on the USB bus. This event automatically puts the USB pad in Idle state.
The detection of a non-idle event sets USBHS_DEVISR.WAKEUP, clears USBHS_DEVISR.SUSP and wakes up the
USB pad.
The pad goes to the Idle state if the USBHS is disabled or if the USBHS_DEVCTRL.DETACH bit = 1. It returns to the
Active state when USBHS_CTRL.USBE = 1 and USBHS_DEVCTRL.DETACH = 0.
38.6.2.1 Introduction
In Device mode, the USBHS supports high-, full- and low-speed data transfers.
In addition to the default control endpoint, 9 endpoints are provided, which can be configured with an isochronous,
bulk or interrupt type, as described in Table 38-1.
As the Device mode starts in Idle state, the pad consumption is reduced to the minimum.
<any
other
USBHS_CTRL.USBE = 0 state>
| USBHS_CTRL.UIMOD = 0
USBHS_CTRL.USBE = 0
| USBHS_CTRL.UIMOD = 0 Idle
Reset USBHS_CTRL.USBE = 1
and USBHS_CTRL.UIMOD = 1
HW
USBHS_HSTCTRL.RESET
After a hardware reset, the USBHS Device mode is in Reset state. In this state:
• the USBHS clock is stopped to minimize power consumption (USBHS_CTRL.FRZCLK = 1),
• the internal registers of the Device mode are reset,
• the endpoint banks are de-allocated,
• neither D+ nor D- is pulled up (USBHS_DEVCTRL.DETACH = 1).
D+ or D- is pulled up according to the selected speed as soon as the USBHS_DEVCTRL.DETACH bit is written to
zero. See “Device Mode” for further details.
When the USBHS is enabled (USBHS_CTRL.USBE = 1) in Device mode (USBHS_CTRL.UIMOD = 1), its Device
mode state enters Idle state with minimal power consumption. This does not require the USB clock to be activated.
The USBHS Device mode can be disabled and reset at any time by disabling the USBHS (by writing a zero to
USBHS_CTRL.USBE) or when the Host mode is enabled (USBHS_CTRL.UIMOD = 0).
The endpoint reset may be associated with a clear of the data toggle sequence as an answer to the
CLEAR_FEATURE USB request. This can be achieved by writing a one to the Reset Data Toggle Set bit (RSTDTS)
in the Device Endpoint x Control Set register (this sets the Reset Data Toggle bit USBHS_DEVEPTIMRx.RSTDT).
In the end, the user has to write a zero to the USBHS_DEVEPT.EPRSTx bit to complete the reset operation and to
start using the FIFO.
Endpoint
Activation
Endpoint
ERROR
Activated
As long as the endpoint is not correctly configured (USBHS_HSTPIPISRx.CFGOK = 0), the controller does not
acknowledge the packets sent by the host to this endpoint.
The USBHS_HSTPIPISRx.CFGOK bit is set provided that the configured size and number of banks are correct as
compared to the endpoint maximal allowed values (see the Description of USB Pipes/Endpoints table) and to the
maximal FIFO size (i.e., the DPRAM size).
See "DPRAM Management" for additional information.
38.6.2.8 Detach
The reset value of the USBHS_DEVCTRL.DETACH bit is one.
It is possible to initiate a device re-enumeration by simply writing a one, and then a zero, to
USBHS_DEVCTRL.DETACH.
USBHS_DEVCTRL.DETACH acts on the pull-up connections of the D+ and D- pads. See “Device Mode” for further
details.
USBHS_DEVEPTISRx.RXOUTI HW SW HW SW
USBHS_DEVEPTISRx.TXINI SW
Control Read
Figure 38-10 shows a control read transaction. The USBHS has to manage the simultaneous write requests from the
CPU and the USB host.
Figure 38-10. Control Read
SETUP DATA STATUS
USBHS_DEVEPTISRx.RXOUTI HW SW
USBHS_DEVEPTISRx.TXINI SW HW SW
Wr Enable
HOST
Wr Enable
CPU
The OUT retry is always ACKed. This reception sets USBHS_DEVEPTISRx.RXOUTI and
USBHS_DEVEPTISRx.TXINI. Handle this with the following software algorithm:
set TXINI
wait for RXOUTI OR TXINI
if RXOUTI, then clear bit and return
if TXINI, then continue
Once the OUT status stage has been received, the USBHS waits for a SETUP request. The SETUP request has
priority over any other request and has to be ACKed. This means that any other bit should be cleared and the FIFO
reset when a SETUP is received.
The user has to consider that the byte counter is reset when a zero-length OUT packet is received.
HW
USBHS_DEVEPTISRx.TXINI SW SW
HW
USBHS_DEVEPTISRx.TXINI SW SW SW
USBHS_DEVEPTIMRx.FIFOCON write data to CPU SW write data to CPU SW write data to CPU
BANK 0 BANK 1 BANK0
Detailed Description
The data is written as follows:
• When the bank is empty, USBHS_DEVEPTISRx.TXINI and USBHS_DEVEPTIMRx.FIFOCON are set, which
triggers a PEP_x interrupt if USBHS_DEVEPTIMRx.TXINE = 1.
• The user acknowledges the interrupt by clearing USBHS_DEVEPTISRx.TXINI.
• The user writes the data into the current bank by using the USB Pipe/Endpoint nFIFO Data (USBFIFOnDATA)
register, until all the data frame is written or the bank is full (in which case USBHS_DEVEPTISRx.RWALL is
cleared and the Byte Count (USBHS_DEVEPTISRx.BYCT) field reaches the endpoint size).
• The user allows the controller to send the bank and switches to the next bank (if any) by clearing
USBHS_DEVEPTIMRx.FIFOCON.
If the endpoint uses several banks, the current one can be written while the previous one is being read by the
host. Then, when the user clears USBHS_DEVEPTIMRx.FIFOCON, the following bank may already be free and
USBHS_DEVEPTISRx.TXINI is set immediately.
An “Abort” stage can be produced when a zero-length OUT packet is received during an IN stage of a control or
isochronous IN transaction. The Kill IN Bank (USBHS_DEVEPTIMRx.KILLBK) bit is used to kill the last written bank.
The best way to manage this abort is to apply the algorithm represented in the following figure.
Figure 38-13. Abort Algorithm
Endpoint
Abort
No
Abort Done
The USBHS_DEVEPTISRx.RWALL bit is set when the current bank is not empty, i.e., when the software can read
further data from the FIFO.
Figure 38-14. Example of an OUT Endpoint with one Data Bank
HW HW
USBHS_DEVEPTISRx.RXOUTI SW SW
HW
HW
USBHS_DEVEPTISRx.RXOUTI SW SW
Detailed Description
The data is read as follows:
• When the bank is full, USBHS_DEVEPTISRx.RXOUTI and USBHS_DEVEPTIMRx.FIFOCON are set, which
triggers a PEP_x interrupt if USBHS_DEVEPTIMRx.RXOUTE = 1.
• The user acknowledges the interrupt by writing a one to USBHS_DEVEPTICRx.RXOUTIC in order to clear
USBHS_DEVEPTISRx.RXOUTI.
• The user can read the byte count of the current bank from USBHS_DEVEPTISRx.BYCT to know how many
bytes to read, rather than polling USBHS_DEVEPTISRx.RWALL.
• The user reads the data from the current bank by using the USBFIFOnDATA register, until all the expected
data frame is read or the bank is empty (in which case USBHS_DEVEPTISRx.RWALL is cleared and
USBHS_DEVEPTISRx.BYCT reaches zero).
• The user frees the bank and switches to the next bank (if any) by clearing USBHS_DEVEPTIMRx.FIFOCON.
If the endpoint uses several banks, the current one can be read while the following one is being written by the
host. Then, when the user clears USBHS_DEVEPTIMRx.FIFOCON, the following bank can already be read and
USBHS_DEVEPTISRx.RXOUTI is set immediately.
In High-speed mode, the PING and NYET protocols are handled by the USBHS.
• For a single bank, a NYET handshake is always sent to the host (on Bulk-out transaction) to indicate that the
current packet is acknowledged but there is no room for the next one.
• For a double bank, the USBHS responds to the OUT/DATA transaction with an ACK handshake when the
endpoint accepted the data successfully and has room for another data payload (the second bank is free).
38.6.2.14 Underflow
This error only exists for isochronous IN/OUT endpoints. It sets the Underflow Interrupt
(USBHS_DEVEPTISRx.UNDERFI) bit, which triggers a PEP_x interrupt if the Underflow Interrupt Enable
(USBHS_DEVEPTIMRx.UNDERFE) bit is one.
• An underflow can occur during the IN stage if the host attempts to read from an empty bank. A zero-length
packet is then automatically sent by the USBHS.
• An underflow cannot occur during the OUT stage on a CPU action, since the user may only read if the bank is
not empty (USBHS_DEVEPTISRx.RXOUTI = 1 or USBHS_DEVEPTISRx.RWALL = 1).
• An underflow can also occur during the OUT stage if the host sends a packet while the bank is already full.
Typically, the CPU is not fast enough. The packet is lost.
• An underflow cannot occur during the IN stage on a CPU action, since the user may only write if the bank is not
full (USBHS_DEVEPTISRx.TXINI = 1or USBHS_DEVEPTISRx.RWALL = 1).
38.6.2.15 Overflow
This error exists for all endpoint types. It sets the Overflow interrupt (USBHS_DEVEPTISRx.OVERFI) bit, which
triggers a PEP_x interrupt if the Overflow Interrupt Enable (USBHS_DEVEPTIMRx.OVERFE) bit is one.
• An overflow can occur during the OUT stage if the host attempts to write into a bank which is too small for the
packet. The packet is acknowledged and the USBHS_DEVEPTISRx.RXOUTI bit is set as if no overflow had
occurred. The bank is filled with all the first bytes of the packet that fit in.
• An overflow cannot occur during the IN stage on a CPU action, since the user may only write if the bank is not
full (USBHS_DEVEPTISRx.TXINI = 1 or USBHS_DEVEPTISRx.RWALL = 1).
38.6.2.17 HB IsoFlush
This error only exists for high-bandwidth isochronous IN endpoints.
At the end of the microframe, if at least one packet has been sent to the host and there is a missing IN token during
this microframe, the bank(s) destined to this microframe is/are flushed out to ensure a good data synchronization
between the host and the device.
For example, if NBTRANS is three (three transactions per microframe) and if only the first IN token (among three) is
well received by the USBHS, the last two banks are discarded.
38.6.2.19 Interrupts
See the structure of the USB device interrupt system in Figure 38-3.
There are two kinds of device interrupts: processing, i.e., their generation is part of the normal processing, and
exception, i.e., errors (not related to CPU exceptions).
Global Interrupts
The processing device global interrupts are:
• Suspend (USBHS_DEVISR.SUSP)
• Start of Frame (USBHS_DEVISR.SOF) interrupt with no frame number CRC error - the Frame Number CRC
Error (USBHS_DEVFNUM.FNCERR) bit is zero.
• Micro Start of Frame (USBHS_DEVISR.MSOF) with no CRC error
In Host mode, the USBHS associates a pipe to a device endpoint, considering the device configuration descriptors.
38.6.3.2 Power-On and Reset
The following figure describes the USBHS Host mode main states.
Figure 38-17. Host Mode Main States
<any
other
Device state>
Macro off
Clock stopped Disconnection
Idle
Device
Connection
Device
Disconnection
Ready
SOFE = 0
SOFE = 1
Suspend
After a hardware reset, the USBHS Host mode is in the Reset state.
When the USBHS is enabled (USBHS_CTRL.USBE = 1) in Host mode (USBHS_CTRL.UIMOD = 0), it goes to the
Idle state. In this state, the controller waits for a device connection with a minimal power consumption. The USB pad
should be in the Idle state. Once a device is connected, the USBHS enters the Ready state, which does not require
the USB clock to be activated.
The controller enters the Suspend state when the USB bus is in a “Suspend” state, i.e., when the Host mode does
not generate the “Start of Frame (SOF)”. In this state, the USB consumption is minimal. The Host mode exits the
Suspend state when starting to generate the SOF over the USB line.
38.6.3.3 Device Detection
A device is detected by the USBHS Host mode when D+ or D- is no longer tied low, i.e., when the device D+ or D-
pull-up resistor is connected. The bit USBHS_SFR.VBUSRQS must be set to ‘1’ to enable this detection.
Note: The VBUS supply is not managed by the USBHS interface. It must be generated on-board.
The device disconnection is detected by the host controller when both D+ and D- are pulled down.
Pipe
Activation
As long as the pipe is not correctly configured (USBHS_HSTPIPISRx.CFGOK = 0), the controller cannot send
packets to the device through this pipe.
The USBHS_HSTPIPISRx.CFGOK bit is only set if the configured size and number of banks are correct as compared
to their maximal allowed values for the pipe (see the Description of USB Pipes/Endpoints table) and to the maximal
FIFO size (i.e., the DPRAM size).
See "DPRAM Management" for additional information.
Once the pipe is correctly configured (USBHS_HSTPIPISRx.CFGOK = 1), only the USBHS_HSTPIPCFGx.PTOKEN
and USBHS_HSTPIPCFGx.INTFRQ fields can be written by software. USBHS_HSTPIPCFGx.INTFRQ is
meaningless for non-interrupt pipes.
When starting an enumeration, the user gets the device descriptor by sending a GET_DESCRIPTOR USB request.
This descriptor contains the maximal packet size of the device default control endpoint (bMaxPacketSize0) and the
user reconfigures the size of the default control pipe with this size parameter.
The generation of IN requests starts when the pipe is unfrozen (the Pipe Freeze (USBHS_HSTPIPIMRx.PFREEZE)
field in USBHS_HSTPIPIMRx is zero).
The Received IN Data Interrupt (USBHS_HSTPIPISRx.RXINI) bit is set at the same time as the FIFO Control
(USBHS_HSTPIPIMRx.FIFOCON) bit when the current bank is full. This triggers a PEP_x interrupt if the Received IN
Data Interrupt Enable (USBHS_HSTPIPIMRx.RXINE) bit is one.
USBHS_HSTPIPISRx.RXINI is cleared by software (by writing a one to the Received IN Data Interrupt Clear bit in the
Host Pipe x Clear register (USBHS_HSTPIPIDRx.RXINIC)) to acknowledge the interrupt, which has no effect on the
pipe FIFO.
The user then reads from the FIFO and clears the USBHS_HSTPIPIMRx.FIFOCON bit (by writing a one to the FIFO
Control Clear (USBHS_HSTPIPIDRx.FIFOCONC) bit) to free the bank. If the IN pipe is composed of multiple banks,
this also switches to the next bank. The USBHS_HSTPIPISRx.RXINI and USBHS_HSTPIPIMRx.FIFOCON bits are
updated in accordance with the status of the next bank.
USBHS_HSTPIPISRx.RXINI is always cleared before clearing USBHS_HSTPIPIMRx.FIFOCON.
The Read/Write Allowed (USBHS_HSTPIPISRx.RWALL) bit is set when the current bank is not empty, i.e., when the
software can read further data from the FIFO.
Figure 38-19. Example of an IN Pipe with one Data Bank
DATA DATA
IN ACK IN ACK
(bank 0) (bank 0)
HW HW
USBHS_HSTPIPISRx.RXINI SW SW
HW HW
USBHS_HSTPIPISRx.RXINI SW SW
The USBHS_HSTPIPISRx.RWALL bit is set when the current bank is not full, i.e., when the software can write further
data into the FIFO.
Notes:
1. If the user decides to switch to the Suspend state (by writing a zero to the USBHS_HSTCTRL.SOFE bit) while
a bank is ready to be sent, the USBHS automatically exits this state and the bank is sent.
2. In High-speed operating mode, the host controller automatically manages the PING protocol to maximize the
USB bandwidth. The user can tune the PING protocol by handling the Ping Enable (PINGEN) bit and the
bInterval Parameter for the Bulk-Out/Ping Transaction (BINTERVAL) field in USBHS_HSTPIPCFGx. See the
Host Pipe x Configuration Register for additional information.
Figure 38-21. Example of an OUT Pipe with one Data Bank
DATA
OUT ACK OUT
(bank 0)
HW
SW SW
USBHS_HSTPIPISRx.TXOUTI
Figure 38-22. Example of an OUT Pipe with two Data Banks and no Bank Switching Delay
DATA DATA
OUT ACK OUT ACK
(bank 0) (bank 1)
HW
SW SW SW
USBHS_HSTPIPISRx.TXOUTI
Figure 38-23. Example of an OUT Pipe with two Data Banks and a Bank Switching Delay
DATA DATA
OUT ACK OUT ACK
(bank 0) (bank 1)
HW
USBHS_HSTPIPISRx.TXOUTI SW SW SW
38.6.3.13 Interrupts
See the structure of the USB host interrupt system on Figure 38-3.
There are two kinds of host interrupts: processing, i.e., their generation is part of the normal processing, and
exception, i.e., errors (not related to CPU exceptions).
Global Interrupts
The processing host global interrupts are:
• Device Connection (USBHS_HSTISR.DCONNI)
• Device Disconnection (USBHS_HSTISR.DDISCI)
• USB Reset Sent (USBHS_HSTISR.RSTI)
• Downstream Resume Sent (USBHS_HSTISR.RSMEDI)
• Upstream Resume Received (USBHS_HSTISR.RXRSMI)
• Host Start of Frame (USBHS_HSTISR.HSOFI)
• Host Wakeup (USBHS_HSTISR.HWUPI)
• Pipe x (USBHS_HSTISR.PEP_x)
• DMA Channel x (USBHS_HSTISR.DMAxINT)
There is no exception host global interrupt.
Pipe Interrupts
The processing host pipe interrupts are:
• Received IN Data (USBHS_HSTPIPISRx.RXINI)
• Transmitted OUT Data (USBHS_HSTPIPISRx.TXOUTI)
• Transmitted SETUP (USBHS_HSTPIPISRx.TXSTPI)
• Short Packet (USBHS_HSTPIPISRx.SHORTPACKETI)
• Number of Busy Banks (USBHS_HSTPIPISRx.NBUSYBK)
The exception host pipe interrupts are:
• Underflow (USBHS_HSTPIPISRx.UNDERFI)
• Pipe Error (USBHS_HSTPIPISRx.PERRI)
• NAKed (USBHS_HSTPIPISRx.NAKEDI)
• Overflow (USBHS_HSTPIPISRx.OVERFI)
• Received STALLed (USBHS_HSTPIPISRx.RXSTALLDI)
• CRC Error (USBHS_HSTPIPISRx.CRCERRI)
DMA Interrupts
The processing host DMA interrupts are:
• The End of USB Transfer Status (USBHS_HSTDMASTATUSx.END_TR_ST)
• The End of Channel Buffer Status (USBHS_HSTDMASTATUSx.END_BF_ST)
• The Descriptor Loaded Status (USBHS_HSTDMASTATUSx.DESC_LDST)
There is no exception host DMA interrupt.
Memory Area
Data Buffer 1
Data Buffer 2
Data Buffer 3
...........continued
...........continued
SHORTPACK
7:0 STALLEDI OVERFI NAKINI NAKOUTI RXSTPI RXOUTI TXINI
ET
USBHS_DEVEPTIS
0x013C 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R3
23:16 BYCT[3:0] CFGOK CTRLDIR RWALL
31:24 BYCT[10:4]
SHORTPACK HBISOFLUSH
7:0 CRCERRI OVERFI HBISOINERRI UNDERFI RXOUTI TXINI
ET I
USBHS_DEVEPTIS ERRORTRAN
0x013C 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R3 (ISOENPT) S
23:16 BYCT[3:0] CFGOK RWALL
31:24 BYCT[10:4]
SHORTPACK
7:0 STALLEDI OVERFI NAKINI NAKOUTI RXSTPI RXOUTI TXINI
ET
USBHS_DEVEPTIS
0x0140 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R4
23:16 BYCT[3:0] CFGOK CTRLDIR RWALL
31:24 BYCT[10:4]
SHORTPACK HBISOFLUSH
7:0 CRCERRI OVERFI HBISOINERRI UNDERFI RXOUTI TXINI
ET I
USBHS_DEVEPTIS ERRORTRAN
0x0140 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R4 (ISOENPT) S
23:16 BYCT[3:0] CFGOK RWALL
31:24 BYCT[10:4]
SHORTPACK
7:0 STALLEDI OVERFI NAKINI NAKOUTI RXSTPI RXOUTI TXINI
ET
USBHS_DEVEPTIS
0x0144 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R5
23:16 BYCT[3:0] CFGOK CTRLDIR RWALL
31:24 BYCT[10:4]
SHORTPACK HBISOFLUSH
7:0 CRCERRI OVERFI HBISOINERRI UNDERFI RXOUTI TXINI
ET I
USBHS_DEVEPTIS ERRORTRAN
0x0144 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R5 (ISOENPT) S
23:16 BYCT[3:0] CFGOK RWALL
31:24 BYCT[10:4]
SHORTPACK
7:0 STALLEDI OVERFI NAKINI NAKOUTI RXSTPI RXOUTI TXINI
ET
USBHS_DEVEPTIS
0x0148 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R6
23:16 BYCT[3:0] CFGOK CTRLDIR RWALL
31:24 BYCT[10:4]
SHORTPACK HBISOFLUSH
7:0 CRCERRI OVERFI HBISOINERRI UNDERFI RXOUTI TXINI
ET I
USBHS_DEVEPTIS ERRORTRAN
0x0148 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R6 (ISOENPT) S
23:16 BYCT[3:0] CFGOK RWALL
31:24 BYCT[10:4]
SHORTPACK
7:0 STALLEDI OVERFI NAKINI NAKOUTI RXSTPI RXOUTI TXINI
ET
USBHS_DEVEPTIS
0x014C 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R7
23:16 BYCT[3:0] CFGOK CTRLDIR RWALL
31:24 BYCT[10:4]
SHORTPACK HBISOFLUSH
7:0 CRCERRI OVERFI HBISOINERRI UNDERFI RXOUTI TXINI
ET I
USBHS_DEVEPTIS ERRORTRAN
0x014C 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R7 (ISOENPT) S
23:16 BYCT[3:0] CFGOK RWALL
31:24 BYCT[10:4]
...........continued
SHORTPACK
7:0 STALLEDI OVERFI NAKINI NAKOUTI RXSTPI RXOUTI TXINI
ET
USBHS_DEVEPTIS
0x0150 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R8
23:16 BYCT[3:0] CFGOK CTRLDIR RWALL
31:24 BYCT[10:4]
SHORTPACK HBISOFLUSH
7:0 CRCERRI OVERFI HBISOINERRI UNDERFI RXOUTI TXINI
ET I
USBHS_DEVEPTIS ERRORTRAN
0x0150 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R8 (ISOENPT) S
23:16 BYCT[3:0] CFGOK RWALL
31:24 BYCT[10:4]
0x0154
... Reserved
0x015F
SHORTPACK
7:0 STALLEDIC OVERFIC NAKINIC NAKOUTIC RXSTPIC RXOUTIC TXINIC
ETC
USBHS_DEVEPTIC
0x0160 15:8
R0
23:16
31:24
SHORTPACK HBISOFLUSH HBISOINERRI
7:0 CRCERRIC OVERFIC UNDERFIC RXOUTIC TXINIC
ETC IC C
USBHS_DEVEPTIC
0x0160 15:8
R0 (ISOENPT)
23:16
31:24
SHORTPACK
7:0 STALLEDIC OVERFIC NAKINIC NAKOUTIC RXSTPIC RXOUTIC TXINIC
ETC
USBHS_DEVEPTIC
0x0164 15:8
R1
23:16
31:24
SHORTPACK HBISOFLUSH HBISOINERRI
7:0 CRCERRIC OVERFIC UNDERFIC RXOUTIC TXINIC
ETC IC C
USBHS_DEVEPTIC
0x0164 15:8
R1 (ISOENPT)
23:16
31:24
SHORTPACK
7:0 STALLEDIC OVERFIC NAKINIC NAKOUTIC RXSTPIC RXOUTIC TXINIC
ETC
USBHS_DEVEPTIC
0x0168 15:8
R2
23:16
31:24
SHORTPACK HBISOFLUSH HBISOINERRI
7:0 CRCERRIC OVERFIC UNDERFIC RXOUTIC TXINIC
ETC IC C
USBHS_DEVEPTIC
0x0168 15:8
R2 (ISOENPT)
23:16
31:24
SHORTPACK
7:0 STALLEDIC OVERFIC NAKINIC NAKOUTIC RXSTPIC RXOUTIC TXINIC
ETC
USBHS_DEVEPTIC
0x016C 15:8
R3
23:16
31:24
SHORTPACK HBISOFLUSH HBISOINERRI
7:0 CRCERRIC OVERFIC UNDERFIC RXOUTIC TXINIC
ETC IC C
USBHS_DEVEPTIC
0x016C 15:8
R3 (ISOENPT)
23:16
31:24
SHORTPACK
7:0 STALLEDIC OVERFIC NAKINIC NAKOUTIC RXSTPIC RXOUTIC TXINIC
ETC
USBHS_DEVEPTIC
0x0170 15:8
R4
23:16
31:24
...........continued
...........continued
SHORTPACK
7:0 STALLEDIS OVERFIS NAKINIS NAKOUTIS RXSTPIS RXOUTIS TXINIS
ETS
USBHS_DEVEPTIF
0x0194 15:8 NBUSYBKS
R1
23:16
31:24
SHORTPACK HBISOFLUSH HBISOINERRI
7:0 CRCERRIS OVERFIS UNDERFIS RXOUTIS TXINIS
ETS IS S
USBHS_DEVEPTIF
0x0194 15:8 NBUSYBKS
R1 (ISOENPT)
23:16
31:24
SHORTPACK
7:0 STALLEDIS OVERFIS NAKINIS NAKOUTIS RXSTPIS RXOUTIS TXINIS
ETS
USBHS_DEVEPTIF
0x0198 15:8 NBUSYBKS
R2
23:16
31:24
SHORTPACK HBISOFLUSH HBISOINERRI
7:0 CRCERRIS OVERFIS UNDERFIS RXOUTIS TXINIS
ETS IS S
USBHS_DEVEPTIF
0x0198 15:8 NBUSYBKS
R2 (ISOENPT)
23:16
31:24
SHORTPACK
7:0 STALLEDIS OVERFIS NAKINIS NAKOUTIS RXSTPIS RXOUTIS TXINIS
ETS
USBHS_DEVEPTIF
0x019C 15:8 NBUSYBKS
R3
23:16
31:24
SHORTPACK HBISOFLUSH HBISOINERRI
7:0 CRCERRIS OVERFIS UNDERFIS RXOUTIS TXINIS
ETS IS S
USBHS_DEVEPTIF
0x019C 15:8 NBUSYBKS
R3 (ISOENPT)
23:16
31:24
SHORTPACK
7:0 STALLEDIS OVERFIS NAKINIS NAKOUTIS RXSTPIS RXOUTIS TXINIS
ETS
USBHS_DEVEPTIF
0x01A0 15:8 NBUSYBKS
R4
23:16
31:24
SHORTPACK HBISOFLUSH HBISOINERRI
7:0 CRCERRIS OVERFIS UNDERFIS RXOUTIS TXINIS
ETS IS S
USBHS_DEVEPTIF
0x01A0 15:8 NBUSYBKS
R4 (ISOENPT)
23:16
31:24
SHORTPACK
7:0 STALLEDIS OVERFIS NAKINIS NAKOUTIS RXSTPIS RXOUTIS TXINIS
ETS
USBHS_DEVEPTIF
0x01A4 15:8 NBUSYBKS
R5
23:16
31:24
SHORTPACK HBISOFLUSH HBISOINERRI
7:0 CRCERRIS OVERFIS UNDERFIS RXOUTIS TXINIS
ETS IS S
USBHS_DEVEPTIF
0x01A4 15:8 NBUSYBKS
R5 (ISOENPT)
23:16
31:24
SHORTPACK
7:0 STALLEDIS OVERFIS NAKINIS NAKOUTIS RXSTPIS RXOUTIS TXINIS
ETS
USBHS_DEVEPTIF
0x01A8 15:8 NBUSYBKS
R6
23:16
31:24
...........continued
...........continued
...........continued
...........continued
SHORTPACK
7:0 STALLEDES OVERFES NAKINES NAKOUTES RXSTPES RXOUTES TXINES
ETES
USBHS_DEVEPTIE 15:8 FIFOCONS KILLBKS NBUSYBKES
0x01FC
R3 EPDISHDMA
23:16 STALLRQS RSTDTS NYETDISS
S
31:24
SHORTPACK HBISOFLUSH HBISOINERR
7:0 CRCERRES OVERFES UNDERFES RXOUTES TXINES
ETES ES ES
ERRORTRAN
USBHS_DEVEPTIE 15:8 FIFOCONS KILLBKS NBUSYBKES DATAXES MDATAES
0x01FC SES
R3 (ISOENPT)
EPDISHDMA
23:16 RSTDTS
S
31:24
SHORTPACK
7:0 STALLEDES OVERFES NAKINES NAKOUTES RXSTPES RXOUTES TXINES
ETES
USBHS_DEVEPTIE 15:8 FIFOCONS KILLBKS NBUSYBKES
0x0200
R4 EPDISHDMA
23:16 STALLRQS RSTDTS NYETDISS
S
31:24
SHORTPACK HBISOFLUSH HBISOINERR
7:0 CRCERRES OVERFES UNDERFES RXOUTES TXINES
ETES ES ES
ERRORTRAN
USBHS_DEVEPTIE 15:8 FIFOCONS KILLBKS NBUSYBKES DATAXES MDATAES
0x0200 SES
R4 (ISOENPT)
EPDISHDMA
23:16 RSTDTS
S
31:24
SHORTPACK
7:0 STALLEDES OVERFES NAKINES NAKOUTES RXSTPES RXOUTES TXINES
ETES
USBHS_DEVEPTIE 15:8 FIFOCONS KILLBKS NBUSYBKES
0x0204
R5 EPDISHDMA
23:16 STALLRQS RSTDTS NYETDISS
S
31:24
SHORTPACK HBISOFLUSH HBISOINERR
7:0 CRCERRES OVERFES UNDERFES RXOUTES TXINES
ETES ES ES
ERRORTRAN
USBHS_DEVEPTIE 15:8 FIFOCONS KILLBKS NBUSYBKES DATAXES MDATAES
0x0204 SES
R5 (ISOENPT)
EPDISHDMA
23:16 RSTDTS
S
31:24
SHORTPACK
7:0 STALLEDES OVERFES NAKINES NAKOUTES RXSTPES RXOUTES TXINES
ETES
USBHS_DEVEPTIE 15:8 FIFOCONS KILLBKS NBUSYBKES
0x0208
R6 EPDISHDMA
23:16 STALLRQS RSTDTS NYETDISS
S
31:24
SHORTPACK HBISOFLUSH HBISOINERR
7:0 CRCERRES OVERFES UNDERFES RXOUTES TXINES
ETES ES ES
ERRORTRAN
USBHS_DEVEPTIE 15:8 FIFOCONS KILLBKS NBUSYBKES DATAXES MDATAES
0x0208 SES
R6 (ISOENPT)
EPDISHDMA
23:16 RSTDTS
S
31:24
SHORTPACK
7:0 STALLEDES OVERFES NAKINES NAKOUTES RXSTPES RXOUTES TXINES
ETES
USBHS_DEVEPTIE 15:8 FIFOCONS KILLBKS NBUSYBKES
0x020C
R7 EPDISHDMA
23:16 STALLRQS RSTDTS NYETDISS
S
31:24
...........continued
...........continued
...........continued
SHORTPACK
7:0 STALLEDEC OVERFEC NAKINEC NAKOUTEC RXSTPEC RXOUTEC TXINEC
ETEC
USBHS_DEVEPTID 15:8 FIFOCONC NBUSYBKEC
0x023C
R7 EPDISHDMA
23:16 STALLRQC NYETDISC
C
31:24
SHORTPACK HBISOFLUSH HBISOINERR
7:0 CRCERREC OVERFEC UNDERFEC RXOUTEC TXINEC
ETEC EC EC
ERRORTRAN
USBHS_DEVEPTID 15:8 FIFOCONC NBUSYBKEC DATAXEC MDATEC
0x023C SEC
R7 (ISOENPT)
EPDISHDMA
23:16
C
31:24
SHORTPACK
7:0 STALLEDEC OVERFEC NAKINEC NAKOUTEC RXSTPEC RXOUTEC TXINEC
ETEC
USBHS_DEVEPTID 15:8 FIFOCONC NBUSYBKEC
0x0240
R8 EPDISHDMA
23:16 STALLRQC NYETDISC
C
31:24
SHORTPACK HBISOFLUSH HBISOINERR
7:0 CRCERREC OVERFEC UNDERFEC RXOUTEC TXINEC
ETEC EC EC
ERRORTRAN
USBHS_DEVEPTID 15:8 FIFOCONC NBUSYBKEC DATAXEC MDATEC
0x0240 SEC
R8 (ISOENPT)
EPDISHDMA
23:16
C
31:24
0x0244
... Reserved
0x02FF
7:0 NXT_DSC_ADD[7:0]
USBHS_DEVDMAN 15:8 NXT_DSC_ADD[15:8]
0x0300
XTDSC1 23:16 NXT_DSC_ADD[23:16]
31:24 NXT_DSC_ADD[31:24]
7:0 BUFF_ADD[7:0]
USBHS_DEVDMAA 15:8 BUFF_ADD[15:8]
0x0304
DDRESS1 23:16 BUFF_ADD[23:16]
31:24 BUFF_ADD[31:24]
7:0 BURST_LCK DESC_LD_IT END_BUFFIT END_TR_IT END_B_EN END_TR_EN LDNXT_DSC CHANN_ENB
USBHS_DEVDMAC 15:8
0x0308
ONTROL1 23:16 BUFF_LENGTH[7:0]
31:24 BUFF_LENGTH[15:8]
7:0 DESC_LDST END_BF_ST END_TR_ST CHANN_ACT CHANN_ENB
USBHS_DEVDMAS 15:8
0x030C
TATUS1 23:16 BUFF_COUNT[7:0]
31:24 BUFF_COUNT[15:8]
7:0 NXT_DSC_ADD[7:0]
USBHS_DEVDMAN 15:8 NXT_DSC_ADD[15:8]
0x0310
XTDSC2 23:16 NXT_DSC_ADD[23:16]
31:24 NXT_DSC_ADD[31:24]
7:0 BUFF_ADD[7:0]
USBHS_DEVDMAA 15:8 BUFF_ADD[15:8]
0x0314
DDRESS2 23:16 BUFF_ADD[23:16]
31:24 BUFF_ADD[31:24]
7:0 BURST_LCK DESC_LD_IT END_BUFFIT END_TR_IT END_B_EN END_TR_EN LDNXT_DSC CHANN_ENB
USBHS_DEVDMAC 15:8
0x0318
ONTROL2 23:16 BUFF_LENGTH[7:0]
31:24 BUFF_LENGTH[15:8]
...........continued
...........continued
7:0 BUFF_ADD[7:0]
USBHS_DEVDMAA 15:8 BUFF_ADD[15:8]
0x0354
DDRESS6 23:16 BUFF_ADD[23:16]
31:24 BUFF_ADD[31:24]
7:0 BURST_LCK DESC_LD_IT END_BUFFIT END_TR_IT END_B_EN END_TR_EN LDNXT_DSC CHANN_ENB
USBHS_DEVDMAC 15:8
0x0358
ONTROL6 23:16 BUFF_LENGTH[7:0]
31:24 BUFF_LENGTH[15:8]
7:0 DESC_LDST END_BF_ST END_TR_ST CHANN_ACT CHANN_ENB
USBHS_DEVDMAS 15:8
0x035C
TATUS6 23:16 BUFF_COUNT[7:0]
31:24 BUFF_COUNT[15:8]
7:0 NXT_DSC_ADD[7:0]
USBHS_DEVDMAN 15:8 NXT_DSC_ADD[15:8]
0x0360
XTDSC7 23:16 NXT_DSC_ADD[23:16]
31:24 NXT_DSC_ADD[31:24]
7:0 BUFF_ADD[7:0]
USBHS_DEVDMAA 15:8 BUFF_ADD[15:8]
0x0364
DDRESS7 23:16 BUFF_ADD[23:16]
31:24 BUFF_ADD[31:24]
7:0 BURST_LCK DESC_LD_IT END_BUFFIT END_TR_IT END_B_EN END_TR_EN LDNXT_DSC CHANN_ENB
USBHS_DEVDMAC 15:8
0x0368
ONTROL7 23:16 BUFF_LENGTH[7:0]
31:24 BUFF_LENGTH[15:8]
7:0 DESC_LDST END_BF_ST END_TR_ST CHANN_ACT CHANN_ENB
USBHS_DEVDMAS 15:8
0x036C
TATUS7 23:16 BUFF_COUNT[7:0]
31:24 BUFF_COUNT[15:8]
0x0370
... Reserved
0x03FF
7:0
15:8 SPDCONF[1:0] RESUME RESET SOFE
0x0400 USBHS_HSTCTRL
23:16
31:24
7:0 HWUPI HSOFI RXRSMI RSMEDI RSTI DDISCI DCONNI
15:8 PEP_7 PEP_6 PEP_5 PEP_4 PEP_3 PEP_2 PEP_1 PEP_0
0x0404 USBHS_HSTISR
23:16 PEP_9 PEP_8
31:24 DMA_6 DMA_5 DMA_4 DMA_3 DMA_2 DMA_1 DMA_0
7:0 HWUPIC HSOFIC RXRSMIC RSMEDIC RSTIC DDISCIC DCONNIC
15:8
0x0408 USBHS_HSTICR
23:16
31:24
7:0 HWUPIS HSOFIS RXRSMIS RSMEDIS RSTIS DDISCIS DCONNIS
15:8
0x040C USBHS_HSTIFR
23:16
31:24 DMA_6 DMA_5 DMA_4 DMA_3 DMA_2 DMA_1 DMA_0
7:0 HWUPIE HSOFIE RXRSMIE RSMEDIE RSTIE DDISCIE DCONNIE
15:8 PEP_7 PEP_6 PEP_5 PEP_4 PEP_3 PEP_2 PEP_1 PEP_0
0x0410 USBHS_HSTIMR
23:16 PEP_9 PEP_8
31:24 DMA_6 DMA_5 DMA_4 DMA_3 DMA_2 DMA_1 DMA_0
7:0 HWUPIEC HSOFIEC RXRSMIEC RSMEDIEC RSTIEC DDISCIEC DCONNIEC
15:8 PEP_7 PEP_6 PEP_5 PEP_4 PEP_3 PEP_2 PEP_1 PEP_0
0x0414 USBHS_HSTIDR
23:16 PEP_9 PEP_8
31:24 DMA_6 DMA_5 DMA_4 DMA_3 DMA_2 DMA_1 DMA_0
7:0 HWUPIES HSOFIES RXRSMIES RSMEDIES RSTIES DDISCIES DCONNIES
15:8 PEP_7 PEP_6 PEP_5 PEP_4 PEP_3 PEP_2 PEP_1 PEP_0
0x0418 USBHS_HSTIER
23:16 PEP_9 PEP_8
31:24 DMA_6 DMA_5 DMA_4 DMA_3 DMA_2 DMA_1 DMA_0
...........continued
...........continued
...........continued
SHORTPACK
7:0 RXSTALLDI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x0534 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R1 (INTPIPES)
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 CRCERRI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x0534 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R1 (ISOPIPES)
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 RXSTALLDI OVERFI NAKEDI PERRI TXSTPI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x0538 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R2
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 RXSTALLDI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x0538 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R2 (INTPIPES)
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 CRCERRI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x0538 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R2 (ISOPIPES)
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 RXSTALLDI OVERFI NAKEDI PERRI TXSTPI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x053C 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R3
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 RXSTALLDI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x053C 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R3 (INTPIPES)
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 CRCERRI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x053C 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R3 (ISOPIPES)
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 RXSTALLDI OVERFI NAKEDI PERRI TXSTPI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x0540 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R4
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 RXSTALLDI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x0540 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R4 (INTPIPES)
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 CRCERRI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x0540 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R4 (ISOPIPES)
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
...........continued
SHORTPACK
7:0 RXSTALLDI OVERFI NAKEDI PERRI TXSTPI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x0544 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R5
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 RXSTALLDI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x0544 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R5 (INTPIPES)
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 CRCERRI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x0544 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R5 (ISOPIPES)
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 RXSTALLDI OVERFI NAKEDI PERRI TXSTPI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x0548 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R6
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 RXSTALLDI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x0548 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R6 (INTPIPES)
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 CRCERRI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x0548 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R6 (ISOPIPES)
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 RXSTALLDI OVERFI NAKEDI PERRI TXSTPI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x054C 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R7
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 RXSTALLDI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x054C 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R7 (INTPIPES)
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 CRCERRI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x054C 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R7 (ISOPIPES)
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 RXSTALLDI OVERFI NAKEDI PERRI TXSTPI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x0550 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R8
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
SHORTPACK
7:0 RXSTALLDI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x0550 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R8 (INTPIPES)
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
...........continued
SHORTPACK
7:0 CRCERRI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
ETI
USBHS_HSTPIPIS
0x0550 15:8 CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
R8 (ISOPIPES)
23:16 PBYCT[3:0] CFGOK RWALL
31:24 PBYCT[10:4]
0x0554
... Reserved
0x055F
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC TXSTPIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0560 15:8
R0
23:16
31:24
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0560 15:8
R0 (INTPIPES)
23:16
31:24
SHORTPACK
7:0 CRCERRIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0560 15:8
R0 (ISOPIPES)
23:16
31:24
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC TXSTPIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0564 15:8
R1
23:16
31:24
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0564 15:8
R1 (INTPIPES)
23:16
31:24
SHORTPACK
7:0 CRCERRIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0564 15:8
R1 (ISOPIPES)
23:16
31:24
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC TXSTPIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0568 15:8
R2
23:16
31:24
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0568 15:8
R2 (INTPIPES)
23:16
31:24
SHORTPACK
7:0 CRCERRIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0568 15:8
R2 (ISOPIPES)
23:16
31:24
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC TXSTPIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x056C 15:8
R3
23:16
31:24
...........continued
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x056C 15:8
R3 (INTPIPES)
23:16
31:24
SHORTPACK
7:0 CRCERRIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x056C 15:8
R3 (ISOPIPES)
23:16
31:24
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC TXSTPIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0570 15:8
R4
23:16
31:24
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0570 15:8
R4 (INTPIPES)
23:16
31:24
SHORTPACK
7:0 CRCERRIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0570 15:8
R4 (ISOPIPES)
23:16
31:24
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC TXSTPIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0574 15:8
R5
23:16
31:24
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0574 15:8
R5 (INTPIPES)
23:16
31:24
SHORTPACK
7:0 CRCERRIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0574 15:8
R5 (ISOPIPES)
23:16
31:24
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC TXSTPIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0578 15:8
R6
23:16
31:24
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0578 15:8
R6 (INTPIPES)
23:16
31:24
SHORTPACK
7:0 CRCERRIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0578 15:8
R6 (ISOPIPES)
23:16
31:24
...........continued
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC TXSTPIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x057C 15:8
R7
23:16
31:24
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x057C 15:8
R7 (INTPIPES)
23:16
31:24
SHORTPACK
7:0 CRCERRIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x057C 15:8
R7 (ISOPIPES)
23:16
31:24
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC TXSTPIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0580 15:8
R8
23:16
31:24
SHORTPACK
7:0 RXSTALLDIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0580 15:8
R8 (INTPIPES)
23:16
31:24
SHORTPACK
7:0 CRCERRIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
ETIC
USBHS_HSTPIPIC
0x0580 15:8
R8 (ISOPIPES)
23:16
31:24
0x0584
... Reserved
0x058F
SHORTPACK
7:0 RXSTALLDIS OVERFIS NAKEDIS PERRIS TXSTPIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x0590 15:8 NBUSYBKS
Rx
23:16
31:24
SHORTPACK
7:0 RXSTALLDIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x0590 15:8 NBUSYBKS
R0 (INTPIPES)
23:16
31:24
SHORTPACK
7:0 CRCERRIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x0590 15:8 NBUSYBKS
R0 (ISOPIPES)
23:16
31:24
SHORTPACK
7:0 RXSTALLDIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x0594 15:8 NBUSYBKS
R1 (INTPIPES)
23:16
31:24
SHORTPACK
7:0 CRCERRIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x0594 15:8 NBUSYBKS
R1 (ISOPIPES)
23:16
31:24
...........continued
SHORTPACK
7:0 RXSTALLDIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x0598 15:8 NBUSYBKS
R2 (INTPIPES)
23:16
31:24
SHORTPACK
7:0 CRCERRIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x0598 15:8 NBUSYBKS
R2 (ISOPIPES)
23:16
31:24
SHORTPACK
7:0 RXSTALLDIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x059C 15:8 NBUSYBKS
R3 (INTPIPES)
23:16
31:24
SHORTPACK
7:0 CRCERRIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x059C 15:8 NBUSYBKS
R3 (ISOPIPES)
23:16
31:24
SHORTPACK
7:0 RXSTALLDIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x05A0 15:8 NBUSYBKS
R4 (INTPIPES)
23:16
31:24
SHORTPACK
7:0 CRCERRIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x05A0 15:8 NBUSYBKS
R4 (ISOPIPES)
23:16
31:24
SHORTPACK
7:0 RXSTALLDIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x05A4 15:8 NBUSYBKS
R5 (INTPIPES)
23:16
31:24
SHORTPACK
7:0 CRCERRIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x05A4 15:8 NBUSYBKS
R5 (ISOPIPES)
23:16
31:24
SHORTPACK
7:0 RXSTALLDIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x05A8 15:8 NBUSYBKS
R6 (INTPIPES)
23:16
31:24
SHORTPACK
7:0 CRCERRIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x05A8 15:8 NBUSYBKS
R6 (ISOPIPES)
23:16
31:24
SHORTPACK
7:0 RXSTALLDIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x05AC 15:8 NBUSYBKS
R7 (INTPIPES)
23:16
31:24
...........continued
SHORTPACK
7:0 CRCERRIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x05AC 15:8 NBUSYBKS
R7 (ISOPIPES)
23:16
31:24
SHORTPACK
7:0 RXSTALLDIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x05B0 15:8 NBUSYBKS
R8 (INTPIPES)
23:16
31:24
SHORTPACK
7:0 CRCERRIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
ETIS
USBHS_HSTPIPIF
0x05B0 15:8 NBUSYBKS
R8 (ISOPIPES)
23:16
31:24
0x05B4
... Reserved
0x05BF
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE TXSTPE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05C0 15:8 FIFOCON NBUSYBKE
R0
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05C0 15:8 FIFOCON NBUSYBKE
R0 (INTPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 CRCERRE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05C0 15:8 FIFOCON NBUSYBKE
R0 (ISOPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE TXSTPE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05C4 15:8 FIFOCON NBUSYBKE
R1
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05C4 15:8 FIFOCON NBUSYBKE
R1 (INTPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 CRCERRE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05C4 15:8 FIFOCON NBUSYBKE
R1 (ISOPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE TXSTPE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05C8 15:8 FIFOCON NBUSYBKE
R2
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05C8 15:8 FIFOCON NBUSYBKE
R2 (INTPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
...........continued
SHORTPACK
7:0 CRCERRE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05C8 15:8 FIFOCON NBUSYBKE
R2 (ISOPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE TXSTPE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05CC 15:8 FIFOCON NBUSYBKE
R3
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05CC 15:8 FIFOCON NBUSYBKE
R3 (INTPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 CRCERRE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05CC 15:8 FIFOCON NBUSYBKE
R3 (ISOPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE TXSTPE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05D0 15:8 FIFOCON NBUSYBKE
R4
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05D0 15:8 FIFOCON NBUSYBKE
R4 (INTPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 CRCERRE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05D0 15:8 FIFOCON NBUSYBKE
R4 (ISOPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE TXSTPE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05D4 15:8 FIFOCON NBUSYBKE
R5
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05D4 15:8 FIFOCON NBUSYBKE
R5 (INTPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 CRCERRE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05D4 15:8 FIFOCON NBUSYBKE
R5 (ISOPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE TXSTPE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05D8 15:8 FIFOCON NBUSYBKE
R6
23:16 RSTDT PFREEZE PDISHDMA
31:24
...........continued
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05D8 15:8 FIFOCON NBUSYBKE
R6 (INTPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 CRCERRE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05D8 15:8 FIFOCON NBUSYBKE
R6 (ISOPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE TXSTPE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05DC 15:8 FIFOCON NBUSYBKE
R7
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05DC 15:8 FIFOCON NBUSYBKE
R7 (INTPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 CRCERRE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05DC 15:8 FIFOCON NBUSYBKE
R7 (ISOPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE TXSTPE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05E0 15:8 FIFOCON NBUSYBKE
R8
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 RXSTALLDE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05E0 15:8 FIFOCON NBUSYBKE
R8 (INTPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
SHORTPACK
7:0 CRCERRE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
ETIE
USBHS_HSTPIPIM
0x05E0 15:8 FIFOCON NBUSYBKE
R8 (ISOPIPES)
23:16 RSTDT PFREEZE PDISHDMA
31:24
0x05E4
... Reserved
0x05EF
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES TXSTPES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x05F0 15:8 NBUSYBKES
R0
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x05F0 15:8 NBUSYBKES
R0 (INTPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 CRCERRES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x05F0 15:8 NBUSYBKES
R0 (ISOPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
...........continued
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES TXSTPES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x05F4 15:8 NBUSYBKES
R1
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x05F4 15:8 NBUSYBKES
R1 (INTPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 CRCERRES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x05F4 15:8 NBUSYBKES
R1 (ISOPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES TXSTPES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x05F8 15:8 NBUSYBKES
R2
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x05F8 15:8 NBUSYBKES
R2 (INTPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 CRCERRES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x05F8 15:8 NBUSYBKES
R2 (ISOPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES TXSTPES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x05FC 15:8 NBUSYBKES
R3
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x05FC 15:8 NBUSYBKES
R3 (INTPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 CRCERRES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x05FC 15:8 NBUSYBKES
R3 (ISOPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES TXSTPES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x0600 15:8 NBUSYBKES
R4
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x0600 15:8 NBUSYBKES
R4 (INTPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
...........continued
SHORTPACK
7:0 CRCERRES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x0600 15:8 NBUSYBKES
R4 (ISOPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES TXSTPES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x0604 15:8 NBUSYBKES
R5
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x0604 15:8 NBUSYBKES
R5 (INTPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 CRCERRES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x0604 15:8 NBUSYBKES
R5 (ISOPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES TXSTPES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x0608 15:8 NBUSYBKES
R6
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x0608 15:8 NBUSYBKES
R6 (INTPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 CRCERRES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x0608 15:8 NBUSYBKES
R6 (ISOPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES TXSTPES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x060C 15:8 NBUSYBKES
R7
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x060C 15:8 NBUSYBKES
R7 (INTPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 CRCERRES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x060C 15:8 NBUSYBKES
R7 (ISOPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES TXSTPES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x0610 15:8 NBUSYBKES
R8
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
...........continued
SHORTPACK
7:0 RXSTALLDES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x0610 15:8 NBUSYBKES
R8 (INTPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
SHORTPACK
7:0 CRCERRES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
ETIES
USBHS_HSTPIPIE
0x0610 15:8 NBUSYBKES
R8 (ISOPIPES)
23:16 RSTDTS PFREEZES PDISHDMAS
31:24
0x0614
... Reserved
0x061F
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC TXSTPEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0620 15:8 FIFOCONC NBUSYBKEC
R0
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0620 15:8 FIFOCONC NBUSYBKEC
R0 (INTPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 CRCERREC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0620 15:8 FIFOCONC NBUSYBKEC
R0 (ISOPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC TXSTPEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0624 15:8 FIFOCONC NBUSYBKEC
R1
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0624 15:8 FIFOCONC NBUSYBKEC
R1 (INTPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 CRCERREC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0624 15:8 FIFOCONC NBUSYBKEC
R1 (ISOPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC TXSTPEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0628 15:8 FIFOCONC NBUSYBKEC
R2
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0628 15:8 FIFOCONC NBUSYBKEC
R2 (INTPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 CRCERREC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0628 15:8 FIFOCONC NBUSYBKEC
R2 (ISOPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
...........continued
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC TXSTPEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x062C 15:8 FIFOCONC NBUSYBKEC
R3
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x062C 15:8 FIFOCONC NBUSYBKEC
R3 (INTPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 CRCERREC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x062C 15:8 FIFOCONC NBUSYBKEC
R3 (ISOPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC TXSTPEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0630 15:8 FIFOCONC NBUSYBKEC
R4
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0630 15:8 FIFOCONC NBUSYBKEC
R4 (INTPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 CRCERREC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0630 15:8 FIFOCONC NBUSYBKEC
R4 (ISOPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC TXSTPEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0634 15:8 FIFOCONC NBUSYBKEC
R5
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0634 15:8 FIFOCONC NBUSYBKEC
R5 (INTPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 CRCERREC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0634 15:8 FIFOCONC NBUSYBKEC
R5 (ISOPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC TXSTPEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0638 15:8 FIFOCONC NBUSYBKEC
R6
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0638 15:8 FIFOCONC NBUSYBKEC
R6 (INTPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
...........continued
SHORTPACK
7:0 CRCERREC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0638 15:8 FIFOCONC NBUSYBKEC
R6 (ISOPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC TXSTPEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x063C 15:8 FIFOCONC NBUSYBKEC
R7
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x063C 15:8 FIFOCONC NBUSYBKEC
R7 (INTPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 CRCERREC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x063C 15:8 FIFOCONC NBUSYBKEC
R7 (ISOPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC TXSTPEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0640 15:8 FIFOCONC NBUSYBKEC
R8
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 RXSTALLDEC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0640 15:8 FIFOCONC NBUSYBKEC
R8 (INTPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
SHORTPACK
7:0 CRCERREC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
ETIEC
USBHS_HSTPIPID
0x0640 15:8 FIFOCONC NBUSYBKEC
R8 (ISOPIPES)
23:16 PFREEZEC PDISHDMAC
31:24
0x0644
... Reserved
0x064F
7:0 INRQ[7:0]
USBHS_HSTPIPIN 15:8 INMODE
0x0650
RQ0 23:16
31:24
7:0 INRQ[7:0]
USBHS_HSTPIPIN 15:8 INMODE
0x0654
RQ1 23:16
31:24
7:0 INRQ[7:0]
USBHS_HSTPIPIN 15:8 INMODE
0x0658
RQ2 23:16
31:24
7:0 INRQ[7:0]
USBHS_HSTPIPIN 15:8 INMODE
0x065C
RQ3 23:16
31:24
7:0 INRQ[7:0]
USBHS_HSTPIPIN 15:8 INMODE
0x0660
RQ4 23:16
31:24
...........continued
7:0 INRQ[7:0]
USBHS_HSTPIPIN 15:8 INMODE
0x0664
RQ5 23:16
31:24
7:0 INRQ[7:0]
USBHS_HSTPIPIN 15:8 INMODE
0x0668
RQ6 23:16
31:24
7:0 INRQ[7:0]
USBHS_HSTPIPIN 15:8 INMODE
0x066C
RQ7 23:16
31:24
7:0 INRQ[7:0]
USBHS_HSTPIPIN 15:8 INMODE
0x0670
RQ8 23:16
31:24
0x0674
... Reserved
0x067F
7:0 COUNTER[1:0] CRC16 TIMEOUT PID DATAPID DATATGL
USBHS_HSTPIPER 15:8
0x0680
R0 23:16
31:24
7:0 COUNTER[1:0] CRC16 TIMEOUT PID DATAPID DATATGL
USBHS_HSTPIPER 15:8
0x0684
R1 23:16
31:24
7:0 COUNTER[1:0] CRC16 TIMEOUT PID DATAPID DATATGL
USBHS_HSTPIPER 15:8
0x0688
R2 23:16
31:24
7:0 COUNTER[1:0] CRC16 TIMEOUT PID DATAPID DATATGL
USBHS_HSTPIPER 15:8
0x068C
R3 23:16
31:24
7:0 COUNTER[1:0] CRC16 TIMEOUT PID DATAPID DATATGL
USBHS_HSTPIPER 15:8
0x0690
R4 23:16
31:24
7:0 COUNTER[1:0] CRC16 TIMEOUT PID DATAPID DATATGL
USBHS_HSTPIPER 15:8
0x0694
R5 23:16
31:24
7:0 COUNTER[1:0] CRC16 TIMEOUT PID DATAPID DATATGL
USBHS_HSTPIPER 15:8
0x0698
R6 23:16
31:24
7:0 COUNTER[1:0] CRC16 TIMEOUT PID DATAPID DATATGL
USBHS_HSTPIPER 15:8
0x069C
R7 23:16
31:24
7:0 COUNTER[1:0] CRC16 TIMEOUT PID DATAPID DATATGL
USBHS_HSTPIPER 15:8
0x06A0
R8 23:16
31:24
0x06A4
... Reserved
0x06FF
...........continued
7:0 NXT_DSC_ADD[7:0]
USBHS_HSTDMAN 15:8 NXT_DSC_ADD[15:8]
0x0700
XTDSC1 23:16 NXT_DSC_ADD[23:16]
31:24 NXT_DSC_ADD[31:24]
7:0 BUFF_ADD[7:0]
USBHS_HSTDMAA 15:8 BUFF_ADD[15:8]
0x0704
DDRESSx 23:16 BUFF_ADD[23:16]
31:24 BUFF_ADD[31:24]
7:0 BURST_LCK DESC_LD_IT END_BUFFIT END_TR_IT END_B_EN END_TR_EN LDNXT_DSC CHANN_ENB
USBHS_HSTDMAC 15:8
0x0708
ONTROLx 23:16 BUFF_LENGTH[7:0]
31:24 BUFF_LENGTH[15:8]
7:0 DESC_LDST END_BF_ST END_TR_ST CHANN_ACT CHANN_ENB
USBHS_HSTDMAS 15:8
0x070C
TATUSx 23:16 BUFF_COUNT[7:0]
31:24 BUFF_COUNT[15:8]
7:0 NXT_DSC_ADD[7:0]
USBHS_HSTDMAN 15:8 NXT_DSC_ADD[15:8]
0x0710
XTDSC2 23:16 NXT_DSC_ADD[23:16]
31:24 NXT_DSC_ADD[31:24]
7:0 BUFF_ADD[7:0]
USBHS_HSTDMAA 15:8 BUFF_ADD[15:8]
0x0714
DDRESSx 23:16 BUFF_ADD[23:16]
31:24 BUFF_ADD[31:24]
7:0 BURST_LCK DESC_LD_IT END_BUFFIT END_TR_IT END_B_EN END_TR_EN LDNXT_DSC CHANN_ENB
USBHS_HSTDMAC 15:8
0x0718
ONTROLx 23:16 BUFF_LENGTH[7:0]
31:24 BUFF_LENGTH[15:8]
7:0 DESC_LDST END_BF_ST END_TR_ST CHANN_ACT CHANN_ENB
USBHS_HSTDMAS 15:8
0x071C
TATUSx 23:16 BUFF_COUNT[7:0]
31:24 BUFF_COUNT[15:8]
7:0 NXT_DSC_ADD[7:0]
USBHS_HSTDMAN 15:8 NXT_DSC_ADD[15:8]
0x0720
XTDSC3 23:16 NXT_DSC_ADD[23:16]
31:24 NXT_DSC_ADD[31:24]
7:0 BUFF_ADD[7:0]
USBHS_HSTDMAA 15:8 BUFF_ADD[15:8]
0x0724
DDRESSx 23:16 BUFF_ADD[23:16]
31:24 BUFF_ADD[31:24]
7:0 BURST_LCK DESC_LD_IT END_BUFFIT END_TR_IT END_B_EN END_TR_EN LDNXT_DSC CHANN_ENB
USBHS_HSTDMAC 15:8
0x0728
ONTROLx 23:16 BUFF_LENGTH[7:0]
31:24 BUFF_LENGTH[15:8]
7:0 DESC_LDST END_BF_ST END_TR_ST CHANN_ACT CHANN_ENB
USBHS_HSTDMAS 15:8
0x072C
TATUSx 23:16 BUFF_COUNT[7:0]
31:24 BUFF_COUNT[15:8]
7:0 NXT_DSC_ADD[7:0]
USBHS_HSTDMAN 15:8 NXT_DSC_ADD[15:8]
0x0730
XTDSC4 23:16 NXT_DSC_ADD[23:16]
31:24 NXT_DSC_ADD[31:24]
7:0 BUFF_ADD[7:0]
USBHS_HSTDMAA 15:8 BUFF_ADD[15:8]
0x0734
DDRESSx 23:16 BUFF_ADD[23:16]
31:24 BUFF_ADD[31:24]
...........continued
...........continued
7:0 RDERRE
15:8 USBE FRZCLK VBUSHWC
0x0800 USBHS_CTRL
23:16
31:24 UIMOD UID
7:0 RDERRI
15:8 CLKUSABLE SPEED[1:0]
0x0804 USBHS_SR
23:16
31:24
7:0 RDERRIC
15:8
0x0808 USBHS_SCR
23:16
31:24
7:0 RDERRIS
15:8 VBUSRQS
0x080C USBHS_SFR
23:16
31:24
Name: USBHS_CTRL
Offset: 0x0800
Reset: 0x03004000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
UIMOD UID
Access R/W R/W
Reset 1 1
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
USBE FRZCLK VBUSHWC
Access R/W R/W R/W
Reset 0 1 0
Bit 7 6 5 4 3 2 1 0
RDERRE
Access R/W
Reset 0
Value Description
0 The hardware control over the VBOF output pin is enabled. The USBHS resets the VBOF output pin
when a VBUS problem occurs.
1 The hardware control over the VBOF output pin is disabled.
0 The hardware control over the PIO line is enabled. The USBHS resets the PIO output pin when a
VBUS problem occurs.
1 The hardware control over the PIO line is disabled.
Name: USBHS_SR
Offset: 0x0804
Reset: 0x00000400
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
CLKUSABLE SPEED[1:0]
Access R R R
Reset 0 0 0
Bit 7 6 5 4 3 2 1 0
RDERRI
Access R
Reset 0
Name: USBHS_SCR
Offset: 0x0808
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
RDERRIC
Access W
Reset
Name: USBHS_SFR
Offset: 0x080C
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
VBUSRQS
Access W
Reset
Bit 7 6 5 4 3 2 1 0
RDERRIS
Access W
Reset
Name: USBHS_DEVCTRL
Offset: 0x0000
Reset: 0x00000100
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
OPMODE2
Access R/W
Reset 0
Bit 15 14 13 12 11 10 9 8
TSTPCKT TSTK TSTJ LS SPDCONF[1:0] RMWKUP DETACH
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 1
Bit 7 6 5 4 3 2 1 0
ADDEN UADD[6:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 8 – DETACH Detach
Value Description
0 Reconnects the device.
1 Physically detaches the device (disconnects the internal pull-up resistor from D+ and D-).
Name: USBHS_DEVISR
Offset: 0x0004
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
DMA_6 DMA_5 DMA_4 DMA_3 DMA_2 DMA_1 DMA_0
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PEP_9 PEP_8 PEP_7 PEP_6 PEP_5 PEP_4
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PEP_3 PEP_2 PEP_1 PEP_0
Access R R R R
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
UPRSM EORSM WAKEUP EORST SOF MSOF SUSP
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bits 25, 26, 27, 28, 29, 30, 31 – DMA_ DMA Channel x Interrupt
Value Description
0 Cleared when the USBHS_DEVDMASTATUSx interrupt source is cleared.
1 Set when an interrupt is triggered by the DMA channel x. This triggers a USB interrupt if DMA_x = 1.
Bits 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 – PEP_ Endpoint x Interrupt
Value Description
0 Cleared when the interrupt source is serviced.
1 Set when an interrupt is triggered by endpoint x (USBHS_DEVEPTISRx, USBHS_DEVEPTIMRx). This
triggers a USB interrupt if USBHS_DEVIMR.PEP_x = 1.
Value Description
1 Set when the USBHS is reactivated by a filtered non-idle signal from the lines (not by an upstream
resume). This triggers an interrupt if USBHS_DEVIMR.WAKEUPE = 1.
Name: USBHS_DEVICR
Offset: 0x0008
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
UPRSMC EORSMC WAKEUPC EORSTC SOFC MSOFC SUSPC
Access W W W W W W W
Reset
Name: USBHS_DEVIFR
Offset: 0x000C
Property: Write-only
Bit 31 30 29 28 27 26 25 24
DMA_6 DMA_5 DMA_4 DMA_3 DMA_2 DMA_1 DMA_0
Access W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
UPRSMS EORSMS WAKEUPS EORSTS SOFS MSOFS SUSPS
Access W W W W W W W
Reset
Bits 25, 26, 27, 28, 29, 30, 31 – DMA_ DMA Channel x Interrupt Set
Name: USBHS_DEVIMR
Offset: 0x0010
Reset: 0x00000000
Property: Read-only
The following configuration values are valid for all listed bit names of this register:
0: The corresponding interrupt is not enabled.
1: The corresponding interrupt is enabled.
Bit 31 30 29 28 27 26 25 24
DMA_6 DMA_5 DMA_4 DMA_3 DMA_2 DMA_1 DMA_0
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PEP_9 PEP_8 PEP_7 PEP_6 PEP_5 PEP_4
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PEP_3 PEP_2 PEP_1 PEP_0
Access R R R R
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
UPRSME EORSME WAKEUPE EORSTE SOFE MSOFE SUSPE
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bits 25, 26, 27, 28, 29, 30, 31 – DMA_ DMA Channel x Interrupt Mask
Bits 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 – PEP_ Endpoint x Interrupt Mask
Name: USBHS_DEVIDR
Offset: 0x0014
Property: Write-only
Bit 31 30 29 28 27 26 25 24
DMA_6 DMA_5 DMA_4 DMA_3 DMA_2 DMA_1 DMA_0
Access W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
PEP_9 PEP_8 PEP_7 PEP_6 PEP_5 PEP_4
Access W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
PEP_3 PEP_2 PEP_1 PEP_0
Access W W W W
Reset
Bit 7 6 5 4 3 2 1 0
UPRSMEC EORSMEC WAKEUPEC EORSTEC SOFEC MSOFEC SUSPEC
Access W W W W W W W
Reset
Bits 25, 26, 27, 28, 29, 30, 31 – DMA_ DMA Channel x Interrupt Disable
Bits 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 – PEP_ Endpoint x Interrupt Disable
Name: USBHS_DEVIER
Offset: 0x0018
Property: Write-only
Bit 31 30 29 28 27 26 25 24
DMA_6 DMA_5 DMA_4 DMA_3 DMA_2 DMA_1 DMA_0
Access W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
PEP_9 PEP_8 PEP_7 PEP_6 PEP_5 PEP_4
Access W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
PEP_3 PEP_2 PEP_1 PEP_0
Access W W W W
Reset
Bit 7 6 5 4 3 2 1 0
UPRSMES EORSMES WAKEUPES EORSTES SOFES MSOFES SUSPES
Access W W W W W W W
Reset
Bits 25, 26, 27, 28, 29, 30, 31 – DMA_ DMA Channel x Interrupt Enable
Bits 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 – PEP_ Endpoint x Interrupt Enable
Name: USBHS_DEVEPT
Offset: 0x001C
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
EPRST9 EPRST8
Access R/W R/W
Reset 0 0
Bit 23 22 21 20 19 18 17 16
EPRST7 EPRST6 EPRST5 EPRST4 EPRST3 EPRST2 EPRST1 EPRST0
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
EPEN9 EPEN8
Access R/W R/W
Reset 0 0
Bit 7 6 5 4 3 2 1 0
EPEN7 EPEN6 EPEN5 EPEN4 EPEN3 EPEN2 EPEN1 EPEN0
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 – EPRST Endpoint x Reset
The whole endpoint mechanism (FIFO counter, reception, transmission, etc.) is reset apart from the Data Toggle
Sequence field (USBHS_DEVEPTISRx.DTSEQ), which can be cleared by setting the USBHS_DEVEPTIMRx.RSTDT
bit (by writing a one to the USBHS_DEVEPTIERx.RSTDTS bit).
The endpoint configuration remains active and the endpoint is still enabled.
This bit is cleared upon receiving a USB reset.
Value Description
0 Completes the reset operation and starts using the FIFO.
1 Resets the endpoint x FIFO prior to any other operation, upon hardware reset
or when a USB bus reset has been received. This resets the endpoint x
registers (USBHS_DEVEPTCFGx, USBHS_DEVEPTISRx, USBHS_DEVEPTIMRx) but not
the endpoint configuration (USBHS_DEVEPTCFGx.ALLOC, USBHS_DEVEPTCFGx.EPBK,
USBHS_DEVEPTCFGx.EPSIZE, USBHS_DEVEPTCFGx.EPDIR, USBHS_DEVEPTCFGx.EPTYPE).
Name: USBHS_DEVFNUM
Offset: 0x0020
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
FNCERR FNUM[10:5]
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
FNUM[4:0] MFNUM[2:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: USBHS_DEVEPTCFGx
Offset: 0x0100 + x*0x04 [x=0..8]
Reset: 0
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
NBTRANS[1:0] EPTYPE[1:0] AUTOSW EPDIR
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
EPSIZE[2:0] EPBK[1:0] ALLOC
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
38.7.15 Device Endpoint Interrupt Status Register (Control, Bulk, Interrupt Endpoints)
Name: USBHS_DEVEPTISRx
Offset: 0x0130 + x*0x04 [x=0..8]
Reset: 0
Property: Read/Write
This register view is relevant only if EPTYPE = 0x0, 0x2, or 0x3 in the ”Device Endpoint x Configuration Register”.
Bit 31 30 29 28 27 26 25 24
BYCT[10:4]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
BYCT[3:0] CFGOK CTRLDIR RWALL
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE STALLEDI OVERFI NAKINI NAKOUTI RXSTPI RXOUTI TXINI
T
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
This register view is relevant only if EPTYPE = 0x1 in the ”Device Endpoint x Configuration Register”.
Bit 31 30 29 28 27 26 25 24
BYCT[10:4]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
BYCT[3:0] CFGOK RWALL
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CURRBK[1:0] NBUSYBK[1:0] ERRORTRANS DTSEQ[1:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE CRCERRI OVERFI HBISOFLUSHI HBISOINERRI UNDERFI RXOUTI TXINI
T
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
For IN endpoints:
0: Cleared when TXINIC = 1. This acknowledges the interrupt, which has no effect on the endpoint FIFO.
USBHS_DEVEPTISRx.TXINI shall always be cleared before clearing USBHS_DEVEPTIMRx.FIFOCON.
1: Set at the same time as USBHS_DEVEPTIMRx.FIFOCON when the current bank is free. This triggers a PEP_x
interrupt if TXINE = 1.
The user writes into the FIFO and clears the USBHS_DEVEPTIMRx.FIFOCON bit to allow the USBHS to
send the data. If the IN endpoint is composed of multiple banks, this also switches to the next bank. The
USBHS_DEVEPTISRx.TXINI and USBHS_DEVEPTIMRx.FIFOCON bits are set/cleared in accordance with the
status of the next bank.
This bit is inactive (cleared) for OUT endpoints.
38.7.17 Device Endpoint Interrupt Clear Register (Control, Bulk, Interrupt Endpoints)
Name: USBHS_DEVEPTICRx
Offset: 0x0160 + x*0x04 [x=0..8]
Reset: 0
Property: Read/Write
This register view is relevant only if EPTYPE = 0x0, 0x2, or 0x3 in the ”Device Endpoint x Configuration Register”.
For additional information, see ”Device Endpoint x Status Register (Control, Bulk, Interrupt Endpoints)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Clears the corresponding bit in USBHS_DEVEPTISRx.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
SHORTPACKE STALLEDIC OVERFIC NAKINIC NAKOUTIC RXSTPIC RXOUTIC TXINIC
TC
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
This register view is relevant only if EPTYPE = 0x1 in ”Device Endpoint x Configuration Register”.
For additional information, see ”Device Endpoint x Status Register (Isochronous Endpoints)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Clears the corresponding bit in USBHS_DEVEPTISRx.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
SHORTPACKE CRCERRIC OVERFIC HBISOFLUSHI HBISOINERRIC UNDERFIC RXOUTIC TXINIC
TC C
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
38.7.19 Device Endpoint Interrupt Set Register (Control, Bulk, Interrupt Endpoints)
Name: USBHS_DEVEPTIFRx
Offset: 0x0190 + x*0x04 [x=0..8]
Reset: 0
Property: Read/Write
This register view is relevant only if EPTYPE = 0x0, 0x2, or 0x3 in ”Device Endpoint x Configuration Register”.
For additional information, see ”Device Endpoint x Status Register (Control, Bulk, Interrupt Endpoints)”.This register
always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Sets the corresponding bit in USBHS_DEVEPTISRx, which may be useful for test or debug purposes.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
NBUSYBKS
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE STALLEDIS OVERFIS NAKINIS NAKOUTIS RXSTPIS RXOUTIS TXINIS
TS
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
This register view is relevant only if EPTYPE = 0x1 in ”Device Endpoint x Configuration Register”.
For additional information, see ”Device Endpoint x Status Register (Isochronous Endpoints)”.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Sets the corresponding bit in USBHS_DEVEPTISRx, which may be useful for test or debug purposes.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
NBUSYBKS
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE CRCERRIS OVERFIS HBISOFLUSHI HBISOINERRIS UNDERFIS RXOUTIS TXINIS
TS S
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
38.7.21 Device Endpoint Interrupt Mask Register (Control, Bulk, Interrupt Endpoints)
Name: USBHS_DEVEPTIMRx
Offset: 0x01C0 + x*0x04 [x=0..8]
Reset: 0
Property: Read/Write
This register view is relevant only if EPTYPE = 0x0, 0x2, or 0x3 in ”Device Endpoint x Configuration Register”.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
STALLRQ RSTDT NYETDIS EPDISHDMA
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 15 14 13 12 11 10 9 8
FIFOCON KILLBK NBUSYBKE
Access R/W R/W R/W
Reset 0 0 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE STALLEDE OVERFE NAKINE NAKOUTE RXSTPE RXOUTE TXINE
TE
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
In Ping-pong mode, if the interrupt is associated to a new system-bank packet (e.g. Bank1) and the current DMA
transfer is running on the previous packet (Bank0), then the previous-packet DMA transfer completes normally, but
the new-packet DMA transfer does not start (not requested).
If the interrupt is not associated to a new system-bank packet (USBHS_DEVEPTISRx.NAKINI, NAKOUTI, etc.), then
the request cancellation may occur at any time and may immediately pause the current DMA transfer.
This may be used for example to identify erroneous packets, to prevent them from being transferred into a buffer, to
complete a DMA transfer by software after reception of a short packet, etc.
The bank is really cleared when the “kill packet” procedure is accepted by the USBHS core. This bit is
CAUTION
automatically cleared after the end of the procedure.
Value Description
0 Cleared when USBHS_DEVEPTIDRx.STALLEDEC = 1. This disables the STALLed interrupt
(USBHS_DEVEPTISRx.STALLEDI).
1 Set when USBHS_DEVEPTIERx.STALLEDES = 1. This enables the STALLed interrupt
(USBHS_DEVEPTISRx.STALLEDI).
This register view is relevant only if EPTYPE = 0x1 in ”Device Endpoint x Configuration Register”.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
RSTDT EPDISHDMA
Access R/W R/W
Reset 0 0
Bit 15 14 13 12 11 10 9 8
FIFOCON KILLBK NBUSYBKE ERRORTRANS DATAXE MDATAE
E
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE CRCERRE OVERFE HBISOFLUSHE HBISOINERRE UNDERFE RXOUTE TXINE
TE
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
0: Cleared (by writing a one to the USBHS_DEVEPTIDRx.FIFOCONC bit) to send the FIFO data and to switch to the
next bank.
1: Set when the current bank is free, at the same time as USBHS_DEVEPTISRx.TXINI.
For OUT endpoints:
0: Cleared (by writing a one to the USBHS_DEVEPTIDRx.FIFOCONC bit) to free the current bank and to switch to
the next bank.
1: Set when the current bank is full, at the same time as USBHS_DEVEPTISRx.RXOUTI.
The bank is really cleared when the “kill packet” procedure is accepted by the USBHS core. This bit is
CAUTION
automatically cleared after the end of the procedure.
Value Description
0 Cleared when USBHS_DEVEPTIDRx.SHORTPACKETEC = 1. This disables the Short Packet interrupt
(USBHS_DEVEPTISRx.SHORTPACKET).
1 Set when USBHS_DEVEPTIERx.SHORTPACKETES = 1. This enables the Short Packet interrupt
(USBHS_DEVEPTISRx.SHORTPACKET).
38.7.23 Device Endpoint Interrupt Disable Register (Control, Bulk, Interrupt Endpoints)
Name: USBHS_DEVEPTIDRx
Offset: 0x0220 + x*0x04 [x=0..8]
Reset: 0
Property: Read/Write
This register view is relevant only if EPTYPE = 0x0, 0x2, or 0x3 in ”Device Endpoint x Configuration Register”.
For additional information, see ”Device Endpoint x Mask Register (Control, Bulk, Interrupt Endpoints)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Clears the corresponding bit in USBHS_DEVEPTIMRx.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
STALLRQC NYETDISC EPDISHDMAC
Access R/W R/W R/W
Reset 0 0 0
Bit 15 14 13 12 11 10 9 8
FIFOCONC NBUSYBKEC
Access R/W R/W
Reset 0 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE STALLEDEC OVERFEC NAKINEC NAKOUTEC RXSTPEC RXOUTEC TXINEC
TEC
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
This register view is relevant only if EPTYPE = 0x1 in ”Device Endpoint x Configuration Register”.
For additional information, see ”Device Endpoint x Mask Register (Isochronous Endpoints)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Clears the corresponding bit in USBHS_DEVEPTIMRx.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
EPDISHDMAC
Access R/W
Reset 0
Bit 15 14 13 12 11 10 9 8
FIFOCONC NBUSYBKEC ERRORTRANS DATAXEC MDATEC
EC
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE CRCERREC OVERFEC HBISOFLUSHE HBISOINERRE UNDERFEC RXOUTEC TXINEC
TEC C C
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
38.7.25 Device Endpoint Interrupt Enable Register (Control, Bulk, Interrupt Endpoints)
Name: USBHS_DEVEPTIERx
Offset: 0x01F0 + x*0x04 [x=0..8]
Reset: 0
Property: Read/Write
This register view is relevant only if EPTYPE = 0x0, 0x2, or 0x3 in ”Device Endpoint x Configuration Register”.
For additional information, see ”Device Endpoint x Mask Register (Control, Bulk, Interrupt Endpoints)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Sets the corresponding bit in USBHS_DEVEPTIMRx.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
STALLRQS RSTDTS NYETDISS EPDISHDMAS
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 15 14 13 12 11 10 9 8
FIFOCONS KILLBKS NBUSYBKES
Access R/W R/W R/W
Reset 0 0 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE STALLEDES OVERFES NAKINES NAKOUTES RXSTPES RXOUTES TXINES
TES
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
This register view is relevant only if EPTYPE = 0x1 in ”Device Endpoint x Configuration Register”.
For additional information, see ”Device Endpoint x Mask Register (Isochronous Endpoints)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Clears the corresponding bit in USBHS_DEVEPTIMRx.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
RSTDTS EPDISHDMAS
Access R/W R/W
Reset 0 0
Bit 15 14 13 12 11 10 9 8
FIFOCONS KILLBKS NBUSYBKES ERRORTRANS DATAXES MDATAES
ES
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE CRCERRES OVERFES HBISOFLUSHE HBISOINERRE UNDERFES RXOUTES TXINES
TES S S
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: USBHS_DEVDMANXTDSCx
Offset: 0x0300 + (x-1)*0x10 [x=1..7]
Reset: 0
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
NXT_DSC_ADD[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NXT_DSC_ADD[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NXT_DSC_ADD[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NXT_DSC_ADD[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: USBHS_DEVDMAADDRESSx
Offset: 0x0304 + (x-1)*0x10 [x=1..7]
Reset: 0
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
BUFF_ADD[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
BUFF_ADD[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
BUFF_ADD[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
BUFF_ADD[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: USBHS_DEVDMACONTROLx
Offset: 0x0308 + (x-1)*0x10 [x=1..7]
Reset: 0
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
BUFF_LENGTH[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
BUFF_LENGTH[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
BURST_LCK DESC_LD_IT END_BUFFIT END_TR_IT END_B_EN END_TR_EN LDNXT_DSC CHANN_ENB
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Value Description
0 USBHS device-initiated buffer transfer completion does not trigger any interrupt at
USBHS_DEVDMASTATUSx.END_TR_ST rising.
1 An interrupt is sent after the buffer transfer is complete, if the USBHS device has ended the buffer
transfer.
Value Description
0 No channel register is loaded after the end of the channel transfer.
1 The channel controller loads the next descriptor after the end of the current transfer, i.e., when the
USBHS_DEVDMASTATUS.CHANN_ENB bit is reset.
Name: USBHS_DEVDMASTATUSx
Offset: 0x030C + (x-1)*0x10 [x=1..7]
Reset: 0
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
BUFF_COUNT[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
BUFF_COUNT[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
DESC_LDST END_BF_ST END_TR_ST CHANN_ACT CHANN_ENB
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
Name: USBHS_HSTCTRL
Offset: 0x0400
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
SPDCONF[1:0] RESUME RESET SOFE
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
Access
Reset
Value Description
1 Generates SOF on the USB bus in Full- or High-speed mode and sends “keep alive” signals in
Low-speed mode.
Name: USBHS_HSTISR
Offset: 0x0404
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
DMA_6 DMA_5 DMA_4 DMA_3 DMA_2 DMA_1 DMA_0
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PEP_9 PEP_8
Access R R
Reset 0 0
Bit 15 14 13 12 11 10 9 8
PEP_7 PEP_6 PEP_5 PEP_4 PEP_3 PEP_2 PEP_1 PEP_0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
HWUPI HSOFI RXRSMI RSMEDI RSTI DDISCI DCONNI
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bits 25, 26, 27, 28, 29, 30, 31 – DMA_ DMA Channel x Interrupt
Value Description
0 Cleared when the USBHS_HSTDMASTATUSx interrupt source is cleared.
1 Set when an interrupt is triggered by the DMA channel x. This triggers a USB interrupt if the
corresponding bit in USBHS_HSTIMR = 1.
Bits 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 – PEP_ Pipe x Interrupt
Value Description
0 Cleared when the interrupt source is served.
1 Set when an interrupt is triggered by pipe x (USBHS_HSTPIPISRx). This triggers a USB interrupt if the
corresponding bit in USBHS_HSTIMR = 1.
Name: USBHS_HSTICR
Offset: 0x0408
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
HWUPIC HSOFIC RXRSMIC RSMEDIC RSTIC DDISCIC DCONNIC
Access W W W W W W W
Reset
Name: USBHS_HSTIFR
Offset: 0x040C
Property: Write-only
Bit 31 30 29 28 27 26 25 24
DMA_6 DMA_5 DMA_4 DMA_3 DMA_2 DMA_1 DMA_0
Access W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
HWUPIS HSOFIS RXRSMIS RSMEDIS RSTIS DDISCIS DCONNIS
Access W W W W W W W
Reset
Bits 25, 26, 27, 28, 29, 30, 31 – DMA_ DMA Channel x Interrupt Set
Name: USBHS_HSTIMR
Offset: 0x0410
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
DMA_6 DMA_5 DMA_4 DMA_3 DMA_2 DMA_1 DMA_0
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PEP_9 PEP_8
Access R R
Reset 0 0
Bit 15 14 13 12 11 10 9 8
PEP_7 PEP_6 PEP_5 PEP_4 PEP_3 PEP_2 PEP_1 PEP_0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
HWUPIE HSOFIE RXRSMIE RSMEDIE RSTIE DDISCIE DCONNIE
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bits 25, 26, 27, 28, 29, 30, 31 – DMA_ DMA Channel x Interrupt Enable
Value Description
0 Cleared when the corresponding bit in USBHS_HSTIDR = 1. This disables the DMA Channel x
Interrupt (USBHS_HSTISR.DMA_x).
1 Set when the corresponding bit in USBHS_HSTIER = 1. This enables the DMA Channel x Interrupt
(USBHS_HSTISR.DMA_x).
Bits 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 – PEP_ Pipe x Interrupt Enable
Value Description
0 Cleared when PEP_x = 1. This disables the Pipe x Interrupt (PEP_x).
1 Set when the corresponding bit in USBHS_HSTIER = 1. This enables the Pipe x Interrupt
(USBHS_HSTISR.PEP_x).
Value Description
0 Cleared when USBHS_HSTIDR.RXRSMIEC= 1. This disables the Downstream Resume interrupt
(USBHS_HSTISR.RXRSMI).
1 Set when USBHS_HSTIER.RXRSMIES = 1. This enables the Upstream Resume Received interrupt
(USBHS_HSTISR.RXRSMI).
Name: USBHS_HSTIDR
Offset: 0x0414
Property: Write-only
Bit 31 30 29 28 27 26 25 24
DMA_6 DMA_5 DMA_4 DMA_3 DMA_2 DMA_1 DMA_0
Access W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
PEP_9 PEP_8
Access W W
Reset
Bit 15 14 13 12 11 10 9 8
PEP_7 PEP_6 PEP_5 PEP_4 PEP_3 PEP_2 PEP_1 PEP_0
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
HWUPIEC HSOFIEC RXRSMIEC RSMEDIEC RSTIEC DDISCIEC DCONNIEC
Access W W W W W W W
Reset
Bits 25, 26, 27, 28, 29, 30, 31 – DMA_ DMA Channel x Interrupt Disable
Bits 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 – PEP_ Pipe x Interrupt Disable
Name: USBHS_HSTIER
Offset: 0x0418
Property: Write-only
Bit 31 30 29 28 27 26 25 24
DMA_6 DMA_5 DMA_4 DMA_3 DMA_2 DMA_1 DMA_0
Access W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
PEP_9 PEP_8
Access W W
Reset
Bit 15 14 13 12 11 10 9 8
PEP_7 PEP_6 PEP_5 PEP_4 PEP_3 PEP_2 PEP_1 PEP_0
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
HWUPIES HSOFIES RXRSMIES RSMEDIES RSTIES DDISCIES DCONNIES
Access W W W W W W W
Reset
Bits 25, 26, 27, 28, 29, 30, 31 – DMA_ DMA Channel x Interrupt Enable
Bits 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 – PEP_ Pipe x Interrupt Enable
Name: USBHS_HSTFNUM
Offset: 0x0420
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
FLENHIGH[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
FNUM[10:5]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
FNUM[4:0] MFNUM[2:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: USBHS_HSTADDR1
Offset: 0x0424
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
HSTADDRP3[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
HSTADDRP2[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
HSTADDRP1[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
HSTADDRP0[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Name: USBHS_HSTADDR2
Offset: 0x0428
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
HSTADDRP7[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
HSTADDRP6[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
HSTADDRP5[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
HSTADDRP4[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Name: USBHS_HSTADDR3
Offset: 0x042C
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
HSTADDRP9[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
HSTADDRP8[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Name: USBHS_HSTPIP
Offset: 0x0041C
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
PRST8
Access R/W
Reset 0
Bit 23 22 21 20 19 18 17 16
PRST7 PRST6 PRST5 PRST4 PRST3 PRST2 PRST1 PRST0
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PEN8
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
PEN7 PEN6 PEN5 PEN4 PEN3 PEN2 PEN1 PEN0
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 16, 17, 18, 19, 20, 21, 22, 23, 24 – PRST Pipe x Reset
Value Description
0 Completes the reset operation and allows to start using the FIFO.
1 Resets the Pipe x FIFO. This resets the pipe x registers (USBHS_HSTPIPCFGx,
USBHS_HSTPIPISRx, USBHS_HSTPIPIMRx), but not the pipe configuration (ALLOC, PBK, PSIZE,
PTOKEN, PTYPE, PEPNUM, INTFRQ). The whole pipe mechanism (FIFO counter, reception,
transmission, etc.) is reset, apart from the Data Toggle management. The pipe configuration remains
active and the pipe is still enabled.
Name: USBHS_HSTPIPCFGx
Offset: 0x0500 + x*0x04 [x=0..8]
Reset: 0
Property: Read/Write
For High-speed Bulk-out Pipe, see ”Host Pipe x Configuration Register (High-speed Bulk-out or High-speed Control
Pipe)”.
Bit 31 30 29 28 27 26 25 24
INTFRQ[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PEPNUM[3:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PTYPE[1:0] AUTOSW PTOKEN[1:0]
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PSIZE[2:0] PBK[1:0] ALLOC
Access - - - R/W R/W R/W
Reset 0 0 0 0 0 0
38.7.44 Host Pipe x Configuration Register (High-speed Bulk-out or High-speed Control Pipe)
This configuration is relevant only if PTYPE = 0x0 or 0x2 in ”Host Pipe x Configuration Register”.
Bit 31 30 29 28 27 26 25 24
BINTERVAL[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PINGEN PEPNUM[3:0]
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PTYPE[1:0] AUTOSW PTOKEN[1:0]
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PSIZE[2:0] PBK[1:0] ALLOC
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: USBHS_HSTPIPISRx
Offset: 0x0530 + x*0x04 [x=0..8]
Reset: 0
Property: Read/Write
This register view is relevant only if PTYPE = 0x0 or 0x2 in ”Host Pipe x Configuration Register”.
Bit 31 30 29 28 27 26 25 24
PBYCT[10:4]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PBYCT[3:0] CFGOK RWALL
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE RXSTALLDI OVERFI NAKEDI PERRI TXSTPI TXOUTI RXINI
TI
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Value Description
1 Set when an error occurs on the current bank of the pipe. This triggers an interrupt if the
USBHS_HSTPIPIMR.PERRE bit is set. Refer to the USBHS_HSTPIPERRx register to determine the
source of the error.
This register view is relevant only if PTYPE = 0x3 in ”Host Pipe x Configuration Register”.
Bit 31 30 29 28 27 26 25 24
PBYCT[10:4]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PBYCT[3:0] CFGOK RWALL
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE RXSTALLDI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
TI
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Value Description
1 Set when an error occurs on the current bank of the pipe. This triggers an interrupt if the
USBHS_HSTPIPIMR.PERRE bit is set. Refer to the USBHS_HSTPIPERRx register to determine the
source of the error.
This register view is relevant only if PTYPE = 0x1 in ”Host Pipe x Configuration Register”.
Bit 31 30 29 28 27 26 25 24
PBYCT[10:4]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PBYCT[3:0] CFGOK RWALL
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CURRBK[1:0] NBUSYBK[1:0] DTSEQ[1:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE CRCERRI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI
TI
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Value Description
1 Set when an error occurs on the current bank of the pipe. This triggers an interrupt if the
USBHS_HSTPIPIMR.PERRE bit is set. Refer to the USBHS_HSTPIPERRx register to determine the
source of the error.
Name: USBHS_HSTPIPICRx
Offset: 0x0560 + x*0x04 [x=0..8]
Reset: 0
Property: Read/Write
This register view is relevant only if PTYPE = 0x0 or 0x2 in ”Host Pipe x Configuration Register”.
For additional information, see ”Host Pipe x Status Register (Control, Bulk Pipes)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Clears the corresponding bit in USBHS_HSTPIPISRx.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
SHORTPACKE RXSTALLDIC OVERFIC NAKEDIC TXSTPIC TXOUTIC RXINIC
TIC
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
This register view is relevant only if PTYPE = 0x3 in ”Host Pipe x Configuration Register”.
For additional information, see ”Host Pipe x Status Register (Interrupt Pipes)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Clears the corresponding bit in USBHS_HSTPIPISRx.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
SHORTPACKE RXSTALLDIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
TIC
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
This register view is relevant only if PTYPE = 0x1 in ”Host Pipe x Configuration Register”.
For additional information, see ”Host Pipe x Status Register (Isochronous Pipes)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Clears the corresponding bit in USBHS_HSTPIPISRx.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
SHORTPACKE CRCERRIC OVERFIC NAKEDIC UNDERFIC TXOUTIC RXINIC
TIC
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Name: USBHS_HSTPIPIFRx
Offset: 0x0590
Reset: 0
Property: Read/Write
This register view is relevant only if PTYPE = 0x0 or 0x2 in ”Host Pipe x Configuration Register”.
For additional information, see ”Host Pipe x Status Register (Control, Bulk Pipes)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Sets the corresponding bit in USBHS_HSTPIPISRx, which may be useful for test or debug purposes.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
NBUSYBKS
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE RXSTALLDIS OVERFIS NAKEDIS PERRIS TXSTPIS TXOUTIS RXINIS
TIS
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
This register view is relevant only if PTYPE = 0x3 in ”Host Pipe x Configuration Register”.
For additional information, see ”Host Pipe x Status Register (Interrupt Pipes)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Sets the corresponding bit in USBHS_HSTPIPISRx, which may be useful for test or debug purposes.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
NBUSYBKS
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE RXSTALLDIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
TIS
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
This register view is relevant only if PTYPE = 0x1 in ”Host Pipe x Configuration Register”.
For additional information, see ”Host Pipe x Status Register (Isochronous Pipes)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Sets the corresponding bit in USBHS_HSTPIPISRx, which may be useful for test or debug purposes.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
NBUSYBKS
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE CRCERRIS OVERFIS NAKEDIS PERRIS UNDERFIS TXOUTIS RXINIS
TIS
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: USBHS_HSTPIPIMRx
Offset: 0x05C0 + x*0x04 [x=0..8]
Reset: 0
Property: Read/Write
This register view is relevant only if PTYPE = 0x0 or 0x2 in ”Host Pipe x Configuration Register”.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
RSTDT PFREEZE PDISHDMA
Access R/W R/W R/W
Reset 0 0 0
Bit 15 14 13 12 11 10 9 8
FIFOCON NBUSYBKE
Access R/W R/W
Reset 0 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE RXSTALLDE OVERFIE NAKEDE PERRE TXSTPE TXOUTE RXINE
TIE
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
0: Cleared when USBHS_HSTPIPIDR.FIFOCONC = 1. This sends the FIFO data and switches the bank.
1: Set when the current bank is free, at the same time as USBHS_HSTPIPISR.TXOUTI or TXSTPI.
For an IN pipe:
0: Cleared when USBHS_HSTPIPIDR.FIFOCONC = 1. This frees the current bank and switches to the next bank.
1: Set when a new IN message is stored in the current bank, at the same time as USBHS_HSTPIPISR.RXINI.
This register view is relevant only if PTYPE = 0x3 in ”Host Pipe x Configuration Register”.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
RSTDT PFREEZE PDISHDMA
Access R/W R/W R/W
Reset 0 0 0
Bit 15 14 13 12 11 10 9 8
FIFOCON NBUSYBKE
Access R/W R/W
Reset 0 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE RXSTALLDE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
TIE
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
0: Cleared when USBHS_HSTPIPIDR.FIFOCONC = 1. This sends the FIFO data and switches the bank.
1: Set when the current bank is free, at the same time as USBHS_HSTPIPISR.TXOUTI or TXSTPI.
For IN pipes:
0: Cleared when USBHS_HSTPIPIDR.FIFOCONC = 1. This frees the current bank and switches to the next bank.
1: Set when a new IN message is stored in the current bank, at the same time as USBHS_HSTPIPISR.RXINI.
This register view is relevant only if PTYPE = 0x1 in ”Host Pipe x Configuration Register”.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
RSTDT PFREEZE PDISHDMA
Access R/W R/W R/W
Reset 0 0 0
Bit 15 14 13 12 11 10 9 8
FIFOCON NBUSYBKE
Access R/W R/W
Reset 0 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE CRCERRE OVERFIE NAKEDE PERRE UNDERFIE TXOUTE RXINE
TIE
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
0: Cleared when USBHS_HSTPIPIDR.FIFOCONC = 1. This sends the FIFO data and switches the bank.
1: Set when the current bank is free, at the same time as USBHS_HSTPIPISR.TXOUTI or TXSTPI.
For IN pipes:
0: Cleared when USBHS_HSTPIPIDR.FIFOCONC = 1. This frees the current bank and switches to the next bank.
1: Set when a new IN message is stored in the current bank, at the same time as USBHS_HSTPIPISR.RXINI.
Name: USBHS_HSTPIPIDRx
Offset: 0x0620 + x*0x04 [x=0..8]
Reset: 0
Property: Read/Write
This register view is relevant only if PTYPE = 0x0 or 0x2 in ”Host Pipe x Configuration Register”.
For additional information, see ”Host Pipe x Mask Register (Control, Bulk Pipes)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Clears the corresponding bit in USBHS_HSTPIPIMRx.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
PFREEZEC PDISHDMAC
Access R/W R/W
Reset 0 0
Bit 15 14 13 12 11 10 9 8
FIFOCONC NBUSYBKEC
Access R/W R/W
Reset 0 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE RXSTALLDEC OVERFIEC NAKEDEC PERREC TXSTPEC TXOUTEC RXINEC
TIEC
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
This register view is relevant only if PTYPE = 0x3 in ”Host Pipe x Configuration Register”.
For additional information, see ”Host Pipe x Mask Register (Interrupt Pipes)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Clears the corresponding bit in USBHS_HSTPIPIMRx.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
PFREEZEC PDISHDMAC
Access R/W R/W
Reset 0 0
Bit 15 14 13 12 11 10 9 8
FIFOCONC NBUSYBKEC
Access R/W R/W
Reset 0 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE RXSTALLDEC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
TIEC
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
This register view is relevant only if PTYPE = 0x1 in ”Host Pipe x Configuration Register”.
For additional information, see ”Host Pipe x Mask Register (Isochronous Pipes)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Clears the corresponding bit in USBHS_HSTPIPIMRx.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
PFREEZEC PDISHDMAC
Access R/W R/W
Reset 0 0
Bit 15 14 13 12 11 10 9 8
FIFOCONC NBUSYBKEC
Access R/W R/W
Reset 0 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE CRCERREC OVERFIEC NAKEDEC PERREC UNDERFIEC TXOUTEC RXINEC
TIEC
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: USBHS_HSTPIPIERx
Offset: 0x05F0 + x*0x04 [x=0..8]
Reset: 0
Property: Read/Write
This register view is relevant only if PTYPE = 0x0 or 0x2 in ”Host Pipe x Configuration Register”.
For additional information, see ”Host Pipe x Mask Register (Control, Bulk Pipes)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Sets the corresponding bit in USBHS_HSTPIPIMRx.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
RSTDTS PFREEZES PDISHDMAS
Access R/W R/W R/W
Reset 0 0 0
Bit 15 14 13 12 11 10 9 8
NBUSYBKES
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE RXSTALLDES OVERFIES NAKEDES PERRES TXSTPES TXOUTES RXINES
TIES
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
This register view is relevant only if PTYPE = 0x3 in ”Host Pipe x Configuration Register”.
For additional information, see ”Host Pipe x Mask Register (Interrupt Pipes)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Sets the corresponding bit in USBHS_HSTPIPIMRx.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
RSTDTS PFREEZES PDISHDMAS
Access R/W R/W R/W
Reset 0 0 0
Bit 15 14 13 12 11 10 9 8
NBUSYBKES
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE RXSTALLDES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
TIES
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
This register view is relevant only if PTYPE = 0x1 in ”Host Pipe x Configuration Register”.
For additional information, see ”Host Pipe x Mask Register (Isochronous Pipes)”.
This register always reads as zero.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Sets the corresponding bit in USBHS_HSTPIPIMRx.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
RSTDTS PFREEZES PDISHDMAS
Access R/W R/W R/W
Reset 0 0 0
Bit 15 14 13 12 11 10 9 8
NBUSYBKES
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
SHORTPACKE CRCERRES OVERFIES NAKEDES PERRES UNDERFIES TXOUTES RXINES
TIES
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: USBHS_HSTPIPINRQx
Offset: 0x0650 + x*0x04 [x=0..8]
Reset: 0
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
INMODE
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
INRQ[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: USBHS_HSTPIPERRx
Offset: 0x0680 + x*0x04 [x=0..8]
Reset: 0
Property: Read/Write
Writing a zero in a bit/field in this register clears the bit/field. Writing a one has no effect.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
COUNTER[1:0] CRC16 TIMEOUT PID DATAPID DATATGL
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Value Description
0 No Data Toggle error occurred since last clear of this bit.
1 This bit is automatically set when a Data Toggle error has been detected.
Name: USBHS_HSTDMANXTDSCx
Offset: 0x0700 + (x-1)*0x10 [x=1..7]
Reset: 0
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
NXT_DSC_ADD[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NXT_DSC_ADD[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NXT_DSC_ADD[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
NXT_DSC_ADD[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: USBHS_HSTDMAADDRESSx
Offset: 0x0704 + x*0x10 [x=0..6]
Reset: 0
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
BUFF_ADD[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
BUFF_ADD[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
BUFF_ADD[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
BUFF_ADD[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: USBHS_HSTDMACONTROLx
Offset: 0x0708 + x*0x10 [x=0..6]
Reset: 0
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
BUFF_LENGTH[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
BUFF_LENGTH[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
BURST_LCK DESC_LD_IT END_BUFFIT END_TR_IT END_B_EN END_TR_EN LDNXT_DSC CHANN_ENB
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Value Description
0 Completion of a USBHS device-initiated buffer transfer does not trigger any interrupt at
USBHS_HSTDMASTATUSx.END_TR_ST rising.
1 An interrupt is sent after the buffer transfer is complete, if the USBHS device has ended the buffer
transfer.
Value Description
0 No channel register is loaded after the end of the channel transfer.
1 The channel controller loads the next descriptor after the end of the current transfer, i.e., when the
USBHS_HSTDMASTATUS.CHANN_ENB bit is reset.
Name: USBHS_HSTDMASTATUSx
Offset: 0x070C + x*0x10 [x=0..6]
Reset: 0
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
BUFF_COUNT[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
BUFF_COUNT[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
DESC_LDST END_BF_ST END_TR_ST CHANN_ACT CHANN_ENB
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
39.1 Description
The High Speed Multimedia Card Interface (HSMCI) supports the MultiMedia Card (MMC) Specification V4.3, the SD
Memory Card Specification V2.0, the SDIO V2.0 specification and CE-ATA V1.1.
The HSMCI includes a command register, response registers, data registers, timeout counters and error detection
logic that automatically handle the transmission of commands and, when required, the reception of the associated
responses and data with a limited processor overhead.
The HSMCI operates at a rate of up to Host Clock divided by 2 and supports the interfacing of 1 slot(s). Each slot
may be used to interface with a High Speed MultiMedia Card bus (up to 30 Cards) or with an SD Memory Card. A bit
field in the SD Card Register performs this selection.
The SD Memory Card communication is based on a 9-pin interface (clock, command, four data and three power
lines) and the High Speed MultiMedia Card on a 7-pin interface (clock, command, one data, three power lines and
one reserved for future use).
The SD Memory Card interface also supports High Speed MultiMedia Card operations. The main differences
between SD and High Speed MultiMedia Cards are the initialization process and the bus topology.
HSMCI fully supports CE-ATA Revision 1.1, built on the MMC System Specification v4.0. The module includes
dedicated hardware to issue the command completion signal and capture the host command completion signal
disable.
APB Bridge
DMAC
APB
MCCK(1)
MCCDA(1)
MCDA2(1)
MCDA3(1)
Interrupt Control
HSMCI Interrupt
Note:
1. When several HSMCI (x HSMCI) are embedded in a product, MCCK refers to HSMCIx_CK, MCCDA to
HSMCIx_CDA, MCDAy to HSMCIx_DAy.
Application Layer
ex: File System, Audio, Security, etc.
Physical Layer
HSMCI Interface
1 2 3 4 5 6 7
1 2 3 4 5 6 78
9
9 10 11 1213 8
MMC SDCard
Note: 1. When several HSMCI (x HSMCI) are embedded in a product, MCCK refers to HSMCIx_CK, MCCDA to
HSMCIx_CDA, MCDAy to HSMCIx_DAy.
Note: 2. I: Input, O: Output, PP: Push/Pull, OD: Open Drain.
1 2 3 4 5 6 7
9 10 11 1213 8
MMC
The High Speed MultiMedia Card communication is based on a 13-pin serial bus interface. It has three
communication lines and four supply lines.
Table 39-2. Bus Topology
...........continued
Pin Number Name Type(1) Description HSMCI Pin Name(2)
(Slot z)
Notes:
1. I: Input, O: Output, PP: Push/Pull, OD: Open Drain, S: Supply
2. When several HSMCI (x HSMCI) are embedded in a product, MCCK refers to HSMCIx_CK, MCCDA to
HSMCIx_CDA, MCDAy to HSMCIx_DAy.
Figure 39-4. MMC Bus Connections (One Slot)
HSMCI
MCDA0
MCCDA
MCCK
1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 4 5 6 7
Note: When several HSMCI (x HSMCI) are embedded in a product, MCCK refers to HSMCIx_CK, MCCDA to
HSMCIx_CDA MCDAy to HSMCIx_DAy.
Figure 39-5. SD Memory Card Bus Topology
1 2 3 4 56 78
9
SD CARD
The SD Memory Card bus includes the signals listed in the table below.
Table 39-3. SD Memory Card Bus Signals
...........continued
Pin Number Name Type(1) Description HSMCI Pin Name(2)
(Slot z)
Notes:
1. I: input, O: output, PP: Push Pull, OD: Open Drain.
2. When several HSMCI (x HSMCI) are embedded in a product, MCCK refers to HSMCIx_CK, MCCDA to
HSMCIx_CDA, MCDAy to HSMCIx_DAy.
Figure 39-6. SD Card Bus Connections with One Slot
1 2 3 4 5 6 78
MCDA0 - MCDA3
MCCK SD CARD
MCCDA
9
Note: When several HSMCI (x HSMCI) are embedded in a product, MCCK refers to HSMCIx_CK, MCCDA to
HSMCIx_CDA MCDAy to HSMCIx_DAy.
When the HSMCI is configured to operate with SD memory cards, the width of the data bus can be selected in the
HSMCI_SDCR. Clearing the SDCBUS bit in this register means that the width is one bit; setting it means that the
width is four bits. In the case of High Speed MultiMedia cards, only the data line 0 is used. The other data lines can
be used as independent PIOs.
The command ALL_SEND_CID and the fields and values for the HSMCI_CMDR are described in the following two
tables.
Table 39-4. ALL_SEND_CID Command Description
Field Value
CMDNB (command number) 2 (CMD2)
RSPTYP (response type) 2 (R2: 136 bits response)
SPCMD (special command) 0 (not a special command)
OPCMD (open drain command) 1
MAXLAT (max latency for command to response) 0 (NID cycles ==> 5 cycles)
TRCMD (transfer command) 0 (No transfer)
TRDIR (transfer direction) X (available only in transfer command)
TRTYP (transfer type) X (available only in transfer command)
IOSPCMD (SDIO special command) 0 (not a special command)
While the card maintains a busy indication (at the end of a STOP_TRANSMISSION command CMD12, for example),
a new command shall not be sent. The NOTBUSY flag in the Status Register (HSMCI_SR) is asserted when the card
releases the busy indication.
If the command requires a response, it can be read in the HSMCI Response Register (HSMCI_RSPR). The response
size can be from 48 bits up to 136 bits depending on the command. The HSMCI embeds an error detection to
prevent any corrupted data during the transfer.
The following flowchart shows how to send a command to the card and read the response if needed. In this
example, the status register bits are polled but setting the appropriate bits in the HSMCI Interrupt Enable Register
(HSMCI_IER) allows using an interrupt method.
Read HSMCI_SR
(1)
RETURN ERROR
RETURN OK
Read HSMCI_SR
0
NOTBUSY
RETURN OK
Note: If the command is SEND_OP_COND, the CRC error flag is always present (refer to R3 response in the High
Speed MultiMedia Card specification) .
Send SELECT/DESELECT_CARD
command(1) to select the card
No Yes
Read with DMAC
Yes
Number of words to read = 0 ?
Read status register HSMCI_SR
No
No
RETURN
Read data = HSMCI_RDR
RETURN
Note 1: It is assumed that this command has been correctly sent (see the Command/Response Functional Flow
Diagram).
The flowchart, Write Functional Flow Diagram, shows how to write a single block with or without use of DMA facilities.
Polling or interrupt method can be used to wait for the end of write according to the contents of the HSMCI Interrupt
Mask Register (HSMCI_IMR).
Figure 39-9. Write Functional Flow Diagram
Send SELECT/DESELECT_CARD
command(1) to select the card
No Yes
Write using DMAC
DMAC_GE.EN[X] = TRUE
Yes
Number of words to write = 0 ?
No
RETURN
Note: 1. It is assumed that this command has been correctly sent (see Command/Response Functional Flow
Diagram).
The flowchart in Read and Write Multiple Block shows how to manage read multiple block and write multiple block
transfers with the DMA Controller. Polling or interrupt method can be used to wait for the end of write according to the
contents of the HSMCI_IMR.
Send SELECT/DESELECT_CARD
command(1) to select the card
No Yes
Write using DMAC
DMAC_GE.EN[X] = TRUE
Yes
Number of words to write = 0 ?
No
RETURN
Notes: 1. It is assumed that this command has been correctly sent (see Command/Response Functional Flow
Diagram).
2. Handle errors reported in HSMCI_SR.
3. Program the block length in the HSMCI Configuration Register with block_length value.
4. Configure the fields of the HSMCI_MR as follows:
a. Program FBYTE to one when the transfer is not multiple of 4, zero otherwise.
5. Issue a WRITE_SINGLE_BLOCK command writing HSMCI_ARGR then HSMCI_CMDR.
6. Program the DMA Controller.
a. Read the Channel Status Register to choose an available (disabled) channel.
b. Clear any pending interrupts on the channel from the previous DMAC transfer by reading the DMAC_CISx
register.
c. Program the channel registers.
d. The DMAC_CSAx register for Channel x must be set to the location of the source data.
e. The DMAC_CDAx register for Channel x must be set with the starting address of the HSMCI_FIFO address.
f. Configure the fields of DMAC_CCx of Channel x as follows:
– DWIDTH is set to WORD when the transfer is multiple of 4, otherwise it is set to BYTE
– CSIZE must be set according to the value of HSMCI_DMA.CHKSIZE.
g. Configure the fields of DMAC_CUBCx for Channel x as follows:
– UBLEN is programmed with block_length/4 when the transfer length is multiple of 4, block_length otherwise.
h. Enable Channel x, writing one to DMAC_GE.EN[x]. The DMAC is ready and waiting for request.
7. Wait for XFRDONE in the HSMCI_SR.
3. Issue the Boot Operation Request command by writing to the HSMCI_CMDR with SPCMD field set to
BOOTREQ, TRDIR set to READ and TRCMD set to “start data transfer”.
4. The BOOT_ACK field located in the HSMCI_CMDR must be set to one, if the BOOT_ACK field of the MMC
device located in the Extended CSD register is set to one.
5. Host processor can copy boot data sequentially as soon as the RXRDY flag is asserted.
6. When Data transfer is completed, host processor shall terminate the boot stream by writing the HSMCI_CMDR
with SPCMD field set to BOOTEND.
39.12.1 Definition
The XFRDONE flag in the HSMCI_SR indicates exactly when the read or write sequence is finished.
The CMDRDY flag is released 8 tbit after the end of the card response.
CMDRDY flag
Data
NOTBUSY flag
XFRDONE flag
CMDRDY flag The CMDRDY flag is released 8 tbit after the end of the card response.
NOTBUSY flag
XFRDONE flag
...........continued
Name: HSMCI_CR
Offset: 0x00
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
SWRST PWSDIS PWSEN MCIDIS MCIEN
Access W W W W W
Reset
Before enabling this mode, the user must set a value different from 0 in the PWSDIV field of the
WARNING
HSMCI_MR.
Value Description
0 No effect.
1 Enables the Power Saving Mode if PWSDIS is 0.
Name: HSMCI_MR
Offset: 0x04
Reset: 0x0
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the HSMCI Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
CLKODD
Access R/W
Reset 0
Bit 15 14 13 12 11 10 9 8
PADV FBYTE WRPROOF RDPROOF PWSDIV[2:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CLKDIV[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Value Description
0 Disables Force Byte Transfer.
1 Enables Force Byte Transfer.
This value must be different from 0 before enabling the Power Save Mode in the HSMCI_CR (PWSEN bit).
WARNING
Name: HSMCI_DTOR
Offset: 0x08
Reset: 0x0
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the HSMCI Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
DTOMUL[2:0] DTOCYC[3:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Name: HSMCI_SDCR
Offset: 0x0C
Reset: 0x0
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the HSMCI Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
SDCBUS[1:0] SDCSEL[1:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Name: HSMCI_ARGR
Offset: 0x10
Reset: 0x0
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
ARG[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
ARG[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
ARG[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
ARG[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: HSMCI_CMDR
Offset: 0x14
Property: Write-only
This register is write-protected while CMDRDY is 0 in HSMCI_SR. If an Interrupt command is sent, this register is
only writable by an interrupt response (field SPCMD). This means that the current command execution cannot be
interrupted or modified.
Bit 31 30 29 28 27 26 25 24
BOOT_ACK ATACS IOSPCMD[1:0]
Access W W W W
Reset
Bit 23 22 21 20 19 18 17 16
TRTYP[2:0] TRDIR TRCMD[1:0]
Access W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
MAXLAT OPDCMD SPCMD[2:0]
Access W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
RSPTYP[1:0] CMDNB[5:0]
Access W W W W W W W W
Reset
Name: HSMCI_BLKR
Offset: 0x18
Reset: 0x0
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
BLKLEN[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
BLKLEN[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
BCNT[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
BCNT[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
In SDIO Byte and Block modes (TRTYP = 4 or 5), writing the 7 last bits of BCNT field with a value which
WARNING
differs from 0 is forbidden and may lead to unpredictable results.
Name: HSMCI_CSTOR
Offset: 0x1C
Reset: 0x0
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the HSMCI Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
CSTOMUL[2:0] CSTOCYC[3:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Name: HSMCI_RSPR[0..3]
Offset: 0x20
Reset: 0x0
Property: Read-only
Note: The RSP data size can be up to 128 bit. According to the data size, RSP data is available at consecutive
addresses ( 0x20, 0x24, 0x28, 0x2C).
Bit 31 30 29 28 27 26 25 24
RSP[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RSP[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RSP[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RSP[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: HSMCI_RDR
Offset: 0x30
Reset: 0x0
Property: Read-only
Bit 31 30 29 28 27 26 25 24
DATA[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
DATA[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
DATA[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DATA[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: HSMCI_TDR
Offset: 0x34
Property: Write-only
Bit 31 30 29 28 27 26 25 24
DATA[31:24]
Access W W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
DATA[23:16]
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
DATA[15:8]
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
DATA[7:0]
Access W W W W W W W W
Reset
Name: HSMCI_SR
Offset: 0x40
Reset: 0xC0E5
Property: Read-only
Bit 31 30 29 28 27 26 25 24
UNRE OVRE ACKRCVE ACKRCV XFRDONE FIFOEMPTY BLKOVRE
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CSTOE DTOE DCRCE RTOE RENDE RCRCE RDIRE RINDE
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CSRCV SDIOWAIT SDIOIRQA
Access R R R
Reset 0 0 0
Bit 7 6 5 4 3 2 1 0
NOTBUSY DTIP BLKE TXRDY RXRDY CMDRDY
Access R R R R R R
Reset 1 0 0 1 0 1
Bit 31 – UNRE Underrun (if FERRCTRL = 1, cleared by writing in HSMCI_CMDR or cleared on read if FERRCTRL = 0)
If FERRCTRL = 1 in HSMCI_CFG, OVRE is cleared on read.
If FERRCTRL = 0 in HSMCI_CFG, OVRE is cleared by writing HSMCI_CMDR.
Value Description
0 No error.
1 At least one 8-bit data has been sent without valid information (not written).
Bit 30 – OVRE Overrun (if FERRCTRL = 1, cleared by writing in HSMCI_CMDR or cleared on read if FERRCTRL = 0)
If FERRCTRL = 1 in HSMCI_CFG, OVRE is cleared on read.
If FERRCTRL = 0 in HSMCI_CFG, OVRE is cleared by writing HSMCI_CMDR.
Value Description
0 No error.
1 At least one 8-bit received data has been lost (not read).
Name: HSMCI_IER
Offset: 0x44
Property: Write-only
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Enables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
UNRE OVRE ACKRCVE ACKRCV XFRDONE FIFOEMPTY BLKOVRE
Access W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
CSTOE DTOE DCRCE RTOE RENDE RCRCE RDIRE RINDE
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
CSRCV SDIOWAIT SDIOIRQA
Access W W W
Reset
Bit 7 6 5 4 3 2 1 0
NOTBUSY DTIP BLKE TXRDY RXRDY CMDRDY
Access W W W W W W
Reset
Name: HSMCI_IDR
Offset: 0x48
Property: Write-only
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Disables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
UNRE OVRE ACKRCVE ACKRCV XFRDONE FIFOEMPTY BLKOVRE
Access W W W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
CSTOE DTOE DCRCE RTOE RENDE RCRCE RDIRE RINDE
Access W W W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
CSRCV SDIOWAIT SDIOIRQA
Access W W W
Reset
Bit 7 6 5 4 3 2 1 0
NOTBUSY DTIP BLKE TXRDY RXRDY CMDRDY
Access W W W W W W
Reset
Name: HSMCI_IMR
Offset: 0x4C
Reset: 0x0
Property: Read-only
The following configuration values are valid for all listed bit names of this register:
0: The corresponding interrupt is not enabled.
1: The corresponding interrupt is enabled.
Bit 31 30 29 28 27 26 25 24
UNRE OVRE ACKRCVE ACKRCV XFRDONE FIFOEMPTY BLKOVRE
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CSTOE DTOE DCRCE RTOE RENDE RCRCE RDIRE RINDE
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CSRCV SDIOWAIT SDIOIRQA
Access R R R
Reset 0 0 0
Bit 7 6 5 4 3 2 1 0
NOTBUSY DTIP BLKE TXRDY RXRDY CMDRDY
Access R R R R R R
Reset 0 0 0 0 0 0
Name: HSMCI_DMA
Offset: 0x50
Reset: 0x0
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the HSMCI Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
DMAEN
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
CHKSIZE[2:0]
Access R/W R/W R/W
Reset 0 0 0
Name: HSMCI_CFG
Offset: 0x54
Reset: 0x0
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the HSMCI Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
LSYNC HSMODE
Access R/W R/W
Reset 0 0
Bit 7 6 5 4 3 2 1 0
FERRCTRL FIFOMODE
Access R/W R/W
Reset 0 0
Name: HSMCI_WPMR
Offset: 0xE4
Reset: 0x0
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
WPKEY[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WPKEY[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPKEY[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPEN
Access R/W
Reset 0
Name: HSMCI_WPSR
Offset: 0xE8
Reset: 0x0
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
WPVSRC[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPVSRC[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPVS
Access R
Reset 0
Bit 31 30 29 28 27 26 25 24
DATA[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
DATA[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
DATA[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DATA[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
40.1 Description
The Serial Peripheral Interface (SPI) circuit is a synchronous serial data link that provides communication with
external devices in Host or Client mode. It also enables communication between processors if an external processor
is connected to the system.
The Serial Peripheral Interface is essentially a shift register that serially transmits data bits to other SPIs. During a
data transfer, one SPI system acts as the “Host”' which controls the data flow, while the other devices act as “Clients''
which have data shifted into and out by the Host. Different CPUs can take turn being Hosts (multiple Host protocol,
contrary to single Host protocol where one CPU is always the Host while all of the others are always Clients). One
Host can simultaneously shift data into multiple Clients. However, only one Client can drive its output to write data
back to the Host at any given time.
A Client device is selected when the Host asserts its NSS signal. If multiple Client devices exist, the Host generates a
separate Client select signal for each Client (NPCS).
The SPI system consists of two data lines and two control lines:
• Host Out Client In (MOSI)—This data line supplies the output data from the Host shifted into the input(s) of the
Client(s).
• Host In Client Out (MISO)—This data line supplies the output data from a Client to the input of the Host. There
may be no more than one Client transmitting data during any particular transfer.
• Serial Clock (SPCK)—This control line is driven by the Host and regulates the flow of the data bits. The Host
can transmit data at a variety of baud rates; there is one SPCK pulse for each bit that is transmitted.
• Client Select (NSS)—This control line allows Clients to be turned on and off by hardware.
Bus clock
Peripheral bridge Trigger
events
Peripheral
clock SPI
PMC
SPCK SPCK
MISO MISO
Client 0
MOSI MOSI
SPCK
NPCS1
MISO
NPCS2 NC Client 1
NPCS3 MOSI
NSS
SPCK
MISO
Client 2
MOSI
NSS
40.6.3 Interrupt
The SPI interface has an interrupt line connected to the interrupt controller. Handling the SPI interrupt requires
programming the interrupt controller before configuring the SPI.
SPI Mode CPOL NCPHA Shift SPCK Edge Capture SPCK Edge SPCK Inactive Level
0 0 1 Falling Rising Low
1 0 0 Rising Falling Low
2 1 1 Rising Falling High
3 1 0 Falling Rising High
SPCK
(CPOL = 0)
SPCK
(CPOL = 1)
MOSI
MSB 6 5 4 3 2 1 LSB
(from host)
MISO
(from client)
MSB 6 5 4 3 2 1 LSB *
NSS
(to client)
* Not defined.
SPCK
(CPOL = 0)
SPCK
(CPOL = 1)
MISO
(from client) * MSB 6 5 4 3 2 1 LSB
NSS
(to client)
* Not defined.
SPI
Clock
SPI_CSRx
BITS SPI_RDR RDRF
NCPHA RD OVRES
CPOL
SPI_TDR
TD TDRE
SPI_CSRx
SPI_RDR
CSAAT PCS
PS
NPCSx
SPI_MR PCSDEC
PCS Current
0 Peripheral
SPI_TDR
PCS NPCS0
1
MSTR
MODF
NPCS0
MODFDIS
TDRE ? 0
(SW check)
Fixed
CSAAT ? 1 PS ? 0 peripheral
(HW check) (HW check)
Variable
0 1 peripheral
Fixed
PS ? 0 peripheral SPI_TDR(PCS) yes SPI_MR(PCS)
(HW check) = NPCS ? = NPCS ?
(HW check) (HW check)
Variable
1 peripheral no no
NPCS <= SPI_TDR(PCS) NPCS <= SPI_MR(PCS) NPCS deasserted NPCS deasserted
Delay DLYBS
TDRE ? 0 (i.e., a new write to SPI_TDR occurred during data transfer or delay DLYBCT)
(HW check)
TXEMPTY is set
1 CSAAT ?
(HW check)
NPCS deasserted
Delay DLYBCS
The figure below shows the behavior of Transmit Data Register Empty (TDRE), Receive Data Register (RDRF) and
Transmission Register Empty (TXEMPTY) status flags within SPI_SR during an 8-bit data transfer in Fixed mode
without the DMA involved.
Figure 40-8. Status Register Flags Behavior
1 2 3 4 5 6 7 8
SPCK
NPCS0
MOSI
MSB 6 5 4 3 2 1 LSB
(from host)
TDRE
RDR read
Write in
SPI_TDR
RDRF
MISO
MSB 6 5 4 3 2 1 LSB
(from client)
TXEMPTY
Chip Select 1
Chip Select 2
SPCK
DLYBCS DLYBS DLYBCT DLYBCT
For details on CSAAT, LASTXFER and CSNAAT, see section Peripheral Deselection with another DMA or PDC.
If LASTXFER is used, the command must be issued after writing the last character. Instead of LASTXFER, the
user can use the SPIDIS command. After the end of the DMA transfer, it is necessary to wait for the TXEMPTY
flag and then write SPIDIS into the SPI Control Register (SPI_CR). This does not change the configuration
register values). The NPCS is disabled after the last character transfer. Then, another DMA transfer can be
started if SPI_CR.SPIEN has previously been written.
SPCK
MISO
MOSI
select remains active. To deassert the chip select line at the end of the transfer, the Last Transfer (LASTXFER) bit in
SPI_CR must be set after writing the last data to transmit into SPI_TDR.
TDRE
DLYBCT DLYBCT
NPCS[0..n] A A A A A
DLYBCS DLYBCS
PCS = A PCS = A
Write SPI_TDR
TDRE
DLYBCT DLYBCT
NPCS[0..n] A A A A A
DLYBCS DLYBCS
PCS=A PCS = A
Write SPI_TDR
TDRE
DLYBCT DLYBCT
NPCS[0..n] A B A B
DLYBCS DLYBCS
PCS = B PCS = B
Write SPI_TDR
DLYBCT DLYBCT
TDRE
NPCS[0..n] A A A A
DLYBCS
PCS = A PCS = A
Write SPI_TDR
Note that the fields BITS, CPOL and NCPHA of the other chip select registers (SPI_CSR1...SPI_CSR3) have no
effect when the SPI is programmed in Client mode.
The bits are shifted out on the MISO line and sampled on the MOSI line.
Note: For more information on SPI_CSRx.BITS, see the note in section SPI Chip Select Register.
When all bits are processed, the received data is transferred in SPI_RDR and the RDRF bit rises. If SPI_RDR has
not been read before new data is received, the Overrun Error Status (OVRES) bit in SPI_SR is set. As long as this
flag is set, data is loaded in SPI_RDR. The user must read SPI_SR to clear the OVRES bit.
When a transfer starts, the data shifted out is the data present in the internal shift register. If no data has been
written in SPI_TDR, the last data received is transferred. If no data has been received since the last reset, all bits are
transmitted low, as the internal shift register resets to 0.
When a first data is written in SPI_TDR, it is transferred immediately in the internal shift register and the TDRE flag
rises. If new data is written, it remains in SPI_TDR until a transfer occurs, i.e., NSS falls and there is a valid clock on
the SPCK pin. When the transfer occurs, the last data written in SPI_TDR is transferred in the internal shift register
and the TDRE flag rises. This enables frequent updates of critical variables with single transfers.
Then, new data is loaded in the internal shift register from SPI_TDR. If no character is ready to be transmitted, i.e.,
no character has been written in SPI_TDR since the last load from SPI_TDR to the internal shift register, SPI_TDR is
retransmitted. In this case the Underrun Error Status Flag (UNDES) is set in SPI_SR.
In Client mode, if the NSS line rises and the received character length does not match the configuration defined in
SPI_CSR0.BITS the flag SFERR is set in SPI_SR.
The following figure shows a block diagram of the SPI when operating in Client mode.
Figure 40-12. Client Mode Functional Block Diagram
SPCK
NSS SPI
Clock
SPIEN
SPIENS
SPIDIS
SPI_CSR0
BITS SPI_RDR RDRF
NCPHA RD OVRES
CPOL
SPI_TDR
TD TDRE
...........continued
Name: SPI_CR
Offset: 0x00
Reset: –
Property: Write-only
This register can only be written if the WPCREN bit is cleared in the SPI Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
LASTXFER
Access W
Reset –
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
REQCLR
Access W
Reset –
Bit 7 6 5 4 3 2 1 0
SWRST SPIDIS SPIEN
Access W W W
Reset – – –
Value Description
0 No effect.
1 Enables the SPI to transfer and receive data.
Name: SPI_MR
Offset: 0x04
Reset: 0x0
Property: Read/Write
This register can only be written if the WPEN bit is cleared in theSPI Write Protection Mode Register .
Bit 31 30 29 28 27 26 25 24
DLYBCS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
PCS[3:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
LLB WDRBT MODFDIS PCSDEC PS MSTR
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Value Description
0 No Effect. In Host mode, a transfer can be initiated regardless of SPI_RDR state.
1 In Host mode, a transfer can start only if SPI_RDR is empty, i.e., does not contain any unread data.
This mode prevents overrun error in reception.
Name: SPI_RDR
Offset: 0x08
Reset: 0x0
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
PCS[3:0]
Access R R R R
Reset 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RD[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RD[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: SPI_TDR
Offset: 0x0C
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
LASTXFER
Access W
Reset –
Bit 23 22 21 20 19 18 17 16
PCS[3:0]
Access W W W W
Reset – – – –
Bit 15 14 13 12 11 10 9 8
TD[15:8]
Access W W W W W W W W
Reset – – – – – – – –
Bit 7 6 5 4 3 2 1 0
TD[7:0]
Access W W W W W W W W
Reset – – – – – – – –
Name: SPI_SR
Offset: 0x10
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
SPIENS
Access R
Reset 0
Bit 15 14 13 12 11 10 9 8
SFERR UNDES TXEMPTY NSSR
Access R R R R
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
OVRES MODF TDRE RDRF
Access R R R R
Reset 0 0 0 0
Name: SPI_IER
Offset: 0x14
Reset: –
Property: Write-only
This register can only be written if the WPITEN bit is cleared in the SPI Write Protection Mode Register.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Enables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
UNDES TXEMPTY NSSR
Access W W W
Reset – – –
Bit 7 6 5 4 3 2 1 0
OVRES MODF TDRE RDRF
Access W W W W
Reset – – – –
Name: SPI_IDR
Offset: 0x18
Reset: –
Property: Write-only
This register can only be written if the WPITEN bit is cleared in the SPI Write Protection Mode Register.
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Disables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
UNDES TXEMPTY NSSR
Access W W W
Reset – – –
Bit 7 6 5 4 3 2 1 0
OVRES MODF TDRE RDRF
Access W W W W
Reset – – – –
Name: SPI_IMR
Offset: 0x1C
Reset: 0x0
Property: Read-only
The following configuration values are valid for all listed bit names of this register:
0: The corresponding interrupt is not enabled.
1: The corresponding interrupt is enabled.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
UNDES TXEMPTY NSSR
Access R R R
Reset 0 0 0
Bit 7 6 5 4 3 2 1 0
OVRES MODF TDRE RDRF
Access R R R R
Reset 0 0 0 0
Name: SPI_CSRx
Offset: 0x30 + x*0x04 [x=0..3]
Reset: 0
Property: R/W
This register can only be written if the WPEN bit is cleared in the SPI Write Protection Mode Register.
SPI_CSRx must be written even if the user wants to use the default reset values. The BITS field is not updated with
the translated value unless the register is written.
Bit 31 30 29 28 27 26 25 24
DLYBCT[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
DLYBS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
SCBR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
BITS[3:0] CSAAT CSNAAT NCPHA CPOL
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: SPI_WPMR
Offset: 0xE4
Reset: 0x0
Property: Read/Write
See section Register Write Protection for the list of registers that can be write-protected.
Bit 31 30 29 28 27 26 25 24
WPKEY[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WPKEY[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPKEY[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPCREN WPITEN WPEN
Access R/W R/W R/W
Reset 0 0 0
Name: SPI_WPSR
Offset: 0xE8
Reset: 0x0
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
WPVSRC[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPVS
Access R
Reset 0
41.1 Description
The Quad Serial Peripheral Interface (QSPI) is a synchronous serial data link that provides communication with
external devices in Host mode.
The QSPI can be used in SPI Host Mode to interface to serial peripherals, such as ADCs, DACs, LCD controllers,
CAN controllers and sensors, or in Serial Memory mode to interface to serial Flash memories.
The QSPI allows the system to execute code directly from a serial Flash memory (XIP) without code shadowing to
RAM. The serial Flash memory mapping is seen in the system as other memories, such as ROM, SRAM, DRAM,
embedded Flash memory, and so on.
With the support of the Quad SPI protocol, the QSPI allows the system to use high-performance serial Flash
memories which are small and inexpensive, in place of larger and more expensive parallel Flash memories.
Note: Stacked devices with a rollover in the memory address space at each die boundary are not supported.
peripheral clock
PMC
QSPI QSCK
MOSI/QIO0
Peripheral APB
MISO/QIO1
Bridge
CPU
PIO QIO2
AHB
MATRIX QIO3
DMA QCS
Interrupt Control
QSPI Interrupt
Notes:
1. MOSI and MISO are used for single-bit SPI operation.
2. QIO0–QIO1 are used for Dual SPI operation.
3. QIO0–QIO3 are used for Quad SPI operation.
QSPI Clock QSPI_SCR.CPOL QSPI_SCR.CPHA Shift QSCK Capture QSCK QSCK Inactive
Mode Edge Edge Level
0 0 0 Falling Rising Low
1 0 1 Rising Falling Low
2 1 0 Rising Falling High
3 1 1 Falling Rising High
QSCK
(CPOL = 0)
QSCK
(CPOL = 1)
MOSI
MSB 6 5 4 3 2 1 LSB
(from host)
MISO
(from client)
MSB 6 5 4 3 2 1 LSB *
QCS
(to client)
QSCK
(CPOL = 0)
QSCK
(CPOL = 1)
MISO
(from client) * MSB 6 5 4 3 2 1 LSB
QCS
(to client)
These delays allow the QSPI to be adapted to the interfaced peripherals and their speed and bus release time.
Figure 41-4. Programmable Delays
QCS
QSCK
DLYCS DLYBS DLYBCT DLYBCT
Serial
Clock
QSPI_MR
NBBITS QSPI_TDR
TD TDRE
QSPI_MR
CSMODE
1
TDRE ?
NPCS = 0
Delay DLYBS
Serializer = QSPI_TDR(TD)
TDRE = 1
Data Transfer
QSPI_RDR(RD) = Serializer
RDRF = 1
Delay DLYBCT
0
TDRE ?
NPCS = 1
Delay DLYCS
The figure below shows Transmit Data Register Empty (TDRE), Receive Data Register Full (RDRF) and
Transmission Register Empty (TXEMPTY) status flags behavior within the QSPI_SR during an 8-bit data transfer
in Fixed mode, without DMA.
QSCK
QCS
MOSI
MSB 6 5 4 3 2 1 LSB
(from host)
TDRE
QSPI_RDR read
Write in
QSPI_TDR
RDRF
MISO
MSB 6 5 4 3 2 1 LSB
(from client)
TXEMPTY
QSCK
• WIDTH field—used to configure which data lanes are used to send the instruction code, the address, the option
code and to transfer the data. It is possible to use two unidirectional data lanes (MISO-MOSI Single-bit SPI), two
bidirectional data lanes (QIO0-QIO1 Dual SPI) or four bidirectional data lanes (QIO0–QIO3 Quad SPI).
• INSTEN bit—used to enable the send of an instruction code.
• ADDREN bit—used to enable the send of an address after the instruction code.
• OPTEN bit—used to enable the send of an option code after the address.
• DATAEN bit—used to enable the transfer of data (READ or PROGRAM instruction).
• OPTL field—used to configure the option code length. The value written in OPTL must be consistent with the
value written in the field WIDTH. For example: OPTL = 0 (1-bit option code) is not consistent with WIDTH = 6
(option code sent with QuadSPI protocol, thus the minimum length of the option code is 4 bits).
• ADDRL bit—used to configure the address length.
• TFRTYP field—used to define which type of data transfer must be performed.
• NBDUM field—used to configure the number of dummy cycles when reading data from the serial Flash memory.
Between the address/option and the data, with some instructions, dummy cycles are inserted by the serial Flash
memory.
Refer to 41.6.5.2. Instruction Frame Transmission.
If data transfer is enabled, the user can access the serial memory by reading or writing the QSPI memory space:
• To read in the serial memory, but not a memory data, for example a JEDEC-ID or the QSPI_SR,
QSPI_IFR.TFRTYP must be written to ‘0’.
• To read in the serial memory, and particularly a memory data, TFRTYP must be written to ‘1’.
• To write in the serial memory, but not a memory data, for example writing the configuration or the QSPI_SR,
TFRTYP must be written to ‘2’.
• If the user wants to write in the serial memory in particular to program a memory data, TFRTYP must be written
to ‘3’ .
If QSPI_IFR.TFRTYP has a value other than ‘1’, the address sent in the instruction frame is the address of the first
system bus accesses. The addresses of the next accesses are not used by the QSPI. At each system bus access,
an SPI transfer is performed with the same size. For example, a halfword system bus access leads to a 16-bit SPI
transfer, and a byte system bus access leads to an 8-bit SPI transfer.
If TFRTYP = 1, the address of the first instruction frame is the one of the first read access in the QSPI memory
space. Each time the read accesses become nonsequential (addresses are not consecutive), a new instruction frame
is sent with the last system bus access address. In this way, the system can read data at a random location in the
serial memory. The size of the SPI transfers may differ from the size of the system bus read accesses.
When data transfer is not enabled, the end of the instruction frame is indicated when QSPI_SR.INSTRE rises. (The
QSPI_SR.CSR flag indicates when chip select rises. A delay between these flags may exist in case of high clock
division or a high DLYBCT value).
When data transfer is enabled, the user must indicate when the data transfer is completed in the QSPI memory
space by setting QSPI_CR.LASTXFR. The end of the instruction frame is indicated when QSPI_SR.INSTRE rises.
The following figure illustrates instruction transmission management.
No Instruction frame
with address
but no data
?
Yes
No Instruction frame
with instruction code and/or
option code
?
Yes
No Instruction frame
with data
?
Yes
Instruction frame No
with address
?
Yes
Read memory No
transfer
(TFRTYP = 1)
?
Yes
Read DATA in the QSPI AHB Read/Write DATA in the QSPI Read/Write DATA in the QSPI
memory space. AHB memory space. AHB memory space.
If accesses are not sequential The address of the first access Address of accesses are not
a new instruction is sent is sent after the instruction used by the QSPI.
automatically. code.
Write QSPI_CR.LASTXFR to 1
when all data have been
transferred.
END
If the Continuous Read mode is not supported by the serial Flash memory or disabled, CRM bit must not
CAUTION
be written to ‘1’, otherwise data read out of the serial Flash memory is unpredictable.
QSCK
QCS
QSCK
MOSI / QIO0
Instruction C7h
QSPI_SR.INSTRE
Example 2:
Instruction in Quad SPI, without address, without option, without data.
Command: POWER DOWN (B9h)
• Write 0x0000_00B9 in QSPI_ICR.
• Write 0x0000_00B9 in QSPI_WICR.
• Write 0x0000_0016 in QSPI_IFR.
• Wait for QSPI_SR.INSTRE to rise.
Figure 41-12. Instruction Transmission Waveform 2
Write QSPI_IFR
QCS
QSCK
QIO0
QIO1
QIO2
QIO3
Instruction B9h
QSPI_SR.INSTRE
Example 3:
Instruction in Single-bit SPI, with address in Single-bit SPI, without option, without data.
Command: BLOCK ERASE (20h)
• Write the address (of the block to erase) in QSPI_AR.
• Write 0x0000_0020 in QSPI_ICR.
• Write 0x0000_0020 in QSPI_WICR.
• Write 0x0000_0030 in QSPI_IFR.
• Wait for QSPI_SR.INSTRE to rise.
Write QSPI_IFR
QCS
QSCK
QCS
QSCK
MOSI / QIO0 D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0
Instruction 77h Data
QSPI_SR.INSTRE
Write AHB
Set QSPI_CR.LASTXFR
Example 5:
Instruction in Single-bit SPI, with address in Dual SPI, without option, with data write in Dual SPI.
Command: BYTE/PAGE PROGRAM (02h)
• Write 0x0000_0002 in QSPI_ICR.
• Write 0x0000_0002 in QSPI_WICR.
• Write 0x0000_30B3 in QSPI_IFR.
• Write 0x0000_10B3 in QSPI_IFR.
• Read QSPI_IFR (dummy read) to synchronize system bus accesses.
• Write data in the QSPI system bus memory space (0x80000000).
The address of the first system bus write access is sent in the instruction frame.
The address of the next system bus write accesses is not used.
• Write a ‘1’ to QSPI_CR.LASTXFR.
• Wait for QSPI_SR.INSTRE to rise.
QCS
QSCK
Write AHB
Set QSPI_CR.LASTXFR
Example 6:
Instruction in Single-bit SPI, with address in Single-bit SPI, without option, with data read in Quad SPI, with eight
dummy cycles.
Command: QUAD_OUTPUT READ ARRAY (6Bh)
• Write 0x0000_006B in QSPI_ICR.
• Write 0x0008_10B2 in QSPI_IFR.
• Read QSPI_IR (dummy read) to synchronize system bus accesses.
• Read data in the QSPI system bus memory space (0x80000000).
The address of the first system bus read access is sent in the instruction frame.
The address of the next system bus read accesses is not used.
• Write a ‘1’ to QSPI_CR.LASTXFR.
• Wait for QSPI_SR.INSTRE to rise.
Figure 41-16. Instruction Transmission Waveform 6
Write QSPI_IFR
QCS
QSCK
QIO1 D5 D1 D5 D1
QIO2 D6 D2 D6 D2
QIO3 D7 D3 D7 D3
Instruction 6Bh Address Dummy cycles Data
QSPI_SR.INSTRE
Read AHB
Set QSPI_CR.LASTXFR
Example 7:
Instruction in Single-bit SPI, with address and option in Quad SPI, with data read in Quad SPI, with four dummy
cycles, with fetch and continuous read.
Command: FAST READ QUAD I/O (EBh) - 8-BIT OPTION (0x30h)
• Write 0x0030_00EB in QSPI_ICR.
• Write 0x0030_00EB in QSPI_RICR.
• Write 0x0004_33F4 in QSPI_IFR.
• Read QSPI_IFR (dummy read) to synchronize system bus accesses.
• Read data in the QSPI system bus memory space (0x80000000).
Fetch is enabled, the address of the system bus read accesses is always used.
• Write a ‘1’ to QSPI_CR.LASTXFR.
• Wait for QSPI_SR.INSTRE to rise.
QCS
QSCK
Example 8:
Instruction in Quad SPI, with address in Quad SPI, without option, with data read in Quad SPI, with two dummy
cycles, with fetch.
Command: HIGH-SPEED READ (0Bh)
• Write 0x0000_000B in QSPI_ICR.
• Write 0x0000_000B in QSPI_RICR.
• Write 0x0002_20B6 in QSPI_IFR.
• Read QSPI_IFR (dummy read) to synchronize system bus accesses.
• Read data in the QSPI system bus memory space (0x80000000).
Fetch is enabled, the address of the system bus read accesses is always used.
• Write a ‘1’ to QSPI_CR.LASTXFR.
• Wait for QSPI_SR.INSTRE to rise.
Figure 41-18. Instruction Transmission Waveform 8
Write QSPI_IFR
QCS
QSCK
Read AHB
Example 9:
Instruction in Quad SPI, without address, without option, with data read in Quad SPI, without dummy cycles, without
fetch.
Command: HIGH-SPEED READ (05h)
• Write 0x0000_0005 in QSPI_ICR.
• Write 0x0000_0005 in QSPI_RICR.
• Write 0x0000_0096 in QSPI_IFR.
• Read QSPI_IFR (dummy read) to synchronize system bus accesses.
• Read data in the QSPI system bus memory space (0x80000000).
Fetch is disabled.
• Write a ‘1’ to QSPI_CR.LASTXFR.
• Wait for QSPI_SR.INSTRE to rise.
QCS
QSCK
QIO0 D4 D0 D4 D0
QIO1 D5 D1 D5 D1
QIO2 D6 D2 D6 D2
QIO3 D7 D3 D7 D3
Instruction 05h Data
Read AHB
Set QSPI_CR.LASTXFR
...........continued
Name: QSPI_CR
Offset: 0x00
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
LASTXFER
Access W
Reset –
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
SWRST QSPIDIS QSPIEN
Access W W W
Reset – – –
Name: QSPI_MR
Offset: 0x04
Reset: 0x00000000
Property: Read/Write
This register can only be written if bit WPEN is cleared in the QSPI Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
DLYCS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
DLYBCT[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NBBITS[3:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TAMPCLR CSMODE[1:0] WDRBT LLB SMM
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: QSPI_RDR
Offset: 0x08
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RD[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RD[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: QSPI_TDR
Offset: 0x0C
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
TD[15:8]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TD[7:0]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 –
Name: QSPI_SR
Offset: 0x10
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
QSPIENS
Access R
Reset 0
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
INSTRE CSS CSR
Access R R R
Reset 0 0 0
Bit 7 6 5 4 3 2 1 0
OVRES TXEMPTY TDRE RDRF
Access R R R R
Reset 0 0 0 0
Value Description
1 QSPI_TDR and the internal shifter are empty. If a transfer delay has been defined, TXEMPTY is set
after the completion of such delay.
Name: QSPI_IER
Offset: 0x14
Reset: –
Property: Write-only
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Enables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
INSTRE CSS CSR
Access W W W
Reset – – –
Bit 7 6 5 4 3 2 1 0
OVRES TXEMPTY TDRE RDRF
Access W W W W
Reset – – – –
Name: QSPI_IDR
Offset: 0x18
Reset: –
Property: Write-only
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Disables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
INSTRE CSS CSR
Access W W W
Reset – – –
Bit 7 6 5 4 3 2 1 0
OVRES TXEMPTY TDRE RDRF
Access W W W W
Reset – – – –
Name: QSPI_IMR
Offset: 0x1C
Reset: 0x00000000
Property: Read-only
The following configuration values are valid for all listed bit names of this register:
0: The corresponding interrupt is not enabled.
1: The corresponding interrupt is enabled.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
INSTRE CSS CSR
Access R R R
Reset 0 0 0
Bit 7 6 5 4 3 2 1 0
OVRES TXEMPTY TDRE RDRF
Access R R R R
Reset 0 0 0 0
Name: QSPI_SCR
Offset: 0x20
Reset: 0x00000000
Property: Read/Write
This register can only be written if bit WPEN is cleared in the QSPI Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
DLYBS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
SCBR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CPHA CPOL
Access R/W R/W
Reset 0 0
Name: QSPI_IAR
Offset: 0x30
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
ADDR[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
ADDR[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
ADDR[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
ADDR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: QSPI_ICR
Offset: 0x34
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
OPT[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
INST[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: QSPI_IFR
Offset: 0x38
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
DDRCMDEN APBTFRTYP
Access R/W R/W
Reset 0 0
Bit 23 22 21 20 19 18 17 16
NBDUM[4:0]
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
DDREN CRM TFRTYP[1:0] ADDRL OPTL[1:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DATAEN OPTEN ADDREN INSTEN WIDTH[2:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bits 2:0 – WIDTH[2:0] Width of Instruction Code, Address, Option Code and Data
Value Name Description
0 SINGLE_BIT_SPI Instruction: Single-bit SPI / Address-Option: Single-bit SPI / Data: Single-bit SPI
1 DUAL_OUTPUT Instruction: Single-bit SPI / Address-Option: Single-bit SPI / Data: Dual SPI
2 QUAD_OUTPUT Instruction: Single-bit SPI / Address-Option: Single-bit SPI / Data: Quad SPI
3 DUAL_IO Instruction: Single-bit SPI / Address-Option: Dual SPI / Data: Dual SPI
4 QUAD_IO Instruction: Single-bit SPI / Address-Option: Quad SPI / Data: Quad SPI
5 DUAL_CMD Instruction: Dual SPI / Address-Option: Dual SPI / Data: Dual SPI
6 QUAD_CMD Instruction: Quad SPI / Address-Option: Quad SPI / Data: Quad SPI
Name: QSPI_SMR
Offset: 0x40
Reset: 0x00000000
Property: Read/Write
This register can only be written if bit WPEN is cleared in the QSPI Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
RVDIS SCREN
Access R/W R/W
Reset 0 0
Name: QSPI_SKR
Offset: 0x44
Reset: –
Property: Write-only
This register can only be written if bit WPEN is cleared in the QSPI Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
USRK[31:24]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
USRK[23:16]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
USRK[15:8]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
USRK[7:0]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 –
Name: QSPI_WPMR
Offset: 0xE4
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
WPKEY[23:16]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WPKEY[15:8]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPKEY[7:0]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPEN
Access R/W
Reset 0
Name: QSPI_WPSR
Offset: 0xE8
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
WPVSRC[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPVS
Access R
Reset 0
42.1 Description
The Two-wire Interface (TWIHS) interconnects components on a unique two-wire bus, made up of one clock line
and one data line with speeds of up to 400 kbit/s in Fast mode and up to 3.4 Mbit/s in High-speed Client mode
only, based on a byte-oriented transfer format. It can be used with any Two-wire Interface bus Serial EEPROM
and I²C-compatible devices, such as a Real-Time Clock (RTC), Dot Matrix/Graphic LCD Controller and temperature
sensor. The TWIHS is programmable as a Host or a Client with sequential or single-byte access. Multiple Host
capability is supported.
A configurable baud rate generator permits the output data rate to be adapted to a wide range of core clock
frequencies.
The table below lists the compatibility level of the Two-wire Interface in Host mode and a full I2C compatible device.
Table 42-1. TWI Compatibility with I2C Standard
Note:
1. 10-bit support in Host mode only.
2. START + b000000001 + Ack + Sr.
Abbreviation Description
TWI Two-wire Interface
A Acknowledge
NA Non Acknowledge
P Stop
S Start
Sr Repeated Start
SADR Client Address
ADR Any address except SADR
R Read
W Write
APB Bridge
TWCK
PIO
Two-wire TWD
Peripheral Clock Interface
PMC
TWIHS
Interrupt Interrupt
Controller
TWD
TWCK
Start Stop
TWD
TWCK
42.7.3.1 Definition
The Host is the device that starts a transfer, generates a clock and stops it. This operating mode is not available if
High-speed mode is selected.
TXCOMP
TXRDY
TWCK
TXCOMP
TXRDY
Figure 42-6. Host Write with One-Byte Internal Address and Multiple Data Bytes
STOP command performed
(by writing in TWIHS_CR)
TWCK
TXCOMP
TXRDY
case (MREAD = 1 in TWIHS_MMR). During the acknowledge clock pulse (9th pulse), the Host releases the data line
(HIGH), enabling the Client to pull it down in order to generate the acknowledge. The Host polls the data line during
this clock pulse and sets TWIHS_SR.NACK if the Client does not acknowledge the byte.
If an acknowledge is received, the Host is then ready to receive data from the Client. After data has been received,
the Host sends an acknowledge condition to notify the Client that the data has been received except for the last data
(see Host Read with One Data Byte). When TWIHS_SR.RXRDY is set, a character has been received in the Receive
Holding register (TWIHS_RHR). The RXRDY bit is reset when reading the TWIHS_RHR.
When a single data byte read is performed, with or without internal address (IADR), the START and STOP bits must
be set at the same time. See Host Read with One Data Byte. When a multiple data byte read is performed, with or
without internal address (IADR), the STOP bit must be set after the next-to-last data received (same condition applies
for START bit to generate a REPEATED START). See Host Read with Multiple Data Bytes. For internal address
usage, see Internal Address.
If TWIHS_RHR is full (RXRDY high) and the Host is receiving data, the serial clock line is tied low before receiving
the last bit of the data and until the TWIHS_RHR is read. Once the TWIHS_RHR is read, the Host stops stretching
the serial clock line and ends the data reception. See Host Read Clock Stretching with Multiple Data Bytes.
When receiving multiple bytes in Host Read mode, if the next-to-last access is not read (the RXRDY flag
WARNING
remains high), the last access is not completed until TWIHS_RHR is read. The last access stops on the
next-to-last bit (clock stretching). When the TWIHS_RHR is read, there is only half a bit period to send the
STOP (or START) command, else another read access might occur (spurious access).
A possible workaround is to set the STOP (or START) bit before reading the TWIHS_RHR on the next-to-last access
(within IT handler).
Figure 42-7. Host Read with One Data Byte
TWD S DADR R A DATA N P
TXCOMP
Read RHR
TXCOMP
Write START Bit
RXRDY
Figure 42-9. Host Read Clock Stretching with Multiple Data Bytes
STOP command performed
(by writing in TWIHS_CR)
Clock Streching
TWCK
TXCOMP
RXRDY
Read RHR (Data n) Read RHR (Data n+1) Read RHR (Data n+2)
RXRDY is used as receive ready for the DMA receive channel.
Abbreviation Definition
S Start
Sr Repeated Start
P Stop
W Write
R Read
A Acknowledge
NA Not Acknowledge
DADR Device Address
IADR Internal Address
Figure 42-10. Host Write with One-, Two- or Three-Byte Internal Address and One Data Byte
Three-byte internal address
TWD S DADR W A IADR(23:16) A IADR(15:8) A IADR(7:0) A DATA A P
Figure 42-11. Host Read with One-, Two- or Three-Byte Internal Address and One Data Byte
Three-byte internal address
TWD S DADR W A IADR(23:16) A IADR(15:8) A IADR(7:0) A Sr DADR R A
DATA N P
M LR A M A LA A
S S / C S C SC C
B BW K B K BK K
TXCOMP
TXRDY
Figure 42-14. TWIHS Write Operation with Single Data Byte without Internal Address
BEGIN
No
TXRDY = 1?
Yes
No
TXCOMP = 1?
Yes
Transfer finished
Figure 42-15. TWIHS Write Operation with Single Data Byte and Internal Address
BEGIN
No
TXRDY = 1?
Yes
TXCOMP = 1?
No
Yes
Transfer finished
Figure 42-16. TWIHS Write Operation with Multiple Data Bytes with or without Internal Address
BEGIN
No
Internal address size = 0?
Yes
Data to send?
Yes
No
No
TXCOMP = 1?
Yes
END
Figure 42-17. SMBus Write Operation with Multiple Data Bytes with or without Internal Address and PEC
Sending
BEGIN
No
Internal address size = 0?
Yes
Data to send?
Yes
No
No
TXCOMP = 1?
Yes
END
Figure 42-18. SMBus Write Operation with Multiple Data Bytes with PEC and Alternative Command Mode
BEGIN
Yes
Data to send?
Yes
No
No
TXCOMP = 1?
Yes
END
Figure 42-19. TWIHS Write Operation with Multiple Data Bytes and Read Operation with Multiple Data Bytes
(Sr)
BEGIN
No
Internal address size = 0?
No
TWIHS_THR = data to send TXRDY = 1?
Yes
Data to send ?
Yes
No
No
RXRDY = 1?
Yes
Yes
Stop the transfer
TWIHS_CR = STOP
No
RXRDY = 1?
Yes
No
TXCOMP = 1?
Yes
END
Figure 42-20. TWIHS Write Operation with Multiple Data Bytes + Read Operation and Alternative Command
Mode + PEC
BEGIN
Yes
Data to send?
Yes
No
No
TXCOMP = 1?
Yes
END
Figure 42-21. TWIHS Read Operation with Single Data Byte without Internal Address
BEGIN
No
RXRDY = 1?
Yes
No
TXCOMP = 1?
Yes
END
Figure 42-22. TWIHS Read Operation with Single Data Byte and Internal Address
BEGIN
No
RXRDY = 1?
Yes
No
TXCOMP = 1?
Yes
END
Figure 42-23. TWIHS Read Operation with Multiple Data Bytes with or without Internal Address
BEGIN
No
Internal address size = 0?
No
RXRDY = 1?
Yes
Yes
No
RXRDY = 1?
Yes
No
TXCOMP = 1?
Yes
END
Figure 42-24. TWIHS Read Operation with Multiple Data Bytes with or without Internal Address with PEC
BEGIN
No
Internal address size = 0?
No
RXRDY = 1?
Yes
Yes
No
RXRDY = 1?
Yes
No
TXCOMP = 1?
Yes
END
Figure 42-25. TWIHS Read Operation with Multiple Data Bytes with Alternative Command Mode with PEC
BEGIN
No
RXRDY = 1?
Yes
No
Last data to read ?
Yes
No
RXRDY = 1?
Yes
No
TXCOMP = 1?
Yes
END
Figure 42-26. TWIHS Read Operation with Multiple Data Bytes + Write Operation with Multiple Data Bytes (Sr)
BEGIN
No
Internal address size = 0?
No
RXRDY = 1?
Yes
Yes
Yes
No
TWIHS_THR = data to send TXRDY = 1?
Yes
Data to send ?
Yes
No
No
TXCOMP = 1?
Yes
END
Figure 42-27. TWIHS Read Operation with Multiple Data Bytes + Write with Alternative Command Mode with
PEC
BEGIN
No
RXRDY = 1?
Yes
No
Last data to read ?
Yes
No
TWIHS_THR = data to send TXRDY = 1?
Yes
Data to send ?
Yes
No
No
TXCOMP = 1?
Yes
END
42.7.4.1 Definition
In Multihost mode, more than one Host may handle the bus at the same time without data corruption by using
arbitration.
Arbitration starts as soon as two or more Hosts place information on the bus at the same time, and stops (arbitration
is lost) for the Host that intends to send a logical one while the other Host sends a logical zero.
As soon as arbitration is lost by a Host, it stops sending data and listens to the bus in order to detect a stop. When
the stop is detected, the Host that has lost arbitration may put its data on the bus by respecting arbitration.
Arbitration is illustrated in Arbitration Cases.
TWCK
TWD
TWCK
Arbitration is lost
Data from a Host S 1 0 0 1 1 P S 1 0 1
The host stops sending
data
Arbitration is lost
Data from TWIHS S 1 0 1 S 1 0 0 1 1
TWIHS stops sending data
ARBLST
Bus is busy Bus is free
The flowchart below gives an example of read and write operations in Multihost mode.
START
Yes No
SVACC = 1 ? GACC = 1 ?
Yes
No SVREAD = 1 ?
No No
EOSACC = 1 ? No TXRDY= 1 ?
Yes Yes
No Write in TWIHS_THR
TXCOMP = 1 ? No
RXRDY= 1 ?
Yes
Yes
No Read TWIHS_RHR
Need to perform
a host access ?
GENERAL CALL TREATMENT
Yes
Decoding of the
programming sequence
Prog seq No
OK ?
Change SADR
Yes No
ARBLST = 1 ?
Yes No
MREAD = 1 ?
Yes Yes
RXRDY= 0 ? TXRDY= 0 ?
No No
Yes Yes
Read TWIHS_RHR Data to read? Data to send ? Write in TWIHS_THR
No No
Stop Transfer
TWIHS_CR = STOP
Yes No
TXCOMP = 0 ?
42.7.5.1 Definition
Client mode is defined as a mode where the device receives the clock and the address from another device called
the Host.
In this mode, the device never initiates and never completes the transmission (START, REPEATED_START and
STOP conditions are always provided by the Host).
After GACC is set, the user must interpret the meaning of the GENERAL CALL and decode the new address
programming sequence.
See Host Performs a General Call.
TXRDY
Write THR Read RHR
NACK
SVACC
SVREAD SVREAD has to be taken into account only while SVACC is active
EOSACC
Notes:
1. When SVACC is low, the state of SVREAD becomes irrelevant.
2. TXRDY is reset when data has been transmitted from TWIHS_THR to the internal shifter and set when this
data has been acknowledged or non acknowledged.
RXRDY
SVACC
SVREAD SVREAD has to be taken into account only while SVACC is active
EOSACC
Notes:
1. When SVACC is low, the state of SVREAD becomes irrelevant.
2. RXRDY is set when data has been transmitted from the internal shifter to TWIHS_RHR and reset when this
data is read.
TXD S GENERAL CALL A Reset or write DADD A DATA1 A DATA2 A New SADR A P
New SADR
Programming sequence
GACC
Reset after read
SVACC
Note: This method enables the user to create a personal programming sequence by choosing the programming
bytes and their number. The programming sequence has to be provided to the Host.
TWCK
CLOCK is tied low by the TWIHS
as long as THR is empty
Write THR
SCLWS
TXRDY
SVACC
SVREAD
As soon as a START is detected
TXCOMP
TWIHS_THR is transmitted to the internal shifter Ack or Nack from the host
SCLWS
SCL is stretched after the acknowledge of DATA1
RXRDY
Rd DATA0 Rd DATA1 Rd DATA2
SVACC
SVREAD
As soon as a START is detected
TXCOMP
Notes:
1. At the end of the read sequence, TXCOMP is set after a STOP or after a REPEATED_START + an address
different from SADR.
2. SCLWS is automatically set when the clock stretching mechanism is started and automatically reset when the
mechanism is finished.
SVACC
SVREAD
TXRDY
RXRDY
EOSACC Cleared after read
TXCOMP As soon as a START is detected
Note: TXCOMP is only set at the end of the transmission. This is because after the REPEATED START, SADR is
detected again.
SVACC
SVREAD
TXRDY
RXRDY
Notes:
1. In this case, if TWIHS_THR has not been written at the end of the read command, the clock is automatically
stretched before the ACK.
2. TXCOMP is only set at the end of the transmission. This is because after the REPEATED START, SADR is
detected again.
42.7.5.6.2 Timeouts
The TWIHS SMBus Timing Register (TWIHS_SMBTR) configures the SMBus timeout values. If a timeout occurs, the
Client leaves the bus. The TOUT bit is also set in TWIHS_SR.
Note: When Client clock stretching is disabled, the TWIHS_RHR must always be read before receiving the next
data (Host write frame). It is strongly recommended to use either the polling method on the RXRDY flag in
TWIHS_SR, or the DMA. If the receive is managed by an interrupt, the TWIHS interrupt priority must be set to
the right level and its latency minimized to avoid receive overrun.
Note: When Client clock stretching is disabled, the TWIHS_THR must be filled with the first data to send before the
beginning of the frame (Host read frame). It is strongly recommended to use either the polling method on the TXRDY
flag in TWIHS_SR, or the DMA. If the transmit is managed by an interrupt, the TWIHS interrupt priority must be set to
the right level and its latency minimized to avoid transmit underrun.
42.7.5.7.2 Usage
TWIHS High-speed mode usage is the same as the standard TWIHS (See Read/Write Flowcharts).
Clock
Stretching
PClk
Startup
PClk
PClk_request
SystemWakeUp_req
Clock
Stretching
S SADR R/W NA P
PClk
Startup
PClk
PClk_request
SystemWakeUp_req
Figure 42-41. Address Match and Data Match (Data Matching Enabled)
Address Matching + Data Matching Area
Clock
Stretching
PClk
Startup
PClk
PClk_request
SystemWakeUp_req
Figure 42-42. Address Match and No Data Match (Data Matching Enabled)
Address Matching + Data Matching Area
Clock
Stretching
PClk
Startup
PClk
PClk_request
SystemWakeUp_req
No
SVACC = 1 ? GACC = 1 ?
No SVREAD = 1 ?
No No
EOSACC = 1 ? No TXRDY= 1 ?
No Write in TWIHS_THR
TXCOMP = 1 ?
No
RXRDY= 1 ?
END
Read TWIHS_RHR
Decoding of the
programming sequence
Prog seq No
OK ?
Change SADR
Figure 42-44. Read Write Flowchart in Client Mode with SMBus PEC
No
SVACC = 1 ? GACC = 1 ?
No SVREAD = 1 ?
No No No
EOSACC = 1 ? TXRDY= 1 ?
RXRDY= 1 ?
No
TXCOMP = 1 ? Last data sent ?
Write in TWIHS_THR
END No
Write in PECRQ
Write in PECRQ
Read TWIHS_RHR
Decoding of the
programming sequence
Prog seq No
OK ?
Change SADR
Figure 42-45. Read Write Flowchart in Client Mode with SMBus PEC and Alternative Command Mode
No
SVACC = 1 ? GACC = 1 ?
No SVREAD = 1 ?
No No
EOSACC = 1 ? No TXRDY= 1 ?
No Write in TWIHS_THR
TXCOMP = 1 ?
No
RXRDY= 1 ?
END
Read TWIHS_RHR
Decoding of the
programming sequence
Prog seq No
OK ?
Change SADR
...........continued
Name: TWIHS_CR
Offset: 0x00
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
FIFODIS FIFOEN LOCKCLR THRCLR
Access W W W W
Reset – – – –
Bit 23 22 21 20 19 18 17 16
ACMDIS ACMEN
Access W W
Reset – –
Bit 15 14 13 12 11 10 9 8
CLEAR PECRQ PECDIS PECEN SMBDIS SMBEN HSDIS HSEN
Access W W W W W W W W
Reset – – – – – – – –
Bit 7 6 5 4 3 2 1 0
SWRST QUICK SVDIS SVEN MSDIS MSEN STOP START
Access W W W W W W W W
Reset – – – – – – – –
Value Description
1 Alternative Command mode enabled.
Value Description
1 The Client mode is disabled. The shifter and holding characters (if it contains data) are transmitted in
case of read operation. In write operation, the character being transferred must be completely received
before disabling.
Name: TWIHS_MMR
Offset: 0x04
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
DADR[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
MREAD IADRSZ[1:0]
Access R/W R/W R/W
Reset 0 0 0
Bit 7 6 5 4 3 2 1 0
Access
Reset
Name: TWIHS_SMR
Offset: 0x08
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
DATAMEN SADR3EN SADR2EN SADR1EN
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 23 22 21 20 19 18 17 16
SADR[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
MASK[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SCLWSDIS SMHH SMDA NACKEN
Access R/W R/W R/W R/W
Reset 0 0 0 0
Name: TWIHS_IADR
Offset: 0x0C
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
IADR[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
IADR[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
IADR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: TWIHS_CWGR
Offset: 0x10
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the TWIHS Write Protection Mode Register.
TWIHS_CWGR is used in Host mode only.
Bit 31 30 29 28 27 26 25 24
HOLD[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CKDIV[2:0]
Access R/W R/W R/W
Reset 0 0 0
Bit 15 14 13 12 11 10 9 8
CHDIV[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CLDIV[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: TWIHS_SR
Offset: 0x20
Reset: 0x03000009
Property: Read-only
Bit 31 30 29 28 27 26 25 24
SDA SCL
Access R R
Reset 1 1
Bit 23 22 21 20 19 18 17 16
SMBHHM SMBDAM PECERR TOUT MCACK
Access R R R R R
Reset 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
EOSACC SCLWS ARBLST NACK
Access R R R R
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
UNRE OVRE GACC SVACC SVREAD TXRDY RXRDY TXCOMP
Access R R R R R R R R
Reset 0 0 0 0 1 0 0 1
Value Description
1 An SMBus timeout occurred since the last read of TWIHS_SR.
Name: TWIHS_SMBTR
Offset: 0x38
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the TWIHS Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
THMAX[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
TLOWM[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
TLOWS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PRESC[3:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Name: TWIHS_FILTR
Offset: 0x44
Reset: 0x00000000
Property: Read/Write
TWIHS digital input filtering follows a majority decision based on three samples from SDA/SCL lines at peripheral
clock frequency.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
THRES[2:0]
Access R/W R/W R/W
Reset 0 0 0
Bit 7 6 5 4 3 2 1 0
PADFCFG PADFEN FILT
Access R/W R/W R/W
Reset 0 0 0
Name: TWIHS_IER
Offset: 0x24
Reset: –
Property: Write-only
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Enables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
SMBHHM SMBDAM PECERR TOUT MCACK
Access W W W W W
Reset – – – – –
Bit 15 14 13 12 11 10 9 8
EOSACC SCL_WS ARBLST NACK
Access W W W W
Reset – – – –
Bit 7 6 5 4 3 2 1 0
UNRE OVRE GACC SVACC TXRDY RXRDY TXCOMP
Access W W W W W W W
Reset – – – – – – –
Name: TWIHS_IDR
Offset: 0x28
Reset: –
Property: Write-only
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Disables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
SMBHHM SMBDAM PECERR TOUT MCACK
Access W W W W W
Reset – – – – –
Bit 15 14 13 12 11 10 9 8
EOSACC SCL_WS ARBLST NACK
Access W W W W
Reset – – – –
Bit 7 6 5 4 3 2 1 0
UNRE OVRE GACC SVACC TXRDY RXRDY TXCOMP
Access W W W W W W W
Reset – – – – – – –
Name: TWIHS_IMR
Offset: 0x2C
Reset: 0x00000000
Property: Read-only
The following configuration values are valid for all listed bit names of this register:
0: The corresponding interrupt is disabled.
1: The corresponding interrupt is enabled.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
SMBHHM SMBDAM PECERR TOUT MCACK
Access R R R R R
Reset 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
EOSACC SCL_WS ARBLST NACK
Access R R R R
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
UNRE OVRE GACC SVACC TXRDY RXRDY TXCOMP
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Name: TWIHS_RHR
Offset: 0x30
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
RXDATA[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: TWIHS_SWMR
Offset: 0x4C
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the TWIHS Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
DATAM[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
SADR3[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
SADR2[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SADR1[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Name: TWIHS_THR
Offset: 0x34
Reset: 0x00000000
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
TXDATA[7:0]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Name: TWIHS_WPMR
Offset: 0xE4
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
WPKEY[23:16]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WPKEY[15:8]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPKEY[7:0]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPEN
Access R/W
Reset 0
Name: TWIHS_WPSR
Offset: 0xE8
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
WPVSRC[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WPVSRC[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPVSRC[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPVS
Access R
Reset 0
43.1 Description
The Synchronous Serial Controller (SSC) provides a synchronous communication link with external devices. It
supports many serial synchronous communication protocols generally used in audio and telecommunications
applications such as I2S, Short Frame Sync, Long Frame Sync, etc.
The SSC contains an independent receiver and transmitter and a common clock divider. The receiver and the
transmitter each interface with three signals: the TD/RD signal for data, the TK/RK signal for the clock and the TF/RF
signal for the Frame Sync. The transfers can be programmed to start automatically or on different events detected on
the Frame Sync signal.
The SSC high-level of programmability and its use of DMA enable a continuous high bit rate data transfer without
processor intervention.
Featuring connection to the DMA, the SSC enables interfacing with low processor overhead to:
• Codecs in Host or Client mode
• DAC through dedicated serial interface, particularly I2S
• Magnetic card reader
System
Bus
Peripheral Bridge
DMA
Bus Clock
Peripheral
Bus
TF
TK
TD
Peripheral Clock
PMC
SSC Interface PIO
RF
RK
Interrupt Control
RD
SSC Interrupt
SSC
RD Clock SCK
RF Word Select WS
RK
Data SD MSB LSB MSB
RF
Serial Data Clock (SCLK)
Serial Data In
SSC
Data In
RD
RF
RK
CODEC
Second
Time Slot
Serial Data in
Before using the SSC transmitter, the PIO controller must be configured to dedicate the SSC transmitter I/O lines to
the SSC Peripheral mode.
43.7.3 Interrupt
The SSC interface has an interrupt line connected to the interrupt controller. Handling interrupts requires
programming the interrupt controller before configuring the SSC.
All SSC interrupts can be enabled/disabled configuring the SSC Interrupt Mask Register. Each pending and
unmasked SSC interrupt asserts the SSC interrupt line. The SSC interrupt service routine can get the interrupt
origin by reading the SSC Interrupt Status Register.
Transmitter
Clock Output
TK
Controller
Peripheral TK Input
Clock Clock Transmit Clock TX clock Frame Sync TF
Divider Controller Controller
RX clock
TXEN
TX Start Data
RX Start Start TD
Selector Controller
TF Transmit Shift Register
RK Input
Receive Clock RX Clock Frame Sync
Controller RF
Controller
TX Clock
RXEN
TX Start Start RX Start
Data
RF RD
Selector Receive Shift Register Controller
RC0R
To Interrupt Controller
SSC_CMR
The peripheral clock divider is determined by the 12-bit field DIV counter and comparator (so its maximal value is
4095) in the Clock Mode Register (SSC_CMR), allowing a peripheral clock division by up to 8190. The Divided Clock
is provided to both the receiver and the transmitter. When this field is programmed to 0, the Clock Divider is not used
and remains inactive.
When DIV is set to a value equal to or greater than 1, the Divided Clock has a frequency of peripheral clock divided
by 2 times DIV. Each level of the Divided Clock has a duration of the peripheral clock multiplied by DIV. This ensures
a 50% duty cycle for the Divided Clock regardless of whether the DIV value is even or odd.
Figure 43-8. Divided Clock Generation
Peripheral Clock
Divided Clock
DIV = 1
Peripheral Clock
Divided Clock
DIV = 3
Tri_state Clock
Controller Output
Receive MUX
Clock
Divider
Clock
CKO Data Transfer
CKS
INV Tri_state Transmit
MUX Controller Clock
CKI CKG
Tri_state Clock
Controller Output
Transmit MUX
Clock
Divider
Clock
CKO Data Transfer
CKS
INV Tri_state Receive
MUX Controller Clock
CKI CKG
SSC_TFMR.FSDEN
SSC_TCMR.STTDLY != 0 0 1 Transmit Clock
The receiver uses a shift register clocked by the receive clock signal and the start mode selected in the SSC_RCMR.
The data is transferred from the shift register depending on the data format selected.
When the receiver shift register is full, the SSC transfers this data in the holding register, the status flag RXRDY is set
in the SSC_SR and the data can be read in the receiver holding register. If another transfer occurs before read of the
Receive Holding Register (SSC_RHR), the status flag OVERUN is set in the SSC_SR and the receiver shift register
is transferred in the SSC_RHR.
Figure 43-12. Receive Block Diagram
SSC_CR.RXEN
SSC_SR.RXEN
SSC_CR.RXDIS
SSC_TCMR.START
SSC_RCMR.START SSC_RFMR.MSBF
TXEN SSC_RFMR.DATNB
RXEN
RX Start Start RX Start
Selector Start RX Controller
RF RF Selector
RC0R RD
SSC_RCMR.STTDLY != 0
load SSC_RSHR load SSC_RHR Receive Clock
SSC_RFMR.FSLEN SSC_RFMR.DATLEN
RX Controller counter reached STTDLY
43.8.4 Start
The transmitter and receiver can both be programmed to start their operations when an event occurs, respectively
in the Transmit Start Selection (START) field of SSC_TCMR and in the Receive Start Selection (START) field of
SSC_RCMR.
Under the following conditions the start event is independently programmable:
• Continuous. In this case, the transmission starts as soon as a word is written in SSC_THR and the reception
starts as soon as the receiver is enabled.
• Synchronously with the transmitter/receiver
• On detection of a falling/rising edge on TF/RF
• On detection of a low level/high level on TF/RF
• On detection of a level change or an edge on TF/RF
A start can be programmed in the same manner on either side of the Transmit/Receive Clock Register (SSC_RCMR/
SSC_TCMR). Thus, the start could be on TF (Transmit) or RF (Receive).
Moreover, the receiver can start when data is detected in the bit stream with the Compare Functions.
Detection on TF/RF input/output is done by the field FSOS of the Transmit/Receive Frame Mode Register
(SSC_TFMR/SSC_RFMR).
TF
(Input)
TD
Start = Low Level on TF X BO B1
(Output)
STTDLY
TD
Start = Level Change on TF X BO B1 BO B1
(Output)
STTDLY
TD
Start = Any Edge on TF (Output) X BO B1 BO B1
STTDLY
RF
(Input)
RD
Start = Low Level on RF X BO B1
(Input)
STTDLY
RD
Start = Rising Edge on RF X BO B1
(Input)
STTDLY
RD
Start = Any Edge on RF X BO B1 BO B1
(Input)
STTDLY
RK
Figure 43-16. Transmit and Receive Frame Format in Edge/Pulse Start Modes
Start Start
PERIOD
(1)
TF/RF
FSLEN
DATNB
DATLEN DATLEN
RD Data Data
To SSC_RHR To SSC_RHR
DATLEN DATLEN
43.8.9 Interrupt
Most bits in the SSC_SR have a corresponding bit in interrupt management registers.
The SSC can be programmed to generate an interrupt when it detects an event. The interrupt is controlled by writing
the Interrupt Enable Register (SSC_IER) and Interrupt Disable Register (SSC_IDR). These registers enable and
disable, respectively, the corresponding interrupt by setting and clearing the corresponding bit in the Interrupt Mask
Register (SSC_IMR), which controls the generation of interrupts by asserting the SSC interrupt line connected to the
interrupt controller.
Figure 43-19. Interrupt Block Diagram
SSC_IMR
SSC_IER SSC_IDR
Set Clear
Transmitter
TXRDY
TXEMPTY
TXSYN
Interrupt SSC Interrupt
Control
Receiver
RXRDY
OVRUN
RXSYN
...........continued
Name: SSC_CR
Offset: 0x0
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
SWRST TXDIS TXEN
Access W W W
Reset – – –
Bit 7 6 5 4 3 2 1 0
RXDIS RXEN
Access W W
Reset – –
Name: SSC_CMR
Offset: 0x4
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the SSC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
DIV[11:8]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DIV[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: SSC_RCMR
Offset: 0x10
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the SSC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
PERIOD[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
STTDLY[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
STOP START[3:0]
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CKG[1:0] CKI CKO[2:0] CKS[1:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: SSC_RFMR
Offset: 0x14
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the SSC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
FSLEN_EXT[3:0] FSEDGE
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
FSOS[2:0] FSLEN[3:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
DATNB[3:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
MSBF LOOP DATLEN[4:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Name: SSC_TCMR
Offset: 0x18
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the SSC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
PERIOD[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
STTDLY[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
START[3:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CKG[1:0] CKI CKO[2:0] CKS[1:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: SSC_TFMR
Offset: 0x1C
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the SSC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
FSLEN_EXT[3:0] FSEDGE
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
FSDEN FSOS[2:0] FSLEN[3:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
DATNB[3:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
MSBF DATDEF DATLEN[4:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Name: SSC_RHR
Offset: 0x20
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
RDAT[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RDAT[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RDAT[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RDAT[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: SSC_THR
Offset: 0x24
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
TDAT[31:24]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
TDAT[23:16]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
TDAT[15:8]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TDAT[7:0]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 –
Name: SSC_RSHR
Offset: 0x30
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RSDAT[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RSDAT[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: SSC_TSHR
Offset: 0x34
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
TSDAT[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TSDAT[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: SSC_RC0R
Offset: 0x38
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the SSC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
CP0[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CP0[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: SSC_RC1R
Offset: 0x3C
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the SSC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
CP1[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CP1[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: SSC_SR
Offset: 0x40
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
RXEN TXEN
Access R R
Reset 0 0
Bit 15 14 13 12 11 10 9 8
RXSYN TXSYN CP1 CP0
Access R R R R
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
OVRUN RXRDY TXEMPTY TXRDY
Access R R R R
Reset 0 0 0 0
Bit 9 – CP1 Compare 1
Value Description
0 A compare 1 has not occurred since the last read of the Status Register.
1 A compare 1 has occurred since the last read of the Status Register.
Bit 8 – CP0 Compare 0
Value Description
0 A compare 0 has not occurred since the last read of the Status Register.
Value Description
1 A compare 0 has occurred since the last read of the Status Register.
Name: SSC_IER
Offset: 0x44
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RXSYN TXSYN CP1 CP0
Access W W W W
Reset – – – –
Bit 7 6 5 4 3 2 1 0
OVRUN RXRDY TXEMPTY TXRDY
Access W W W W
Reset – – – –
Value Description
1 Enables the Receive Ready Interrupt.
Name: SSC_IDR
Offset: 0x48
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RXSYN TXSYN CP1 CP0
Access W W W W
Reset – – – –
Bit 7 6 5 4 3 2 1 0
OVRUN RXRDY TXEMPTY TXRDY
Access W W W W
Reset – – – –
Value Description
1 Disables the Receive Ready Interrupt.
Name: SSC_IMR
Offset: 0x4C
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RXSYN TXSYN CP1 CP0
Access R R R R
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
OVRUN RXRDY TXEMPTY TXRDY
Access R R R R
Reset 0 0 0 0
Value Description
1 The Receive Ready Interrupt is enabled.
Name: SSC_WPMR
Offset: 0xE4
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
WPKEY[23:16]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WPKEY[15:8]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPKEY[7:0]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPEN
Access R/W
Reset 0
Name: SSC_WPSR
Offset: 0xE8
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
WPVSRC[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPVSRC[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPVS
Access R
Reset 0
44.1 Description
The Inter-IC Sound Controller (I2SC) provides a 5-wire, bidirectional, synchronous, digital audio link to external audio
devices: I2SC_DI, I2SC_DO, I2SC_WS, I2SC_CK, and I2SC_MCK pins.
The I2SC is compliant with the Inter-IC Sound (I2S) bus specification.
The I2SC consists of a receiver, a transmitter and a common clock generator that can be enabled separately to
provide Host, Client or Controller modes with receiver and/or transmitter active.
DMA Controller channels, separate for the receiver and for the transmitter, allow a continuous high bit rate data
transfer without processor intervention to the following:
• Audio CODECs in Host, Client, or Controller mode
• Stereo DAC or ADC through a dedicated I2S serial interface
The I2SC can use either a single DMA Controller channel for both audio channels or one DMA Controller channel per
audio channel.
The 8- and 16-bit compact stereo format reduces the required DMA Controller bandwidth by transferring the left and
right samples within the same data word.
In Host mode, the I2SC can produce a 32 fs to 1024 fs Host clock that provides an over-sampling clock to an external
audio codec or digital signal processor (DSP).
Receiver I2SC_DI
DMA Events
Controller
(1) For the value of ‘PID’, refer to I2SCx in the table “Peripheral Identifiers”.
Related Links
14.1. Peripheral Identifiers
44.5.3 Clocks
The clock for the I2SC bus interface is generated by the Power Management Controller (PMC). I2SC must be
disabled before disabling the clock to avoid freezing the I2SC in an undefined state.
44.6.1 Initialization
The I2SC features a receiver, a transmitter and a clock generator for Host and Controller modes. Receiver and
transmitter share the same serial clock and word select.
Before enabling the I2SC, the selected configuration must be written to the I2SC Mode Register (I2SC_MR) and to
the Peripheral Clock Configuration Register (CCFG_PCCR) described in the section “Bus Matrix (MATRIX)”.
If the I2SC_MR.IMCKMODE bit is set, the I2SC_MR.IMCKFS field must be configured as described in section “Serial
Clock and Word Select Generation”.
Once the I2SC_MR has been written, the I2SC clock generator, receiver, and transmitter can be enabled by writing
a ’1’ to the CKEN, RXEN, and TXEN bits in the Control Register (I2SC_CR). The clock generator can be enabled
alone in Controller mode to output clocks to the I2SC_MCK, I2SC_CK, and I2SC_WS pins. The clock generator must
also be enabled if the receiver or the transmitter is enabled.
The clock generator, receiver, and transmitter can be disabled independently by writing a ’1’ to I2SC_CR.CXDIS,
I2SC_CR.RXDIS and/or I2SC_CR.TXDIS, respectively. Once requested to stop, they stop only when the
transmission of the pending frame transmission is completed.
Related Links
19. Bus Matrix (MATRIX)
Serial Clock
I2SC_CK
Word Select
I2SC_WS
Data
MSB LSB MSB
I2SC_DI/
I2SC_DO
Serial Clock
I2SC_CK
Word Select
I2SC_WS
Data
I2SC_DI/I2SC_DO MSB LSB MSB
Example: If the sampling rate is 44.1 kHz with an I2S Host clock (I2SC_MCK) ratio of 256, the core frequency must
be an integer multiple of 11.2896 MHz. Assuming an integer multiple of 4, the IMCKDIV field must be configured to 4;
the field IMCKFS must then be set to 31.
The serial clock (I2SC_CK) frequency is 2 × Slot Length times the sample frequency (fs), where Slot Length is
defined in the following table.
Table 44-2. Slot Length
I2SC_MR.IMCKMODE must be written to ’1’ if the Host clock frequency is strictly higher than the serial
WARNING
clock.
If a Host clock output is not required, the MCK clock is used as I2SC_CK by clearing I2SC_MR.IMCKMODE.
Alternatively, if the frequency of the MCK clock used is a multiple of the required I2SC_CK frequency, the I2SC_MCK
to I2SC_CK divider can be used with the ratio defined by writing the I2SC_MR.IMCKFS field.
The I2SC_WS pin is used as word select as described in section “I2S Reception and Transmission Sequence”.
I2SC
I2SC_CR.CKEN/CKDIS I2SC_MR.IMCKMODE
I2SC_MR.IMCKDIV
Peripheral
0 Selected Clock Clock Clock
Clock
Enable Divider I2SC_MCK
GCLK[PID] 1
Clock
I2SC_MR.IMCKMODE I2SC_MR.IMCKFS
Divider
I2SC_MR.DATALENGTH
0 1
I2SC_CK
Host
i2sck_in
0 Clock
Internal
Enable
i2sck_in 1 bit clock
Client
Clock
I2SC_CR.CKEN/CKDIS Divider I2SC_MR.DATALENGTH
I2SC_MR.MODE
I2SC_WS
i2sws_in
0 Internal
word clock
i2sws_in 1
Client
44.6.6 Mono
When the Transmit Mono bit (TXMONO) in I2SC_MR is set, data written to the left channel is duplicated to the right
output channel.
When the Receive Mono bit (RXMONO) in I2SC_MR is set, data received from the left channel is duplicated to the
right channel.
44.6.10 Interrupts
An I2SC interrupt request can be triggered whenever one or several of the following bits are set in I2SC_SR: Receive
Ready (RXRDY), Receive Overrun (RXOR), Transmit Ready (TXRDY) or Transmit Underrun (TXUR).
The interrupt request is generated if the corresponding bit in the Interrupt Mask Register (I2SC_IMR) is set.
Bits in I2SC_IMR are set by writing a ’1’ to the corresponding bit in I2SC_IER and cleared by writing a ’1’ to
the corresponding bit in the Interrupt Disable Register (I2SC_IDR). The interrupt request remains active until the
corresponding bit in I2SC_SR is cleared by writing a ’1’ to the corresponding bit in the Status Clear Register
(I2SC_SCR).
For debug purposes, interrupt requests can be simulated by writing a ’1’ to the corresponding bit in the Status Set
Register (I2SC_SSR).
Figure 44-4. Interrupt Block Diagram
Set Clear
I2SC_IER I2SC_IMR I2SC_IDR
Transmitter
TXRDY
TXUR
Interrupt
Logic
I2SC interrupt line
Receiver
RXRDY
RXOR
I2SC_DI
Serial Clock
Word Select
Serial Clock
I2SC_CK SCK
I2SC_DO
Serial Data In
I2SC_DI SD
I2S Microphone
for Right Channel
SCK
Tied to 0
WS L/R
SD
Serial Clock
Serial Data In
Word Select
I2SC_WS LRCLK/WCLK
Serial Data In
I2SC_DI ADC_SDATA/DOUT
Serial Clock
Serial Data In
Name: I2SC_CR
Offset: 0x00
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
SWRST TXDIS TXEN CKDIS CKEN RXDIS RXEN
Access W W W W W W W
Reset – – – – – – –
Value Description
1 Writing a ’1’ to this bit disables the I2SC receiver. Bit I2SC_SR.RXEN is cleared when the receiver is
stopped.
Name: I2SC_MR
Offset: 0x04
Reset: 0x00000000
Property: Read/Write
The I2SC_MR must be written when the I2SC is stopped. The proper sequence is to write to I2SC_MR, then write to
I2SC_CR to enable the I2SC or to disable the I2SC before writing a new value to I2SC_MR.
Bit 31 30 29 28 27 26 25 24
IWS IMCKMODE IMCKFS[5:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
IMCKDIV[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
TXSAME TXDMA TXMONO RXLOOP RXDMA RXMONO
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DATALENGTH[2:0] MODE
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 13 – TXDMA Single or Multiple DMA Controller Channels for TransmitterDMA Controller Channels for Transmitter
Value Description
0 The transmitter uses only one DMA Controller channel for all audio channels.
1 The transmitter uses one DMA Controller channel per audio channel.
Name: I2SC_SR
Offset: 0x08
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
TXURCH[1:0]
Access R R
Reset 0 0
Bit 15 14 13 12 11 10 9 8
RXORCH[1:0]
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
TXUR TXRDY TXEN RXOR RXRDY RXEN
Access R R R R R R
Reset 0 0 0 0 0 0
Value Description
0 This bit is cleared when the corresponding bit in I2SC_SCR is written to ’1’.
1 This bit is set when an overrun error occurs on I2SC_RHR or when the corresponding bit in I2SC_SSR
is written to ’1’.
Name: I2SC_SCR
Offset: 0x0C
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
TXURCH[1:0]
Access W W
Reset – –
Bit 15 14 13 12 11 10 9 8
RXORCH[1:0]
Access W W
Reset – –
Bit 7 6 5 4 3 2 1 0
TXUR RXOR
Access W W
Reset – –
Name: I2SC_SSR
Offset: 0x10
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
TXURCH[1:0]
Access W W
Reset – –
Bit 15 14 13 12 11 10 9 8
RXORCH[1:0]
Access W W
Reset – –
Bit 7 6 5 4 3 2 1 0
TXUR RXOR
Access W W
Reset – –
Name: I2SC_IER
Offset: 0x14
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
TXUR TXRDY RXOR RXRDY
Access W W W W
Reset – – – –
Name: I2SC_IDR
Offset: 0x18
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
TXUR TXRDY RXOR RXRDY
Access W W W W
Reset – – – –
Name: I2SC_IMR
Offset: 0x1C
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
TXUR TXRDY RXOR RXRDY
Access R R R R
Reset 0 0 0 0
Name: I2SC_RHR
Offset: 0x20
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
RHR[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RHR[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RHR[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RHR[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: I2SC_THR
Offset: 0x24
Property: Write-only
Bit 31 30 29 28 27 26 25 24
THR[31:24]
Access W W W W W W W W
Reset – – – – – – – –
Bit 23 22 21 20 19 18 17 16
THR[23:16]
Access W W W W W W W W
Reset – – – – – – – –
Bit 15 14 13 12 11 10 9 8
THR[15:8]
Access W W W W W W W W
Reset – – – – – – – –
Bit 7 6 5 4 3 2 1 0
THR[7:0]
Access W W W W W W W W
Reset – – – – – – – –
45.1 Description
The Universal Synchronous Asynchronous Receiver Transceiver (USART) provides one full duplex universal
synchronous asynchronous serial link. Data frame format is widely programmable (data length, parity, number of
stop bits) to support a maximum of standards. The receiver implements parity error, framing error and overrun error
detection. The receiver timeout enables handling variable-length frames and the transmitter timeguard facilitates
communications with slow remote devices. Multidrop communications are also supported through address bit
handling in reception and transmission.
The USART features three test modes: Remote Loopback, Local Loopback, and Automatic Echo.
The USART supports specific operating modes providing interfaces on RS485, LIN, LON, and SPI buses, with
ISO7816 T = 0 or T = 1 smart card slots, infrared transceivers and connection to modem ports. The hardware
handshaking feature enables an out-of-band flow control using the RTS and CTS pins.
The USART supports the connection to the DMA Controller, which enables data transfers to the transmitter and from
the receiver. The DMAC provides chained buffer management without any intervention of the processor.
45.2 Features
The following are key features of the USART:
• Programmable Baud Rate Generator
• 5-bit to 9-bit Full-duplex Synchronous or Asynchronous Serial Communications
– 1, 1.5 or 2 Stop Bits in Asynchronous Mode or 1 or 2 Stop Bits in Synchronous Mode
– Parity Generation and Error Detection
– Framing Error Detection, Overrun Error Detection
– Digital Filter on Receive Line
– MSB or LSB first
– Optional Break Generation and Detection
– By 8 or 16 Oversampling Receiver Frequency
– Optional Hardware Handshaking RTS-CTS
– Optional Modem Signal Management DTR-DSR-DCD-RI
– Receiver Timeout and Transmitter Timeguard
– Optional Multidrop Mode with Address Generation and Detection
• RS485 with Driver Control Signal
• ISO7816, T = 0 or T = 1 Protocols for Interfacing with Smart Cards
– NACK Handling, Error Counter with Repetition and Iteration Limit
• IrDA Modulation and Demodulation
– Communication at up to 115.2 kbits
• SPI Mode
– Host or Client
– Serial Clock Programmable Phase and Polarity
– SPI Serial Clock (SCK) Frequency up to fperipheral clock/6
• LIN Mode
– Compliant with LIN 1.3 and LIN 2.0 SPECIFICATIONS
– Host or Client
– Processing of Frames with up to 256 Data Bytes
– Response Data Length can be Configurable or Defined Automatically by the Identifier
– Self-synchronization in Client Node Configuration
– Automatic Processing and Verification of the “Synch Break” and the “Synch Field”
– “Synch Break” Detection Even When Partially Superimposed with a Data Byte
– Automatic Identifier Parity Calculation/Sending and Verification
– Parity Sending and Verification Can be Disabled
– Automatic Checksum Calculation/sending and Verification
– Checksum Sending and Verification Can be Disabled
– Support Both “Classic” and “Enhanced” Checksum Types
– Full LIN Error Checking and Reporting
– Frame Slot Mode: Host Allocates Slots to the Scheduled Frames Automatically
– Generation of the Wakeup Signal
• LON Mode
– Compliant with CEA-709 Specification
– Full-layer 2 Implementation
– Differential Manchester Encoding/Decoding (CDP)
– Preamble Generation Including Bit- and Byte-sync Fields
– LON Timings Handling (beta1, beta2, IDT, etc.)
– CRC Generation and Checking
– Automated Random Number Generation
– Backlog Calculation and Update
– Collision Detection Support
– Supports Both comm_type=1 and comm_type=2 Modes
– Clock Drift Tolerance Up to 16%
– Optimal for Node-to-Node Communication (no embedded digital line filter)
• Test Modes
– Remote Loopback, Local Loopback, Automatic Echo
• Supports Connection of:
– Two DMA Controller Channels (DMAC)
• Offers Buffer Transfer without Processor Intervention
• Register Write Protection
RXD
Receiver
Channel
RTS
(Peripheral)
DMA Controller
TXD
Channel Transmitter
CTS
DTR
Modem DSR
Signals
Bus clock
Bridge Control DCD
RI
APB User
Interface
SCK
Baud Rate
Peripheral clock Generator
PCK
Source Clock Expected Baud Rate Calculation Result CD Actual Baud Rate Error
(MHz) (bit/s) (bit/s)
...........continued
Source Clock Expected Baud Rate Calculation Result CD Actual Baud Rate Error
(MHz) (bit/s) (bit/s)
In this example, the baud rate is calculated with the following formula:
Baud Rate = Selected Clock/CD × 16
The baud rate error is calculated with the following formula. It is not recommended to work with an error higher than
5%.
Expected Baud Rate
Error = 1 −
Actual Baud Rate
USCLKS Modulus
CD
Control
FP
MCK CD SCK
0 (CLKO = 1)
MCK/DIV Selected
1 Clock
Reserved 16-bit Counter
2 Glitch-free FIDI
Logic >1 SYNC
3 OVER
1 0
SCK Selected Clock
(CLKO = 0) 0 0 Sampling 0
Divider
Baud Rate
1 Clock
1
SYNC Sampling
USCLKS = 3 Clock
When the value of US_BRGR.FP is greater than '0', the SCK (oversampling clock) generates non-constant
WARNING
duty cycles. The SCK high duration is increased by “selected clock” period from time to time. The duty
cycle depends on the value of USART_BRGR.CD.
Baud Rate = Selected Clock
CD
In Synchronous mode, if the external clock is selected (USCLKS = 3), the clock is provided directly by the signal
on the USART SCK pin. No division is active. The value written in US_BRGR has no effect. The external clock
frequency must be at least 3 times lower than the system clock. In Host mode, Synchronous mode (USCLKS = 0
or 1, CLKO set to 1), the receive part limits the SCK maximum frequency to Selected Clock/3 in USART mode, or
Selected Clock/6 in SPI mode.
When either the external clock SCK or the internal clock divided (peripheral clock/DIV) is selected, the value of CD
must be even if the user has to ensure a 50:50 mark/space ratio on the SCK pin. When the peripheral clock is
selected, the baud rate generator ensures a 50:50 duty cycle on the SCK pin, even if the value of CD is odd.
B = Di × f
Fi
where:
• B is the bit rate
• Di is the bit-rate adjustment factor
• Fi is the clock frequency division factor
• f is the ISO7816 clock frequency (Hz)
Di is a binary value encoded on a 4-bit field, named DI, as represented in Table 45-3.
Table 45-3. Binary and Decimal Values for Di
Fi is a binary value encoded on a 4-bit field, named FI, as represented in Table 45-4.
Table 45-4. Binary and Decimal Values for Fi
FI field 0000 0001 0010 0011 0100 0101 0110 1001 1010 1011 1100 1101
Fi (decimal) 372 372 558 744 1116 1488 1860 512 768 1024 1536 2048
Table 45-5 shows the resulting Fi/Di ratio, which is the ratio between the ISO7816 clock and the baud rate clock.
Table 45-5. Possible Values for the Fi/Di Ratio
Fi/Di 372 558 744 1116 1488 1806 512 768 1024 1536 2048
1 372 558 744 1116 1488 1860 512 768 1024 1536 2048
2 186 279 372 558 744 930 256 384 512 768 1024
4 93 139.5 186 279 372 465 128 192 256 384 512
8 46.5 69.75 93 139.5 186 232.5 64 96 128 192 256
If the USART is configured in ISO7816 mode, the clock selected by US_MR.USCLKS is first divided by the value
programmed in US_BRGR.CD. The resulting clock can be provided to the SCK pin to feed the smart card clock
inputs. This means that the US_MR.CLKO bit can be written to ‘1’.
This clock is then divided by the value programmed in the FI_DI_RATIO field in the FI DI Ratio register (US_FIDI).
This is performed by the Sampling Divider, which performs a division by up to 2047 in ISO7816 mode. The
noninteger values of the Fi/Di ratio are not supported and the user must program FI_DI_RATIO to a value as close as
possible to the expected value.
FI_DI_RATIO resets to the value 0x174 (372 in decimal) and is the most common divider between the ISO7816 clock
and the bit rate (Fi = 372, Di = 1).
The following figure shows the relation between the Elementary Time Unit, corresponding to a bit time, and the ISO
7816 clock.
Figure 45-4. Elementary Time Unit (ETU)
FI_DI_RATIO
ISO7816 Clock Cycles
ISO7816 Clock
on SCK
1 ETU
The number of data bits is configured in the US_MR.CHRL and the US_MR.MODE9. Nine bits are selected by writing
a ‘1’ to US_MR.MODE9 regardless of the CHRL field. The parity is selected by US_MR.PAR. Even, odd, space,
marked or none parity bit can be configured. US_MR.MSBF configures which data bit is sent first. If written to ‘1’, the
most significant bit is sent first. If written to ‘0’, the less significant bit is sent first. The number of stop bits is selected
by US_MR.NBSTOP. The 1.5 stop bit is supported in Asynchronous mode only.
Figure 45-5. Character Transmit
Example: 8-bit, Parity Enabled, One Stop
Baud Rate
Clock
TXD
TXD
Start Parity Stop Start Parity Stop
D0 D1 D2 D3 D4 D5 D6 D7 D0 D1 D2 D3 D4 D5 D6 D7
Bit Bit Bit Bit Bit Bit
Write
US_THR
TXRDY
TXEMPTY
Manchester
Encoded TXD
Data
The Manchester encoded character can also be encapsulated by adding both a configurable preamble and a
start frame delimiter pattern. Depending on the configuration, the preamble is a training sequence, composed of
a predefined pattern with a programmable length from 1 to 15 bit times. If the preamble length is set to '0', the
preamble waveform is not generated prior to any character. The preamble pattern is chosen among the following
sequences: ALL_ONE, ALL_ZERO, ONE_ZERO or ZERO_ONE by configuring US_MAN.TX_PP. US_MAN.TX_PL
is used to configure the preamble length. Figure 45-8 illustrates and defines the valid patterns. To improve flexibility,
the encoding scheme can be configured using US_MAN.TX_MPOL. If TX_MPOL is set to ‘0’ (default), a logic zero is
encoded with a zero-to-one transition and a logic one is encoded with a one-to-zero transition. If TX_MPOL is set to
‘1’, a logic one is encoded with a one-to-zero transition and a logic zero is encoded with a zero-to-one transition.
Figure 45-8. Preamble Patterns, Default Polarity Assumed
Manchester
Encoded SFD DATA
Data TXD
Manchester
Encoded SFD DATA
TXD
Data
Manchester
Encoded SFD
Data TXD DATA
Manchester
Encoded DATA
SFD
Data TXD
SFD
Manchester
Encoded DATA
Data TXD
One bit
start frame delimiter
SFD
Manchester
Encoded DATA
TXD
Data
Command Sync
start frame delimiter
SFD
Manchester
Encoded DATA
Data TXD
Data Sync
start frame delimiter
RXD
Sampling
point
Expected edge
Sampling
Clock (x16)
RXD
Sampling
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
D0
Start Sampling
Detection
RXD
Sampling
1 2 3 4 5 6 7 0 1 2 3 4
Start
Rejection
Baud Rate
Clock
RXD
Start 16 16 16 16 16 16 16 16 16 16
Detection samples samples samples samples samples samples samples samples samples samples
D0 D1 D2 D3 D4 D5 D6 D7 Parity Stop
Bit Bit
Manchester
Encoded
Data TXD
Start
Detection
1 2 3 4
The receiver is activated and starts preamble and frame delimiter detection, sampling the data at one quarter and
then three quarters. If a valid preamble pattern or start frame delimiter is detected, the receiver continues decoding
with the same synchronization. If the stream does not match a valid pattern or a valid start frame delimiter, the
receiver resynchronizes on the next valid edge.The minimum time threshold to estimate the bit value is three quarters
of a bit time.
If a valid preamble (if used) followed with a valid start frame delimiter is detected, the incoming stream is decoded
into NRZ data and passed to the USART for processing. Figure 45-14 illustrates Manchester pattern mismatch.
When incoming data stream is passed to the USART, the receiver is also able to detect Manchester code violation.
A code violation is a lack of transition in the middle of a bit cell. In this case, the US_CSR.MANERR flag is raised. It
is cleared by writing a ‘1’ to US_CR.RSTSTA. See Figure 45-15 for an example of Manchester error detection during
data phase.
Figure 45-14. Preamble Pattern Mismatch
Preamble Mismatch Preamble Mismatch
Manchester coding error invalid pattern
Manchester
Encoded SFD DATA
Data TXD
Sampling points
ASK/FSK
Upstream Receiver
Upstream
LNA Serial
Emitter VCO Configuration
RF filter Interface
Demod
ASK/FSK
Downstream Transmitter
Manchester USART
Downstream Encoder Emitter
Receiver PA
RF filter
Mod
VCO
Control
The USART peripheral is configured as a Manchester encoder/decoder. Looking at the downstream communication
channel, Manchester encoded characters are serially sent to the RF emitter. This may also include a user defined
preamble and a start frame delimiter. Mostly, preamble is used in the RF receiver to distinguish between a valid data
from a transmitter and signals due to noise. The Manchester stream is then modulated. See Figure 45-17 for an
example of ASK modulation scheme. When a logic one is sent to the ASK modulator, the power amplifier, referred
to as PA, is enabled and transmits an RF signal at downstream frequency. When a logic zero is transmitted, the RF
signal is turned off. If the FSK modulator is activated, two different frequencies are used to transmit data. When a
logic one is sent, the modulator outputs an RF signal at frequency F0 and switches to F1 if the data sent is a zero.
See Figure 45-18.
From the receiver side, another carrier frequency is used. The RF receiver performs a bit check operation examining
demodulated data stream. If a valid pattern is detected, the receiver switches to Receiving mode. The demodulated
stream is sent to the Manchester decoder. Because of bit checking inside RF IC, the data transferred to the
microcontroller is reduced by a user-defined number of bits. The Manchester preamble length is to be defined in
accordance with the RF IC configuration.
Figure 45-17. ASK Modulator Output
1 0 0 1
NRZ Stream
Manchester
Encoded Data
Default Polarity TXD
Unipolar Output
Manchester
Encoded Data
Default Polarity TXD
Unipolar Output
Baud Rate
Clock
RXD
Sampling
Start D0 D1 D2 D3 D4 D5 D6 D7 Stop Bit
Parity Bit
Baud Rate
Clock
RXD
Start Parity Stop Start Parity Stop
D0 D1 D2 D3 D4 D5 D6 D7 D0 D1 D2 D3 D4 D5 D6 D7
Bit Bit Bit Bit Bit Bit
RSTSTA = 1
Write
US_CR
Read
US_RHR
RXRDY
OVRE
45.6.3.8 Parity
The USART supports five Parity modes. The PAR field also enables Multidrop mode, see “Multidrop Mode”. Even and
odd parity bit generation and error detection are supported. The configuration is done in US_MR.PAR.
If even parity is selected, the parity generator of the transmitter drives the parity bit to 0 if a number of 1s in the
character data bit is even, and to 1 if the number of 1s is odd. Accordingly, the receiver parity checker counts
the number of received 1s and reports a parity error if the sampled parity bit does not correspond. If odd parity is
selected, the parity generator of the transmitter drives the parity bit to 1 if a number of 1s in the character data bit is
even, and to 0 if the number of 1s is odd. Accordingly, the receiver parity checker counts the number of received 1s
and reports a parity error if the sampled parity bit does not correspond. If the mark parity is used, the parity generator
of the transmitter drives the parity bit to 1 for all characters. The receiver parity checker reports an error if the parity
bit is sampled to 0. If the space parity is used, the parity generator of the transmitter drives the parity bit to 0 for
all characters. The receiver parity checker reports an error if the parity bit is sampled to 1. If parity is disabled, the
transmitter does not generate any parity bit and the receiver does not report any parity error.
The following table shows an example of the parity bit for the character 0x41 (character ASCII “A”) depending on the
configuration of the USART. Because there are two bits set to 1 in the character value, the parity bit is set to ‘1’ when
the parity is odd, or configured to ‘0’ when the parity is even.
Table 45-6. Parity Bit Examples
When the receiver detects a parity error, it sets US_CSR.PARE (Parity Error). PARE can be cleared by writing a ‘1’ to
the RSTSTA bit the US_CR. The following figure illustrates the parity bit status setting and clearing.
Figure 45-21. Parity Error
Baud Rate
Clock
RXD
Start Bad Stop
D0 D1 D2 D3 D4 D5 D6 D7
Bit Parity Bit
Bit RSTSTA = 1
Write
US_CR
Parity Error
Detect
PARE Time Flags
Report
Time
RXRDY
The transmitter sends an address byte (parity bit set) when US_CR.SENDA = 1. In this case, the next byte written
to US_THR is transmitted as an address. Any character written in the US_THR without having written SENDA is
transmitted normally with the parity at 0.
Baud Rate
Clock
TXD
Start Parity Stop Start Parity Stop
D0 D1 D2 D3 D4 D5 D6 D7 D0 D1 D2 D3 D4 D5 D6 D7
Bit Bit Bit Bit Bit Bit
Write
US_THR
TXRDY
TXEMPTY
The following table indicates the maximum length of a timeguard period that the transmitter can handle depending on
the baud rate.
Table 45-7. Maximum Timeguard Length Depending on Baud Rate
The timeout delay period (during which the receiver waits for a new character) is programmed in the TO field
of the Receiver Timeout register (US_RTOR). If TO is written to ‘0’, the Receiver Timeout is disabled and no
timeout is detected. US_CSR.TIMEOUT remains at ‘0’. Otherwise, the receiver loads a 16-bit counter with the
value programmed in US_RTOR.TO. This counter is decremented at each bit period and reloaded each time a new
character is received. If the counter reaches 0, TIMEOUT rises. Then, the user can either:
• Stop the counter clock until a new character is received. This is performed by writing a ‘1’ to US_CR.STTTO.
In this case, the idle state on RXD before a new character is received will not provide a timeout. This prevents
having to handle an interrupt before a character is received and allows waiting for the next idle state on RXD
after a frame is received.
• Obtain an interrupt while no character is received. This is performed by writing a ‘1’ to the RETTO (Reload and
Start Timeout) bit in the US_CR. In this case, the counter starts counting down immediately from the value TO.
This generates a periodic interrupt so that a user timeout can be handled, for example when no key is pressed
on a keyboard.
The following figure shows the block diagram of the Receiver Timeout feature.
Figure 45-23. Receiver Timeout Block Diagram
Baud Rate TO
Clock
16-bit
Value
1 D Q Clock 16-bit Timeout
Counter
STTTO = TIMEOUT
Load 0
Clear
Character
Received
RETTO
The following table provides the maximum timeout period for some standard baud rates.
Table 45-8. Maximum Timeout Period
Baud Rate
Clock
RXD
Start Parity Stop
D0 D1 D2 D3 D4 D5 D6 D7
Bit Bit Bit
RSTSTA = 1
Write
US_CR
FRAME
RXRDY
TXD
Start Parity Stop
Bit
D0 D1 D2 D3 D4 D5 D6 D7
Bit Bit
Break Transmission End of Break
STTBRK = 1 STPBRK = 1
Write
US_CR
TXRDY
TXEMPTY
Setting the USART to operate with hardware handshaking is performed by writing the value 0x2 to
US_MR.USART_MODE.
When hardware handshaking is enabled, the USART displays similar behavior as in standard Synchronous or
Asynchronous modes, with the difference that the receiver drives the RTS pin and the level on the CTS pin modifies
the behavior of the transmitter, as shown in the following figures. The transmitter can handle hardware handshaking
in any case.
Figure 45-27. RTS Line Software Control when US_MR.USART_MODE = 2
RXD
Write
US_CR.RTSDIS
Write
US_CR.RTSEN
RTS
The following figure shows how the transmitter operates if hardware handshaking is enabled. The CTS pin disables
the transmitter. If a character is being processed, the transmitter is disabled only after the completion of the current
character and transmission of the next character occurs as soon as the pin CTS falls.
TXD
45.6.4.1 Overview
The ISO7816 is a half duplex communication on only one bidirectional line. The baud rate is determined by a division
of the clock provided to the remote device (see 45.6.1. Baud Rate Generator).
The USART connects to a smart card as shown in the figure below. The TXD line becomes bidirectional and the baud
rate generator feeds the ISO7816 clock on the SCK pin. As the TXD pin becomes bidirectional, its output remains
driven by the output of the transmitter but only when the transmitter is active while its input is directed to the input of
the receiver. The USART is considered as the Host of the communication as it generates the clock.
Figure 45-29. Connection of a Smart Card to the USART
USART
CLK
SCK Smart
Card
I/O
TXD
When operating in ISO7816, either in T = 0 or T = 1 modes, the character format is fixed. The configuration is 8
data bits and 1 or 2 stop bits, regardless of the values programmed in the Mode register fields CHRL, MODE9 and
CHMODE. US_MR.MSBF can be used to transmit LSB or MSB first. The bit INVDATA can be used to transmit in
Normal or Inverse mode. See 45.7.3. US_MR.
The USART cannot operate concurrently in both Receiver and Transmitter modes as the communication is
unidirectional at a time. It has to be configured according to the required mode by enabling or disabling either
the receiver or the transmitter as desired. Enabling both the receiver and the transmitter at the same time in ISO7816
mode may lead to unpredictable results.
The ISO7816 specification defines an inverse transmission format. Data bits of the character must be transmitted on
the I/O line at their negative value.
45.6.4.2 Protocol T = 0
In T = 0 protocol, a character is made up of one start bit, eight data bits, one parity bit and one guard time, which
lasts two bit times. The transmitter shifts out the bits and does not drive the I/O line during the guard time.
If no parity error is detected, the I/O line remains at 1 during the guard time and the transmitter can continue with the
transmission of the next character, as shown in Figure 45-30.
If a parity error is detected by the receiver, it drives the I/O line to 0 during the guard time, as shown in Figure 45-31.
This error bit, NACK, for Non Acknowledge. In this case, the character lasts one additional bit time, as the guard time
does not change and is added to the error bit time, which lasts one bit time.
When the USART is the receiver and it detects an error, it does not load the erroneous character in US_RHR. It sets
US_SR.PARE so that the software can handle the error.
RXD
I/O Error
45.6.4.3 Protocol T = 1
When operating in ISO7816 protocol T = 1, the transmission is similar to an asynchronous format with only
one stop bit. The parity is generated when transmitting and checked when receiving. Parity error detection sets
US_CSR.PARE.
The IrDA mode is enabled by writing the value 0x8 to US_MR.USART_MODE. The IrDA Filter register (US_IF) is
used to configure the demodulator filter. The USART transmitter and receiver operate in a normal Asynchronous
mode and all parameters are accessible. Note that the modulator and the demodulator are activated.
Figure 45-32. Connection to IrDA Transceivers
USART IrDA
Transceivers
Receiver Demodulator RXD RX
TX
Transmitter Modulator TXD
The receiver and the transmitter must be enabled or disabled depending on the direction of the transmission to be
managed.
To receive IrDA signals, the following needs to be done:
• Disable TX and Enable RX
• Configure the TXD pin as PIO and set it as an output to 0 (to avoid LED emission). Disable the internal pull-up
(better for power consumption).
• Receive data
TXD
Peripheral Clock Baud Rate (bit/s) CD Baud Rate Error Pulse Time (μs)
3,686,400 115,200 2 0.00% 1.63
20,000,000 115,200 11 1.38% 1.63
32,768,000 115,200 18 1.25% 1.63
40,000,000 115,200 22 1.38% 1.63
3,686,400 57,600 4 0.00% 3.26
20,000,000 57,600 22 1.38% 3.26
32,768,000 57,600 36 1.25% 3.26
40,000,000 57,600 43 0.93% 3.26
3,686,400 38,400 6 0.00% 4.88
20,000,000 38,400 33 1.38% 4.88
32,768,000 38,400 53 0.63% 4.88
40,000,000 38,400 65 0.16% 4.88
3,686,400 19,200 12 0.00% 9.77
20,000,000 19,200 65 0.16% 9.77
32,768,000 19,200 107 0.31% 9.77
40,000,000 19,200 130 0.16% 9.77
3,686,400 9,600 24 0.00% 19.53
20,000,000 9,600 130 0.16% 19.53
32,768,000 9,600 213 0.16% 19.53
40,000,000 9,600 260 0.16% 19.53
3,686,400 2,400 96 0.00% 78.13
20,000,000 2,400 521 0.03% 78.13
32,768,000 2,400 853 0.04% 78.13
RXD
Counter
Value 6 5 4 3 2 6 6 5 4 3 2 1 0
Pulse Pulse
rejected accepted
Receiver
Input
The programmed value in the US_IF register must always meet the following criterion:
tperipheral clock × (IRDA_FILTER + 3) < 1.41 μs
As the IrDA mode uses the same logic as the ISO7816, note that the FI_DI_RATIO field in US_FIDI must be set to a
value higher than 0 in order to ensure IrDA communications operate correctly.
RXD
Differential
TXD Bus
RTS
TXD
Start Parity Stop
D0 D1 D2 D3 D4 D5 D6 D7
Bit Bit Bit
RTS
Write
US_THR
TXRDY
TXEMPTY
The control of the DTR output pin is performed by writing a ‘1’ to the US_CR.DTRDIS and US_CR.DTREN. The
disable command forces the corresponding pin to its inactive level, that is, high. The enable command forces the
corresponding pin to its active level, that is, low.
The level changes are detected on the RI, DSR, DCD and CTS pins. If an input change is detected, the RIIC, DSRIC,
DCDIC and CTSIC bits in the US_CSR are set and can trigger an interrupt. The status is automatically cleared when
the US_CSR is read. Furthermore, the CTS automatically disables the transmitter when it is detected at its inactive
state. If a character is being transmitted when the CTS rises, the character transmission is completed before the
transmitter is disabled.
...........continued
SPI Bus Protocol Mode CPOL CPHA
2 1 1
3 1 0
SCK
(CPOL = 0)
SCK
(CPOL = 1)
MOSI
SPI Host ->TXD MSB 6 5 4 3 2 1 LSB
SPI Client -> RXD
MISO
SPI Host -> RXD MSB 6 5 4 3 2 1 LSB
SPI Client -> TXD
NSS
SPI Host -> RTS
SPI Client -> CTS
SCK
(CPOL = 0)
SCK
(CPOL = 1)
MOSI
SPI Host -> TXD MSB 6 5 4 3 2 1 LSB
SPI Client -> RXD
MISO
SPI Host -> RXD MSB 6 5 4 3 2 1 LSB
SPI Client -> TXD
NSS
SPI Host -> RTS
SPI Client -> CTS
The chip select line is deasserted for a period equivalent to three bits between the transmission of two data.
The transmitter reports two status bits in US_CSR: TXRDY (Transmitter Ready), which indicates that US_THR is
empty and TXEMPTY, which indicates that all the characters written in US_THR have been processed. When the
current character processing is completed, the last character written in US_THR is transferred into the Shift register
of the transmitter and US_THR becomes empty, thus TXRDY rises.
Both TXRDY and TXEMPTY bits are low when the transmitter is disabled. Writing a character in US_THR while
TXRDY is low has no effect and the written character is lost.
If the USART is in SPI Client mode and if a character must be sent while the US_THR is empty, the UNRE (Underrun
Error) bit is set. The TXD transmission line stays at high level during all this time. The UNRE bit is cleared by writing
a 1 to the RSTSTA (Reset Status) bit in US_CR.
In SPI Host mode, the Client select line (NSS) is asserted at low level one tbit (tbit being the nominal time required
to transmit a bit) before the transmission of the MSB bit and released at high level one tbit after the transmission of
the LSB bit. So, the Client select line (NSS) is always released between each character transmission and a minimum
delay of three tbit always inserted. However, in order to address Client devices supporting the CSAAT mode (Chip
Select Active After Transfer), the Client select line (NSS) can be forced at low level by writing a 1 to the RCS bit in the
US_CR. The Client select line (NSS) can be released at high level only by writing a ‘1’ to US_CR.FCS (for example,
when all data have been transferred to the Client device).
In SPI Client mode, the transmitter does not require a falling edge of the Client select line (NSS) to initiate a character
transmission but only a low level. However, this low level must be present on the Client select line (NSS) at least one
tbit before the first serial clock cycle corresponding to the MSB bit.
TXD
Break Start Stop Start Stop
Break Field 1 0 1 0 1 0 1 0 ID0 ID1 ID2 ID3 ID4 ID5 ID6 ID7
Delimiter Bit Bit Bit Bit
13 dominant bits (at 0) Synch Byte = 0x55
1 recessive bit
Write (at 1)
US_LINIR
US_LINIR ID
TXRDY
US_CSR.LINBK
US_CSR.LINID
Write RSTSTA=1
in US_CR
RXD
Break Start Stop Start Stop
Break Field 1 0 1 0 1 0 1 0 ID0 ID1 ID2 ID3 ID4 ID5 ID6 ID7
Delimiter Bit Synch Byte = 0x55 Bit Bit Bit
13 dominant bits (at 0)
1 recessive bit
(at 1)
US_CSR.LINBK
.US_CSR.LINID
US_LINIR
Write RSTSTA=1
in US_CR
Start Stop
bit bit
The time measurement is made by a 19-bit counter clocked by the sampling clock (see “Baud Rate Generator”).
When the start bit of the Synch Field is detected, the counter is reset. Then during the next eight tbit of the Synch
Field, the counter is incremented. At the end of these eight tbit, the counter is stopped. At this moment, the 16 most
significant bits of the counter (value divided by 8) give the new clock divider (LINCD) and the three least significant
bits of this value (the remainder) give the new fractional part (LINFP).
Once the Synch Field has been entirely received, the clock divider (LINCD) and the fractional part (LINFP) are
updated in the LIN Baud Rate register (US_LINBRR) with the computed values, if the Synchronization is not disabled
by the SYNCDIS bit in the LIN Mode register (US_LINMR).
After reception of the Synch Field:
• If it appears that the computed baud rate deviation compared to the initial baud rate is superior to the maximum
tolerance FTol_Unsynch (±15%), then the clock divider (LINCD) and the fractional part (LINFP) are not updated,
and the error flag US_CSR.LINSTE is set to ‘1’.
• If it appears that the sampled Synch character is not equal to 0x55, then the clock divider (LINCD) and the
fractional part (LINFP) are not updated, and the error flag US_CSR.LINISFE is set to ‘1’.
Flags LINSTE and LINISFE are reset by writing US_CR.RSTSTA to ‘1’.
Figure 45-42. Client Node Synchronization
Baud Rate
Clock
RXD
Break Start Stop Start Stop
Break Field 1 0 1 0 1 0 1 0 ID0 ID1 ID2 ID3 ID4 ID5 ID6 ID7
Delimiter Bit Bit Bit Bit
13 dominant bits (at 0) Synch Byte = 0x55
1 recessive bit
(at 1)
LINIDRX
Reset
Synchro Counter 000_0011_0001_0110_1101
US_BRGR Initial CD
Clock Divider (CD)
US_BRGR Initial FP
Fractional Part (FP)
US_LINBRR Initial CD 0000_0110_0010_1101
Clock Divider (CD)
US_LINBRR Initial FP 101
Fractional Part (FP)
The accuracy of the synchronization depends on several parameters:
• Nominal clock frequency (fNom) (the theoretical Client node clock frequency)
• Baud Rate
• Oversampling (OVER = 0 => 16X or OVER = 1 => 8X)
The following formula is used to compute the deviation of the Client bit rate relative to the Host bit rate after
synchronization (fClient is the real Client node clock frequency):
α × 8 × 2 − OVER + β × Baud rate
Baud rate deviation = 100 × %
8 × f CLIENT
α × 8 × 2 − OVER + β × Baud rate
Baud rate deviation = 100 × %
f TOL_UNSYNCH
8× 100 × f Nom
Examples:
• Baud rate = 20 kbit/s, OVER = 0 (Oversampling 16X) => fNom(min) = 2.64 MHz
• Baud rate = 20 kbit/s, OVER = 1 (Oversampling 8X) => fNom(min) = 1.47 MHz
• Baud rate = 1 kbit/s, OVER = 0 (Oversampling 16X) => fNom(min) = 132 kHz
• Baud rate = 1 kbit/s, OVER = 1 (Oversampling 8X) => fNom(min) = 74 kHz
NACT(Client2)=PUBLISH
45.6.9.12 Checksum
The last field of a frame is the checksum. The checksum contains the inverted 8-bit sum with carry, over all data
bytes or all data bytes and the protected identifier. Checksum calculation over the data bytes only is called classic
checksum and it is used for communication with LIN 1.3 Clients. Checksum calculation over the data bytes and the
protected identifier byte is called enhanced checksum and it is used for communication with LIN 2.0 Clients.
The USART can be configured to:
• Send/Check an Enhanced checksum automatically (CHKDIS = 0 & CHKTYP = 0)
• Send/Check a Classic checksum automatically (CHKDIS = 0 & CHKTYP = 1)
• Not send/check a checksum (CHKDIS = 1)
This configuration is made by the Checksum Type (CHKTYP) and Checksum Disable (CHKDIS) fields of US_LINMR.
If the checksum feature is disabled, the user can send it manually all the same, by considering the checksum as a
normal data byte and by adding 1 to the response data length (see Response Data Length).
Frame
Inter-
frame
Response
space
space
Header Data3 Response
TXRDY
Frame Slot Mode Frame Slot Mode
Disabled Enabled
Write
US_LINID
Write
US_THR Data 1 Data 2 Data 3 Data N
LINTC
Frame
Inter-
frame
Response space
space
Header Data3 Response
TXRDY
FSDIS=1 FSDIS=0
RXRDY
Write
US_LINIR
Write
US_THR Data 1 Data 2 Data 3 Data N
LINTC
Frame Inter-
frame
Response space
space
Header Data3 Response
TXRDY
FSDIS=1 FSDIS=0
RXRDY
Write
US_LINIR
Read
US_RHR Data 1 Data N-2 Data N-1 Data N
LINTC
Frame Inter-
frame
Response space
space
Header Data3 Response
TXRDY
FSDIS=1 FSDIS=0
RXRDY
Write
US_LINIR
LINTC
• Write NACT, PARDIS, CHKDIS, CHKTYPE, DLCM and DLC in US_LINMR to configure the frame transfer.
IMPORTANT: If the NACT configuration for this frame is PUBLISH, the US_LINMR must be written with NACT =
PUBLISH even if this field is already correctly configured, in order to set the TXREADY flag and the corresponding
write transfer request.
What comes next depends on the NACT configuration:
• Case 1: NACT = PUBLISH, the LIN controller sends the response
– Wait until TXRDY in US_CSR rises.
– Write TCHR in US_THR to send a byte.
– If all the data have not been written, redo the two previous steps.
– Wait until LINTC in US_CSR rises.
– Check the LIN errors.
• Case 2: NACT = SUBSCRIBE, the USART receives the response
– Wait until RXRDY in US_CSR rises.
– Read RCHR in US_RHR.
– If all the data have not been read, redo the two previous steps.
– Wait until LINTC in US_CSR rises.
– Check the LIN errors.
• Case 3: NACT = IGNORE, the USART is not concerned by the response
– Wait until LINTC in US_CSR rises.
– Check the LIN errors.
Figure 45-48. Client Node Configuration, NACT = PUBLISH
TXRDY
RXRDY
LINIDRX
Read
US_LINID
Write
US_THR Data 1 Data 2 Data 3 Data N
LINTC
TXRDY
RXRDY
LINIDRX
Read
US_LINID
Read
US_RHR Data 1 Data N-2 Data N-1 Data N
LINTC
TXRDY
RXRDY
LINIDRX
Read
US_LINID
Read
US_RHR
LINTC
NACT NACT
PARDIS PARDIS
CHKDIS CHKDIS
CHKTYP CHKTYP
DLM DLM
FSDIS FSDIS
DLC
DLC
DATA N
DATA N
IDENTIFIER IDENTIFIER
TXRDY
DATA N
DATA N
DATA 0 DATA 0
NACT = SUBSCRIBE
APB bus APB bus
(Peripheral) DMA USART LIN Controller (Peripheral) DMA USART LIN Controller
Controller Controller
TXRDY RXRDY
DATA N DATA N
each bit period and reloaded each time a new character is received. If the counter reaches 0, US_CSR.TIMEOUT
rises.
If US_CR.STTTO is written to ‘1’, the counter clock is stopped until a first character is received.
If US_CR.RETTO is written to ‘1’, the counter starts counting down immediately from the value TO.
Table 45-14. Receiver Timeout Programming
Transport Layer
Acknowledged and unacknowledged unicast and multicast Application
Software
Layer 4 Authentification
Server
Network Layer
Layer 3 Connection-less, domain-wide broadcast, no segmentation,
loop-free topology, learning routers
Link Layer
Framing, data encoding, CRC checking
USART
Layer 2 in
MAC Sublayer
Predictive p-persistent CSMA: collision avoidance LON Mode
optional priority and collision detection
The USART configured in LON mode is a full-layer 2 implementation including standard timings handling, framing
(transmit and receive PPDU frames), backlog estimation and other features. At the frame encoding/decoding
level, differential Manchester encoding is used (also known as CDP). When configured in LON mode, there is no
embedded digital line filter, thus the optimal usage is node-to-node communication.
Preamble
Differential
Manchester DATA
encoded TXD
data
Differential
Manchester DATA
encoded TXD
data
45.6.10.5.6 Data
Data are sent/received serially after the preamble transmission/reception. Data can be either sent/received MSB first
or LSB first depending on US_MR.MSBF.
45.6.10.5.7 CRC
The two last bytes of LON frames are dedicated to CRC.
When transmitting, the CRC of the frame is automatically generated and sent when expected.
When receiving frames the CRC is automatically checked and a LCRCE flag is set in US_CSR if the calculated CRC
do not match the received one. Note that the two received CRC bytes are seen as two additional data from the user
point of view.
45.6.10.6.2 comm_type
In the CEA-709 standard, two communication configurations are defined and configurable through the comm_type
variable. The comm_type variable value can be set in the USART LON Mode register (US_LONMR) through the
COMMT bit. The selection of the comm_type determines the MAC behavior in the following ways:
• comm_type=1:
– An indeterminate time is defined during the Beta 1 period in which all transitions on the channel are
ignored, as shown in Figure 45-58.
– The MAC sublayer ignores collisions occurring during the first 25% of the transmitted preamble. It optionally
(according to US_LONMR.CDTAIL) ignores collisions reported following the transmission of the CRC but
prior to the end of transmission.
– If a collision is detected during preamble transmission, the MAC sublayer can terminate the packet if so
configured according to US_LONMR.TCOL. Collisions detected after the preamble has been sent do not
terminate transmission.
• comm_type=2:
– No indeterminate time is defined at the MAC sublayer.
– The MAC sublayer shall always terminate the packet upon notification of a collision.
Figure 45-58. LON Indeterminate Time
IDT
Beta2
Packet
Packet Packet
1 2 3 ... ... ... n
Priority
Beta1 Random Delay
Slots
45.6.10.8.1 Beta2
A node wishing to transmit generates a random delay T. This delay is an integer number of randomizing slots of
duration Beta2.
The beta2 length (in tbit) is configurable through US_FIDI. Note that a length of ‘0’ is not allowed.
45.6.10.8.4 Wbase
The wbase timer represents the base windows size. Its duration, derived from Beta2, equals 16 Beta2 slots.
Oversampling
16X Clock
RXD
Sampling
point
Expected edge
Random Delay Preamble l2hdr Data 1 Data 2 Data N-1 Data N CRC CRC
TXRDY
RXRDY
Write
US_LONL2HDR
Write
US_THR
Data 1 Data 2 Data 3 Data 4 Data N
LTXD
6. Write RXIDLEV and RX_PL in US_MAN to indicate the receiver line value and select the preamble pattern to
use.
7. Wait until RXRDY in US_CSR rises.
8. Read RCHR in US_RHR.
9. If all the data and the two CRC bytes have not been read, redo the two previous steps.
10. Wait until LRXD in US_CSR rises.
11. Check the LON errors.
12.
Figure 45-62. Rx Frame
Random Delay Preamble l2hdr Data 1 Data 2 Data N-1 Data N CRC CRC
TXRDY
RXRDY
Write
US_LONL2HDR
Read
US_RHR l2hdr Data 1 Data 2 Data N-1 Data N
LRXD
45.6.10.12.1 Configuration
The DMA mode is configured in USLONMR.DMAM:
• DMAM = 1: The LON frame data length (DATAL) is stored in the WRITE buffer and it is written by the DMA in
US_THR (instead of the LON Data Length register US_LONDL).
• DMAM = 0: The LON frame data length (DATAL) is not stored in the WRITE buffer and it must be written by the
user in US_LONDL.
In both DMA modes L2HDR is considered as a data and its value must be stored in the WRITE buffer as the first data
to write.
Figure 45-63. DMAM = 1
WRITE BUFFER
READ BUFFER
DATAL
L2HDR
TXRDY
RXRDY
DATA N
DATA N
L2HDR L2HDR
DATA N DATA N
Collision
notification
TXRDY
RXRDY
Write
US_LONL2HDR
Write
US_THR
Data 1 Data 2 Data 3 Data (N-i)+1
LTXD
LCOL
LFET
RSTSTA
Receiver RXD
Transmitter TXD
Receiver RXD
Transmitter TXD
Receiver RXD
Transmitter 1 TXD
Receiver 1 RXD
Transmitter TXD
...........continued
...........continued
7:0 NB_ERRORS[7:0]
15:8
0x44 US_NER
23:16
31:24
0x48
... Reserved
0x4B
7:0 IRDA_FILTER[7:0]
15:8
0x4C US_IF
23:16
31:24
7:0 TX_PL[3:0]
15:8 TX_MPOL TX_PP[1:0]
0x50 US_MAN
23:16 RX_PL[3:0]
31:24 RXIDLEV DRIFT ONE RX_MPOL RX_PP[1:0]
7:0 WKUPTYP FSDIS DLM CHKTYP CHKDIS PARDIS NACT[1:0]
15:8 DLC[7:0]
0x54 US_LINMR
23:16 SYNCDIS PDCM
31:24
7:0 IDCHR[7:0]
15:8
0x58 US_LINIR
23:16
31:24
7:0 LINCD[7:0]
15:8 LINCD[15:8]
0x5C US_LINBRR
23:16 LINFP[2:0]
31:24
7:0 LCDS DMAM CDTAIL TCOL COLDET COMMT
15:8
0x60 US_LONMR
23:16 EOFS[7:0]
31:24
7:0 LONPL[7:0]
15:8 LONPL[13:8]
0x64 US_LONPR
23:16
31:24
7:0 LONDL[7:0]
15:8
0x68 US_LONDL
23:16
31:24
7:0 PB ALTP BLI[5:0]
15:8
0x6C US_LONL2HDR
23:16
31:24
7:0 LONBL[5:0]
15:8
0x70 US_LONBL
23:16
31:24
7:0 BETA1TX[7:0]
15:8 BETA1TX[15:8]
0x74 US_LONB1TX
23:16 BETA1TX[23:16]
31:24
7:0 BETA1RX[7:0]
15:8 BETA1RX[15:8]
0x78 US_LONB1RX
23:16 BETA1RX[23:16]
31:24
7:0 PSNB[6:0]
15:8 NPS[6:0]
0x7C US_LONPRIO
23:16
31:24
...........continued
7:0 IDTTX[7:0]
15:8 IDTTX[15:8]
0x80 US_IDTTX
23:16 IDTTX[23:16]
31:24
7:0 IDTRX[7:0]
15:8 IDTRX[15:8]
0x84 US_IDTRX
23:16 IDTRX[23:16]
31:24
7:0 ICDIFF[3:0]
15:8
0x88 US_ICDIFF
23:16
31:24
0x8C
... Reserved
0xE3
7:0 WPEN
15:8 WPKEY[7:0]
0xE4 US_WPMR
23:16 WPKEY[15:8]
31:24 WPKEY[23:16]
7:0 WPVS
15:8 WPVSRC[7:0]
0xE8 US_WPSR
23:16 WPVSRC[15:8]
31:24
Name: US_CR
Offset: 0x0000
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
LINWKUP LINABT RTSDIS RTSEN DTRDIS DTREN
Access W W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
RETTO RSTNACK RSTIT SENDA STTTO STPBRK STTBRK RSTSTA
Access W W W W W W W W
Reset
Bit 7 6 5 4 3 2 1 0
TXDIS TXEN RXDIS RXEN RSTTX RSTRX
Access W W W W W W
Reset
Value Description
0 No effect.
1 Drives the pin DTR to 0.
Bit 11 – STTTO Clear TIMEOUT Flag and Start Timeout After Next Character Received
Value Description
0 No effect.
1 Starts waiting for a character before enabling the timeout counter. Immediately disables a timeout
period in progress. Resets the status bit TIMEOUT in US_CSR.
This configuration is relevant only if USART_MODE = 0xE or 0xF in the USART Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
RCS FCS
Access W W
Reset – –
Bit 15 14 13 12 11 10 9 8
RSTSTA
Access W
Reset –
Bit 7 6 5 4 3 2 1 0
TXDIS TXEN RXDIS RXEN RSTTX RSTRX
Access W W W W W W
Reset – – – – – –
Name: US_MR
Offset: 0x0004
Reset: 0x0
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
For SPI configuration, see “USART Mode Register (SPI_MODE)”.
Bit 31 30 29 28 27 26 25 24
ONEBIT MODSYNC MAN FILTER MAX_ITERATION[2:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
INVDATA VAR_SYNC DSNACK INACK OVER CLKO MODE9 MSBF
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CHMODE[1:0] NBSTOP[1:0] PAR[2:0] SYNC
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CHRL[1:0] USCLKS[1:0] USART_MODE[3:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Value Description
0 The data field transmitted on TXD line is the same as the one written in US_THR or the content read in
US_RHR is the same as RXD line. Normal mode of operation.
1 The data field transmitted on TXD line is inverted (voltage polarity only) compared to the value written
on US_THR or the content read in US_RHR is inverted compared to what is received on RXD line (or
ISO7816 IO line). Inverted mode of operation, useful for contactless card application. To be used with
configuration bit MSBF.
This configuration is relevant only if USART_MODE = 0xE or 0xF in the USART Mode Register.
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
WRDBT CLKO CPOL
Access R/W R/W R/W
Reset 0 0 0
Bit 15 14 13 12 11 10 9 8
CPHA
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
CHRL[1:0] USCLKS[1:0] USART_MODE[3:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Value Description
1 Data is captured on the leading edge of SPCK and changed on the following edge of SPCK.
Name: US_IER
Offset: 0x0008
Property: Write-only
For SPI specific configuration, see “USART Interrupt Enable Register (SPI_MODE)”.
For LIN specific configuration, see “USART Interrupt Enable Register (LIN_MODE)”.
For LON specific configuration, see “USART Interrupt Enable Register (LON_MODE)”.
The following configuration values are valid for all listed bit names of this register:
0: No effect
1: Enables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
MANE CTSIC DCDIC DSRIC RIIC
Access W W W W W
Reset
Bit 15 14 13 12 11 10 9 8
NACK ITER TXEMPTY TIMEOUT
Access W W W W
Reset
Bit 7 6 5 4 3 2 1 0
PARE FRAME OVRE RXBRK TXRDY RXRDY
Access W W W W W W
Reset
This configuration is relevant only if USART_MODE = 0xE or 0xF in the USART Mode Register.
The following configuration values are valid for all listed bit names of this register:
0: No effect
1: Enables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
NSSE
Access W
Reset
Bit 15 14 13 12 11 10 9 8
UNRE TXEMPTY
Access W W
Reset
Bit 7 6 5 4 3 2 1 0
OVRE TXRDY RXRDY
Access W W W
Reset
Bit 19 – NSSE NSS Line (Driving CTS Pin) Rising or Falling Edge Event Interrupt Enable
This configuration is relevant only if USART_MODE = 0xA or 0xB in the USART Mode Register.
The following configuration values are valid for all listed bit names of this register:
0: No effect
1: Enables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
LINHTE LINSTE LINSNRE LINCE LINIPE LINISFE LINBE
Access W W W W W W W
Reset – – – – – – –
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
LINTC LINID LINBK TXEMPTY TIMEOUT
Access W W W W W
Reset – – – – –
Bit 7 6 5 4 3 2 1 0
PARE FRAME OVRE TXRDY RXRDY
Access W W W W W
Reset – – – – –
This register is relevant only if USART_MODE = 0x9 in the USART Mode Register.
The following configuration values are valid for all listed bit names of this register:
0: No effect
1: Enables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
LBLOVFE LRXD LFET LCOL LTXD
Access W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
UNRE TXEMPTY
Access W W
Reset
Bit 7 6 5 4 3 2 1 0
LCRCE LSFE OVRE TXRDY RXRDY
Access W W W W W
Reset
Name: US_IDR
Offset: 0x000C
Property: Write-only
For SPI specific configuration, see “USART Interrupt Disable Register (SPI_MODE)”.
For LIN specific configuration, see “USART Interrupt Disable Register (LIN_MODE)”.
For LON specific configuration, see “USART Interrupt Disable Register (LON_MODE)”.
The following configuration values are valid for all listed bit names of this register:
0: No effect
1: Disables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
MANE
Access W
Reset
Bit 23 22 21 20 19 18 17 16
CTSIC DCDIC DSRIC RIIC
Access W W W W
Reset
Bit 15 14 13 12 11 10 9 8
NACK ITER TXEMPTY TIMEOUT
Access W W W W
Reset
Bit 7 6 5 4 3 2 1 0
PARE FRAME OVRE RXBRK TXRDY RXRDY
Access W W W W W W
Reset
This configuration is relevant only if USART_MODE = 0xE or 0xF in the USART Mode Register.
The following configuration values are valid for all listed bit names of this register:
0: No effect
1: Disables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
NSSE
Access W
Reset
Bit 15 14 13 12 11 10 9 8
UNRE TXEMPTY
Access W W
Reset
Bit 7 6 5 4 3 2 1 0
OVRE TXRDY RXRDY
Access W W W
Reset
Bit 19 – NSSE NSS Line (Driving CTS Pin) Rising or Falling Edge Event Interrupt Disable
This configuration is relevant only if USART_MODE = 0xA or 0xB in the USART Mode Register.
The following configuration values are valid for all listed bit names of this register:
0: No effect
1: Disables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
LINHTE LINSTE LINSNRE LINCE LINIPE LINISFE LINBE
Access W W W W W W W
Reset – – – – – – –
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
LINTC LINID LINBK TXEMPTY TIMEOUT
Access W W W W W
Reset – – – – –
Bit 7 6 5 4 3 2 1 0
PARE FRAME OVRE TXRDY RXRDY
Access W W W W W
Reset – – – – –
This configuration is relevant only if USART_MODE = 0x9 in the USART Mode Register.
The following configuration values are valid for all listed bit names of this register:
0: No effect
1: Disables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
LBLOVFE LRXD LFET LCOL LTXD
Access W W W W W
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
UNRE TXEMPTY
Access W W
Reset
Bit 7 6 5 4 3 2 1 0
LCRCE LSFE OVRE TXRDY RXRDY
Access W W W W W
Reset
Name: US_IMR
Offset: 0x0010
Reset: 0x0
Property: Read-only
For SPI specific configuration, see “USART Interrupt Mask Register (SPI_MODE)”.
For LIN specific configuration, see “USART Interrupt Mask Register (LIN_MODE)”.
For LON specific configuration, see “USART Interrupt Mask Register (LON_MODE)”.
The following configuration values are valid for all listed bit names of this register:
0: The corresponding interrupt is not enabled.
1: The corresponding interrupt is enabled.
Bit 31 30 29 28 27 26 25 24
MANE
Access R
Reset 0
Bit 23 22 21 20 19 18 17 16
CTSIC DCDIC DSRIC RIIC
Access R R R R
Reset 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NACK ITER TXEMPTY TIMEOUT
Access R R R R
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PARE FRAME OVRE RXBRK TXRDY RXRDY
Access R R R R R R
Reset 0 0 0 0 0 0
This configuration is relevant only if USART_MODE = 0xE or 0xF in the USART Mode Register.
The following configuration values are valid for all listed bit names of this register:
0: The corresponding interrupt is not enabled.
1: The corresponding interrupt is enabled.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
NSSE
Access R
Reset 0
Bit 15 14 13 12 11 10 9 8
UNRE TXEMPTY
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
OVRE TXRDY RXRDY
Access R R R
Reset 0 0 0
Bit 19 – NSSE NSS Line (Driving CTS Pin) Rising or Falling Edge Event Interrupt Mask
This configuration is relevant only if USART_MODE = 0xA or 0xB in the USART Mode Register.
The following configuration values are valid for all listed bit names of this register:
0: The corresponding interrupt is not enabled.
1: The corresponding interrupt is enabled.
Bit 31 30 29 28 27 26 25 24
LINHTE LINSTE LINSNRE LINCE LINIPE LINISFE LINBE
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
LINTC LINID LINBK TXEMPTY TIMEOUT
Access R R R R R
Reset 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PARE FRAME OVRE TXRDY RXRDY
Access R R R R R
Reset 0 0 0 0 0
This configuration is relevant only if USART_MODE = 0x9 in the USART Mode Register.
The following configuration values are valid for all listed bit names of this register:
0: The corresponding interrupt is not enabled.
1: The corresponding interrupt is enabled.
Bit 31 30 29 28 27 26 25 24
LBLOVFE LRXD LFET LCOL LTXD
Access R R R R R
Reset 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
UNRE TXEMPTY
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
LCRCE LSFE OVRE TXRDY RXRDY
Access R R R R R
Reset 0 0 0 0 0
Name: US_CSR
Offset: 0x0014
Reset: 0x0
Property: Read-only
For SPI specific configuration, see “USART Channel Status Register (SPI_MODE)”.
For LIN specific configuration, see “USART Channel Status Register (LIN_MODE)”.
For LON specific configuration, see “USART Channel Status Register (LON_MODE)”.
Bit 31 30 29 28 27 26 25 24
MANERR
Access R
Reset 0
Bit 23 22 21 20 19 18 17 16
CTS DCD DSR RI CTSIC DCDIC DSRIC RIIC
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NACK ITER TXEMPTY TIMEOUT
Access R R R R
Reset 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PARE FRAME OVRE RXBRK TXRDY RXRDY
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 10 – ITER Max Number of Repetitions Reached (cleared by writing a one to bit US_CR.RSTIT)
Value Description
0 Maximum number of repetitions has not been reached since the last RSTIT.
1 Maximum number of repetitions has been reached since the last RSTIT.
This configuration is relevant only if USART_MODE = 0xE or 0xF in the USART Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
NSS NSSE
Access R R
Reset 0 0
Bit 15 14 13 12 11 10 9 8
UNRE TXEMPTY
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
OVRE TXRDY RXRDY
Access R R R
Reset 0 0 0
Bit 19 – NSSE NSS Line (Driving CTS Pin) Rising or Falling Edge Event (cleared on read)
Value Description
0 No NSS line event has been detected since the last read of US_CSR.
1 A rising or falling edge event has been detected on NSS line since the last read of US_CSR.
Value Description
0 A character is in the US_THR waiting to be transferred to the Transmit Shift Register or the transmitter
is disabled. As soon as the transmitter is enabled, TXRDY becomes 1.
1 There is no character in the US_THR.
This configuration is relevant only if USART_MODE = 0xA or 0xB in the USART Mode Register.
Bit 31 30 29 28 27 26 25 24
LINHTE LINSTE LINSNRE LINCE LINIPE LINISFE LINBE
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
LINBLS
Access R
Reset 0
Bit 15 14 13 12 11 10 9 8
LINTC LINID LINBK TXEMPTY TIMEOUT
Access R R R R R
Reset 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PARE FRAME OVRE TXRDY RXRDY
Access R R R R R
Reset 0 0 0 0 0
Bit 31 – LINHTE LIN Header Timeout Error (cleared by writing a one to bit US_CR.RSTSTA)
Value Description
0 No LIN header timeout error has been detected since the last RSTSTA.
1 A LIN header timeout error has been detected since the last RSTSTA.
Bit 30 – LINSTE LIN Synch Tolerance Error (cleared by writing a one to bit US_CR.RSTSTA)
Value Description
0 No LIN synch tolerance error has been detected since the last RSTSTA.
1 A LIN synch tolerance error has been detected since the last RSTSTA.
Bit 29 – LINSNRE LIN Client Not Responding Error (cleared by writing a one to bit US_CR.RSTSTA)
Value Description
0 No LIN Client not responding error has been detected since the last RSTSTA.
1 A LIN Client not responding error has been detected since the last RSTSTA.
Bit 27 – LINIPE LIN Identifier Parity Error (cleared by writing a one to bit US_CR.RSTSTA)
Value Description
0 No LIN identifier parity error has been detected since the last RSTSTA.
1 A LIN identifier parity error has been detected since the last RSTSTA.
Bit 26 – LINISFE LIN Inconsistent Synch Field Error (cleared by writing a one to bit US_CR.RSTSTA)
Value Description
0 No LIN inconsistent synch field error has been detected since the last RSTSTA
1 The USART is configured as a Client node and a LIN Inconsistent synch field error has been detected
since the last RSTSTA.
Bit 14 – LINID LIN Identifier Sent or LIN Identifier Received (cleared by writing a one to bit US_CR.RSTSTA)
Value Description
0 - If USART operates in LIN Host mode (USART_MODE = 0xA):
No LIN identifier has been sent since the last RSTSTA.
- If USART operates in LIN Client mode (USART_MODE = 0xB):
No LIN identifier has been received since the last RSTSTA.
1 - If USART operates in LIN Host mode (USART_MODE = 0xA):
At least one LIN identifier has been sent since the last RSTSTA.
- If USART operates in LIN Client mode (USART_MODE = 0xB):
At least one LIN identifier has been received since the last RSTSTA
Bit 13 – LINBK LIN Break Sent or LIN Break Received (cleared by writing a one to bit US_CR.RSTSTA)
Value Description
0 - If USART operates in LIN Host mode (USART_MODE = 0xA):
No LIN break has been sent since the last RSTSTA.
- If USART operates in LIN Client mode (USART_MODE = 0xB):
No LIN break has been received since the last RSTSTA.
1 - If USART operates in LIN Host mode (USART_MODE = 0xA):
At least one LIN break has been sent since the last RSTSTA.
- If USART operates in LIN Client mode (USART_MODE = 0xB):
At least one LIN break has been received since the last RSTSTA.
Value Description
1 There has been a timeout since the last start timeout command (STTTO in US_CR).
This configuration is relevant only if USART_MODE = 0x9 in the USART Mode Register.
Bit 31 30 29 28 27 26 25 24
LBLOVFE LRXD LFET LCOL LTXD
Access R R R R R
Reset 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
UNRE TXEMPTY
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
LCRCE LSFE OVRE TXRDY RXRDY
Access R R R R R
Reset 0 0 0 0 0
Bit 28 – LBLOVFE LON Backlog Overflow Error (cleared by writing a one to bit US_CR.RSTSTA)
Value Description
0 No backlog overflow error occurred since the last RSTSTA.
1 At least one backlog error overflow occurred since the last RSTSTA.
Bit 27 – LRXD LON Reception End Flag (cleared by writing a one to bit US_CR.RSTSTA)
Value Description
0 Reception on going or no reception occurred since the last RSTSTA.
1 At least one reception has been performed since the last RSTSTA.
Bit 26 – LFET LON Frame Early Termination (cleared by writing a one to bit US_CR.RSTSTA)
Value Description
0 No frame has been terminated early due to collision detection since the last RSTSTA.
1 At least one transmission has been terminated due to collision detection since the last RSTSTA. (This
stops the DMA until reset with RSTSTA bit).
Bit 25 – LCOL LON Collision Detected Flag (cleared by writing a one to bit US_CR.RSTSTA)
Value Description
0 No collision occurred while transmitting since the last RSTSTA.
1 At least one collision occurred while transmitting since the last RSTSTA.
Bit 24 – LTXD LON Transmission End Flag (cleared by writing a one to bit US_CR.RSTSTA)
Value Description
0 Transmission on going or no transmission occurred since the last RSTSTA.
1 At least one transmission has been performed since the last RSTSTA.
Value Description
0 No LON underrun error has occurred since the last RSTSTA.
1 At least one LON underrun error has occurred since the last RSTSTA.
Bit 6 – LSFE LON Short Frame Error (cleared by writing a one to bit US_CR.RSTSTA)
Value Description
0 No short frame received since the last RSTSTA.
1 At least one short frame received since the last RSTSTA.
Name: US_RHR
Offset: 0x0018
Reset: 0x0
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RXSYNH RXCHR[8]
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
RXCHR[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: US_THR
Offset: 0x001C
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
TXSYNH TXCHR[8]
Access W W
Reset
Bit 7 6 5 4 3 2 1 0
TXCHR[7:0]
Access W W W W W W W W
Reset
Name: US_BRGR
Offset: 0x0020
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
FP[2:0]
Access R/W R/W R/W
Reset 0 0 0
Bit 15 14 13 12 11 10 9 8
CD[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CD[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
When the value of field FP is greater than 0, the SCK (oversampling clock) generates nonconstant duty
WARNING
cycles. The SCK high duration is increased by “selected clock” period from time to time. The duty cycle
depends on the value of the CD field.
Value Description
0 Fractional divider is disabled.
1–7 Baud rate resolution, defined by FP × 1/8.
Name: US_RTOR
Offset: 0x0024
Reset: 0x0
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
TO[16]
Access R/W
Reset 0
Bit 15 14 13 12 11 10 9 8
TO[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TO[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: US_TTGR
Offset: 0x0028
Reset: 0x0
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
For LON specific configuration, see “USART Transmitter Timeguard Register (LON_MODE)”.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
TG[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
PCYCLE[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PCYCLE[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PCYCLE[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: US_FIDI
Offset: 0x0040
Reset: 0x174
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
For LON specific configuration, see “USART Transmitter Timeguard Register (LON_MODE)”.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
FI_DI_RATIO[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 1
Bit 7 6 5 4 3 2 1 0
FI_DI_RATIO[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 1 1 1 0 1 0 0
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
BETA2[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
BETA2[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 1
Bit 7 6 5 4 3 2 1 0
BETA2[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 1 1 1 0 1 0 0
Name: US_NER
Offset: 0x0044
Reset: 0x0
Property: Read-only
This register is relevant only if USART_MODE = 0x4 or 0x6 in the USART Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
NB_ERRORS[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: US_IF
Offset: 0x004C
Reset: 0x0
Property: Read/Write
This register is relevant only if USART_MODE = 0x8 in the USART Mode Register.
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
IRDA_FILTER[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: US_MAN
Offset: 0x0050
Reset: 0xB30011004
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
RXIDLEV DRIFT ONE RX_MPOL RX_PP[1:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 1 1 0 0
Bit 23 22 21 20 19 18 17 16
RX_PL[3:0]
Access R/W R/W R/W R/W
Reset 0 0 0 1
Bit 15 14 13 12 11 10 9 8
TX_MPOL TX_PP[1:0]
Access R/W R/W R/W
Reset 1 0 0
Bit 7 6 5 4 3 2 1 0
TX_PL[3:0]
Access R/W R/W R/W R/W
Reset 0 1 0 0
Value Description
0 The receiver preamble pattern detection is disabled
1–15 The detected preamble length is RX_PL × Bit Period
Name: US_LINMR
Offset: 0x0054
Reset: 0x00000000
Property: Read/Write
This register is relevant only if USART_MODE = 0xA or 0xB in the USART Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
SYNCDIS PDCM
Access R/W R/W
Reset 0 0
Bit 15 14 13 12 11 10 9 8
DLC[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WKUPTYP FSDIS DLM CHKTYP CHKDIS PARDIS NACT[1:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Value Description
1 The response data length is defined by bits 5 and 6 of the identifier (IDCHR in US_LINIR).
Name: US_LINIR
Offset: 0x0058
Reset: 0x00000000
Property: Read/Write
This register is relevant only if USART_MODE = 0xA or 0xB in the USART Mode Register.
Write access is possible only in LIN Host node configuration.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
IDCHR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: US_LINBRR
Offset: 0x005C
Reset: 0x0
Property: Read-only
This register is relevant only if USART_MODE = 0xA or 0xB in the USART Mode Register.
Returns the baud rate value after the synchronization process completion.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
LINFP[2:0]
Access R R R
Reset 0 0 0
Bit 15 14 13 12 11 10 9 8
LINCD[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
LINCD[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: US_LONMR
Offset: 0x0060
Reset: 0x0
Property: Read/Write
This register is relevant only if USART_MODE = 0x9 in the USART Mode Register.
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
EOFS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
LCDS DMAM CDTAIL TCOL COLDET COMMT
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Value Description
0 LON collision detection feature disabled.
1 LON collision detection feature enabled.
Name: US_LONPR
Offset: 0x0064
Reset: 0x0
Property: Read/Write
This register is relevant only if USART_MODE = 0x9 in the USART Mode Register.
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
LONPL[13:8]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
LONPL[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: US_LONDL
Offset: 0x0068
Reset: 0x0
Property: Read/Write
This register is relevant only if USART_MODE = 0x9 in the USART Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
LONDL[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: US_LONL2HDR
Offset: 0x006C
Reset: 0x0
Property: Read/Write
This register is relevant only if USART_MODE = 0x9 in the USART Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
PB ALTP BLI[5:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: US_LONBL
Offset: 0x0070
Reset: 0x0
Property: Read
This register is relevant only if USART_MODE = 0x9 in the USART Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
LONBL[5:0]
Access
Reset 0 0 0 0 0 0
Name: US_LONB1TX
Offset: 0x0074
Reset: 0x0
Property: Read/Write
This register is relevant only if USART_MODE = 0x9 in the USART Mode Register.
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
BETA1TX[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
BETA1TX[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
BETA1TX[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: US_LONB1RX
Offset: 0x0078
Reset: 0x0
Property: Read/Write
This register is relevant only if USART_MODE = 0x9 in the USART Mode Register.
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
BETA1RX[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
BETA1RX[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
BETA1RX[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: US_LONPRIO
Offset: 0x007C
Reset: 0x0
Property: Read/Write
This register is relevant only if USART_MODE = 0x9 in the USART Mode Register.
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
NPS[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
PSNB[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Name: US_IDTTX
Offset: 0x0080
Reset: 0x0
Property: Read/Write
This register is relevant only if USART_MODE = 0x9 in the USART Mode Register.
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
IDTTX[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
IDTTX[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
IDTTX[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 23:0 – IDTTX[23:0] LON Indeterminate Time after Transmission (comm_type = 1 mode only)
Value Description
0– LON indeterminate time after transmission in tbit.
16777215
Name: US_IDTRX
Offset: 0x0084
Reset: 0x0
Property: Read/Write
This register is relevant only if USART_MODE = 0x9 in the USART Mode Register.
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
IDTRX[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
IDTRX[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
IDTRX[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 23:0 – IDTRX[23:0] LON Indeterminate Time after Reception (comm_type = 1 mode only)
Value Description
0– LON indeterminate time after reception in tbit.
16777215
Name: US_ICDIFF
Offset: 0x0088
Reset: 0x0
Property: Read/Write
This register is relevant only if USART_MODE = 0x9 in the USART Mode Register.
This register can only be written if the WPEN bit is cleared in the USART Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
ICDIFF[3:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Name: US_WPMR
Offset: 0x00E4
Reset: 0x0
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
WPKEY[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WPKEY[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPKEY[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPEN
Access R/W
Reset 0
Name: US_WPSR
Offset: 0x00E8
Reset: 0x0
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
WPVSRC[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPVSRC[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPVS
Access R
Reset 0
46.1 Description
The Universal Asynchronous Receiver Transmitter (UART) features a two-pin UART that can be used for
communication and trace purposes and offers an ideal medium for in-situ programming solutions.
Moreover, the association with a DMA controller permits packet handling for these tasks with processor time reduced
to a minimum.
APB
Interrupt
uart_irq
PCKx Control
PMC peripheral clock
CD
peripheral clock 0
16-bit Counter
OUT
>1
PCKx 1
1 Divide Baud Rate
by 16 Clock
0 0
Receiver
Sampling Clock
46.5.2 Receiver
RXRDY
OVRE
RSTSTA
Figure 46-4. Character Reception
Example: 8-bit, parity enabled 1 stop
URXD
RXRDY
Read UART_RHR
RXRDY
OVRE
RSTSTA
RXRDY
PARE
RXRDY
FRAME
46.5.3 Transmitter
Baud Rate
Clock
UTXD
TXRDY
TXEMPTY
Peripheral
Clock
RXRDY
Write REQCLR
SystemWakeUp_req
SystemWakeUp_req
RHR = 0x75,
PCLK_req VAL1 = 0x75
=> match
PCLK
(Main RC)
SystemWakeUp_req
RHR = 0x85,
PCLK_req VAL1 = 0x00
=> no match
PCLK
(Main RC)
SystemWakeUp_req
RXD
Idle Start D0 D1 D7 Parity = NOK Stop
PCLK
(Main RC)
SystemWakeUp_req
Related Links
31. Power Management Controller (PMC)
Receiver RXD
Disabled
Transmitter TXD
Local Loopback
Disabled
Receiver RXD
VDD
Disabled
Transmitter TXD
Disabled
Transmitter TXD
Name: UART_CR
Offset: 0x00
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
REQCLR RSTSTA
Access W W
Reset – –
Bit 7 6 5 4 3 2 1 0
TXDIS TXEN RXDIS RXEN RSTTX RSTRX
Access W W W W W W
Reset – – – – – –
Value Description
0 No effect.
1 The receiver is disabled. If a character is being processed and RSTRX is not set, the character is
completed before the receiver is stopped.
Name: UART_MR
Offset: 0x04
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
CHMODE[1:0] BRSRCCK PAR[2:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
FILTER
Access R/W
Reset 0
Name: UART_IER
Offset: 0x08
Reset: –
Property: Write-only
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Enables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
CMP TXEMPTY
Access W W
Reset – –
Bit 7 6 5 4 3 2 1 0
PARE FRAME OVRE TXRDY RXRDY
Access W W W W W
Reset – – – – –
Name: UART_IDR
Offset: 0x0C
Reset: –
Property: Write-only
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Disables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
CMP TXEMPTY
Access W W
Reset – –
Bit 7 6 5 4 3 2 1 0
PARE FRAME OVRE TXRDY RXRDY
Access W W W W W
Reset – – – – –
Name: UART_IMR
Offset: 0x10
Reset: 0x00000000
Property: Read-only
The following configuration values are valid for all listed bit names of this register:
0: The corresponding interrupt is disabled.
1: The corresponding interrupt is enabled.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
CMP TXEMPTY
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
PARE FRAME OVRE TXRDY RXRDY
Access R R R R R
Reset 0 0 0 0 0
Name: UART_SR
Offset: 0x14
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
CMP TXEMPTY
Access R R
Reset 0 0
Bit 7 6 5 4 3 2 1 0
PARE FRAME OVRE TXRDY RXRDY
Access R R R R R
Reset 0 0 0 0 0
Value Description
0 A character has been written to UART_THR and not yet transferred to the internal shift register, or the
transmitter is disabled.
1 There is no character written to UART_THR not yet transferred to the internal shift register.
Name: UART_RHR
Offset: 0x18
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
RXCHR[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: UART_THR
Offset: 0x1C
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
TXCHR[7:0]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 –
Name: UART_BRGR
Offset: 0x20
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
CD[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CD[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: UART_CMPR
Offset: 0x24
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
VAL2[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CMPPAR CMPMODE
Access R/W R/W
Reset 0 0
Bit 7 6 5 4 3 2 1 0
VAL1[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: UART_WPMR
Offset: 0xE4
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
WPKEY[23:16]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WPKEY[15:8]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPKEY[7:0]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPEN
Access R/W
Reset 0
47.1 Description
The MediaLB (MLB) maps all the MOST Network data types (transport methods) into a single low-cost, scalable,
and standardized hardware interface between a MediaLB Controller and at least one other MediaLB Device. The
use of MediaLB simplifies the hardware interface, reduces the pin count, and facilitates the design of modular
reusable hardware. From a software development perspective, the use of MediaLB relieves the system developer
from the complexity of the MOST Network, which simplifies software development and enables the design of
reusable software for different applications. This simplified, standardized interface shortens time-to-market and
makes software maintenance effortless.
The link layer and three different physical layers are defined as part of this specification. The physical layer section
describes pin configurations, operating speeds, and bus topology. The link layer section describes the compliance of
the signaling and addressing protocol.
The ChannelAddresses output by the Controller for each logical channel are used in normal data transport
and can be statically or dynamically assigned. To support dynamic configuration of MediaLB Devices, a unique
DeviceAddress must be assigned to all MediaLB Devices before startup. DeviceAddresses allow the External Host
Controller (EHC) and MediaLB Controller to dynamically determine which Devices exist on the bus. At the request of
a MediaLB Device (e.g. EHC), the Controller scans for DeviceAddresses in the System Channel. Once a Device is
detected, a ChannelAddress for each logical channel can be assigned.
The DeviceAddress, ChannelAddress, Command, and RxStatus structures are described in the Link Layer section.
MediaLB
Analog
Configuration
Interface
Analog
Interface
Data Buffer Channel Table
Bus Interface Bus Interface
AHB RF
AHB
Interface HBI
HBI
CPR
Names Description
Media Local Bus:
MLBC General reference to the Clock line of a Media Local Bus:
on a 3-pin MediaLB interface, connects to the MLBCLK pin
MediaLB MediaLB
Controller Device 1
MOST Network
100 Ω 100 Ω
MLBDAT MLBDAT
RX
TX 100 Ω 100 Ω
MLBSIG MLBSIG
100 Ω
MLBCLK MLBCLK
47 kΩ
MediaLB
Device 2
100 Ω
MLBDAT
47 kΩ
100 Ω
MLBSIG
47 kΩ
MLBCLK
MLBCLK
100 Ω
(Optional)
27 pF
(Optional)
A 16-bit token, which is sent on the MLBS line by the MediaLB Controller at the end of a physical channel. A unique
ChannelAddress defines a logical channel and grants a particular physical channel to a transmitting (Tx) and a
receiving (Rx) MediaLB Device.
• Command:
A byte-wide value sent by the transmitting (Tx) MediaLB Device on the MLBS line at the start of a physical channel.
This command byte indicates the data type and additional control information to the Rx MediaLB Device. The Tx
Device also outputs data on the MLBD signal during the same physical channel that Command is sent.
• RxStatus:
A byte-wide value sent by the receiving (Rx) MediaLB Device on the MLBS line, after Command is sent. This status
response provides a hardware handshaking mechanism and signals other control information, such as transmission
errors, back to the sender.
• Data:
The physical channel contains Data and is sent by the Tx MediaLB Device during the same physical channel in which
Command is sent. This physical channel data must be transmitted left-justified, MSB first, most significant byte first.
Note the Rx Device might return a status of busy, wherein the Tx Device must retransmit the same data in the next
physical channel associated with the logical channel.
To dynamically configure ChannelAddresses for logical channels, a DeviceAddress can be pre-defined for MediaLB
Devices. The DeviceAddress is a 16-bit address used in the System Channel with the MLBScan command to detect
which MediaLB Devices exist.
Note: 1. All odd ChannelAddresses are reserved (LSB must be zero for valid ChannelAddresses).
are never assigned to physical channels. Once a Device is found, the ChannelAddresses used in normal operation
can be assigned.
MediaLB Devices are encouraged to support dynamic configuration, where a preset DeviceAddress is used to assign
the ChannelAddresses for each logical channel. Dynamic configuration avoids collisions of ChannelAddresses on
different Devices.
To minimize collisions of DeviceAddresses, programmable Devices should assign the DeviceAddress via firmware.
For non-programmable Devices, it is strongly recommended to have only the upper bits fixed, and have the lower
bits configurable via pins on the Device. Having the lower bits configurable via pins minimizes collisions with other
manufacturer’s Devices, as well as allows multiple instances of the same Device to coexist on the same MediaLB
bus.
Table 47-4. DeviceAddress Grouping
...........continued
Value Command Description
(see
Note)
02h...0Eh rsvd Reserved
10h SyncData Tx Device sends out SyncData command to indicate synchronous stream
data.
12h...1Eh rsvd Reserved
20h AsyncStart Asynchronous logical channel. Start of a packet.
22h AsyncContinue Asynchronous logical channel. Middle of a packet.
24h AsyncEnd Asynchronous logical channel. End of a packet.
26h AsyncBreak Asynchronous logical channel. Indicates a packet stop. No valid data
present on the MLBD line.
28h...2Eh rsvd Reserved
30h ControlStart Control logical channel. Start of a message.
32h ControlContinue Control logical channel. Middle of a message.
34h ControlEnd Control logical channel. End of a message.
36h ControlBreak Control logical channel. Indicates a message stop. No valid data present
on the MLBD line.
38h...3Eh rsvd Reserved
40h IsoNoData Isochronous logical channel, no data valid.
42h Iso1Byte Isochronous logical channel, one data byte valid. First byte (MSB)
transmitted/received is valid. Last three bytes in physical channel are
empty.
44h Iso2Bytes Isochronous logical channel, first two data bytes valid. First byte
transmitted/received is the MSB. Last two bytes in physical channel are
empty.
46h Iso3Bytes Isochronous logical channel, first three data bytes valid. First byte
transmitted/received is the MSB. Last byte in physical channel is empty.
48h Iso4Bytes Isochronous logical channel, all four data bytes valid. First byte
transmitted/received is the MSB.
4Ah...4Eh rsvd Reserved
50h IsoSync1Byte Isochronous logical channel, one data byte valid and start of a block. First
byte transmitted/received is valid. Last three bytes in physical channel are
empty.
52h IsoSync2Bytes Isochronous logical channel, two data bytes valid and start of a block.
First byte transmitted/received is the MSB. Last two bytes in the physical
channel are empty.
54h IsoSync3Bytes Isochronous logical channel, three data bytes valid and start of a block.
First byte transmitted/received is the MSB. Last byte in physical channel is
empty.
56h IsoSync4Bytes Isochronous logical channel, all four data bytes valid and start of a block.
First byte transmitted/received is the MSB.
58h...DEh rsvd Reserved
...........continued
Value Command Description
(see
Note)
System Commands (Controller sends in System Channel):
00h NoData The Controller has no System command to send out.
E0h MOSTLock The Controller issues a MOST Network lock command in the System
Channel to notify Devices that the MOST Network is in lock.
E2h MOSTUnlock The Controller issues a MOST Network unlock command in the System
Channel to notify Devices that the MOST Network is unlocked.
E4h MLBScan The Controller issues an MediaLB scan command in the System Channel
and uses the MLBD line to indicate the DeviceAddress which is currently
being scanned. All Devices supporting MLBScan must compare the
received DeviceAddress against their internal DeviceAddress, and if a
match occurs, a Device responds in the following System Channel with
one of the System responses as specified in Table 47-6.
E6h MLBSubCmd The Controller outputs a sub-command in the System Channel. The sub-
command is part of the data on the MLBD line.
E8h...FCh rsvd Reserved
FEh MLBReset The Controller outputs a MediaLB reset on the System Channel MLBS
line. If the first two-bytes are zero on the MLBD line, then the system reset
is a broadcast system reset and every Device should reset its MediaLB
interface. Otherwise, the MLBD line contains the DeviceAddress of the
Device being asked to reset its own MediaLB interface.
The MLBSubCmd command is used for configuration and status information from the Controller to Devices. A
sub-command is contained in the first byte of the MLBD quadlet. When MediaLB Device interfaces receive the
MLBSubCmd command, they will store the command and corresponding data quadlet (sub-command). Currently,
only one sub-command is defined (scSetCA) and is used in dynamic configuration.
MediaLB Devices and ChannelAddresses can be configured using two methods: static or dynamic. When the EHC
MediaLB Device uses the dynamic method, it instructs the Controller to scan for other MediaLB Devices. As Devices
are found, the EHC then instructs the Controller to configure the found Device via the MLBSubCmd command.
The EHC determines which DeviceAddresses to scan for and, once a Device is found, which ChannelAddresses to
assign. The EHC uses the pre-defined logical channels opened when MediaLB was started to transfer messages to
the Controller. The EHC sends a message to the Controller to start scanning for a particular DeviceAddress. The
Controller then sends the MLBScan command into the System Channel, and places the DeviceAddress into the first
two bytes (most significant or first two transmitted) of the System Channel on MLBD.
An Rx Device with a matching DeviceAddress must send a status response of DevicePresent in the next System
Channel if the ChannelAddresses are already assigned or fixed. If the ChannelAddresses have not been assigned,
then the Rx Device must respond with DeviceServiceRequest.
If a Device is found, the Controller sends a message to the EHC indicating the Device’s presence and whether the
Device needs to be configured or not. For Devices that need to be configured (requesting service), the EHC must
then send a message to the Controller defining which ChannelAddresses to send to the Device. The Controller then
sends this information to all Devices using the MLBSubCmd command in the System Channel.
The MLBSubCmd command data field contains four bytes that are defined as follows:
Figure 47-3. Sub-Command scSetCA Quadlet
31 24 23 16 15 8 7 0
sub-command = scSetCA DA [8:1] CA [8:1] Index
The scSetCA (01h) sub-command (under the MediaLB MLBSubCmd command) supports dynamic configuration of
MediaLB ChannelAddresses. The bytes are defined as follows:
• scSetCA (01h) - Sub-command to Set ChannelAddress. Indicates that the rest of the bytes are logical channel
configuration information.
• DA[8:1] - DeviceAddress bits 8 through 1, where all other bits are zero. Matches the DeviceAddress found
during the MLBScan command.
• CA[8:1] - ChannelAddress bits 8 through 1, where all other bits are zero. Assigned ChannelAddress associated
with a specific Index (Device’s logical channel) below.
• Index - Indicates which logical channel within a Device to associate the ChannelAddress with. This index
enables a Device to support multiple logical channels. Index 0 and 1 are reserved for control channels. Devices
that do not support control channels will start at Index 2 (with Indices 0 and 1 unused).
MediaLB Devices receiving this sub-command should check the DA[8:1] byte to determine whether this
DeviceAddress matches its own. If the DeviceAddress matches, then the Device uses the ChannelAddress (CA[8:1]
bits) for the logical channel associated with that Index. If a Device is reset or drops off MediaLB, it must reinitialize to
its power-up state and discard any previously assigned ChannelAddresses.
MediaLB Device documentation must contain a table defining the relationship between the Index value, the particular
logical channel associated with it, and the type and maximum bandwidth supported. In addition, the Device must
indicate how many frames are needed to set the ChannelAddress once the scSetCA sub-command has been
received. The EHC must use this data to determine the wait between setting Indices/Logical channels.
• The Rx MediaLB Device responds in the same physical channel by shifting out its status response (RxStatus)
onto the MLBS line after the Tx Device’s Command. The RxStatus reports the status of the receiving
Device to the sender. For asynchronous, control and isochronous (non-broadcast) transmissions, the data
sent is accepted if the receiver presents a status response of ReceiverReady or rejected if the receiver
presents a status response of ReceiverBusy. For synchronous and isochronous (broadcast) transmissions, the
receiving Device must not drive any RxStatus, thereby defaulting to ReceiverReady. Synchronous (and some
isochronous) data is sent in a broadcast fashion and supports multiple receiving Devices.
Figure 47-4. 3-pin MediaLB Data Structure
Controller grants the Transmitting Device sends
Receiving Device
Transmitting Device its Command and
accepts or rejects the
access to the logical associated Data on the
Data using the RxStatus
channel associated with logical channel associated
field.
the ChannelAddress. with the ChannelAddress.
Controller: Tx Device: Rx Device:
MLBS ChannelAddress Command RxStatus
4-byte delay
(1 quadlet = 1 physical channel) (1 quadlet = 1 physical channel)
During normal operation, the MediaLB Controller initiates a transfer by sending out the ChannelAddress on the
MLBS line, and then stops driving (high-impedance) the MLBS line. When a MediaLB Device recognizes the
ChannelAddress as related to one of its channels, the Tx Device will generate the Command on the MLBS line and
place the data on the MLBD line. The Rx Device will generate the RxStatus on the MLBS line, after the Command.
Both Command and RxStatus are output in the second quadlet after the matching ChannelAddress occurred. If the
Rx Device reports a status response of ReceiverBusy, then the Tx Device must retransmit the Command and Data
in the next physical channel assigned to that same ChannelAddress (next quadlet in the logical channel). If the Tx
Device transmits the NoData command, the Rx Device ignores the data on the MLBD line.
This results in the following scheme:
Controller: ChannelAddress → Tx Device: Command → Rx Device: RxStatus
Since for synchronous data transmission (SyncData) the status response must always be ReceiverReady (bus
default when signal not driven), synchronous data supports broadcast transmission to multiple Rx Devices.
After the Tx Device outputs Command, it must stop driving the MLBS line to allow the Rx Device to output RxStatus.
At the end of the physical channel, the Tx Device must also stop driving the MLBD line unless the ChannelAddress
for the next physical channel is also assigned to it. Likewise, after the Rx Device outputs RxStatus, it must stop
driving the MLBS line to allow the Controller to output another ChannelAddress.
Figure 47-5 illustrates which Device is driving the MediaLB signal and data lines, using the 256Fs speed as an
example. Depending on the number of physical channels that are grouped into logical channels, fewer unique
ChannelAddresses may be seen in the frame. In Figure 47-5, each logical channel is one quadlet (one physical
channel), mapping to seven ChannelAddresses (B through H). If one logical channel consisted of two quadlets and
another consisted of three quadlets, then only four unique ChannelAddresses would be seen on MediaLB (B through
E).
For MediaLB synchronization purposes, ChannelAddress 0x01FE is defined as the FRAMESYNC pattern. The
MediaLB Controller generates this pattern once per MOST Network frame on the MLBS line. The MediaLB link layer
is designed to ensure that this bit pattern is unique on the bus.
All MediaLB Devices must synchronize their byte boundary and their physical channel boundary upon receiving the
FRAMESYNC pattern. The end of the FRAMESYNC pattern also indicates that four bytes later is the start of the
MediaLB frame (PC0), and the System Channel. The actual number of physical channels supported is determined by
the MediaLB clock speed. the following table illustrates the number of available quadlets and physical channels per
frame for 3-pin MediaLB speed modes.
Table 47-7. 3-pin MediaLB Valid Physical Channels
MediaLB Speed Physical Channels Available Physical Channels per Frame (see Note)
per Frame
256×Fs 8 7 (PC1–PC7)
...........continued
MediaLB Speed Physical Channels Available Physical Channels per Frame (see Note)
per Frame
512×Fs 16 15 (PC1–PC15)
Note: PC0 (first physical channel of the MediaLB frame) is always used as the System Channel.
The MLBS and MLBD physical channel associated with the FRAMESYNC ChannelAddress (PC0), is defined as
the System Channel and can be used by the Controller to broadcast system control and status information to all
Devices. Examples of System commands are MLBReset and MLBScan. Status examples include MOSTLock and
MOSTUnlock which indicate the status of the MOST Network to MediaLB Devices.
MediaLB supports both static physical channel assignments or dynamic implementations. As an example of a
static implementation, the Controller can automatically open a pair of logical channels at power-up. Through these
channels, the rest of the MediaLB bandwidth can be configured by a MediaLB Device (generally the EHC). For
a dynamic implementation, the EHC can request the Controller to scan for specific DeviceAddresses and then
configure the Devices found (see the MLBScan System command).
Figure 47-5. 3-pin MediaLB 256Fs Interface Example
PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7
Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte B yte Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
MLBD
Cmd Rx PC2 Cmd RxSt PC3 Cmd RxSt PC4 Cmd RxSt PC5 Cmd RxSt PC6 Cmd RxSt PC7 Cmd RxSt PC0 Cmd RxSt PC1
MLBS Sys Stat CA C B B CA D C C CA E D D CA F E E CA G F F CA H G G FRAMESYNC H H CA B
MLBD System Channel Data B Data C Data D Data E Data F Data G Data H
47.6.1.7 Initialization
At power up, the MediaLB Controller might output a MLBReset command in the System Channel (all System
commands are optional). Upon reception of the MLBReset command, all MediaLB Devices will cancel any current
transmissions or receptions and clear their buffers.
Two scenarios are supported to configure MediaLB Devices and ChannelAddresses:
• Static pre-configured before startup. The system implementor decides which ChannelAddresses are to be used
for every communication path on MediaLB. This static MediaLB configuration can be communicated by the EHC
to the Controller through pre-defined power-up logical channels or through a secondary port.
• Dynamically at run-time. Dynamic configuration allows the board designer to support multiple build options
where the EHC can query to find out if a particular Device is present or not on a particular board. The EHC
instructs the Controller to scan for a particular DeviceAddress in the System Channel. The Controller uses the
MLBScan command to look for a Device. The Controller then notifies the EHC whether the Device is present
or not. If the Device is present, then the EHC can instruct the Controller to set the ChannelAddresses for the
Device found. The EHC sends messages to the Controller to set each Indices/Logical channel, and waits the
appropriate amount of time between each message as specified in the Devices documentation. When that
particular Device is configured, the EHC can instruct the Controller to scan for the next Device.
Since the MediaLB Controller is the interface between the MediaLB Devices and the MOST Network, the Controller
provides the MLBC signal and will also continue to operate even when the MOST Network is unlocked. When
no activity exists on MediaLB, the Controller can shut off the MLBC placing MediaLB in a low-power state. The
ChannelAddress assignments are not affected in low-power state; therefore, the same communication paths exists
once MLBC is restarted.
MediaLB Devices are synchronously Clientd to the MediaLB Controller through the MLBC signal. Since the
Controller is synchronized to the MOST Network, the MLBC signal provides Network synchronization to all MediaLB
Devices. Once the Controller starts up MLBC, all MediaLB Devices must synchronize to the MediaLB frame before
communication can commence. When not frame-locked, Devices must search for the FRAMESYNC pattern, which
defines a byte and physical channel boundary. Additionally, the start of the MediaLB frame (PC0) occurs one
quadlet after FRAMESYNC is present on the bus. Even when a Device is frame-locked, it should check every frame
continuing to validate that it remains frame-locked. While frame-locked, the Device can access MediaLB according
the rules of the MediaLB protocol.
A MediaLB Device must perform the following operations:
• Rules for synchronization to MediaLB:
– When locked, as long as FRAMESYNC is detected at the expected time, the Device must not synchronize
to unexpected FRAMESYNC patterns.
– When locked and FRAMESYNC is not detected at the expected time for two consecutive frames, declare
unlock, and the Device stops driving MLBS and MLBD.
– When unlocked and FRAMESYNC is detected at the same time for three consecutive frames, declare lock,
and the Device can resume driving MLBS and MLBD when appropriate.
• When the Tx Device for a physical channel, it drives Command onto MLBS at the beginning of the physical
channel and then sets MLBS to a high impedance state. In addition, the Tx Device drives the data quadlet onto
MLBD line for the duration of the physical channel, and then sets the MLBD line to a high impedance state. The
NoData command is the default for the MLBS line and does not need to be driven by the Tx Device.
• When the Rx Device for a physical channel, it drives RxStatus onto MLBS in the second byte of the physical
channel and then sets MLBS to a high impedance state for asynchronous, control and isochronous (non-
broadcast) transmissions. When no RxStatus is driven, the MLBS line defaults to ReceiverReady; however, it is
recommended that the Rx Device drive the ReceiverReady response for non-broadcast transmissions.
• When the Rx Device for a physical channel, it must not drive any RxStatus (defaulting to ReceiverReady) for
synchronous and isochronous (broadcast) transmissions.
The flow diagram contains four states: Idle, Start, Continue, and End. Each state uses a different command when
sending the data. The Idle state is the starting point, waiting for the application to initiate a packet transfer. When a
quadlet is ready to be transferred, the flow diagram moves to the Start state.
Note: If a ControlEnd command is sent in the physical channel preceding a ReceiverProtocolError RxStatus (in
either the Idle or Start state), the ReceiverProtocolError status response must be assigned to the previous packet
transmitted. Alternatively, a status response of ReceiverProtocolError (in either the Idle or Start state) must not be
assigned to the previous packet transmitted unless ControlEnd was sent in the preceding physical channel.
Once a quadlet has been sent successfully, the flow diagram moves to the Continue state, depicted in Figure 47-7,
and stays there until all but the last quadlet has been transmitted. The last quadlet is transmitted in the End state,
which is depicted in Figure 47-8.
The protocol flow for an Rx Device is illustrated in Figure 47-9. This flow diagram consists of only two states: Idle
and Continue. The Idle state is the starting point where the Rx Device is waiting for a packet start command. Once
a start command has been received (ControlStart or AsyncStart), the flow diagram moves to the Continue state. The
reception of a ControlEnd command completes the transfer and moves the flow diagram back to the Idle state, where
it waits for the next packet.
The protocol flow for an Rx Device, as described in Figure 47-9, should be used as a reference for standard MediaLB
Devices. According to this flow, a ReceiverProtocolError status response may be sent by an Rx Device only in the
Continue state; however, more enhanced MediaLB Devices can also conduct protocol checks in the Idle state. In this
case, a ReceiverProtocolError status response could be sent for example, if a logical channel is setup for control data
and an isochronous or synchronous command is received. Protocol checks in the Continue state may be expanded
beyond the flow shown in Figure 47-9 when required by specific implementations.
GoTo Idle
State = Idle
yes
RxStatus == †
Report Protocol Error
yes
ReceiverProtocolError to Application
State = Start ?
no
* Application
yes
request break
? *
Supporting application Break
requests other than after an
no RxStatus of ReceiverBusy is optional.
RxStatus ==
yes
ReceiverBusy
?
no
no
RxStatus == †
Report Protocol Error
yes
ReceiverProtocolError to Application
?
†
If a ReceiverProtocolError is received in the
no
Idle or Start state following a ControlEnd
command, the protocol error is being
First quadlet sent successfully
reported for the previous packet.
GoTo Next
GoTo Next
State = Continue
*
Supporting application Break * Application
requests other than after an request break yes
RxStatus of ReceiverBusy is optional. ?
no
no Quadlet ready to
send ?
yes
RxStatus ==
yes
ReceiverBusy
?
no
RxStatus == yes
Report Break
ReceiverBreak to Application
?
no
no
Sent Command
yes
== NoData
? GoTo Idle
no
Quadlet sent successfully
GoTo EndState
State = End
* Application
yes
request break
? *
Supporting application Break
requests other than after an
no
RxStatus of ReceiverBusy is optional.
no Quadlet ready to
send ?
yes
RxStatus ==
yes
ReceiverBusy
?
Send Command = ControlBreak
Send Data = 0x00000000
no
Ignore RxStatus
no
no
Sent Command
yes
== NoData
?
A Control packet is sent successfully
if the ControlEnd command is not no
acknowledged with ReceiverProtocolError
in the next physical channel.
GoTo Idle
State = Idle
State = Continue
Application
yes
requests break
no Rx Buffer available no
? ?
yes
Command == Command ==
Store quadlet in Rx Buffer yes no
ControlContinue ControlBreak
? ?
no yes
yes
Command == no
Command == yes
NoData ControlBreak
? ?
no
Report Break received to Application,
discard current packet
Command == yes
ControlEnd Control Packet sent successfully
?
Ignore Command
Ignore Data
Send RxStatus = ReceiverProtocolError
Synchronous
Synchronous stream data is sent in a continuous and broadcast fashion, without block information. Therefore,
receiving Devices must not respond to the synchronous command; thereby leaving RxStatus in the ReceiverReady
state (logic low). For 3-pin MediaLB, the required pull-down on MLBS leaves this signal in the ReceiverReady
command when no synchronous data is transmitted on the MLBD line.
Figure 47-10 illustrates the synchronous data formats for MediaLB. For stereo 24-bit data, two physical channels
(PCn) are needed per frame where the data is packed and left-justified in the two quadlets. In the 32-bit sequential
format, data fills the entire quadlet with the internal data format determined by the system implementor.
Figure 47-10. MediaLB Synchronous Data Structure
PCn PCn+m
(1 quadlet = 1 physical channel) (1 quadlet = 1 physical channel)
Tx Device: Rx Device: Tx Device: Rx Device:
MLBS
SyncData ReceiverReady SyncData ReceiverReady
MSB LSB
MSB LSB
MSB LSB
The synchronous flow for a Tx Device is illustrated in Figure 47-11. The data transfer blocks (slanted rectangle
shapes) occur only during a physical channel (PCn) associated with the logical channel defined by a single
ChannelAddress. The flow diagram contains only one state: Transmit. Once a channel has been initialized, the
Transmit state is entered. If a Tx Device has no data to transmit, it must still send the SyncData command and set
the actual data to a safe value, such as all zeros. To stop sending synchronous data, the logical channel must be
eliminated (ChannelAddress removed from MediaLB).
The synchronous flow for an Rx Device is illustrated in Figure 47-12. The flow diagram also contains only one state,
Continue, where the Rx Device waits for data from the Tx Device. No command other than SyncData is expected
or allowed. When the SyncData command is detected, the corresponding data quadlet sent with the command is
received and stored in the Rx buffer. Any command received, other than SyncData, is a ProtocolError and should
be reported to the application. Furthermore, the data quadlet received with the invalid command is discarded and
replaced with a safe value.
Since the default bus state is ReceiverReady, the Rx Device must not drive the MLBS line with RxStatus since
ReceiverReady is the only allowable response for synchronous data. The system stops the transfer of synchronous
data by eliminating the logical channel (ChannelAddress) from the bus. If an Rx Device does not receive its
ChannelAddress in the frame, it should assume that the channel is not setup yet, or that the logical channel has
been eliminated and should respond accordingly (for example, mute outputs).
Figure 47-11. Synchronous Data Tx Device Protocol
Init
State = Transmit
State = Continue
Receive Command
Receive Data
RxStatus ReceiverReady
yes Command no
SyncData
Isochronous
Isochronous data is sent in a streaming fashion, similar to synchronous data. However, the isochronous commands
indicate the start of a block and how many bytes are valid in the concurrent transmitted quadlet. Valid bytes are
left-justified in the quadlet, as illustrated in Figure 47-13. When isochronous data is being transported (channel
active), but no data is available for the current quadlet, the IsoNoData command is sent by the Tx Device.
Figure 47-13. MediaLB Isochronous Data Structure
4-byte delay
(1 quadlet = 1 physical channel) (1 quadlet = 1 physical channel)
Controller: Tx Device: Rx Device:
MLBS
ChannelAddress Command RxStatus
The isochronous flow for a Tx Device is illustrated in Figure 47-14. The data transfer blocks (slanted rectangle
shapes) occur only during a physical channel (PCn) associated with the logical channel defined by a single
ChannelAddress. Similar to the synchronous flow, isochronous data immediately starts transmitting. When data
exists from the application, the IsoSync?Bytes commands are used to indicate the start of a block, which provides
alignment information to the Rx Device. The Iso?Bytes commands indicate the middle of a block of data. The
definition of block for isochronous data is outside the scope of this document. For physical channels that transfer less
than four bytes, the Rx Device must only use/store the number of valid bytes, and ignore the unused portion.
The isochronous flow for an Rx Device is illustrated in Figure 47-15. The NoData command indicates that the channel
is not setup yet. Once an isochronous channel is setup, the Rx Device continually receives the channel data, similar
to synchronous data. The only two valid responses for an isochronous channel are ReceiverBusy, and the default
bus state of ReceiverReady. Although Rx Devices can respond with ReceiverBusy, its use should be minimized,
since Tx Devices may not be able to store much isochronous data that gets backed up due to the ReceiverBusy
responses. If any Rx Device uses ReceiverBusy, then only one Rx Device is allowed. If all targeted Rx Devices do
not drive RxStatus (default ReceiverReady response), then the isochronous stream can support multiple Rx Devices
(broadcast).
Figure 47-14. Isochronous Data Tx Device Protocol
Init
State = Transm it
yes
no no
no
no
no no
no
yes
RxStatus no
ReceiverBusy
don’t m ove pointer length, ? m ove pointer length
retransm it same data amount to next data
State = Continue
Buffer overflow
yes no Rx Buffer available yes
supported ?
?
no
Receive Command Receive Command
Ignore Data Receive Data
Send RxStatus = ReceiverBusy RxStatus = ReceiverReady
yes
Command ==
IsoNoData
?
no
yes
Indicate Start of a new
block to application
yes
Indicate Start of a new
block to application
yes
Indicate Start of a new
block to application
Command == Command ==
Copy received MS byte to Rx Buffer yes no no
Iso1Byte IsoSync1Byte
? ?
yes
Indicate Start of a new
block to application
Report Protocol Error to Application,
and discard received Data
47.6.2 Compliance
The MediaLB specification is targeted towards many levels of chip complexity and native intelligence. Therefore,
different levels of implementation are allowed to support MediaLB and still remain compliant to this specification.
The Physical Layer portion of this specification must be met by all Devices for whichever speeds a particular Device
supports. All MediaLB Devices must support the rules for synchronization to MediaLB.
For MediaLB Controllers, all System commands are optional, including support for dynamic system configuration and
DeviceAddresses.
For MediaLB Devices, support for all transport methods is optional. If a MediaLB Device supports a particular
transport method, it must fully support it including all Command bytes and RxStatus responses associated with
that transport method. For asynchronous and control methods, the Protocol error responses can be expanded for
additional error checking, based on specific implementations. Any extra error checking that causes a Protocol error to
be transmitted must be listed in the Device documentation.
For MediaLB Devices, support for System responses and dynamic configuration are optional. If dynamic
configuration is supported, it must comply with the specifications listed in this document.
All MediaLB Devices must specify clearly in documentation what MediaLB speeds, System commands, and transport
methods they support. In addition, MediaLB Devices must clearly state the DeviceAddress as well as the Index and
associated transport method used in configuring the ChannelAddress.
...........continued
Channel Address Logical Channel
0x007E 63
0x01FE 0(1)
Receive devices retain the write address pointer to the associated circular data buffer in the DBR, while transmit
devices retain the read address pointer. The DMA controllers in the routing fabric are responsible for ensuring that
the circular buffers do not overflow or underflow. Each channel type (e.g., synchronous, isochronous, asynchronous
and control) has Full and Empty detection.
• Synchronous Channels
For synchronous channels, two mechanisms prevent overflow and underflow of the data buffer:
– Hardware aligns the read pointer (RPTR) to the write pointer (WPTR) to ensure an offset of two sub-
buffers.
– RPTR and WPTR are periodically synchronized to the start of the next sub-buffer (e.g. following a
FRAMESYNC).
• Isochronous Channels
For isochronous channels, hardware does not read from an empty data buffer or write to a full data buffer. The
conditions used by hardware for detection include:
Data buffer Empty condition: (RPTR = WPTR) AND (BF = 0), and
Data buffer Full condition: (WPTR = RPTR) AND (BF = 1).
• Asynchronous and Control Channels
For asynchronous and control channels, hardware does not read from an empty data buffer or write to a full data
buffer. Hardware evaluates the DMA pointers (RPTR, WPTR) and packet count (RPC, WPC) to detect the data
buffer condition, where:
– Data buffer Empty condition: (RPTR = WPTR) AND (RPC = WPC), and
– Data buffer Full condition: ((WPTR = RPTR) AND (WPC != RPC)) OR (WPC = (RPC - 1)).
Channel Table RAM
The MLB has an external Channel Table RAM (CTR) that is 128-bit x 144-entry. The CTR allows system software to
dynamically configure channel routing and allocate data buffers in the DBR.
The CTR is logically divided into three sub-tables:
• Channel Descriptor Table (CDT)
• AHB Descriptor Table (ADT)
• Channel Allocation Table (CAT)
Address Mapping
Table 47-10. CTR Address Mapping
Label Address Bits 127…96 Bits 95…64 Bits 63…32 Bits 31…0
Channel Descriptor Table (CDT):
CDT 0x00 CDT0[127:0], CL = 0
0x01 CDT1[127:0], CL = 1
0x02 CDT2[127:0], CL = 2
... ...
0x3D CDT61[127:0], CL = 61
0x3E CDT62[127:0], CL = 62
0x3F CDT63[127:0], CL = 63
AHB Descriptor Table (ADT):
...........continued
Label Address Bits 127…96 Bits 95…64 Bits 63…32 Bits 31…0
ADT(1) 0x40 ADT0[127:0]
0x41 ADT1[127:0]
0x42 ADT2[127:0]
... ...
0x7D ADT61[127:0]
0x7E ADT62[127:0]
0x7F ADT63[127:0]
Channel Allocation Table (CAT):
CAT for MediaLB 0x80 CAT7 CAT6 CAT5 CAT4 CAT3 CAT2 CAT1 CAT0
... ... ... ... ... ... ... ... ...
0x87 CAT63 CAT62 CAT61 CAT60 CAT59 CAT58 CAT57 CAT56
CAT for HBI(1) 0x88 CAT71 CAT70 CAT69 CAT68 CAT67 CAT66 CAT65 CAT64
... ... ... ... ... ... ... ... ...
0x8F CAT127 CAT126 CAT125 CAT124 CAT123 CAT122 CAT121 CAT120
Note: 1. A fixed relationship exists between ADT entries and HBI CAT entries. When using HBI channel 0 (CAT64)
one should program ADT0. When using HBI channel 1 (CAT65) one should program ADT1, and so on.
Channel Allocation Table
The Channel Allocation Table (CAT) is comprised of 16 CTR entries (addresses 0x80–0x8F), as shown in Table 1-12.
Each 16-bit CAT entry represents a logical connection to or from a transmit/receive device (e.g. MediaLB or HBI
channel). All entries are indexed according to a fixed physical address assigned to every Rx/Tx channel (as shown
in the following table). The value stored in a CAT entry includes a 6-bit Connection Label, which provides a pointer
to the CDT. To complete a logical channel and form a routing connection, system software must assign the same
Connection Label to both the Rx and Tx channels.
Table 47-11. CAT Entry Map
Peripheral Tx Channels Rx Channels CAT Start Index CAT End Index Entries
MediaLB 0 to 64 64 - Tx Channels 0 63 64
HBI 0 to 64 64 - Tx Channels 64 127 64
The format of a full CAT entry is shown in Table 47-12, with field descriptions described in Table 47-13. All reserved
bits of a CAT entry field should be written as zero.
Table 47-12. CAT Entry Formats
Channel Type 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Isochronous rsvd FCE rsvd RNW CE CT[2:0] = 3 rsvd CL[5:0]
Asynchronous rsvd MT RNW CE CT[2:0] = 2 rsvd CL[5:0]
Control rsvd MT RNW CE CT[2:0] = 1 rsvd CL[5:0]
Synchronous rsvd MFE MT RNW CE CT[2:0] = 0 rsvd CL[5:0]
Field Description
CL[5:0] Connection Label (offset into CDT)
CT[2:0] Channel Type (Others):
111 = Reserved
110 = Reserved
101 = Reserved
100 = Reserved
011 = Isochronous
010 = Asynchronous
001 = Control
000 = Synchronous
CE Channel Enable:
1 = Enabled
0 = Disabled
RNW Read Not Write:
1 = Read
0 = Write
Notes: 1. When set for synchronous channels, the MT bit forces Rx channels to write zeros into the channel data
buffer, and Tx channels to output zeros on the physical interface. When set for asynchronous and control channels,
the MT bit causes DMA to halt at a packet boundary. Not valid for isochronous channels.
2. The FCE bit is used by MediaLB isochronous Rx channels only.
3. The MFE bit is used by MediaLB synchronous channels only.
Channel Setup
Data direction in the MLB is in reference to the DBR. Therefore, the data direction of CAT entries corresponding to
the same channel is reversed for the HBI CAT and the MediaLB CAT.
For a Tx channel (from the HC to the MediaLB interface):
• HBI CAT entry: RNW = 0 (write)
• MediaLB CAT entry: RNW = 1 (read)
Conversely, for a Rx channel (data from MediaLB to HC):
• HBI CAT entry: RNW = 1 (read)
• MediaLB CAT entry: RNW = 0 (write)
The figure below illustrates the directional relationship in the MLB.
Rx Rx
Host Host Bus
AMBA Data Buffer Ram MediaLB MediaLB
Controller Interface
Tx (DBR) Interface Tx Bus
(HC)
Bit Offset 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 WSBC Reserved
16 RSBC Reserved
...........continued
Bit Offset 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
32 Reserved
48 Reserved
64 WSTS[3:0] WPTR[11:0]
80 RSTS[3:0] RPTR[11:0]
96 Reserved BD[11:0]
112 Reserved BA[13:0]
WPTR Write Pointer - Software initializes to zero, hardware updates r,w,u (1)
- Counts the write address offset within a buffer
- DMA write address = BA + WPTR
RSBC Read Sub-buffer - Software initializes to zero, hardware updates r,w,u (1)
Counter - Counts the read sub-buffer offset
- DMA uses for pointer management
WSBC Write Sub-buffer - Software initializes to zero, hardware updates r,w,u (1)
Counter - Counts the write sub-buffer offset
- DMA uses for pointer management
RSTS Read Status - Software initializes to zero, hardware updates r,w,u (1)
- RSTS states:(2)
xxx0 = normal operation (no mute)
xxx1 = normal operation (mute)
xx0x = idle
WSTS Write Status - Software initializes to zero, hardware updates r,w,u (1)
- WSTS states:(2)
xxx0 = normal operation (no mute)
xxx1 = normal operation (mute)
xx0x = idle
1xxx = command protocol error
...........continued
Field Description Details Accessibility
Reserved Reserved - Software writes a zero to all reserved bits when the entry is r,w,u (1)
initialized. The reserved bits are Read-only after initialization.
Bit Offset 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Reserved
16 Reserved
32 Reserved BS[8:0]
48 Reserved
64 WSTS[2:0] WPTR[12:0]
80 RSTS[2:0] RPTR[12:0]
96 Reserved BD[12:0]
112 BF rsvd BA[13:0]
BS Block Size - BS defines when to begin the DMA to the data buffer r,w,u (1)
- BS = buffer block size in bytes - 1
- For Rx channels, the DMA writes start when the number of empty
bytes (SPACE) in the data buffer ≥ the block size
- For Tx channels, the DMA reads start when the number of valid
bytes (VALID) in the data buffer ≥ the block size
...........continued
Field Description Details Accessibility
RPTR Read Pointer - Software initializes to zero, hardware updates r,w,u (1)
- Counts the read address offset within a buffer
- DMA read address = BA + RPTR
WPTR Write Pointer - Software initializes to zero, hardware updates r,w,u (1)
- Counts the write address offset within a buffer
- DMA write address = BA + WPTR
RSTS Read Status - Software initializes to zero, hardware updates r,w,u (1)
- RSTS states:(2)
xx1 = active
xx0 = idle
WSTS Write Status - Software initializes to zero, hardware updates r,w,u (1)
- WSTS states:(2)
xx1 = active
xx0 = idle
x1x = command protocol error
1xx = buffer overflow (FCE = 0 only)
Reserved Reserved - Software writes a zero to all Reserved bits when the entry is r,w,u (1)
initialized. The Reserved bits are Read-only after initialization.
Bit Offset 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 WPC[4:0] Reserved
16 RPC[4:0] Reserved
32 rsvd WPC[7:5] Reserved
48 rsvd RPC[7:5] Reserved
64 WSTS[3:0] WPTR[11:0]
80 RSTS[3:0] RPTR[11:0]
96 RSTS[4] WSTS[4] rsvd BD[11:0]
112 Reserved BA[13:0]
...........continued
Field Description Details Accessibility
BD Buffer Depth - BD = size of buffer in bytes - 1 r,w
- Buffer end address = BA + BD
- BD ≥ max packet length - 1
RPC Read Packet - Software initializes to zero, hardware updates r,w,u (1)
Count - Used in conjunction with WPC, RPTR and WPTR to determine if
the buffer is empty or full
WPC Write Packet - Software initializes to zero, hardware updates r,w,u (1)
Count - Used in conjunction with RPC, RPTR and WPTR to determine if the
buffer is empty or full
RPTR Read Pointer - Software initializes to zero, hardware updates r,w,u (1)
- Counts the read address offset within a buffer
- DMA read address = BA + RPTR
WPTR Write Pointer - Software initializes to zero, hardware updates r,w,u (1)
- Counts the write address offset within a buffer
- DMA read address = BA + WPTR
RSTS Read Status - Software initializes to zero, hardware updates r,w,u (1)
- Status states:(2)
x0x00 = idle
xx1xx = ReceiverProtocolError response received from
Rx Device
1xxxx = ReceiverBreak command received from Rx Device
WSTS Write Status - Software initializes to zero, hardware updates r,w,u (1)
- Status states:(2)
x0x00 = idle
xx1xx = command protocol error detected
1xxxx = AsyncBreak/ControlBreak command received from Tx
Device
Reserved Reserved Software writes a zero to all reserved bits when the entry is r,w,u (1)
initialized. The reserved bits are Read-only after initialization.
Start Start
Write
MDWE
MCTL.XCMP = 0
Transfer
Complete?
Write address &
control to MADR
MCTL.XCMP = 1
Transfer
Complete?
Stop
MCTL.XCMP = 1
Stop
The MIF block allows the HC to access the external Data Buffer RAM (DBR) directly when MLB_MADR.TB is set.
Any write to the MLB_MADR triggers a single read or write cycle. Reading from the MLB_MADR register does not
initiate read/write access.
Figure 47-19. MIF DBR Read and Write Flow Diagrams
MIF DBR Write: MIF DBR Read:
Start Start
Transfer
Complete?
MCTL.XCMP = 0
MCTL.XCMP = 1
Transfer
Complete?
Read data from
MDAT
MCTL.XCMP = 1
Stop Stop
DNE1 1 Buffer done bit for ping buffer page: r,u (1),c0
0 = Not done
1 = Done
DNE2 1 Buffer done bit for pong buffer page: r,u (1),c0
0 = Not done
1 = Done
ERR1 1 AHB error response detected for ping buffer page: r,u (1),c0 (2)
0 = No error
1 = Error
ERR2 1 AHB error response detected for pong buffer page: r,u (1),c0 (2)
0 = No error
1 = Error
...........continued
Field No. of Bits Description Accessibility
PS1 1 Packet start bit for ping buffer page: r,w,u (1) (both Tx and
0 = No packet start Rx)
1 = Packet start
Reserved for synchronous and isochronous channels.
PS2 1 Packet start bit for pong buffer page: r,w,u (1) (both Tx and
0 = No packet start Rx)
1 = Packet start
Reserved for synchronous and isochronous channels.
MEP1 1 Most Ethernet Packet (MEP) indicator for ping buffer page: Rsvd for Tx
0 = Not MEP r,u (1),c0 (2) for Rx
1 = MEP
MEP1 only valid for the first page of a segmented buffer.
Reserved for control, synchronous and isochronous channels.
MEP2 1 MEP packet indicator for pong buffer page: Reserved for Tx
0 = not MEP r,u (1),c0 (2) for Rx
1 = MEP MEP2 only valid for the first page of a segmented buffer.
Reserved for control, synchronous and isochronous channels.
Notes:
1. “u” means “Updated periodically by hardware”.
2. “c0” means “Cleared by writing a 0”.
3. The buffer depth (BD1 and BD2) for synchronous channels must consider if Multi-Frame per Sub-buffer mode
is enabled.
Data exchange across the AHB interface can be configured as Little Endian (LE = 1) or Big Endian (LE = 0). The
following figure provides an overview of the endian options, chosen by an ADT descriptor field.
The following figure shows an example of the ping-pong system memory structure. This system memory structure is
similar for all channel types and shows the relationship between the BAn, BDn, and PG descriptor fields.
Figure 47-21. Ping-Pong System Memory Structure
4G - 1
BA1
Ping Buffer
BD1
(PG = 0)
BA2
Pong Buffer
BD2
(PG = 1)
Each ADT entry holds a 32-bit BAn field which defines the start of each ping or pong buffer within system memory.
The BDn field is used to indicate the size for the respective ping or pong page. The maximum size is 2k-entries for
asynchronous and control channels; 8k-entries for isochronous and synchronous channels.
AHB Synchronous Channel Descriptors
Table 47-21 shows the format for a synchronous ADT entry. The field definitions are defined in Table 47-22. Each
synchronous channel buffer can be up to 8k-bytes deep.
Table 47-21. Synchronous ADT Entry Format
Bit Offset 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 CE LE PG Reserved
16 Reserved
32 RDY1 DNE1 ERR1 BD1[12:0]
48 RDY2 DNE2 ERR2 BD2[12:0]
64 BA1[15:0]
80 BA1[31:16]
96 BA2[15:0]
112 BA2[31:16]
Bit Offset 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 CE LE PG Reserved
16 Reserved
32 RDY1 DNE1 ERR1 BD1[12:0]
48 RDY2 DNE2 ERR2 BD2[12:0]
64 BA1[15:0]
80 BA1[31:16]
96 BA2[15:0]
112 BA2[31:16]
Bit Offset 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 CE LE PG Reserved
16 Reserved
32 RDY1 DNE1 ERR1 PS1 MEP1 BD1[10:0]
48 RDY2 DNE2 ERR2 PS2 MEP2 BD2[10:0]
64 BA1[15:0]
80 BA1[31:16]
96 BA2[15:0]
112 BA2[31:16]
Multiple-packet Mode
The multiple-packet mode asynchronous and control buffering scheme supports more than one packet per system
memory buffer, as shown in the following figure. Multiple- packet mode reduces the interrupt rate for packet channels
at the cost of increasing buffering and latency.
For Tx packet channels in multiple-packet mode, software sets the packet start bit (PSn) for every buffer. Setting PSn
informs hardware that the first two bytes of the buffer contains the port message length (PML) of the first packet. After
the first packet, hardware keeps track of where packets start and end within the current buffer. Software should not
write to PSn while the buffer is active (RDYn = 1 and DNEn = 0). For Tx packet channels, the buffer is done (DNEn=
1) when the last byte of the last packet in the buffer is read from system memory. Software should set the buffer
depth to contain the exact number of complete packets for that buffer. Segmented buffers are not supported for Tx
packet channels in multiple-packet mode.
For Rx packet channels in multiple-packet mode, PSn has no meaning and should be ignored. Software is
responsible for keeping track of where each packet starts and ends within the multiple-packet buffer via the packet
PML. The buffer done bit (DNEn) is set in hardware for Rx channels when a buffer is full (see Buffer 1 in Figure
47-23) or if a packet ends exactly 1-byte before the end of the buffer (see Buffer 2 in Figure 47-23). Multiple-packet
mode also supports segmented Rx packets spanning two or more buffers (see Buffers 3–6 in Figure 47-23).
Table 47-24 shows the format for multiple-packet mode asynchronous and control ADT entries. The field definitions
are defined in Table 47-20.
Figure 47-23. Multiple-packet Asynchronous or Control System Memory Structure
Buffer 1 Buffer 2
BA1 BA2
Packet 1 Packet 4
(PG = 0) (PG = 1)
Packet 3 Packet 6
1-Byte
Packet 9 Packet 11
Bit Offset 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 CE LE PG Reserved
16 Reserved
32 RDY1 DNE1 ERR1 PS1(1) BD1[11:0]
48 RDY2 DNE2 ERR2 PS2(1) BD2[11:0]
64 BA1[15:0]
80 BA1[31:16]
96 BA2[15:0]
112 BA2[31:16]
Note: PSn is only valid for TX channels. Set PSn = 1 at the start of the buffer.
d. Set the channel type: CT[2:0] = 010 (asynchronous), 001 (control), 011 (isochronous), or 000
(synchronous)
e. Set the channel label: CL[5:0] = N
f. If CT[2:0] = 000 (synchronous), set the mute bit (MT = 1)
g. Set the channel enable: CE = 1
h. Set all other bits of the CAT to ‘0’
6. Repeat steps 2–5 to initialize all logical channels
Program the AHB Block DMAs
The ADT resides in the external CTR and is programmed indirectly via APB reads and writes to the MIF.
1. Initialize all bits of the ADT to ‘0’
2. Select a logical channel: N = 0–63
3. Program the AHB block ping page for channel N
a. Set the 32-bit base address (BA1)
b. Set the 11-bit buffer depth (BD1): BD1 = buffer depth in bytes - 1
i. For synchronous channels: (BD1 + 1) = n x frames per sub-buffer (m) x bytes-per-frame (bpf)
ii. For isochronous channels: (BD1 + 1) mod (BS + 1) = 0
iii. For asynchronous channels: 5 ≤ (BD1 + 1) ≤ 4096 (max packet length)
iv. For control channels: 5 ≤ (BD1 + 1) ≤ 4096 (max packet length)
c. For asynchronous and control Tx channels set the packet start bit (PS1) iff the page contains the start of
the packet
d. Clear the page done bit (DNE1)
e. Clear the error bit (ERR1)
f. Set the page ready bit (RDY1)
4. Program the AHB block pong page for channel N
a. Set the 32-bit base address (BA2)
b. Set the 11-bit buffer depth (BD2): BD2 = buffer depth in bytes - 1
i. For synchronous channels: (BD2 +1) = n x frames per sub-buffer (m) x bytes-per-frame (bpf)
ii. For isochronous channels: (BD2 + 1) mod (BS + 1) = 0
iii. For asynchronous channels: 5 ≤ (BD2 + 1) ≤ 4096 (max packet length)
iv. For control channels: 5 ≤ (BD2 + 1) ≤ 4096 (max packet length)
c. For asynchronous and control Tx channels set the packet start bit (PS2) if the page contains the start of
the packet
d. Clear the page done bit (DNE2)
e. Clear the error bit (ERR2)
f. Set the page ready bit (RDY2)
5. Select Big Endian (LE = 0) or Little Endian (LE = 1)
6. Select the active page: PG = 0 (ping), PG = 1 (pong)
7. Set the channel enable (CE) bit for all active logical channels
8. Repeat steps 2–7 for all active logical channels
Note: All asynchronous and control packets must start with a PMP header. The first two bytes of the PMP header
contains the Port Message Length (PML), which defines the length of the message that follows in bytes (not including
PML itself). Hardware uses the PML to determine when a packet is complete. Asynchronous and control packets can
also be segmented into two or more pages as well as contain multiple packets per page within system memory.
Synchronize and Unmute Synchronous Channel
The MLB_MLBC0 and MLB_MLBC1 registers are accessible directly via APB reads and writes.
1. Check that MediaLB clock is running (MLB_MLBC1.CLKM = 0)
2. If MLB_MLBC1.CLKM = 1, clear the register bit, wait one APB or I/O clock cycle and repeat step 1.
3. Poll for MediaLB lock (MLB_MLBC0.MLBLK = 1)
4. Wait four frames
...........continued
...........continued
7:0 ADDR[7:0]
15:8 ADDR[13:8]
0xE4 MLB_MADR
23:16
31:24 WNR TB
0xE8
... Reserved
0x03BF
7:0 MPB DMA_MODE SMX SCE
15:8
0x03C0 MLB_ACTL
23:16
31:24
0x03C4
... Reserved
0x03CF
7:0 CHS: Interrupt Status for Logical Channels [31[7:0]
15:8 CHS: Interrupt Status for Logical Channels [31[15:8]
0x03D0 MLB_ACSR0
23:16 CHS: Interrupt Status for Logical Channels [31[23:16]
31:24 CHS: Interrupt Status for Logical Channels [31[31:24]
7:0 CHS[7:0]
15:8 CHS[15:8]
0x03D4 MLB_ACSR1
23:16 CHS[23:16]
31:24 CHS[31:24]
7:0 CHM[7:0]
15:8 CHM[15:8]
0x03D8 MLB_ACMR0
23:16 CHM[23:16]
31:24 CHM[31:24]
7:0 CHM[7:0]
15:8 CHM[15:8]
0x03DC MLB_ACMR1
23:16 CHM[23:16]
31:24 CHM[31:24]
Name: MLB_MLBC0
Offset: 0x000
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
FCNT[2:1]
Access R/W R/W
Reset 0 0
Bit 15 14 13 12 11 10 9 8
FCNT[0] CTLRETRY ASYRETRY
Access R/W R/W R/W
Reset 0 0 0
Bit 7 6 5 4 3 2 1 0
MLBLK ZERO MLBCLK[2:0] MLBEN
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bits 17:15 – FCNT[2:0] The number of frames per sub-buffer for synchronous channels
Value Name Description
0 1_FRAME 1 frame per sub-buffer (Operation is the same as Standard mode.)
1 2_FRAMES 2 frames per sub-buffer
2 4_FRAMES 4 frames per sub-buffer
3 8_FRAMES 8 frames per sub-buffer
4 16_FRAMES 16 frames per sub-buffer
5 32_FRAMES 32 frames per sub-buffer
6 64_FRAMES 64 frames per sub-buffer
Name: MLB_MS0
Offset: 0x00C
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
MCS: MediaLB Channel Status [31[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
MCS: MediaLB Channel Status [31[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
MCS: MediaLB Channel Status [31[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
MCS: MediaLB Channel Status [31[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: MLB_MS1
Offset: 0x014
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
MCS: MediaLB Channel Status [63[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
MCS: MediaLB Channel Status [63[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
MCS: MediaLB Channel Status [63[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
MCS: MediaLB Channel Status [63[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: MLB_MSS
Offset: 0x020
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
SERVREQ SWSYSCMD CSSYSCMD ULKSYSCMD LKSYSCMD RSTSYSCMD
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 4 – SWSYSCMD Software System Command Detected in the System Quadlet (cleared by writing a 0)
Set by hardware, cleared by software. Data is stored in the MLB_MSD register for this command.
Bit 3 – CSSYSCMD Channel Scan System Command Detected in the System Quadlet (cleared by writing a 0)
Set by hardware, cleared by software. If the node address specified in Data quadlet matches the value in
MLB_MLBC1.NDA, the device responds either “device present” or “device present, request service” system response
in the next system quadlet.
Bit 2 – ULKSYSCMD Network Unlock System Command Detected in the System Quadlet (cleared by writing a 0)
Set by hardware, cleared by software.
Bit 1 – LKSYSCMD Network Lock System Command Detected in the System Quadlet (cleared by writing a 0)
Set by hardware, cleared by software.
Bit 0 – RSTSYSCMD Reset System Command Detected in the System Quadlet (cleared by writing a 0)
Set by hardware, cleared by software.
Name: MLB_MSD
Offset: 0x024
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
SD3[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
SD2[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
SD1[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
SD0[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: MLB_MIEN
Offset: 0x02C
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
CTX_BREAK CTX_PE CTX_DONE CRX_BREAK CRX_PE CRX_DONE
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
ATX_BREAK ATX_PE ATX_DONE ARX_BREAK ARX_PE ARX_DONE SYNC_PE
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
ISOC_BUFO ISOC_PE
Access R/W R/W
Reset 0 0
Name: MLB_MLBC1
Offset: 0x03C
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
NDA[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CLKM LOCK
Access R/W R/W
Reset 0 0
Name: MLB_HCTL
Offset: 0x080
Reset: 0x00000000
Property: Read/Write
The HC can control and monitor general operation of the HBI block by reading and writing the HBI Control Register
(MLB_HCTL) through the I/O interface. Each bit of MLB_HCTL is read/write.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
EN
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
RST1 RST0
Access R/W R/W
Reset 0 0
Name: MLB_HCMR0
Offset: 0x088
Reset: 0x00000000
Property: Read/Write
The HC can control which channel(s) are able to generate an HBI interrupt by writing the HBI Channel Mask
Registers (HCMRn). Each bit of HCMRn is read/write.
Bit 31 30 29 28 27 26 25 24
CHM: Bitwise Channel Mask Bit [31[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CHM: Bitwise Channel Mask Bit [31[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CHM: Bitwise Channel Mask Bit [31[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CHM: Bitwise Channel Mask Bit [31[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: MLB_HCMR1
Offset: 0x08C
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
CHM: Bitwise Channel Mask Bit [63[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CHM: Bitwise Channel Mask Bit [63[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CHM: Bitwise Channel Mask Bit [63[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CHM: Bitwise Channel Mask Bit [63[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: MLB_HCER0
Offset: 0x090
Reset: 0x00000000
Property: Read-only
The HBI Channel Error Registers (HCERn) indicate which channel(s) have encountered fatal errors.
Bit 31 30 29 28 27 26 25 24
CERR: Bitwise Channel Error Bit [31[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CERR: Bitwise Channel Error Bit [31[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CERR: Bitwise Channel Error Bit [31[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CERR: Bitwise Channel Error Bit [31[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: MLB_HCER1
Offset: 0x094
Reset: 0x00000000
Property: Read-only
HCERn status bits are set when hardware detects hardware errors on the given logical channel, including:
• Channel opened, but not enabled,
• Channel programmed with invalid channel type, or
• Out-of-range PML for asynchronous or control Tx channels
Bit 31 30 29 28 27 26 25 24
CERR: Bitwise Channel Error Bit [63[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CERR: Bitwise Channel Error Bit [63[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CERR: Bitwise Channel Error Bit [63[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CERR: Bitwise Channel Error Bit [63[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: MLB_HCBR0
Offset: 0x098
Reset: 0x00000000
Property: Read-only
The HC can determine which channel(s) are busy by reading the HBI Channel Busy Registers (HCBRn). An HBI
channel is busy if:
• it is currently loaded into one of the two AGUs
• the channel is enabled, CE = 1 from the Channel Allocation Table (CTR Address Mapping), and
• the DMA is active
When an HBI channel is busy, hardware may write back its local copy of the channel descriptor at any time. System
software should not write a CDT descriptor for a channel that is busy. Only two HBI channels can be busy at any
given time. Each bit of HCBRn is read-only.
Bit 31 30 29 28 27 26 25 24
CHB: Bitwise Channel Busy Bit [31[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CHB: Bitwise Channel Busy Bit [31[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CHB: Bitwise Channel Busy Bit [31[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CHB: Bitwise Channel Busy Bit [31[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: MLB_HCBR1
Offset: 0x09C
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
CHB: Bitwise Channel Busy Bit [63[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CHB: Bitwise Channel Busy Bit [63[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CHB: Bitwise Channel Busy Bit [63[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CHB: Bitwise Channel Busy Bit [63[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: MLB_MDAT0
Offset: 0x0C0
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
DATA[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
DATA[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
DATA[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DATA[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: MLB_MDAT1
Offset: 0x0C4
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
DATA[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
DATA[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
DATA[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DATA[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: MLB_MDAT2
Offset: 0x0C8
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
DATA[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
DATA[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
DATA[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DATA[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: MLB_MDAT3
Offset: 0x0CC
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
DATA[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
DATA[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
DATA[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
DATA[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: MLB_MDWE0
Offset: 0x0D0
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
MASK: Bitwise Write Enable for CTR Data - bits[31[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
MASK: Bitwise Write Enable for CTR Data - bits[31[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
MASK: Bitwise Write Enable for CTR Data - bits[31[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
MASK: Bitwise Write Enable for CTR Data - bits[31[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 31:0 – MASK: Bitwise Write Enable for CTR Data - bits[31[31:0] 0]
MASK[n] = 1 indicates that CTR data [n] is enabled.
Name: MLB_MDWE1
Offset: 0x0D4
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
MASK: Bitwise Write Enable for CTR Data - bits[63:56]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
MASK: Bitwise Write Enable for CTR Data - bits[55:48]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
MASK: Bitwise Write Enable for CTR Data - bits[47:40]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
MASK: Bitwise Write Enable for CTR Data - bits[39:32]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 31:0 – MASK: Bitwise Write Enable for CTR Data - bits[63:32]
MASK[n] = 1 indicates that CTR data [n] is enabled.
Name: MLB_MDWE2
Offset: 0x0D8
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
MASK: Bitwise Write Enable for CTR Data - bits[95:88]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
MASK: Bitwise Write Enable for CTR Data - bits[87:80]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
MASK: Bitwise Write Enable for CTR Data - bits[79:72]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
MASK: Bitwise Write Enable for CTR Data - bits[71:64]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 31:0 – MASK: Bitwise Write Enable for CTR Data - bits[95:64]
MASK[n] = 1 indicates that CTR data [n] is enabled.
Name: MLB_MDWE3
Offset: 0x0DC
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
MASK: Bitwise Write Enable for CTR Data - Bits[127:120]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
MASK: Bitwise Write Enable for CTR Data - Bits[119:112]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
MASK: Bitwise Write Enable for CTR Data - Bits[111:104]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
MASK: Bitwise Write Enable for CTR Data - Bits[103:96]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 31:0 – MASK: Bitwise Write Enable for CTR Data - Bits[127:96]
MASK[n] = 1 indicates that CTR data [n] is enabled.
Name: MLB_MCTL
Offset: 0x0E0
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
XCMP
Access R/W
Reset 0
Name: MLB_MADR
Offset: 0x0E4
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
WNR TB
Access R/W R/W
Reset 0 0
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
ADDR[13:8]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
ADDR[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: MLB_ACTL
Offset: 0x3C0
Reset: 0x00000000
Property: Read/Write
The AHB Control (MLB_ACTL) register is written by the HC to configure the AHB block for channel interrupts.
MLB_ACTL contains three configuration fields, one is used to select the DMA mode, one is used to multiplex channel
interrupts onto a single interrupt signal, and the last selects the method of clearing channel interrupts (either software
or hardware).
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
MPB DMA_MODE SMX SCE
Access R/W R/W R/W R/W
Reset 0 0 0 0
Name: MLB_ACSR0
Offset: 0x3D0
Reset: 0x00000000
Property: Read/Write
The AHB Channel Status (ACSRn) registers contain interrupt bits for each of the 64 physical channels. When an
MLB_ACSRn register bit is set, it indicates that the corresponding physical channel has an interrupt pending.
An AHB interrupt is triggered when either DNEn or ERRn is set within the AHB Channel Descriptor. The HC is
notified of the channel interrupt via ahb_int[1:0]. When an interrupt occurs in MLB_ACSR0 (for channels 31 to 0)
MediaLB IRQ0 is set. When an interrupt occurs in MLB_ACSR1 (for channels 63 to 32) MediaLB IRQ1 is set.
Interrupts in MLB_ACSR0 and MLB_ACSR1 can be optionally multiplexed onto a single interrupt signal, MediaLB
IRQ0, if MLB_ACTL.SMX = 1. If MLB_ACTL.SCE = 0, hardware automatically clears the interrupt bit(s) after the HC
reads the ACSRn register. Alternatively, if MLB_ACTL.SCE = 1, software must write a 1 to the appropriate bit(s) of
MLB_ACSRn to clear the interrupt(s).
Bit 31 30 29 28 27 26 25 24
CHS: Interrupt Status for Logical Channels [31[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CHS: Interrupt Status for Logical Channels [31[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CHS: Interrupt Status for Logical Channels [31[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CHS: Interrupt Status for Logical Channels [31[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 31:0 – CHS: Interrupt Status for Logical Channels [31[31:0] 0] (cleared by writing a 1)
CHS[n] = 1 indicates that an interrupt is pending on channel n.
Name: MLB_ACSR1
Offset: 0x3D4
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
CHS[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CHS[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CHS[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CHS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: MLB_ACMR0
Offset: 0x3D8
Reset: 0x00000000
Property: Read/Write
Using the AHB Channel Mask (ACMRn) register, the HC can control which channel(s) generate interrupts on
ahb_int[1:0]. All ACMRn register bits default as ‘0’ (“masked”); therefore, the HC must initially write ACMRn to enable
interrupts. Each bit of ACMRn is read/write accessible.
Bit 31 30 29 28 27 26 25 24
CHM[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CHM[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CHM[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CHM[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: MLB_ACMR1
Offset: 0x3DC
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
CHM[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CHM[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CHM[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CHM[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
48.1 Description
The Controller Area Network (MCAN) performs communication according to ISO 11898-1:2015 and to Bosch CAN-
FD specification. Additional transceiver hardware is required for connection to the physical layer.
All functions concerning the handling of messages are implemented by the Rx Handler and the Tx Handler. The
Rx Handler manages message acceptance filtering, the transfer of received messages from the CAN core to
the Message RAM, as well as providing receive message status information. The Tx Handler is responsible for
the transfer of transmit messages from the Message RAM to the CAN core, as well as providing transmit status
information.
Acceptance filtering is implemented by a combination of up to 128 filter elements, where each element can be
configured as a range, as a bit mask, or as a dedicated ID filter.
MCAN Controller
Extension IF
CAN Core Clock
Bus-Independent Clock
Timestamp
Interrupt &
Tx_Req Tx_State
System Bus
System Bus
48.4.5 Timestamping
Timestamping uses the value of CV in the TC Counter Value 0 register (TC_CV0) at address 0x4000C010. TC0.Ch0
can use the programmable clocks PCK6 or PCK7 as input. Refer to the section “Timer Counter (TC)” for more details.
The selection between PCK6 and PCK7 is done in the Matrix Peripheral Clock Configuration Register
(CCFG_PCCR), using the bit TC0CC. Refer to this register in the section “Bus Matrix (MATRIX)” for more details.
These clocks can be programmed in the the registers PMC Programmable Clock Registers PMC_PCK6 and
PMC_PCK7, respectively. Refer to these registers in the section “Power Management Controller (PMC)” for more
details.
Related Links
49. Timer Counter (TC)
31. Power Management Controller (PMC)
DLC 9 10 11 12 13 14 15
Number of Data Bytes 12 16 20 24 32 48 64
In CAN FD frames, the bit timing will be switched inside the frame, after the BRS (Bit Rate Switch) bit, if this bit is
recessive. Before the BRS bit, in the CAN FD arbitration phase, the nominal CAN bit timing is used as defined by the
Nominal Bit Timing and Prescaler register (MCAN_NBTP). In the following CAN FD data phase, the data phase CAN
bit timing is used as defined by the Data Bit Timing and Prescaler register (MCAN_DBTP). The bit timing reverts back
from the data phase timing at the CRC delimiter or when an error is detected, whichever occurs first.
The maximum configurable bit rate in the CAN FD data phase depends on the CAN core clock frequency. Example:
with a CAN clock frequency of 20 MHz and the shortest configurable bit time of 4 tq, the bit rate in the data phase is 5
Mbit/s.
In both data frame formats, CAN FD and CAN FD with bit rate switching, the value of the bit ESI (Error Status
Indicator) is determined by the transmitter’s error state at the start of the transmission. If the transmitter is error
passive, ESI is transmitted recessive, else it is transmitted dominant.
48.5.1.4.1 Description
The MCAN protocol unit has implemented a delay compensation mechanism to compensate the delay, thereby
enabling transmission with higher bit rates during the CAN FD data phase independent of the delay of a specific CAN
transceiver.
To check for bit errors during the data phase, the delayed transmit data is compared against the received data at the
secondary sample point. If a bit error is detected, the transmitter will react to this bit error at the next following regular
sample point. During arbitration phase the delay compensation is always disabled.
The transmitter delay compensation enables configurations where the data bit time is shorter than the transmitter
delay, it is described in detail in the new ISO11898-1. It is enabled by setting bit MCAN_DBTP.TDC.
The received bit is compared against the transmitted bit at the SSP. The SSP position is defined as the sum
of the measured delay from the MCAN’s transmit output CANTX through the transceiver to the receive input
CANRX plus the transmitter delay compensation offset as configured by MCAN_TDCR.TDCO. The transmitter delay
compensation offset is used to adjust the position of the SSP inside the received bit (e.g. half of the bit time in the
data phase). The position of the secondary sample point is rounded down to the next integer number of CAN core
clock periods.
MCAN_PSR.TDCV shows the actual transmitter delay compensation value. MCAN_PSR.TDCV is cleared when
MCAN_CCCR.INIT is set and is updated at each transmission of an FD frame while MCAN_DBTP.TDC is set.
The following boundary conditions have to be considered for the delay compensation implemented in the MCAN:
• The sum of the measured delay from CANTX to CANRX and the configured delay compensation offset
MCAN_TDCR.TDCO has to be less than 6 bit times in the data phase.
• The sum of the measured delay from CANTX to CANRX and the configured delay compensation offset
MCAN_TDCR.TDCO has to be less or equal 127 CAN core clock periods. In case this sum exceeds 127
CAN core clock periods, the maximum value of 127 CAN core clock periods is used for delay compensation.
• The data phase ends at the sample point of the CRC delimiter, that stops checking of receive bits at the SSPs.
Start Stop
Delay
CAN core clock Delay Counter
SSP Position
Delay Compensation Offset
MCAN_TDCR.TDCO
To avoid that a dominant glitch inside the received FDF bit ends the delay compensation measurement before the
falling edge of the received res bit, resulting in a to early SSP position, the use of a transmitter delay compensation
filter window can be enabled by programming MCAN_TDCR.TDCF.
This defines a minimum value for the SSP position. Dominant edges on CANRX, that would result in an earlier SSP
position are ignored for transmitter delay measurement. The measurement is stopped when the SSP position is at
least MCAN_TDCR.TDCF AND CANRX is low.
=1
• •
Tx Rx
MCAN
bit timing and it can drive constant dominant or recessive values. The actual value at pin CANRX can be read from
MCAN_TEST.RX. Both functions can be used to check the CAN bus’ physical layer.
Due to the synchronization mechanism between CAN clock and system bus clock domain, there may be a delay of
several system bus clock periods between writing to MCAN_TEST.TX until the new configuration is visible at output
pin CANTX. This applies also when reading input pin CANRX via MCAN_TEST.RX.
Note: Test modes should be used for production tests or self-test only. The software control for pin CANTX
interferes with all CAN protocol functions. It is not recommended to use test modes for application.
=1
• • • •
Tx Rx Tx Rx
MCAN MCAN
actual counter value can be read from MCAN_TOCV.TOC. The Timeout Counter can only be started while
MCAN_CCCR.INIT = ‘0’. It is stopped when MCAN_CCCR.INIT = ‘1’, e.g. when the MCAN enters Bus_Off state.
The operating mode is selected by MCAN_TOCC.TOS. When operating in Continuous mode, the counter starts
when MCAN_CCCR.INIT is reset. A write to MCAN_TOCV presets the counter to the value configured by
MCAN_TOCC.TOP and continues down-counting.
When the Timeout Counter is controlled by one of the FIFOs, an empty FIFO presets the counter to the value
configured by MCAN_TOCC.TOP. Down-counting is started when the first FIFO element is stored. Writing to
MCAN_TOCV has no effect.
When the counter reaches zero, interrupt flag MCAN_IR.TOO is set. In Continuous mode, the counter is immediately
restarted at MCAN_TOCC.TOP.
Note: The clock signal for the Timeout Counter is derived from the CAN Core’s sample point signal. Therefore the
point in time where the Timeout Counter is decremented may vary due to the synchronization / re-synchronization
mechanism of the CAN Core. If the bit rate switch feature in CAN FD is used, the timeout counter is clocked
differently in arbitration and data field.
48.5.4 Rx Handling
The Rx Handler controls the acceptance filtering, the transfer of received messages to the Rx Buffers or to one of the
two Rx FIFOs, as well as the Rx FIFO’s Put and Get Indices.
• Rx Buffer
New Data flag of matching Rx Buffer is not set, but Rx Buffer (partly) overwritten with received data. For error
type, see MCAN_PSR.LEC and MCAN_PSR.DLEC.
• Rx FIFO
Put index of matching Rx FIFO is not updated, but related Rx FIFO element (partly) overwritten with received
data. For error type, see MCAN_PSR.LEC and MCAN_PSR.DLEC. In case the matching Rx FIFO is operated in
Overwrite mode, the boundary conditions described in Rx FIFO Overwrite Mode have to be considered.
Note: When an accepted message is written to one of the two Rx FIFOs, or into an Rx Buffer, the unmodified
received identifier is stored independent of the filter(s) used. The result of the acceptance filter process is
strongly depending on the sequence of configured filter elements.
11 bit 29 bit
11 / 29 bit identifier
MCAN_SIDFC.LSS[7:0] > 0
reject
match filter element #MCAN_SIDFC.LSS
yes acceptance / rejection
no accept
MCAN.GFC.ANFS[1] = ‘1’
accept non-matching frames discard frame
MCAN_GFC.ANFS [1] = ‘0’
store frame
11 bit 29 bit
11 / 29 bit identifier
MCAN_XIDFC.LSE[6:0] = 0
yes match filter element #0
no
reject
acceptance / rejection yes match filter element #MCAN_XIDFC.LSE
accept no
MCAN_GFC.ANFE[1] = ‘1’
discard frame accept non-matching frames
MCAN_GFC.ANFE[1] = ‘0’
store frame
48.5.4.2 Rx FIFOs
Rx FIFO 0 and Rx FIFO 1 can be configured to hold up to 64 elements each. Configuration of the two Rx
FIFOs is done via the Rx FIFO 0 Configuration register (MCAN_RXF0C) and the Rx FIFO 1 Configuration register
(MCAN_RXF1C).
Received messages that passed acceptance filtering are transferred to the Rx FIFO as configured by the matching
filter element. For a description of the filter mechanisms available for Rx FIFO 0 and Rx FIFO 1, see Acceptance
Filtering. The Rx FIFO element is described in Rx Buffer and FIFO Element.
To avoid an Rx FIFO overflow, the Rx FIFO watermark can be used. When the Rx FIFO fill level reaches the Rx
FIFO watermark configured by MCAN_RXFnC.FnWM, interrupt flag MCAN_IR.RFnW is set. When the Rx FIFO Put
Index reaches the Rx FIFO Get Index, an Rx FIFO Full condition is signalled by MCAN_RXFnS.FnF. In addition, the
interrupt flag MCAN_IR.RFnF is set.
7 0
6 1
5 2
Put Index 4 3
MCAN_RXFnS.FnPI
Fill Level
MCAN_RXFnS.FnFL
When reading from an Rx FIFO, Rx FIFO Get Index MCAN_RXFnS.FnGI × FIFO Element Size has to be added to
the corresponding Rx FIFO start address MCAN_RXFnC.FnSA.
Table 48-2. Rx Buffer / FIFO Element Size
0 8 4
1 12 5
2 16 6
3 20 7
4 24 8
5 32 10
6 48 14
7 64 18
When an Rx FIFO is operated in Overwrite mode and an Rx FIFO full condition is signalled, reading of the Rx FIFO
elements should start at least at get index + 1. The reason for that is, that it might happen, that a received message
is written to the Message RAM (put index) while the processor is reading from the Message RAM (get index). In this
case inconsistent data may be read from the respective Rx FIFO element. Adding an offset to the get index when
reading from the Rx FIFO avoids this problem. The offset depends on how fast the processor accesses the Rx FIFO.
The figure below shows an offset of two with respect to the get index when reading the Rx FIFO. In this case the two
messages stored in element 1 and 2 are lost.
Figure 48-8. Rx FIFO Overflow Handling
Rx FIFO Full Rx FIFO Overwrite
(MCAN_RXFnS.FnF = ‘1’) (MCAN_RXFnS.FnF = ‘1’)
MCAN_RXFnS.FnPI
= MCAN_RXFnS.FnGI element 0 overwritten
7 0 7 0 MCAN_RXFnS.FnPI
= MCAN_RXFnS.FnGI
6 1 6 1
5 2 5 2
4 3 4 3
0 ID message 1 0 0
1 ID message 2 0 1
2 ID message 3 0 2
After the last word of a matching received message has been written to the Message RAM, the respective New Data
flag in the New Data 1 register (MCAN_NDAT1) and New Data 2 register (MCAN_NDAT2) is set. As long as the New
Data flag is set, the respective Rx Buffer is locked against updates from received matching frames. The New Data
flags have to be reset by the processor by writing a ‘1’ to the respective bit position.
While an Rx Buffer’s New Data flag is set, a Message ID Filter Element referencing this specific Rx Buffer will not
match, causing the acceptance filtering to continue. Following Message ID Filter Elements may cause the received
message to be stored into another Rx Buffer, or into an Rx FIFO, or the message may be rejected, depending on
filter configuration.
DMS = 00
T7 T1
T8 T2
T3
DMS = 11 T5 DMS = 01
T6 T4
DMS = 10
48.5.5 Tx Handling
The Tx Handler handles transmission requests for the dedicated Tx Buffers, the Tx FIFO, and the Tx Queue. It
controls the transfer of transmit messages to the CAN Core, the Put and Get Indices, and the Tx Event FIFO. Up to
32 Tx Buffers can be set up for message transmission. The CAN mode for transmission (Classic CAN or CAN FD)
can be configured separately for each Tx Buffer element. The Tx Buffer element is described in Tx Buffer Element.
The table below describes the possible configurations for frame transmission.
Table 48-5. Possible Configurations for Frame Transmission
Note: AUTOSAR requires at least three Tx Queue Buffers and support of transmit cancellation.
The Tx Handler starts a Tx scan to check for the highest priority pending Tx request (Tx Buffer with lowest Message
ID) when MCAN_TXBRP is updated, or when a transmission has been started.
0 8 4
1 12 5
2 16 6
3 20 7
4 24 8
5 32 10
6 48 14
7 64 18
48.5.5.3 Tx FIFO
Tx FIFO operation is configured by programming MCAN_TXBC.TFQM to ‘0’. Messages stored in the Tx FIFO are
transmitted starting with the message referenced by the Get Index MCAN_TXFQS.TFGI. After each transmission the
Get Index is incremented cyclically until the Tx FIFO is empty. The Tx FIFO enables transmission of messages with
the same Message ID from different Tx Buffers in the order these messages have been written to the Tx FIFO. The
MCAN calculates the Tx FIFO Free Level MCAN_TXFQS.TFFL as difference between Get and Put Index. It indicates
the number of available (free) Tx FIFO elements.
New transmit messages have to be written to the Tx FIFO starting with the Tx Buffer referenced by the Put Index
MCAN_TXFQS.TFQPI. An Add Request increments the Put Index to the next free Tx FIFO element. When the
Put Index reaches the Get Index, Tx FIFO Full (MCAN_TXFQS.TFQF = ‘1’) is signalled. In this case no further
messages should be written to the Tx FIFO until the next message has been transmitted and the Get Index has been
incremented.
When a single message is added to the Tx FIFO, the transmission is requested by writing a ‘1’ to the TXBAR bit
related to the Tx Buffer referenced by the Tx FIFO’s Put Index.
When multiple (n) messages are added to the Tx FIFO, they are written to n consecutive Tx Buffers starting with the
Put Index. The transmissions are then requested via MCAN_TXBAR. The Put Index is then cyclically incremented by
n. The number of requested Tx buffers should not exceed the number of free Tx Buffers as indicated by the Tx FIFO
Free Level.
When a transmission request for the Tx Buffer referenced by the Get Index is cancelled, the Get Index is
incremented to the next Tx Buffer with pending transmission request and the Tx FIFO Free Level is recalculated.
When transmission cancellation is applied to any other Tx Buffer, the Get Index and the FIFO Free Level remain
unchanged.
A Tx FIFO element allocates Element Size 32-bit words in the Message RAM (see the table Table 48-6). Therefore
the start address of the next available (free) Tx FIFO Buffer is calculated by adding Tx FIFO/Queue Put Index
MCAN_TXFQS.TFQPI (0…31) × Element Size to the Tx Buffer Start Address MCAN_TXBC.TBSA.
48.5.5.4 Tx Queue
Tx Queue operation is configured by programming MCAN_TXBC.TFQM to ‘1’. Messages stored in the Tx Queue
are transmitted starting with the message with the lowest Message ID (highest priority). In case that multiple Queue
Buffers are configured with the same Message ID, the Queue Buffer with the lowest buffer number is transmitted first.
New messages have to be written to the Tx Buffer referenced by the Put Index MCAN_TXFQS.TFQPI. An
Add Request cyclically increments the Put Index to the next free Tx Buffer. In case that the Tx Queue is full
(MCAN_TXFQS.TFQF = ‘1’), the Put Index is not valid and no further message should be written to the Tx Queue
until at least one of the requested messages has been sent out or a pending transmission request has been
cancelled.
The application may use register MCAN_TXBRP instead of the Put Index and may place messages to any Tx Buffer
without pending transmission request.
A Tx Queue Buffer allocates Element Size 32-bit words in the Message RAM (see the table Tx Buffer / FIFO /
Queue Element Size). Therefore the start address of the next available (free) Tx Queue Buffer is calculated by
adding Tx FIFO/Queue Put Index MCAN_TXFQS.TFQPI (0…31) × Element Size to the Tx Buffer Start Address
MCAN_TXBC.TBSA.
Buffer Index 0 1 2 3 4 5 6 7 8 9
Tx Sequence 1. 5. 4. 6. 2. 3.
• Buffer with lowest Message ID gets highest priority and is transmitted next
Buffer Index 0 1 2 3 4 5 6 7 8 9
Tx Sequence 2. 5. 4. 6. 3. 1.
Put Index
Tx prioritization:
• Scan all Tx Buffers with activated transmission request
• Tx Buffer with lowest Message ID gets highest priority and is transmitted next
MCAN_RXBC.RBSA
Rx Buffers 0 to 64 elements / 0 to 1152 words
MCAN_TXEFC.EFSA
Tx Event FIFO 0 to 32 elements / 0 to 64 words
MCAN_TXBC.TBSA
Tx Buffers 0 to 32 elements / 0 to 576 words
32 bits
When the MCAN addresses the Message RAM, it addresses 32-bit words, not single bytes. The configurable start
addresses are 32-bit word addresses; i.e., only bits 15 to 2 are evaluated, the two least significant bits are ignored.
Note: The MCAN does not check for erroneous configuration of the Message RAM. The configuration of the start
addresses of the different sections and the number of elements of each section must be checked carefully to avoid
falsification or loss of data.
31 24 23 16 15 8 7 0
R0 ESI XTD RTR ID[28:0]
R1 ANMF FIDX[6:0] – FDF BRS DLC[3:0] RXTS[15:0]
31 24 23 16 15 8 7 0
T0 ESI XTD RTR ID[28:0]
T1 MM[7:0] EFC reserved FDF BRS DLC[3:0] reserved
T2 DB3[7:0] DB2[7:0] DB1[7:0] DB0[7:0]
T3 DB7[7:0] DB6[7:0] DB5[7:0] DB4[7:0]
... ... ... ... ...
Tn DBm[7:0] DBm-1[7:0] DBm-2[7:0] DBm-3[7:0]
31 24 23 16 15 8 7 0
E0 ESI XTD RTR ID[28:0]
E1 MM[7:0] ET FDF BRS DLC[3:0] TXTS[15:0]
[1:0]
31 24 23 16 15 8 7 0
S0 SFT[1:0] SFEC SFID1[10:0] – SFID2[10:0]
[2:0]
31 24 23 16 15 8 7 0
F0 EFEC EFID1[28:0]
[2:0]
F1 EFT[1:0] – EFID2[28:0]
7:0 DAY[7:0]
15:8 MON[7:0]
0x00 MCAN_CREL
23:16 SUBSTEP[3:0] YEAR[3:0]
31:24 REL[3:0] STEP[3:0]
7:0 ETV[7:0]
15:8 ETV[15:8]
0x04 MCAN_ENDN
23:16 ETV[23:16]
31:24 ETV[31:24]
7:0 CSV[7:0]
15:8 CSV[15:8]
0x08 MCAN_CUST
23:16 CSV[23:16]
31:24 CSV[31:24]
7:0 DTSEG2[3:0] DSJW[2:0]
15:8 DTSEG1[4:0]
0x0C MCAN_DBTP
23:16 TDC DBRP[4:0]
31:24
7:0 RX TX[1:0] LBCK
15:8
0x10 MCAN_TEST
23:16
31:24
7:0 WDC[7:0]
15:8 WDV[7:0]
0x14 MCAN_RWD
23:16
31:24
7:0 TEST DAR MON CSR CSA ASM CCE INIT
15:8 NISO TXP EFBI PXHD BRSE FDOE
0x18 MCAN_CCCR
23:16
31:24
7:0 NTSEG2[6:0]
15:8 NTSEG1[7:0]
0x1C MCAN_NBTP
23:16 NBRP[7:0]
31:24 NSJW[6:0] NBRP[8]
7:0 TSS[1:0]
15:8
0x20 MCAN_TSCC
23:16 TCP[3:0]
31:24
7:0 TSC[7:0]
15:8 TSC[15:8]
0x24 MCAN_TSCV
23:16
31:24
7:0 TOS[1:0] ETOC
15:8
0x28 MCAN_TOCC
23:16 TOP[7:0]
31:24 TOP[15:8]
7:0 TOC[7:0]
15:8 TOC[15:8]
0x2C MCAN_TOCV
23:16
31:24
0x30
... Reserved
0x3F
7:0 TEC[7:0]
15:8 RP REC[6:0]
0x40 MCAN_ECR
23:16 CEL[7:0]
31:24
...........continued
...........continued
...........continued
Name: MCAN_CREL
Offset: 0x00
Reset: 0x32150320
Property: Read-only
Due to clock domain crossing, there is a delay between when a register bit or field is written and when the related
status register bits are updated.
Note: For revision A silicon the reset value is 0x30130506.
Bit 31 30 29 28 27 26 25 24
REL[3:0] STEP[3:0]
Access R R R R R R R R
Reset x x x x x x x x
Bit 23 22 21 20 19 18 17 16
SUBSTEP[3:0] YEAR[3:0]
Access R R R R R R R R
Reset x x x x x x x x
Bit 15 14 13 12 11 10 9 8
MON[7:0]
Access R R R R R R R R
Reset x x x x x x x x
Bit 7 6 5 4 3 2 1 0
DAY[7:0]
Access R R R R R R R R
Reset x x x x x x x x
Name: MCAN_ENDN
Offset: 0x04
Reset: 0x87654321
Property: Read-only
Bit 31 30 29 28 27 26 25 24
ETV[31:24]
Access R R R R R R R R
Reset 1 0 0 0 0 1 1 1
Bit 23 22 21 20 19 18 17 16
ETV[23:16]
Access R R R R R R R R
Reset 0 1 1 0 0 1 0 1
Bit 15 14 13 12 11 10 9 8
ETV[15:8]
Access R R R R R R R R
Reset 0 1 0 0 0 0 1 1
Bit 7 6 5 4 3 2 1 0
ETV[7:0]
Access R R R R R R R R
Reset 0 0 1 0 0 0 0 1
Name: MCAN_CUST
Offset: 0x08
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
CSV[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CSV[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CSV[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CSV[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: MCAN_DBTP
Offset: 0x0C
Reset: 0x00000A33
Property: Read/Write
This register can only be written if the bits CCE and INIT are set in MCAN CC Control Register.
The CAN bit time may be programmed in the range of 4 to 25 time quanta. The CAN time quantum may be
programmed in the range of 1 to 32 CAN core clock periods. tq = (DBRP + 1) CAN core clock periods.
DTSEG1 is the sum of Prop_Seg and Phase_Seg1. DTSEG2 is Phase_Seg2.
Therefore the length of the bit time is (programmed values) [DTSEG1 + DTSEG2 + 3] tq
or (functional values) [Sync_Seg + Prop_Seg + Phase_Seg1 + Phase_Seg2] tq.
The Information Processing Time (IPT) is zero, meaning the data for the next bit is available at the first clock edge
after the sample point.
With a CAN core clock frequency of 8 MHz, the reset value of 0x00000A33 configures the MCAN for a fast bit rate of
500 kbit/s.
The bit rate configured for the CAN FD data phase via MCAN_DBTP must be higher than or equal to the bit rate
configured for the arbitration phase via MCAN_NBTP.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
TDC DBRP[4:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
DTSEG1[4:0]
Access R/W R/W R/W R/W R/W
Reset 0 1 0 1 0
Bit 7 6 5 4 3 2 1 0
DTSEG2[3:0] DSJW[2:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 1 1 0 1 1
Name: MCAN_TEST
Offset: 0x10
Reset: 0x00000000
Property: Read/Write
Write access to the Test Register has to be enabled by setting bit MCAN_CCCR.TEST to ‘1’.
All MCAN Test Register functions are set to their reset values when bit MCAN_CCCR.TEST is cleared.
Loop Back mode and software control of pin CANTX are hardware test modes. Programming of TX ≠ 0 disturbs the
message transfer on the CAN bus.
The reset value for MCAN_TEST.RX is undefined.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
RX TX[1:0] LBCK
Access R R/W R/W R/W
Reset x 0 0 0
Name: MCAN_RWD
Offset: 0x14
Reset: 0x00000000
Property: Read/Write
The RAM Watchdog monitors the Message RAM response time. A Message RAM access via the MCAN’s Generic
Host Interface starts the Message RAM Watchdog Counter with the value configured by MCAN_RWD.WDC. The
counter is reloaded with MCAN_RWD.WDC when the Message RAM signals successful completion by activating its
READY output. In case there is no response from the Message RAM until the counter has counted down to zero,
the counter stops and interrupt flag MCAN_IR.WDI is set. The RAM Watchdog Counter is clocked by the system bus
clock (peripheral clock).
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
WDV[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WDC[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: MCAN_CCCR
Offset: 0x18
Reset: 0x00000001
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
NISO TXP EFBI PXHD BRSE FDOE
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TEST DAR MON CSR CSA ASM CCE INIT
Access R/W R/W R/W R/W R R/W R/W R/W
Reset 0 0 0 0 0 0 0 1
Name: MCAN_NBTP
Offset: 0x1C
Reset: 0x06000A03
Property: Read/Write
This register can only be written if the bits CCE and INIT are set in MCAN_CCCR.
The CAN bit time may be programmed in the range of 4 to 385 time quanta. The CAN time quantum may be
programmed in the range of 1 to 512 CAN core clock periods. tq = tcore clock x (NBRP + 1).
NTSEG1 is the sum of Prop_Seg and Phase_Seg1. NTSEG2 is Phase_Seg2.
Therefore the length of the bit time is (programmed values) [NTSEG1 + NTSEG2 + 3] tq
or (functional values) [Sync_Seg + Prop_Seg + Phase_Seg1 + Phase_Seg2] tq.
The Information Processing Time (IPT) is zero, meaning the data for the next bit is available at the first clock edge
after the sample point.
With a CAN core clock frequency of 8 MHz, the reset value of 0x06000A03 configures the MCAN for a bit rate of 500
kbit/s.
Bit 31 30 29 28 27 26 25 24
NSJW[6:0] NBRP[8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 1 1 0
Bit 23 22 21 20 19 18 17 16
NBRP[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
NTSEG1[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 1 0 1 0
Bit 7 6 5 4 3 2 1 0
NTSEG2[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 1 1
Name: MCAN_TSCC
Offset: 0x20
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
TCP[3:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
TSS[1:0]
Access R/W R/W
Reset 0 0
Name: MCAN_TSCV
Offset: 0x24
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
TSC[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TSC[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: MCAN_TOCC
Offset: 0x28
Reset: 0xFFFF0000
Property: Read/Write
This register can only be written if the bits CCE and INIT are set in MCAN CC Control Register.
For a description of the Timeout Counter, see Timeout Counter.
Bit 31 30 29 28 27 26 25 24
TOP[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Bit 23 22 21 20 19 18 17 16
TOP[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
TOS[1:0] ETOC
Access R/W R/W R/W
Reset 0 0 0
Name: MCAN_TOCV
Offset: 0x2C
Reset: 0x0000FFFF
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
TOC[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Bit 7 6 5 4 3 2 1 0
TOC[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Name: MCAN_ECR
Offset: 0x40
Reset: 0x00000000
Property: Read-only
When MCAN_CCCR.ASM is set, the CAN protocol controller does not increment TEC and REC when a CAN
protocol error is detected, but CEL is still incremented.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
CEL[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RP REC[6:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TEC[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: MCAN_PSR
Offset: 0x44
Reset: 0x00000707
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
TDCV[6:0]
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
PXE RFDF RBRS RESI DLEC[2:0]
Access R R R R R R R
Reset 0 0 0 0 1 1 1
Bit 7 6 5 4 3 2 1 0
BO EW EP ACT[1:0] LEC[2:0]
Access R R R R R R R R
Reset 0 0 0 0 0 1 1 1
Bits 10:8 – DLEC[2:0] Data Phase Last Error Code (set to 111 on read)
Type of last error that occurred in the data phase of a CAN FD format frame with its BRS flag set. Coding is the same
as for LEC. This field will be cleared to zero when a CAN FD format frame with its BRS flag set has been transferred
(reception or transmission) without error.
Name: MCAN_TDCR
Offset: 0x48
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
TDCO[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TDCF[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Name: MCAN_IR
Offset: 0x50
Reset: 0x00000000
Property: Read/Write
The flags are set when one of the listed conditions is detected (edge-sensitive). The flags remain set until the
processor clears them. A flag is cleared by writing a ‘1’ to the corresponding bit position. Writing a ‘0’ has no effect. A
hard reset will clear the register. The configuration of IE controls whether an interrupt is generated. The configuration
of ILS controls on which interrupt line an interrupt is signalled.
Bit 31 30 29 28 27 26 25 24
ARA PED PEA WDI BO EW
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
EP ELO DRX TOO MRAF TSW
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
TEFL TEFF TEFW TEFN TFE TCF TC HPM
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RF1L RF1F RF1W RF1N RF0L RF0F RF0W RF0N
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Value Description
0 Receive FIFO 0 not full.
1 Receive FIFO 0 full.
Name: MCAN_IE
Offset: 0x54
Reset: 0x00000000
Property: Read/Write
The following configuration values are valid for all listed bit names of this register:
0: Disables the corresponding interrupt.
1: Enables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
ARAE PEDE PEAE WDIE BOE EWE
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
EPE ELOE DRXE TOOE MRAFE TSWE
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
TEFLE TEFFE TEFWE TEFNE TFEE TCFE TCE HPME
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RF1LE RF1FE RF1WE RF1NE RF0LE RF0FE RF0WE RF0NE
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: MCAN_ILS
Offset: 0x58
Reset: 0x00000000
Property: Read/Write
The Interrupt Line Select register assigns an interrupt generated by a specific interrupt flag from the Interrupt Register
to one of the two module interrupt lines.
0: Interrupt assigned to interrupt line MCAN_INT0.
1: Interrupt assigned to interrupt line MCAN_INT1.
Bit 31 30 29 28 27 26 25 24
ARAL PEDL PEAL WDIL BOL EWL
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
EPL ELOL DRXL TOOL MRAFL TSWL
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
TEFLL TEFFL TEFWL TEFNL TFEL TCFL TCL HPML
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RF1LL RF1FL RF1WL RF1NL RF0LL RF0FL RF0WL RF0NL
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: MCAN_ILE
Offset: 0x5C
Reset: 0x00000000
Property: Read/Write
Each of the two interrupt lines to the processor can be enabled/disabled separately by programming bits EINT0 and
EINT1.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
EINT1 EINT0
Access R/W R/W
Reset 0 0
Name: MCAN_GFC
Offset: 0x80
Reset: 0x00000000
Property: Read/Write
Global settings for Message ID filtering. The Global Filter Configuration controls the filter path for standard and
extended messages as illustrated in Standard Message ID Filter Path and Extended Message ID Filter Path.
This register can only be written if the bits CCE and INIT are set in MCAN CC Control Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
ANFS[1:0] ANFE[1:0] RRFS RRFE
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: MCAN_SIDFC
Offset: 0x84
Reset: 0x00000000
Property: Read/Write
Settings for 11-bit standard Message ID filtering. The Standard ID Filter Configuration controls the filter path for
standard messages as illustrated in Standard Message ID Filter Path.
This register can only be written if the bits CCE and INIT are set in MCAN CC Control Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
LSS[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
FLSSA[13:6]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
FLSSA[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: MCAN_XIDFC
Offset: 0x88
Reset: 0x00000000
Property: Read/Write
Settings for 29-bit extended Message ID filtering. The Extended ID Filter Configuration controls the filter path for
standard messages as described in Extended Message ID Filter Path.
This register can only be written if the bits CCE and INIT are set in MCAN CC Control Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
LSE[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
FLESA[13:6]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
FLESA[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: MCAN_XIDAM
Offset: 0x90
Reset: 0x1FFFFFFF
Property: Read/Write
This register can only be written if the bits CCE and INIT are set in MCAN CC Control Register.
Bit 31 30 29 28 27 26 25 24
EIDM[28:24]
Access R/W R/W R/W R/W R/W
Reset 1 1 1 1 1
Bit 23 22 21 20 19 18 17 16
EIDM[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8
EIDM[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Bit 7 6 5 4 3 2 1 0
EIDM[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 1 1 1 1 1 1 1 1
Name: MCAN_HPMS
Offset: 0x94
Reset: 0x00000000
Property: Read-only
This register is updated every time a Message ID filter element configured to generate a priority event matches. This
can be used to monitor the status of incoming high priority messages and to enable fast access to these messages.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
FLST FIDX[6:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
MSI[1:0] BIDX[5:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: MCAN_NDAT1
Offset: 0x98
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
ND31 ND30 ND29 ND28 ND27 ND26 ND25 ND24
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
ND23 ND22 ND21 ND20 ND19 ND18 ND17 ND16
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
ND15 ND14 ND13 ND12 ND11 ND10 ND9 ND8
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
ND7 ND6 ND5 ND4 ND3 ND2 ND1 ND0
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – NDx New
Data
The register holds the New Data flags of Receive Buffers 0 to 31. The flags are set when the respective Receive
Buffer has been updated from a received frame. The flags remain set until the processor clears them. A flag is
cleared by writing a ‘1’ to the corresponding bit position. Writing a ‘0’ has no effect. A hard reset will clear the register.
Value Description
0 Receive Buffer not updated
1 Receive Buffer updated from new message
Name: MCAN_NDAT2
Offset: 0x9C
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
ND63 ND62 ND61 ND60 ND59 ND58 ND57 ND56
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
ND55 ND54 ND53 ND52 ND51 ND50 ND49 ND48
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
ND47 ND46 ND45 ND44 ND43 ND42 ND41 ND40
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
ND39 ND38 ND37 ND36 ND35 ND34 ND33 ND32
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – NDx New
Data
The register holds the New Data flags of Receive Buffers 32 to 63. The flags are set when the respective Receive
Buffer has been updated from a received frame. The flags remain set until the processor clears them. A flag is
cleared by writing a ‘1’ to the corresponding bit position. Writing a ‘0’ has no effect. A hard reset will clear the register.
Value Description
0 Receive Buffer not updated.
1 Receive Buffer updated from new message.
Name: MCAN_RXF0C
Offset: 0xA0
Reset: 0x00000000
Property: Read/Write
This register can only be written if the bits CCE and INIT are set in MCAN CC Control Register.
Bit 31 30 29 28 27 26 25 24
F0OM F0WM[6:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
F0S[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
F0SA[13:6]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
F0SA[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: MCAN_RXF0S
Offset: 0xA4
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
RF0L F0F
Access R R
Reset 0 0
Bit 23 22 21 20 19 18 17 16
F0PI[5:0]
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
F0GI[5:0]
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
F0FL[6:0]
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Name: MCAN_RXF0A
Offset: 0xA8
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
F0AI[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: MCAN_RXBC
Offset: 0xAC
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RBSA[13:6]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RBSA[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: MCAN_RXF1C
Offset: 0xB0
Reset: 0x00000000
Property: Read/Write
This register can only be written if the bits CCE and INIT are set in MCAN CC Control Register.
Bit 31 30 29 28 27 26 25 24
F1OM F1WM[6:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
F1S[6:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
F1SA[13:6]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
F1SA[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: MCAN_RXF1S
Offset: 0xB4
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
DMS[1:0] RF1L F1F
Access R R R R
Reset 0 0 0 0
Bit 23 22 21 20 19 18 17 16
F1PI[5:0]
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
F1GI[5:0]
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
F1FL[6:0]
Access R R R R R R R
Reset 0 0 0 0 0 0 0
Name: MCAN_RXF1A
Offset: 0xB8
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
F1AI[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: MCAN_RXESC
Offset: 0xBC
Reset: 0x00000000
Property: Read/Write
This register can only be written if the bits CCE and INIT are set in MCAN CC Control Register.
Configures the number of data bytes belonging to a Receive Buffer / Receive FIFO element. Data field sizes >8 bytes
are intended for CAN FD operation only.
In case the data field size of an accepted CAN frame exceeds the data field size configured for the matching Receive
Buffer or Receive FIFO, only the number of bytes as configured by MCAN_RXESC are stored to the Receive Buffer
resp. Receive FIFO element. The rest of the frame’s data field is ignored.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
RBDS[2:0]
Access R/W R/W R/W
Reset 0 0 0
Bit 7 6 5 4 3 2 1 0
F1DS[2:0] F0DS[2:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: MCAN_TXBC
Offset: 0xC0
Reset: 0x00000000
Property: Read/Write
This register can only be written if the bits CCE and INIT are set in MCAN CC Control Register.
The sum of TFQS and NDTB may not exceed 32. There is no check for erroneous configurations. The Tx Buffers
section in the Message RAM starts with the dedicated Tx Buffers.
Bit 31 30 29 28 27 26 25 24
TFQM TFQS[5:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
NDTB[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
TBSA[13:6]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TBSA[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: MCAN_TXFQS
Offset: 0xC4
Reset: 0x00000000
Property: Read-only
The Tx FIFO/Queue status is related to the pending Tx requests listed in register MCAN_TXBRP. Therefore the effect
of Add/Cancellation requests may be delayed due to a running Tx scan (MCAN_TXBRP not yet updated).
In case of mixed configurations where dedicated Tx Buffers are combined with a Tx FIFO or a Tx Queue, the Put and
Get Indices indicate the number of the Tx Buffer starting with the first dedicated Tx Buffers.
Example: For a configuration of 12 dedicated Tx Buffers and a Tx FIFO of 20 Buffers a Put Index of 15 points to the
fourth buffer of the Tx FIFO.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
TFQF TFQPI[4:0]
Access R R R R R R
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
TFGI[4:0]
Access R R R R R
Reset 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TFFL[5:0]
Access R R R R R R
Reset 0 0 0 0 0 0
Name: MCAN_TXESC
Offset: 0xC8
Reset: 0x00000000
Property: Read/Write
This register can only be written if the bits CCE and INIT are set in MCAN CC Control Register.
Configures the number of data bytes belonging to a Tx Buffer element. Data field sizes > 8 bytes are intended for
CAN FD operation only.
In case the data length code DLC of a Tx Buffer element is configured to a value higher than the Tx Buffer data field
size MCAN_TXESC.TBDS, the bytes not defined by the Tx Buffer are transmitted as “0xCC” (padding bytes).
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
TBDS[2:0]
Access R/W R/W R/W
Reset 0 0 0
Name: MCAN_TXBRP
Offset: 0xCC
Reset: 0x00000000
Property: Read-only
MCAN_TXBRP bits which are set while a Tx scan is in progress are not considered during this particular Tx scan. In
case a cancellation is requested for such a Tx Buffer, this Add Request is cancelled immediately, the corresponding
MCAN_TXBRP bit is reset.
Bit 31 30 29 28 27 26 25 24
TRP31 TRP30 TRP29 TRP28 TRP27 TRP26 TRP25 TRP24
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
TRP23 TRP22 TRP21 TRP20 TRP19 TRP18 TRP17 TRP16
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
TRP15 TRP14 TRP13 TRP12 TRP11 TRP10 TRP9 TRP8
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TRP7 TRP6 TRP5 TRP4 TRP3 TRP2 TRP1 TRP0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – TRPx
Transmission Request Pending for Buffer x
Each Tx Buffer has its own Transmission Request Pending bit. The bits are set via register MCAN_TXBAR. The bits
are reset after a requested transmission has completed or has been cancelled via register MCAN_TXBCR.
TXBRP bits are set only for those Tx Buffers configured via MCAN_TXBC. After a MCAN_TXBRP bit has been set,
a Tx scan (see Tx Handling) is started to check for the pending Tx request with the highest priority (Tx Buffer with
lowest Message ID).
A cancellation request resets the corresponding transmission request pending bit of register MCAN_TXBRP. In case
a transmission has already been started when a cancellation is requested, this is done at the end of the transmission,
regardless whether the transmission was successful or not. The cancellation request bits are reset directly after the
corresponding TXBRP bit has been reset.
After a cancellation has been requested, a finished cancellation is signalled via MCAN_TXBCF.
• after successful transmission together with the corresponding MCAN_TXBTO bit.
• when the transmission has not yet been started at the point of cancellation.
• when the transmission has been aborted due to lost arbitration.
• when an error occurred during frame transmission.
In DAR mode, all transmissions are automatically cancelled if they are not successful. The corresponding
MCAN_TXBCF bit is set for all unsuccessful transmissions.
Value Description
0 No transmission request pending
1 Transmission request pending
Name: MCAN_TXBAR
Offset: 0xD0
Reset: 0x00000000
Property: Read/Write
If an add request is applied for a Transmit Buffer with pending transmission request (corresponding MCAN_TXBRP
bit already set), this Add Request is ignored.
Bit 31 30 29 28 27 26 25 24
AR31 AR30 AR29 AR28 AR27 AR26 AR25 AR24
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
AR23 AR22 AR21 AR20 AR19 AR18 AR17 AR16
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
AR15 AR14 AR13 AR12 AR11 AR10 AR9 AR8
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
AR7 AR6 AR5 AR4 AR3 AR2 AR1 AR0
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – ARx Add
Request for Transmit Buffer x
Each Transmit Buffer has its own Add Request bit. Writing a ‘1’ will set the corresponding Add Request bit; writing
a ‘0’ has no impact. This enables the processor to set transmission requests for multiple Transmit Buffers with one
write to MCAN_TXBAR. MCAN_TXBAR bits are set only for those Transmit Buffers configured via TXBC. When no
Transmit scan is running, the bits are reset immediately, else the bits remain set until the Transmit scan process has
completed.
Value Description
0 No transmission request added.
1 Transmission requested added.
Name: MCAN_TXBCR
Offset: 0xD4
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
CR31 CR30 CR29 CR28 CR27 CR26 CR25 CR24
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CR23 CR22 CR21 CR20 CR19 CR18 CR17 CR16
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CR15 CR14 CR13 CR12 CR11 CR10 CR9 CR8
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CR7 CR6 CR5 CR4 CR3 CR2 CR1 CR0
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – CRx
Cancellation Request for Transmit Buffer x
Each Transmit Buffer has its own Cancellation Request bit. Writing a ‘1’ will set the corresponding Cancellation
Request bit; writing a ‘0’ has no impact. This enables the processor to set cancellation requests for multiple Transmit
Buffers with one write to MCAN_TXBCR. MCAN_TXBCR bits are set only for those Transmit Buffers configured via
TXBC. The bits remain set until the corresponding bit of MCAN_TXBRP is reset.
Value Description
0 No cancellation pending.
1 Cancellation pending.
Name: MCAN_TXBTO
Offset: 0xD8
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
TO31 TO30 TO29 TO28 TO27 TO26 TO25 TO24
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
TO23 TO22 TO21 TO20 TO19 TO18 TO17 TO16
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
TO15 TO14 TO13 TO12 TO11 TO10 TO9 TO8
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TO7 TO6 TO5 TO4 TO3 TO2 TO1 TO0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – TOx
Transmission Occurred for Buffer x
Each Transmit Buffer has its own Transmission Occurred bit. The bits are set when the corresponding
MCAN_TXBRP bit is cleared after a successful transmission. The bits are reset when a new transmission is
requested by writing a ‘1’ to the corresponding bit of register MCAN_TXBAR.
Value Description
0 No transmission occurred.
1 Transmission occurred.
Name: MCAN_TXBCF
Offset: 0xDC
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
CF31 CF30 CF29 CF28 CF27 CF26 CF25 CF24
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CF23 CF22 CF21 CF20 CF19 CF18 CF17 CF16
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CF15 CF14 CF13 CF12 CF11 CF10 CF9 CF8
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CF7 CF6 CF5 CF4 CF3 CF2 CF1 CF0
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – CFx
Cancellation Finished for Transmit Buffer x
Each Transmit Buffer has its own Cancellation Finished bit. The bits are set when the corresponding MCAN_TXBRP
bit is cleared after a cancellation was requested via MCAN_TXBCR. In case the corresponding MCAN_TXBRP bit
was not set at the point of cancellation, CF is set immediately. The bits are reset when a new transmission is
requested by writing a ‘1’ to the corresponding bit of register MCAN_TXBAR.
Value Description
0 No transmit buffer cancellation.
1 Transmit buffer cancellation finished.
Name: MCAN_TXBTIE
Offset: 0xE0
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
TIE31 TIE30 TIE29 TIE28 TIE27 TIE26 TIE25 TIE24
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
TIE23 TIE22 TIE21 TIE20 TIE19 TIE18 TIE17 TIE16
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
TIE15 TIE14 TIE13 TIE12 TIE11 TIE10 TIE9 TIE8
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TIE7 TIE6 TIE5 TIE4 TIE3 TIE2 TIE1 TIE0
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – TIEx
Transmission Interrupt Enable for Buffer x
Each Transmit Buffer has its own Transmission Interrupt Enable bit.
Value Description
0 Transmission interrupt disabled
1 Transmission interrupt enable
Name: MCAN_TXBCIE
Offset: 0xE4
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
CFIE31 CFIE30 CFIE29 CFIE28 CFIE27 CFIE26 CFIE25 CFIE24
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CFIE23 CFIE22 CFIE21 CFIE20 CFIE19 CFIE18 CFIE17 CFIE16
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CFIE15 CFIE14 CFIE13 CFIE12 CFIE11 CFIE10 CFIE9 CFIE8
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CFIE7 CFIE6 CFIE5 CFIE4 CFIE3 CFIE2 CFIE1 CFIE0
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 – CFIEx
Cancellation Finished Interrupt Enable for Transmit Buffer x
Each Transmit Buffer has its own Cancellation Finished Interrupt Enable bit.
Value Description
0 Cancellation finished interrupt disabled.
1 Cancellation finished interrupt enabled.
Name: MCAN_TXEFC
Offset: 0xF0
Reset: 0x00000000
Property: Read/Write
This register can only be written if the bits CCE and INIT are set in MCAN CC Control Register.
Bit 31 30 29 28 27 26 25 24
EFWM[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
EFS[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
EFSA[13:6]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
EFSA[5:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Name: MCAN_TXEFS
Offset: 0xF4
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
TEFL EFF
Access R R
Reset 0 0
Bit 23 22 21 20 19 18 17 16
EFPI[4:0]
Access R R R R R
Reset 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
EFGI[4:0]
Access R R R R R
Reset 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
EFFL[5:0]
Access R R R R R R
Reset 0 0 0 0 0 0
Name: MCAN_TXEFA
Offset: 0xF8
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
EFAI[4:0]
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
49.1 Description
There are four TC modules, numbered TC0 through TC3. Each Timer Counter (TC) module includes three identical
TC channels, numbered Channel 0, Channel 1, and Channel 2..
Each TC channel can be independently programmed to perform a wide range of functions including frequency
measurement, event counting, interval measurement, pulse generation, delay timing and pulse width modulation.
Each channel has three external clock inputs, five internal clock inputs and two multipurpose input/output signals
which can be configured by the user. Each channel drives an internal interrupt signal which can be programmed to
generate processor interrupts.
The TC embeds a quadrature decoder (QDEC) connected in front of the timers and driven by TIOA0, TIOB0 and
TIOB1 inputs. When enabled, the QDEC performs the input lines filtering, decoding of quadrature signals and
connects to the timers/counters in order to read the position and speed of the motor through the user interface.
The TC block has the following two global registers which act upon all TC channels:
• Block Control register (TC_BCR) — Allows channels to be started simultaneously with the same instruction
• Block Mode register (TC_BMR) — Defines the external clock inputs for each channel, allowing them to be
chained
Name Definition
TIMER_CLOCK1 PCK6 or PCK7 (TC0.Ch0 only)
TIMER_CLOCK2 MCK/8
TIMER_CLOCK3 MCK/32
TIMER_CLOCK4 MCK/128
TIMER_CLOCK5 (1) SLCK
1. When SLCK is selected for Peripheral Clock (CSS = 0 in PMC Host Clock register), SLCK input is equivalent
to Peripheral Clock.
2. The PCK6 or PCK7 (TC0.Ch0 only) frequency must be at least three times lower than peripheral clock
frequency.
Figure 49-1. Timer Counter Module N Block Diagram (N = 0,1,2,3)
Timer Counter
Parallel I/O
TIMER_CLOCK1 Controller
TCLK0
TCLK0
TIMER_CLOCK2 TCLK1
TIOA1 TCLK2
TIMER_CLOCK3 TIOA2 XC0 Timer Counter
TIOA
TCLK1 XC1 Channel 0 TIOA0 TIOA0 +3*N
TIMER_CLOCK4 TIOB TIOB0 +3*N
TCLK2 XC2 TIOB0
TIMER_CLOCK5 TC0XC0S SYNC
INT0
TCLK0
TCLK2 SYNC
INT1
TC1XC1S
PWM Interrupt
Controller
Note:
The QDEC connections are detailed in Predefined Connection of the Quadrature Decoder with Timer Counters.
Table 49-2. Channel Signal Description
...........continued
Signal Name Description
TIOAx Capture Mode: Timer Counter Input
Waveform Mode: Timer Counter Output
TIOBx Capture Mode: Timer Counter Input
Waveform Mode: Timer Counter Input/Output
INT Interrupt Signal Output (internal signal)
SYNC Synchronization Input Signal (from configuration register)
Note: TCN.Chm is connected to TIOA(m + 3*N) and TIOB(m + 3*N), for N=0...3 and m = 0,1,2.
49.6.1 Description
All channels of the Timer Counter are independent and identical in operation except when the QDEC is enabled. The
registers for channel programming are listed in 49.7. Register Summary.
Timer Counter
TCLK0 Channel 0
TIOA1
XC0 TIOA0
TIOA2
XC1 = TCLK1
XC2 = TCLK2 TIOB0
SYNC
TC1XC1S
Timer Counter
Channel 1
TCLK1 XC0 = TCLK0 TIOA1
TIOA0
XC1
TIOA2
XC2 = TCLK2 TIOB1
SYNC
Timer Counter
TC2XC2S Channel 2
SYNC
TCCLKS
CLKI
TIMER_CLOCK1 Synchronous
TIMER_CLOCK2 Edge Detection
TIMER_CLOCK3
TIMER_CLOCK4
TIMER_CLOCK5 Selected
Clock
XC0
XC1
XC2
Peripheral Clock
BURST
to ‘1’. In Waveform mode, it can be disabled by an RC Compare event if TC_CMRx.CPCDIS is set to ‘1’. When
disabled, the start or the stop actions have no effect: only a CLKEN command in the TC_CCR can reenable the
clock. When the clock is enabled, TC_SR.CLKSTA is set.
• The clock can also be started or stopped: a trigger (software, synchro, external or compare) always starts the
clock. The clock can be stopped by an RB load event in Capture mode (TC_CMRx.LDBSTOP = 1) or an RC
compare event in Waveform mode (TC_CMRx.CPCSTOP = 1). The start and the stop commands are effective
only if the clock is enabled.
Figure 49-4. Clock Control
Selected
Clock Trigger
Q S
R
Q S
R
Stop Disable
Counter Event Event
Clock
49.6.6 Trigger
A trigger resets the counter and starts the counter clock. Three types of triggers are common to both modes, and a
fourth external trigger is available to each mode.
Regardless of the trigger used, it will be taken into account at the following active edge of the selected clock. This
means that the counter value can be read differently from zero just after a trigger, especially when a low frequency
signal is selected as the clock.
The following triggers are common to both modes:
• Software Trigger: Each channel has a software trigger, available by setting TC_CCR.SWTRG.
• SYNC: Each channel has a synchronization signal SYNC. When asserted, this signal has the same effect as a
software trigger. The SYNC signals of all channels are asserted simultaneously by writing TC_BCR with SYNC
set.
• Compare RC Trigger: RC is implemented in each channel and can provide a trigger when the counter value
matches the RC value if TC_CMRx.CPCTRG is set .
The channel can also be configured to have an external trigger. In Capture mode, the external trigger signal can
be selected between TIOAx and TIOBx. In Waveform mode, an external event can be programmed on one of the
following signals: TIOBx, XC0, XC1 or XC2. This external event can then be programmed to perform a trigger by
setting TC_CMRx.ENETRG.
If an external trigger is used, the duration of the pulses must be longer than the peripheral clock period in order to be
detected.
TIOB
TIOA
RA
RB
TIOB
TIOA
RA
Capture Capture
1 Register A Register B Compare RC =
Counter
SWTRG
CLK
OVF
RESET
SYNC
Trig
ABETRG
ETRGEDG CPCTRG
MTIOB Edge
Detector
TIOB SBSMPLR
TC1_SR
ETRGS
COVFS
LOVRS
LDRAS
LDRBS
CPCS
Edge Subsampler
TC1_IMR
LDRA LDRB
INT
TCCLKS
CLKSTA CLKEN CLKDIS
TIMER_CLOCK1 ACPC
Synchronous CLKI
TIMER_CLOCK2 Edge Detection
TIMER_CLOCK3
Q S
TIMER_CLOCK4 CPCDIS MTIOA
TIMER_CLOCK5 R ACPA
Output Controller
Q S
XC0
R
XC1
XC2 CPCSTOP TIOA
AEEVT
Peripheral Clock
Counter
CLK
OVF
RESET
SWTRG
BCPC
SYNC
Trig
BCPB MTIOB
Output Controller
WAVSEL
EEVT
TIOB
BEEVT
EEVTEDG
ENETRG
TC1_SR
ETRGS
COVFS
CPCS
CPAS
CPBS
Edge
Detector BSWTRG
TIOB
TC1_IMR
INT
49.6.12.1 WAVSEL = 00
When WAVSEL = 00, the value of TC_CV is incremented from 0 to 216-1. Once 216-1 has been reached, the value of
TC_CV is reset. Incrementation of TC_CV starts again and the cycle continues.
An external event trigger or a software trigger can reset the value of TC_CV. It is important to note that the trigger
may occur at any time.
Refer to the figures below.
RC Compare cannot be programmed to generate a trigger in this configuration. At the same time, RC Compare can
stop the counter clock (CPCSTOP = 1 in TC_CMR) and/or disable the counter clock (CPCDIS = 1 in TC_CMR).
0xFFFF
RC
RB
RA
TIOB
TIOA
0xFFFF
RB
RA
Time
Waveform Examples
TIOB
TIOA
49.6.12.2 WAVSEL = 10
When WAVSEL = 10, the value of TC_CV is incremented from 0 to the value of RC, then automatically reset on a RC
Compare. Once the value of TC_CV has been reset, it is then incremented and so on.
It is important to note that TC_CV can be reset at any time by an external event or a software trigger if both are
programmed correctly.
Refer to the figures below.
In addition, RC Compare can stop the counter clock (CPCSTOP = 1 in TC_CMR) and/or disable the counter clock
(CPCDIS = 1 in TC_CMR).
2n-1
(n = counter size) Counter cleared by compare match with RC
RC
RB
RA
TIOB
TIOA
2n-1
(n = counter size) Counter cleared by compare match with RC Counter cleared by trigger
RC
RB
RA
TIOB
TIOA
49.6.12.3 WAVSEL = 01
When WAVSEL = 01, the value of TC_CV is incremented from 0 to 216-1 . Once 216-1 is reached, the value of
TC_CV is decremented to 0, then reincremented to 216-1 and so on.
A trigger such as an external event or a software trigger can modify TC_CV at any time. If a trigger occurs while
TC_CV is incrementing, TC_CV then decrements. If a trigger is received while TC_CV is decrementing, TC_CV then
increments.
Refer to the figures below.
RC Compare cannot be programmed to generate a trigger in this configuration.
At the same time, RC Compare can stop the counter clock (CPCSTOP = 1) and/or disable the counter clock
(CPCDIS = 1).
0xFFFF
RC
RB
RA
TIOB
TIOA
0xFFFF
Counter decremented
by trigger
RC
RB
Counter incremented
by trigger
RA
TIOB
TIOA
49.6.12.4 WAVSEL = 11
When WAVSEL = 11, the value of TC_CV is incremented from 0 to RC. Once RC is reached, the value of TC_CV is
decremented to 0, then reincremented to RC and so on.
A trigger such as an external event or a software trigger can modify TC_CV at any time. If a trigger occurs while
TC_CV is incrementing, TC_CV then decrements. If a trigger is received while TC_CV is decrementing, TC_CV then
increments.
Refer to the figures below.
RC Compare can stop the counter clock (CPCSTOP = 1) and/or disable the counter clock (CPCDIS = 1).
2n-1
(n = counter size)
Counter decremented by compare match with RC
RC
RB
RA
TIOB
TIOA
2n-1
(n = counter size)
Counter decremented by compare match with RC
RC
Counter decremented
by trigger
RB
Counter incremented
by trigger
RA
TIOB
TIOA
Timer Counter
TIOA0 Channel 0
TIOA0
TC_EMR0.TRIGSRCB
TIOB0
TIOB0
TC_EMR1.TRIGSRCA
Timer Counter
TIOA1 Channel 1
TIOA1
TC_EMR1.TRIGSRCB
TIOB1
TIOB1
TC_EMR2.TRIGSRCA
Timer Counter
TIOA2 Channel 2
TIOA2
TC_EMR2.TRIGSRCB
TIOB2
TIOB2
49.6.16.1 Description
The quadrature decoder (QDEC) is driven by TIOA0, TIOB0 and TIOB1 input pins and drives the timer counter of
channel 0 and 1. Channel 2 can be used as a time base in case of speed measurement requirements (refer to
Predefined Connection of the Quadrature Decoder with Timer Counters).
When writing a ‘0’ to TC_BMR.QDEN, the QDEC is bypassed and the IO pins are directly routed to the timer counter
function.
TIOA0 and TIOB0 are to be driven by the two dedicated quadrature signals from a rotary sensor mounted on the
shaft of the off-chip motor.
A third signal from the rotary sensor can be processed through pin TIOB1 and is typically dedicated to be driven by
an index signal if it is provided by the sensor. This signal is not required to decode the quadrature signals PHA, PHB.
TC_CMRx.TCCLKS must be configured to select XC0 input (i.e., 0x101). Field TC0XC0S has no effect as soon as
the QDEC is enabled.
Either speed or position/revolution can be measured. Position channel 0 accumulates the edges of PHA, PHB input
signals giving a high accuracy on motor position whereas channel 1 accumulates the index pulses of the sensor,
therefore the number of rotations. Concatenation of both values provides a high level of precision on motion system
position.
In Speed mode, position cannot be measured but revolution can be measured.
Inputs from the rotary sensor can be filtered prior to downstream processing. Accommodation of input polarity, phase
definition and other factors are configurable.
Interruptions can be generated on different events.
A compare function (using TC_RC) is available on channel 0 (speed/position) or channel 1 (rotation) and can
generate an interrupt by means of TC_SRx.CPCS.
Figure 49-17. Predefined Connection of the Quadrature Decoder with Timer Counters
Reset pulse
SPEEDEN
Quadrature
Decoder 1
1
(Filter + Edge
Detect + QD) TIOA Timer Counter
Channel 0
TIOA0
PHEdges QDEN
1
TIOB
1
XC0
TIOB0
TIOA0 PHA XC0
Speed/Position
TIOB0 QDEN
PHB
TIOB1 Index
IDX 1
TIOB 1 Timer Counter
XC0
Channel 1
TIOB1
XC0
Rotation
Direction
Timer Counter
Channel 2
Input Preprocessing
1
PHA
1 PHedge
Filter
TIOA0
Direction
INVA and
Edge
Detection
1
PHB
1 DIR
Filter
TIOB0
INVB
1 IDX
1 IDX
1 Filter
TIOB1
IDXPHB
INVIDX
Input filtering can efficiently remove spurious pulses that might be generated by the presence of particulate
contamination on the optical or magnetic disk of the rotary sensor.
Spurious pulses can also occur in environments with high levels of electromagnetic interference. Or, simply if
vibration occurs even when rotation is fully stopped and the shaft of the motor is in such a position that the beginning
of one of the reflective or magnetic bars on the rotary sensor disk is aligned with the light or magnetic (Hall) receiver
cell of the rotary sensor. Any vibration can make the PHA, PHB signals toggle for a short duration.
particulate contamination
PHA,B
Filter Out
PHA
PHB
motor shaft stopped so that
rotary sensor cell is aligned with an edge of the disk
rotation
stop
PHA
PHB
stop
Resulting PHA, PHB electrical waveforms
PHB
vibration
PHA, PHB electrical waveforms after filtering
PHA
PHB
Any change in rotation direction is reported in the TC_QISR and can generate an interrupt.
The direction change condition is reported as soon as two consecutive edges on a phase signal have sampled the
same value on the other phase signal and there is an edge on the other signal. The two consecutive edges of
one phase signal sampling the same value on other phase signal is not sufficient to declare a direction change, as
particulate contamination may mask one or more reflective bars on the optical or magnetic disk of the sensor. Refer
to the following figure for waveforms.
Figure 49-20. Rotation Change Detection
Direction Change under normal conditions
Report Time
PHB
DIR
DIRCHG
missing pulse
PHA
same phase
PHB
DIR
PHA
PHB
PHA
PHB
PHA
Even with an abnormally formatted disk, there is no occurrence of PHA, PHB switching at the same time.
PHB
QERR
MAXFILT must be tuned according to several factors such as the peripheral clock frequency, type of rotary sensor
and rotation speed to be achieved.
This time base is automatically fed back to TIOAx of channel 0 when QDEN and SPEEDEN are set.
Channel 0 must be configured in Capture mode (WAVE = 0 in TC_CMR0). TC_CMR0.ABETRG must be configured
at 1 to select TIOAx as a trigger for this channel.
EDGTRG must be set to 0x01, to clear the counter on a rising edge of the TIOAx signal and field LDRA must be set
accordingly to 0x01, to load TC_RA0 at the same time as the counter is cleared (LDRB must be set to 0x01). As a
consequence, at the end of each time base period the differentiation required for the speed calculation is performed.
The process must be started by configuring bits CLKEN and SWTRG in the TC_CCR.
The speed can be read on field RA in TC_RA0.
Channel 1 can still be used to count the number of revolutions of the motor.
PHA
PHB
detection
Not a change of direction
corrections
1 2 3 4 5 6 7 10 12 13 14 15 16
If a quadrature device is undamaged, the number of pulses counted for a predefined period of time must be the same
with or without detection and autocorrection feature.
Therefore, if the measurement results differ, a contamination exists on the device producing the quadrature signals.
This does not substitute the measurements of the number of pulses between two index pulses (if available) but
provides a complementary method to detect damaged quadrature devices.
When the device providing quadrature signals is severely damaged, potentially leading to a number of consecutive
missing pulses greater than 1, the downstream processing may be affected. It is possible to define the maximum
admissible number of consecutive missing pulses before issuing a Missing Pulse Error flag (MPE in TC_QISR). The
threshold triggering an MPE flag report can be configured in TC_BMR.MAXCMP. If the field MAXCMP is cleared,
MPE never rises. The flag MAXCMP can trigger an interrupt while the QDEC is operating, thus providing a real time
report of a potential problem on the quadrature device.
TIOAx
TC_RCx
TIOBx
DOWNx
It is possible to trigger the FAULT output of the TIMER1 with CPCS from TC_SR0 and/or CPCS from TC_SR1. Each
source can be independently enabled/disabled in the TC_FMR.
This can be useful to detect an overflow on speed and/or position when QDEC is processed and to act immediately
by using the FAULT output.
Figure 49-24. Fault Output Generation
AND
TC_SR0 flag CPCS
TC_FMR / ENCF0 OR
TC_FMR / ENCF1
...........continued
...........continued
...........continued
Name: TC_CCRx
Offset: 0x00 + x*0x40 [x=0..2]
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
SWTRG CLKDIS CLKEN
Access W W W
Reset – – –
Name: TC_CMRx
Offset: 0x04 + x*0x40 [x=0..2]
Reset: 0x00000000
Property: Read/Write
This register can be written only if the WPEN bit is cleared in the TC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
SBSMPLR[2:0] LDRB[1:0] LDRA[1:0]
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WAVE CPCTRG ABETRG ETRGEDG[1:0]
Access R/W R/W R/W R/W R/W
Reset 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
LDBDIS LDBSTOP BURST[1:0] CLKI TCCLKS[2:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Name: TC_CMRx
Offset: 0x04 + x*0x40 [x=0..2]
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the TC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
BSWTRG[1:0] BEEVT[1:0] BCPC[1:0] BCPB[1:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
ASWTRG[1:0] AEEVT[1:0] ACPC[1:0] ACPA[1:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WAVE WAVSEL[1:0] ENETRG EEVT[1:0] EEVTEDG[1:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CPCDIS CPCSTOP BURST[1:0] CLKI TCCLKS[2:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Note: If TIOB is chosen as the external event signal, it is configured as an input and no longer generates waveforms
and subsequently no IRQs.
Name: TC_SMMRx
Offset: 0x08 + x*0x40 [x=0..2]
Reset: 0x00000000
Property: R/W
This register can only be written if the WPEN bit is cleared in the TC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
DOWN GCEN
Access R/W R/W
Reset 0 0
49.7.5 TC Register AB
Name: TC_RABx
Offset: 0x0C + x*0x40 [x=0..2]
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
RAB[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RAB[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RAB[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RAB[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: TC_CVx
Offset: 0x10 + x*0x40 [x=0..2]
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
CV[31:24]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
CV[23:16]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
CV[15:8]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
CV[7:0]
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Important:
For 16-bit channels, CV field size is limited to register bits 15:0.
49.7.7 TC Register A
Name: TC_RAx
Offset: 0x14 + x*0x40 [x=0..2]
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
RA[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RA[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RA[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RA[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Important:
For 16-bit channels, RA field size is limited to register bits 15:0.
49.7.8 TC Register B
Name: TC_RBx
Offset: 0x18 + x*0x40 [x=0..2]
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
RB[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RB[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RB[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RB[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Important:
For 16-bit channels, RB field size is limited to register bits 15:0.
49.7.9 TC Register C
Name: TC_RCx
Offset: 0x1C + x*0x40 [x=0..2]
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the TC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
RC[31:24]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
RC[23:16]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
RC[15:8]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
RC[7:0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Important:
For 16-bit channels, RC field size is limited to register bits 15:0.
Name: TC_SRx
Offset: 0x20 + x*0x40 [x=0..2]
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
MTIOB MTIOA CLKSTA
Access R R R
Reset 0 0 0
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
ETRGS LDRBS LDRAS CPCS CPBS CPAS LOVRS COVFS
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Value Description
0 RA Load has not occurred since the last read of the Status Register or TC_CMRx.WAVE = 1.
1 RA Load has occurred since the last read of the Status Register, if TC_CMRx.WAVE = 0.
Name: TC_IERx
Offset: 0x24 + x*0x40 [x=0..2]
Reset: –
Property: Write-only
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Enables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
ETRGS LDRBS LDRAS CPCS CPBS CPAS LOVRS COVFS
Access W W W W W W W W
Reset – – – – – – – –
Name: TC_IDRx
Offset: 0x28 + x*0x40 [x=0..2]
Reset: –
Property: Write-only
The following configuration values are valid for all listed bit names of this register:
0: No effect.
1: Disables the corresponding interrupt.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
ETRGS LDRBS LDRAS CPCS CPBS CPAS LOVRS COVFS
Access W W W W W W W W
Reset – – – – – – – –
Name: TC_IMRx
Offset: 0x2C + x*0x40 [x=0..2]
Reset: 0x00000000
Property: Read-only
The following configuration values are valid for all listed bit names of this register:
0: The corresponding interrupt is not enabled.
1: The corresponding interrupt is enabled.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
ETRGS LDRBS LDRAS CPCS CPBS CPAS LOVRS COVFS
Access R R R R R R R R
Reset 0 0 0 0 0 0 0 0
Name: TC_EMRx
Offset: 0x30 + x*0x40 [x=0..2]
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the TC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
NODIVCLK
Access R/W
Reset 0
Bit 7 6 5 4 3 2 1 0
TRIGSRCB[1:0] TRIGSRCA[1:0]
Access R/W R/W R/W R/W
Reset 0 0 0 0
Name: TC_BCR
Offset: 0xC0
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
SYNC
Access W
Reset –
Name: TC_BMR
Offset: 0xC4
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the TC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
MAXCMP[3:0] MAXFILT[5:4]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
MAXFILT[3:0] AUTOC IDXPHB SWAP
Access R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
INVIDX INVB INVA EDGPHA QDTRANS SPEEDEN POSEN QDEN
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
TC2XC2S[1:0] TC1XC1S[1:0] TC0XC0S[1:0]
Access R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0
Value Description
1 IDX is inverted before driving the QDEC.
Name: TC_QIER
Offset: 0xC8
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
MPE QERR DIRCHG IDX
Access W W W W
Reset – – – –
Bit 0 – IDX Index
Value Description
0 No effect.
1 Enables the interrupt when a rising edge occurs on IDX input.
Name: TC_QIDR
Offset: 0xCC
Reset: –
Property: Write-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
MPE QERR DIRCHG IDX
Access W W W W
Reset – – – –
Bit 0 – IDX Index
Value Description
0 No effect.
1 Disables the interrupt when a rising edge occurs on IDX input.
Name: TC_QIMR
Offset: 0xD0
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
MPE QERR DIRCHG IDX
Access R R R R
Reset 0 0 0 0
Bit 0 – IDX Index
Value Description
0 The interrupt on IDX input is disabled.
1 The interrupt on IDX input is enabled.
Name: TC_QISR
Offset: 0xD4
Reset: 0x00000000
Property: Read-only
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
DIR
Access R
Reset 0
Bit 7 6 5 4 3 2 1 0
MPE QERR DIRCHG IDX
Access R R R R
Reset 0 0 0 0
Bit 8 – DIR Direction
Returns an image of the current rotation direction.
Bit 0 – IDX Index
Value Description
0 No Index input change since the last read of TC_QISR.
1 The IDX input has changed since the last read of TC_QISR.
Name: TC_FMR
Offset: 0xD8
Reset: 0x00000000
Property: Read/Write
This register can only be written if the WPEN bit is cleared in the TC Write Protection Mode Register.
Bit 31 30 29 28 27 26 25 24
Access
Reset
Bit 23 22 21 20 19 18 17 16
Access
Reset
Bit 15 14 13 12 11 10 9 8
Access
Reset
Bit 7 6 5 4 3 2 1 0
ENCF1 ENCF0
Access R/W R/W
Reset 0 0
Name: TC_WPMR
Offset: 0xE4
Reset: 0x00000000
Property: Read/Write
Bit 31 30 29 28 27 26 25 24
WPKEY[23:16]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 23 22 21 20 19 18 17 16
WPKEY[15:8]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8
WPKEY[7:0]
Access W W W W W W W W
Reset 0 0 0 0 0 0 0 0
Bit 7 6 5 4 3 2 1 0
WPEN
Access R/W
Reset 0
50.1 Description
The Pulse Width Modulation Controller (PWM) generates output pulses on 4 channels independently according
to parameters defined per channel. Each channel controls two complementary square output waveforms.
Characteristics of the output waveforms such as period, duty-cycle, polarity and dead-times (also called dead-bands
or non-overlapping times) are configured through the user interface. Each channel selects and uses one of the clocks
provided by the clock generator. The clock generator provides several clocks resulting from the division of the PWM
peripheral clock. External triggers can be managed to allow output pulses to be modified in real time.
All accesses to the PWM are made through registers mapped on the peripheral bus. All channels integrate a
double buffering system in order to prevent an unexpected output waveform while modifying the period, the spread
spectrum, the duty-cycle or the dead-times.
Channels can be linked together as synchronous channels to be able to update their duty-cycle or dead-times at the
same time.
The update of duty-cycles of synchronous channels can be performed by the DMA Controller channel which offers
buffer transfer without processor Intervention.
The PWM includes a spread-spectrum counter to allow a constantly varying period (only for Channel 0). This counter
may be useful to minimize electromagnetic interference or to reduce the acoustic noise of a PWM driven motor.
The PWM provides 8 independent comparison units capable of comparing a programmed value to the counter of
the synchronous channels (counter of channel 0). These comparisons are intended to generate software interrupts,
to trigger pulses on the 2 independent event lines (in order to synchronize ADC conversions with a lot of flexibility
independently of the PWM outputs) and to trigger DMA Controller transfer requests.
PWM outputs can be overridden synchronously or asynchronously to their channel counter.
The PWM provides a fault protection mechanism with 8 fault inputs, capable to detect a fault condition and to
override the PWM outputs asynchronously (outputs forced to ‘0’, ‘1’ or Hi-Z).
For safety usage, some configuration registers are write-protected.
– Independent Update Time Selection of Double Buffering Registers (Polarity, Duty Cycle) for Each Channel,
at Each Period for Left-Aligned or Center-Aligned Configuration
• External Trigger Input Management (e.g., for DC/DC or Lighting Control)
– External PWM Reset Mode
– External PWM Start Mode
– Cycle-By-Cycle Duty Cycle Mode
– Leading-Edge Blanking
• 2 2-bit Gray Up/Down Channels for Stepper Motor Control
• Spread Spectrum Counter to Allow a Constantly Varying Duty Cycle (only for Channel 0)
• Synchronous Channel Mode
– Synchronous Channels Share the Same Counter
– Mode to Update the Synchronous Channels Registers after a Programmable Number of Periods
– Synchronous Channels Supports Connection of one DMA Controller Channel Which Offers Buffer Transfer
Without Processor Intervention To Update Duty-Cycle Registers
• 2 Independent Events Lines Intended to Synchronize ADC Conversions
– Programmable delay for Events Lines to delay ADC measurements
• 8 Comparison Units Intended to Generate Interrupts, Pulses on Event Lines DMA Controller Transfer Requests
• 8 Programmable Fault Inputs Providing an Asynchronous Protection of PWM Outputs
– 3 User Driven through PIO Inputs
– PMC Driven when Crystal Oscillator Clock Fails
– ADC Controller Driven through Configurable Comparison Function
– Analog Comparator Controller Driven
– Timer/Counter Driven through Configurable Comparison Function
• Register Write Protection
Update
Period
PPM DTOHx OOOHx PWMHx
OCx Fault PWMHx
Comparator Output
Dead-Time DTOLx OOOLx Protection PWMLx
Duty-Cycle Override PWMLx
Generator
1
Clock Counter
Selector 0
Channel x
SYNCx
SYNC2
0 Glitch Channel 1
Filter 1 Recoverable Fault
ACC 1 Update Management
0 TRGIN1
PWM_ETRG1.TRGSRC
PWM_ETRG1.TRGFLT
Period
ETM PPM DTOH1 OOOH1 PWMH1
OC1 Fault PWMH1
Output
Comparator Dead-Time DTOL1 Override OOOL1 Protection PWML1
Duty-Cycle PWML1
Generator
1
Clock Counter
Selector 0
Channel 1
SYNC1
Channel 0
Update
Period
PPM DTOH0 OOOH0 PWMH0
OC0 Output Fault PWMH0
Comparator
Dead-Time DTOL0 Override OOOL0 Protection PWML0
Duty-Cycle PWML0
Generator
Clock Counter
Selector Channel 0
Management
Fault Input
PWMFIx
PIO
PWMFI0 event line 0
event line 1
Comparison Events
Peripheral ADC
Units Generator
Clock event line x
PMC
Clock
Generator APB
Interface
Interrupt Interrupt
Generator Controller
APB
Note: For a more detailed illustration of the fault protection circuitry, refer to “Fault Protection”.
Fault Generator External PWM Fault Input Number Polarity Level(1) Fault Input ID
PWM0
PA9 PWMC0_PWMFI0 User-defined 0
PD8 PWMC0_PWMFI1 User-defined 1
PD9 PWMC0_PWMFI2 User-defined 2
Main OSC (PMC) – To be configured to 1 3
AFEC0 – To be configured to 1 4
...........continued
Fault Generator External PWM Fault Input Number Polarity Level(1) Fault Input ID
AFEC1 – To be configured to 1 5
ACC – To be configured to 1 6
Timer0 – To be configured to 1 7
PWM1
PA21 PWMC1_PWMFI0 User-defined 0
PA26 PWMC1_PWMFI1 User-defined 1
PA28 PWMC1_PWMFI2 User-defined 2
Main OSC (PMC) – To be configured to 1 3
AFEC0 – To be configured to 1 4
AFEC1 – To be configured to 1 5
ACC – To be configured to 1 6
Timer1 – To be configured to 1 7
Note:
1. FPOL field in PWMC_FMR.
peripheral clock
peripheral clock/2
peripheral clock/4
peripheral clock/8
peripheral clock/16
peripheral clock/32
peripheral clock/64
peripheral clock/128
peripheral clock/256
peripheral clock/512
peripheral clock/1024
Divider A clkA
PREA DIVA
PWM_CLK
Divider B clkB
PREB DIVB
PWM_CLK
The PWM peripheral clock is divided in the clock generator module to provide different clocks available for all
channels. Each channel can independently select one of the divided clocks.
The clock generator is divided into different blocks:
• a modulo n counter which provides 11 clocks: fperipheral clock, fperipheral clock/2, fperipheral clock/4, fperipheral clock/8,
fperipheral clock/16, fperipheral clock/32, fperipheral clock/64, fperipheral clock/128, fperipheral clock/256, fperipheral clock/512,
fperipheral clock/1024
• two linear dividers (1, 1/2, 1/3, ... 1/255) that provide two separate clocks: clkA and clkB
Each linear divider can independently divide one of the clocks of the modulo n counter. The selection of the clock to
be divided is made according to the PREA (PREB) field of the PWM Clock register (PWM_CLK). The resulting clock
clkA (clkB) is the clock selected divided by DIVA (DIVB) field value.
After a reset of the PWM controller, DIVA (DIVB) and PREA (PREB) are set to ‘0’. This implies that after reset clkA
(clkB) are turned off.
At reset, all clocks provided by the modulo n counter are turned off except the peripheral clock. This situation is also
true when the PWM peripheral clock is turned off through the Power Management Controller.
Before using the PWM controller, the programmer must first enable the peripheral clock in the Power
CAUTION
Management Controller (PMC).
Update Channel x
Period
DTOHx OOOHx PWMHx
Comparator Dead-Time Output Fault
MUX
OCx
x Generator DTOLx Override OOOLx Protection PWMLx
Duty-Cycle
SYNCx
MUX
from
Clock Counter
Clock
Selector Channel x
Generator
from APB
Peripheral Bus
Counter
Channel 0 Channel y (= x+1)
DTOHy OOOHy PWMHy
OCy Dead-Time Output Fault
MUX
Comparator Generator DTOLy Override OOOLy Protection PWMLy
z = 0 (x = 0, y = 1), y
z = 1 (x = 2, y = 3), 2-bit gray
z = 2 (x = 4, y = 5), counter z
z = 3 (x = 6, y = 7)
50.6.2.2 Comparator
The comparator continuously compares its counter value with the channel period defined by CPRD in the PWM
Channel Period Register (PWM_CPRDx) and the duty-cycle defined by CDTY in the PWM Channel Duty Cycle
Register (PWM_CDTYx) to generate an output signal OCx accordingly.
The different properties of the waveform of the output OCx are:
• the clock selection. The channel counter is clocked by one of the clocks provided by the clock generator
described in the previous section. This channel parameter is defined in the CPRE field of the PWM Channel
Mode Register (PWM_CMRx). This field is reset at ‘0’.
• the waveform period. This channel parameter is defined in the CPRD field of the PWM_CPRDx register.
If the waveform is left-aligned, then the output waveform period depends on the counter source clock and can
be calculated:
By using the PWM peripheral clock divided by a given prescaler value “X” (where X = 2PREA is 1, 2, 4, 8, 16, 32,
64, 128, 256, 512, or 1024). The resulting period formula is:
X × CPRD
fperipheral clock
By using the PWM peripheral clock divided by a given prescaler value “X” (see above) and by either the DIVA or
the DIVB divider. The formula becomes, respectively:
If the waveform is center-aligned, then the output waveform period depends on the counter source clock and
can be calculated:
By using the PWM peripheral clock divided by a given prescaler value “X” (where X = 2PREA is 1, 2, 4, 8, 16, 32,
64, 128, 256, 512, or 1024). The resulting period formula is:
2 × X × CPRD
fperipheral clock
By using the PWM peripheral clock divided by a given prescaler value “X” (see above) and by either the DIVA or
the DIVB divider. The formula becomes, respectively:
2 × X × CPRD × DIVA
or
fperipheral clock
2 × X × CPRD × DIVB
fperipheral clock
• the waveform duty-cycle. This channel parameter is defined in the CDTY field of the PWM_CDTYx register.
If the waveform is left-aligned, then:
OC0
OC1
Period
Note: See the figure Waveform Properties for a detailed description of center-aligned waveforms.
When center-aligned, the channel counter increases up to CPRD and decreases down to 0. This ends the period.
When left-aligned, the channel counter increases up to CPRD and is reset. This ends the period.
Thus, for the same CPRD value, the period for a center-aligned channel is twice the period for a left-aligned channel.
Waveforms are fixed at 0 when:
• CDTY = CPRD and CPOL = 0 (Note that if TRGMODE = MODE3, the PWM waveform switches to 1 at the
external trigger event (see Cycle-By-Cycle Duty Mode)).
• CDTY = 0 and CPOL = 1
Waveforms are fixed at 1 (once the channel is enabled) when:
• CDTY = 0 and CPOL = 0
• CDTY = CPRD and CPOL = 1 (Note that if TRGMODE = MODE3, the PWM waveform switches to 0 at the
external trigger event (see Cycle-By-Cycle Duty Mode)).
The waveform polarity must be set before enabling the channel. This immediately affects the channel output level.
Modifying CPOL in PWM Channel Mode Register while the channel is enabled can lead to an unexpected behavior of
the device being driven by PWM.
In addition to generating the output signals OCx, the comparator generates interrupts depending on the counter
value. When the output waveform is left-aligned, the interrupt occurs at the end of the counter period. When the
output waveform is center-aligned, the bit CES of PWM_CMRx defines when the channel counter interrupt occurs. If
CES is set to ‘0’, the interrupt occurs at the end of the counter period. If CES is set to ‘1’, the interrupt occurs at the
end of the counter period and at half of the counter period.
The figure below illustrates the counter interrupts depending on the configuration.
Channel x
slected clock
CHIDx(PWM_SR)
CHIDx(PWM_ENA)
CHIDx(PWM_DIS)
Center Aligned
CALG(PWM_CMRx) = 1
PWM_CCNTx
CPRD(PWM_CPRDx)
CDTY(PWM_CDTYx)
Period
Counter Event
CHIDx(PWM_ISR)
CES(PWM_CMRx) = 0
Counter Event
CHIDx(PWM_ISR)
CES(PWM_CMRx) = 1
Left Aligned
CALG(PWM_CMRx) = 0
PWM_CCNTx
CPRD(PWM_CPRDx)
CDTY(PWM_CDTYx)
Period
Counter Event
CHIDx(PWM_ISR)
MOSFETs
Triggers
PWM
PWM0 BRIDGE
PWM1 DRIVER
PWM2
PWM: OCx
(internally routed to TIOB)
TC: TIOA
(from PAD)
Capture event
Capture event
MOSFETs
Triggers
PWM
PWM0 BRIDGE
PWM1 DRIVER
PWM2
Center Aligned
CALG(PWM_CMRx) = 1
PWM_CCNTx
CPRD(PWM_CPRDx)
CDTY(PWM_CDTYx)
Period
PWM: OCx
TC: TIOA
(from PAD)
Left Aligned
CALG(PWM_CMRx) = 0
PWM_CCNTx
CPRD(PWM_CPRDx)
CDTY(PWM_CDTYx)
Period
PWM: OCx
TC: TIOA
(from PAD)
PWMH0
PWML0
PWMH1
PWML1
DOWNx
DTHx DTLx
DTHx DTLx
Odd cycle Even cycle Odd cycle Even cycle Odd cycle
CHIDx(PWM_ENA)
CHIDx(PWM_DIS)
Left Aligned
PWM_CCNTx CALG(PWM_CMRx) = 0
CPRD(PWM_CPRDx)
CDTY(PWM_CDTYx)
PWM_CMRx
Software configurations
CPOL = 0 CPOL = 1
DPOLI = 0 DPOLI = 0
DTE = 0 DTE = 0
PPM = 1 PPM = 1
DTOHx
DTHI = 0 DTHI = 1
DTLI = 0 DTLI = 1
DTOLx
DTOHx
DTHI = 0 DTHI = 1
DTLI = 1 DTLI = 0
DTOLx
DTOHx
DTHI = 1 DTHI = 0
DTLI = 0 DTLI = 1 DTOLx
DTOHx
DTHI = 1 DTHI = 0
DTLI = 1 DTLI = 0 DTOLx
PWM_CMRx
Software configurations
CPOL = 0 CPOL = 1
DPOLI = 1 DPOLI = 1
DTE = 0 DTE = 0
PPM = 1 PPM = 1
DTOHx
DTHI = 0 DTHI = 1
DTLI = 0 DTLI = 1
DTOLx
DTOHx
DTHI = 0 DTHI = 1
DTLI = 1 DTLI = 0
DTOLx
DTOHx
DTHI = 1 DTHI = 0
DTLI = 0 DTLI = 1 DTOLx
DTOHx
DTHI = 1 DTHI = 0
DTLI = 1 DTLI = 0 DTOLx
CHIDx(PWM_ENA)
CHIDx(PWM_DIS)
Left Aligned
PWM_CCNTx CALG(PWM_CMRx) = 0
CPRD(PWM_CPRDx)
CDTY(PWM_CDTYx)
PWM_CMRx
Software configurations
CPOL = 0 CPOL = 1
DPOLI = 0 DPOLI = 0
DTE = 0 DTE = 0
PPM = 1 PPM = 1
DTOHx
DTHI = 0 DTHI = 1
DTLI = 0 DTLI = 1
DTOLx
DTOHx
DTHI = 0 DTHI = 1
DTLI = 1 DTLI = 0
DTOLx
DTOHx
DTHI = 1 DTHI = 0
DTLI = 0 DTLI = 1 DTOLx
DTOHx
DTHI = 1 DTHI = 0
DTLI = 1 DTLI = 0 DTOLx
PWM_CMRx
Software configurations
CPOL = 0 CPOL = 1
DPOLI = 1 DPOLI = 1
DTE = 0 DTE = 0
PPM = 1 PPM = 1
DTOHx
DTHI = 0 DTHI = 1
DTLI = 0 DTLI = 1
DTOLx
DTOHx
DTHI = 0 DTHI = 1
DTLI = 1 DTLI = 0
DTOLx
DTOHx
DTHI = 1 DTHI = 0
DTLI = 0 DTLI = 1 DTOLx
DTOHx
DTHI = 1 DTHI = 0
DTLI = 1 DTLI = 0 DTOLx
The PWM Push-Pull mode can be useful in transformer-based power converters, such as a half-bridge converter.
The Push-Pull mode prevents the transformer core from being saturated by any direct current.
+ D1 L
C1 PWMxH
VDC VIN
+
COUT VOUT
D2
+
C2 PWMxL
PWMx outputs
PWM
Controller
PWM Configuration
Example 1
PPM (PWM_CMRx) = 1
PWM Channel x Period
CPOL (PWM_CMRx) = 0
DPOLI (PWM_CMRx) = 0 Even cycle Odd cycle Even cycle Odd cycle Even cycle
VOUT
CDTY (PWM_CDTYx)
PWM Configuration
Example 2
PPM (PWM_CMRx) = 1
PWM Channel x Period
CPOL (PWM_CMRx) = 1
DPOLI (PWM_CMRx) = 1 Even cycle Odd cycle Even cycle Odd cycle Even cycle
VOUT
CDTY (PWM_CDTYx)
Output Waveform PWMxH
DTHI (PWM_CMRx) = 0
DTH (PWM_DTx) = 0
CDTY (PWM_CDTYx)
Output Waveform PWMxL
DTLI (PWM_CMRx) = 1
DTL (PWM_DTx) = 0
+ D1
C1 PWMxH L
VDC VIN +
COUT VOUT
D2
+
C2 PWMxL
PWMx outputs
x = [1..2]
PWMEXTRGx Error
PWM Isolation
x = [0,1]
CONTROLLER Amplification VREF
PWM Configuration
PPM (PWM_CMRx) = 1
CPOL (PWM_CMRx) = 1
PWM Channel x Period
DPOLI (PWM_CMRx) = 1
MODE (PWM_ETRGx) = 3
Even cycle Odd cycle Even cycle Odd cycle Even cycle
VREF
VOUT
CDTY (PWM_CDTYx)
Output Waveform PWMxH
DTHI (PWM_CMRx) = 0
DTH (PWM_DTx) = 0
CDTY (PWM_CDTYx)
Output Waveform PWMxL
DTLI (PWM_CMRx) = 1
DTL (PWM_DTx) = 0
OSHx
DTOLx
0
OOOLx
OOVLx
1
OSLx
The fields OSHx and OSLx in the PWM Output Selection Register (PWM_OS) allow the outputs of the dead-time
generator DTOHx and DTOLx to be overridden by the value defined in the fields OOVHx and OOVLx in the PWM
Output Override Value Register (PWM_OOV).
The set registers PWM Output Selection Set Register (PWM_OSS) and PWM Output Selection Set Update Register
(PWM_OSSUPD) enable the override of the outputs of a channel regardless of other channels. In the same way,
the clear registers PWM Output Selection Clear Register (PWM_OSC) and PWM Output Selection Clear Update
Register (PWM_OSCUPD) disable the override of the outputs of a channel regardless of other channels.
By using buffer registers PWM_OSSUPD and PWM_OSCUPD, the output selection of PWM outputs is done
synchronously to the channel counter, at the beginning of the next PWM period.
Note: Only one PWM_OSSUPD or PWM_OSCUPD operation can be done within a PWM period regardless of the
channels affected.
By using the PWM_OSS and PWM_OSC registers, the output selection of PWM outputs is done asynchronously to
the channel counter, as soon as the register is written.
The value of the current output selection can be read in PWM_OS.
While overriding PWM outputs, the channel counters continue to run, only the PWM outputs are forced to user
defined values.
SYNCx
0 0
FIV3
PWMFI3 Glitch
1
= FMOD3 SET OUT
Fault 3 Status
FS3 from fault 3
Filter 1
CLR FPEx[3]
Fault Input 0
Management FPE0[3]
Write FCLR3 at 1 1
of PWMFI3 FFIL3 FPOL3 FMOD3
SYNCx
PWMFIy
The polarity level of the fault inputs is configured by the FPOL field in the PWM Fault Mode Register (PWM_FMR).
For fault inputs coming from internal peripherals such as ADC or Timer Counter, the polarity level must be FPOL = 1.
For fault inputs coming from external GPIO pins the polarity level depends on the user's implementation.
The configuration of the Fault Activation mode (FMOD field in PWMC_FMR) depends on the peripheral generating
the fault. If the corresponding peripheral does not have “Fault Clear” management, then the FMOD configuration to
use must be FMOD = 1, to avoid spurious fault detection. Refer to the corresponding peripheral documentation for
details on handling fault generation.
Fault inputs may or may not be glitch-filtered depending on the FFIL field in PWM_FMR. When the filter is activated,
glitches on fault inputs with a width inferior to the PWM peripheral clock period are rejected.
A fault becomes active as soon as its corresponding fault input has a transition to the programmed polarity level. If
the corresponding bit FMOD is set to ‘0’ in PWM_FMR, the fault remains active as long as the fault input is at this
polarity level. If the corresponding FMOD field is set to ‘1’, the fault remains active until the fault input is no longer
at this polarity level and until it is cleared by writing the corresponding bit FCLR in the PWM Fault Clear Register
(PWM_FCR). In the PWM Fault Status Register (PWM_FSR), the field FIV indicates the current level of the fault
inputs and the field FIS indicates whether a fault is currently active.
Each fault can be taken into account or not by the fault protection mechanism in each channel. To be taken into
account in the channel x, the fault y must be enabled by the bit FPEx[y] in the PWM Fault Protection Enable register
(PWM_FPE1). However, synchronous channels (see Synchronous Channels) do not use their own fault enable bits,
but those of the channel 0 (bits FPE0[y]).
The fault protection on a channel is triggered when this channel is enabled and when any one of the faults that are
enabled for this channel is active. It can be triggered even if the PWM peripheral clock is not running but only by a
fault input that is not glitch-filtered.
When the fault protection is triggered on a channel, the fault protection mechanism resets the counter of this channel
and forces the channel outputs to the values defined by the fields FPVHx and FPVLx in the PWM Fault Protection
Value Register 1 (PWM_FPV) and fields FPZHx/FPZLx in the PWM Fault Protection Value Register 2, as shown in
the table below. The output forcing is made asynchronously to the channel counter.
Table 50-3. Forcing Values of PWM Outputs by Fault Protection
CAUTION
• To prevent any unexpected activation of the status flag FSy in PWM_FSR, the FMODy bit can be set
to ‘1’ only if the FPOLy bit has been previously configured to its final value.
• To prevent any unexpected activation of the Fault Protection on the channel x, the bit FPEx[y] can be
set to ‘1’ only if the FPOLy bit has been previously configured to its final value.
If a comparison unit is enabled (see PWM Comparison Units) and if a fault is triggered in the channel 0, then the
comparison cannot match.
As soon as the fault protection is triggered on a channel, an interrupt (different from the interrupt generated at the end
of the PWM period) can be generated but only if it is enabled and not masked. The interrupt is reset by reading the
interrupt status register, even if the fault which has caused the trigger of the fault protection is kept active.
Recoverable fault 1 and 2 can be taken into account by all channels by enabling the FPEx[1/2] bit in the PWM Fault
Protection Enable registers (PWM_FPEx). However, the synchronous channels (see Synchronous Channels) do not
use their own fault enable bits, but those of the channel ‘0’ (bits FPE0[1/2]).
When a recoverable fault is triggered (according to the PWM_ETRGx.TRGMODE setting), the PWM counter of the
affected channels is not cleared (unlike in the classic fault protection mechanism) but the channel outputs are forced
to the values defined by the fields FPVHx and FPVLx in the PWM Fault Protection (PWM_FPV) register, as per
table Forcing Values of PWM Outputs by Fault Protection. The output forcing is made asynchronously to the channel
counter and lasts from the recoverable fault occurrence to the end of the next PWM cycle (if the recoverable fault is
no longer present), see figure below.
The recoverable fault does not trigger an interrupt. The Fault Status FSy (with y = 1 or 2) is not reported in the PWM
Fault Status Register when the fault ‘y’ is a recoverable fault.
CNT(PWM_CCNTy)
CPRD(PWM_CPRDy)
CDTY(PWM_CDTYy)
PWMEXTRGy Event
TRG_EDGE(PWM_RTRGy) = 1
PWMHy
CNT(PWM_CCNTx)
CPRD(PWM_CPRDx)
CDTY(PWM_CDTYx)
0
1 PWM cycle 1 PWM cycle
PWMHx
CNT(PWM_CCNTz)
CPRD(PWM_CPRDz)
CDTY(PWM_CDTYz)
0
1 PWM cycle 1 PWM cycle 1 PWM cycle
PWMHz
PWM_FSR.FSy
This is achieved by varying the effective period in a range defined by a spread spectrum value which is programmed
by the field SPRD in the PWM Spread Spectrum Register (PWM_SSPR). The effective period of the output waveform
is the value of the spread spectrum counter added to the programmed waveform period CPRD in the PWM Channel
Period Register (PWM_CPRD0).
It will cause the effective period to vary from CPRD-SPRD to CPRD+SPRD. This leads to a constantly varying duty
cycle on the PWM output waveform because the duty cycle value programmed is unchanged.
The value of the spread spectrum counter can change in two ways depending on the bit SPRDM in PWM_SSPR.
If SPRDM = 0, the Triangular mode is selected. The spread spectrum counter starts to count from -SPRD when
the channel 0 is enabled or after reset and counts upwards at each period of the channel counter. When it reaches
SPRD, it restarts to count from -SPRD again.
If SPRDM = 1, the Random mode is selected. A new random value is assigned to the spread spectrum counter at
each period of the channel counter. This random value is between -SPRD and +SPRD and is uniformly distributed.
Figure 50-18. Spread Spectrum Counter
Max value of the channel counter
CPRD+SPRD
Variation of the
Period Value: CPRD effective period
CPRD-SPRD
0x0
defining a channel as an asynchronous channel while it is a synchronous channel (by writing the SYNCx bit to ‘0’
while it was ‘1’) is allowed only if the channel is disabled at this time.
The UPDM field (Update Mode) in the PWM_SCM register selects one of the three methods to update the registers
of the synchronous channels:
• Method 1 (UPDM = 0): The period value, the duty-cycle values and the dead-time values must be written
by the processor in their respective update registers (respectively PWM_CPRDUPDx, PWM_CDTYUPDx and
PWM_DTUPDx).The update is triggered at the next PWM period as soon as the bit UPDULOCK in the PWM
Sync Channels Update Control Register (PWM_SCUC) is set to ‘1’.
• Method 2 (UPDM = 1): The period value, the duty-cycle values, the dead-time values and the update period
value must be written by the processor in their respective update registers (respectively PWM_CPRDUPDx,
PWM_CDTYUPDx and PWM_DTUPD). The update of the period value and of the dead-time values is triggered
at the next PWM period as soon as the bit UPDULOCK in the PWM_SCUC register is set to ‘1’. The update of
the duty-cycle values and the update period value is triggered automatically after an update period defined by
the field UPR in the PWM Sync Channels Update Period Register (PWM_SCUP).
• Method 3 (UPDM = 2): Same as Method 2 apart from the fact that the duty-cycle values of ALL synchronous
channels are written by the DMA Controller. The user can choose to synchronize the DMA Controller transfer
request with a comparison match (see Section 7.3 “PWM Comparison Units”), by the fields PTRM and PTRCS
in the PWM_SCM register. The DMA destination address must be configured to access only the PWM DMA
Register (PWM_DMAR). The DMA buffer data structure must consist of sequentially repeated duty cycles. The
number of duty cycles in each sequence corresponds to the number of synchronized channels. Duty cycles in
each sequence must be ordered from the lowest to the highest channel index. The size of the duty cycle is 16
bits.
Table 50-4. Summary of the Update of Registers of Synchronous Channels
50.6.2.9.1 Method 1: Manual write of duty-cycle values and manual trigger of the update
In this mode, the update of the period value, the duty-cycle values and the dead-time values must be done by
writing in their respective update registers with the processor (respectively PWM_CPRDUPDx, PWM_CDTYUPDx
and PWM_DTUPDx).
To trigger the update, the user must use the bit UPDULOCK in the PWM_SCUC register which allows to update
synchronously (at the same PWM period) the synchronous channels:
• If the bit UPDULOCK is set to ‘1’, the update is done at the next PWM period of the synchronous channels.
• If the UPDULOCK bit is not set to ‘1’, the update is locked and cannot be performed.
After writing the UPDULOCK bit to ‘1’, it is held at this value until the update occurs, then it is read 0.
Sequence for Method 1:
1. Select the manual write of duty-cycle values and the manual update by setting the UPDM field to ‘0’ in the
PWM_SCM register.
2. Define the synchronous channels by the SYNCx bits in the PWM_SCM register.
3. Enable the synchronous channels by writing CHID0 in the PWM_ENA register.
4. If an update of the period value and/or the duty-cycle values and/or the dead-time values is required, write
registers that need to be updated (PWM_CPRDUPDx, PWM_CDTYUPDx and PWM_DTUPDx).
5. Set UPDULOCK to ‘1’ in PWM_SCUC.
6. The update of the registers will occur at the beginning of the next PWM period. When the UPDULOCK bit is
reset, go to Step 4. for new values.
Figure 50-19. Method 1 (UPDM = 0)
CCNT0
UPDULOCK
50.6.2.9.2 Method 2: Manual write of duty-cycle values and automatic trigger of the update
In this mode, the update of the period value, the duty-cycle values, the dead-time values and the update period value
must be done by writing in their respective update registers with the processor (respectively PWM_CPRDUPDx,
PWM_CDTYUPDx, PWM_DTUPDx and PWM_SCUPUPD).
To trigger the update of the period value and the dead-time values, the user must use the bit UPDULOCK in the
PWM_SCUC register, which updates synchronously (at the same PWM period) the synchronous channels:
• If the bit UPDULOCK is set to ‘1’, the update is done at the next PWM period of the synchronous channels.
• If the UPDULOCK bit is not set to ‘1’, the update is locked and cannot be performed.
After writing the UPDULOCK bit to ‘1’, it is held at this value until the update occurs, then it is read 0.
The update of the duty-cycle values and the update period is triggered automatically after an update period.
To configure the automatic update, the user must define a value for the update period by the UPR field in
the PWM_SCUP register. The PWM controller waits UPR+1 period of synchronous channels before updating
automatically the duty values and the update period value.
The status of the duty-cycle value write is reported in the PWM Interrupt Status Register 2 (PWM_ISR2) by the
following flags:
• WRDY: this flag is set to ‘1’ when the PWM Controller is ready to receive new duty-cycle values and a new
update period value. It is reset to ‘0’ when the PWM_ISR2 register is read.
Depending on the interrupt mask in the PWM Interrupt Mask Register 2 (PWM_IMR2), an interrupt can be generated
by these flags.
Sequence for Method 2:
1. Select the manual write of duty-cycle values and the automatic update by setting the field UPDM to ‘1’ in the
PWM_SCM register
2. Define the synchronous channels by the bits SYNCx in the PWM_SCM register.
3. Define the update period by the field UPR in the PWM_SCUP register.
4. Enable the synchronous channels by writing CHID0 in the PWM_ENA register.
5. If an update of the period value and/or of the dead-time values is required, write registers that need to be
updated (PWM_CPRDUPDx, PWM_DTUPDx), else go to Step 8.
6. Set UPDULOCK to ‘1’ in PWM_SCUC.
7. The update of these registers will occur at the beginning of the next PWM period. At this moment the bit
UPDULOCK is reset, go to Step 5. for new values.
8. If an update of the duty-cycle values and/or the update period is required, check first that write of new update
values is possible by polling the flag WRDY (or by waiting for the corresponding interrupt) in PWM_ISR2.
9. Write registers that need to be updated (PWM_CDTYUPDx, PWM_SCUPUPD).
10. The update of these registers will occur at the next PWM period of the synchronous channels when the
Update Period is elapsed. Go to Step 8. for new values.
Figure 50-20. Method 2 (UPDM = 1)
CCNT0
UPRCNT 0x0 0x1 0x0 0x1 0x0 0x1 0x0 0x1 0x2 0x3 0x0 0x1 0x2
WRDY
50.6.2.9.3 Method 3: Automatic write of duty-cycle values and automatic trigger of the update
In this mode, the update of the duty cycle values is made automatically by the DMA Controller. The update of the
period value, the dead-time values and the update period value must be done by writing in their respective update
registers with the processor (respectively PWM_CPRDUPDx, PWM_DTUPDx and PWM_SCUPUPD).
To trigger the update of the period value and the dead-time values, the user must use the bit UPDULOCK which
allows to update synchronously (at the same PWM period) the synchronous channels:
• If the bit UPDULOCK is set to ‘1’, the update is done at the next PWM period of the synchronous channels.
• If the UPDULOCK bit is not set to ‘1’, the update is locked and cannot be performed.
After writing the UPDULOCK bit to ‘1’, it is held at this value until the update occurs, then it is read 0.
The update of the duty-cycle values and the update period value is triggered automatically after an update period.
To configure the automatic update, the user must define a value for the Update Period by the field UPR in
the PWM_SCUP register. The PWM controller waits UPR+1 periods of synchronous channels before updating
automatically the duty values and the update period value.
Using the DMA Controller removes processor overhead by reducing its intervention during the transfer. This
significantly reduces the number of clock cycles required for a data transfer, which improves microcontroller
performance.
The DMA Controller must write the duty-cycle values in the synchronous channels index order. For example if the
channels 0, 1 and 3 are synchronous channels, the DMA Controller must write the duty-cycle of the channel 0 first,
then the duty-cycle of the channel 1, and finally the duty-cycle of the channel 3.
The status of the DMA Controller transfer is reported in PWM_ISR2 by the following flags:
• WRDY: this flag is set to ‘1’ when the PWM Controller is ready to receive new duty-cycle values and a new
update period value. It is reset to ‘0’ when PWM_ISR2 is read. The user can choose to synchronize the WRDY
flag and the DMA Controller transfer request with a comparison match (see PWM Comparison Units), by the
fields PTRM and PTRCS in the PWM_SCM register.
• UNRE: this flag is set to ‘1’ when the update period defined by the UPR field has elapsed while the whole data
has not been written by the DMA Controller. It is reset to ‘0’ when PWM_ISR2 is read.
Depending on the interrupt mask in PWM_IMR2, an interrupt can be generated by these flags.
UPRCNT 0x0 0x1 0x0 0x1 0x0 0x1 0x0 0x1 0x2 0x3 0x0 0x1 0x2
transfer request
WRDY