Sign In
Upload
Manuals
Brands
ARTERY Manuals
Computer Hardware
AT32A423CCT7
ARTERY AT32A423CCT7 Manuals
Manuals and User Guides for ARTERY AT32A423CCT7. We have
1
ARTERY AT32A423CCT7 manual available for free PDF download: Reference Manual
ARTERY AT32A423CCT7 Reference Manual (513 pages)
ARM-based 32-bit Cortex-M4F MCU, 64 to 256 KB Flash, sLib, 15 timers, 1 ADC, 18 communication interfaces (CAN and OTGFS)
Brand:
ARTERY
| Category:
Computer Hardware
| Size: 7 MB
Table of Contents
Table of Contents
2
AHB Peripheral Clock Enable in Low Power Mode Register
3
System Architecture
34
Figure 1-1 AT32A423 Series Microcontrollers System Architecture
34
System Overview
35
ARM Cortex -M4F Processor
35
Bit Band
35
Figure 1-2 Internal Block Diagram of Cortex ® -M4F
35
Figure 1-3 Comparison between Bit-Band Region and Its Alias Region: Image a
36
Figure 1-4 Comparison between Bit-Band Region and Its Alias Region: Image B
36
Table 1-1 Bit-Band Address Mapping in SRAM
37
Table 1-2 Bit-Band Address Mapping in the Peripheral Area
37
Interrupt and Exception Vectors
38
Table 1-3 AT32A423 Series Vector Table
38
System Tick (Systick)
41
Reset
41
Figure 1-5 Reset Process
41
Figure 1-6 Example of MSP and PC Initialization
42
List of Abbreviations for Registers
43
Device Characteristics Information
43
Flash Memory Size Register
43
Device Electronic Signature
43
Table 1-4 List of Abbreviations for Registers
43
Table 1-5 Base Address and Reset Value of Registers
43
Memory Resources
44
Internal Memory Address Map
44
Flash Memory
44
Figure 2-1 AT32A423 Address Mapping
44
Table 2-1 Flash Memory Organization (256 KB)
45
Table 2-2 Flash Memory Organization (128 KB)
45
Table 2-3 Flash Memory Organization (64 KB)
45
SRAM Memory
46
Peripheral Address Map
46
Table 2-4 Peripheral Boundary Address
46
Power Control (PWC)
49
Introduction
49
Main Features
49
Por/Lvr
49
Figure 3-1 Block Diagram of each Power Supply
49
Power Voltage Monitor (PVM)
50
Figure 3-2 Power-On Reset/Low Voltage Reset Waveform
50
Figure 3-3 PVM Threshold and Output
50
Power Domain
51
Power Saving Modes
51
PWC Registers
53
Power Control Register (PWC_CTRL)
53
Table 3-1 PWC Register Map and Reset Values
53
Power Control/Status Register (PWC_CTRLSTS)
54
LDO Output Voltage Select Register (PWC_LDOOV)
55
Clock and Reset Manage (CRM)
56
Clock
56
Clock Sources
56
Figure 4-1 AT32A423 Clock Tree
56
System Clock
58
Peripheral Clock
58
Clock Fail Detector
58
Auto Step-By-Step System Clock Switch
58
Internal Clock Output
58
Interrupts
59
Reset
59
System Reset
59
Battery Powered Domain Reset
59
Figure 4-2 System Reset Circuit
59
CRM Registers
60
Clock Control Register (CRM_CTRL)
60
Table 4-1 CRM Register Map and Reset Values
60
PLL Clock Configuration Register (CRM_PLLCFG)
61
Clock Configuration Register (CRM_CFG)
62
Clock Interrupt Register (CRM_CLKINT)
64
AHB Peripheral Reset Register 1 (CRM_AHBRST1)
65
AHB Peripheral Reset Register 2 (CRM_AHBRST2)
65
AHB Peripheral Reset Register 3 (CRM_AHBRST3)
66
APB1 Peripheral Reset Register (CRM_APB1RST)
66
APB2 Peripheral Reset Register (CRM_APB2RST)
67
AHB Peripheral Clock Enable Register 1 (CRM_AHBEN1)
68
AHB Peripheral Clock Enable Register 2 (CRM_AHBEN2)
68
AHB Peripheral Clock Enable Register 3 (CRM_AHBEN3)
69
APB1 Peripheral Clock Enable Register (CRM_APB1EN)
69
APB2 Peripheral Clock Enable Register (CRM_APB2EN)
70
15AHB Peripheral Clock Enable in Low Power Mode Register ( CRM_AHBLPEN1)
71
AHB Peripheral Clock Enable in Low Power Mode Register
71
(Crm_Ahblpen2)
72
(Crm_Ahblpen3)
72
APB1 Peripheral Clock Enable in Low Power Mode Register
72
(Crm_Apb1Lpen)
72
APB2 Peripheral Clock Enable in Low Power Mode Register
73
(Crm_Apb2Lpen)
73
Peripheral Independent Clock Select Register (CRM_PICLKS)
74
Battery Powered Domain Control Register (CRM_BPDC)
74
Control/Status Register (CRM_CTRLSTS)
75
Additional Register 1 (CRM_MISC1)
76
Additional Register 2 (CRM_MISC2)
77
Flash Memory Controller (FLASH)
78
FLASH Introduction
78
Table 5-1 Flash Memory Architecture (256 K)
78
Table 5-2 Flash Memory Architecture (128 K)
78
Table 5-3 Flash Memory Architecture (64 K)
78
Table 5-4 User System Data Area
79
Flash Memory Operation
80
Unlock/Lock
80
Erase Operation
80
Figure 5-1 Flash Memory Sector Erase Process
81
Programming Operation
82
Figure 5-2 Flash Memory Mass Erase Process
82
Figure 5-3 Flash Memory Programming Process
83
Read Operation
84
Main Flash Memory Extension Area
84
User System Data Area Operation
84
Unlock/Lock
84
Erase Operation
84
Programming Operation
85
Figure 5-4 System Data Area Erase Process
85
Read Operation
86
Flash Memory Protection
86
Figure 5-5 System Data Area Programming Process
86
Access Protection
87
Erase/Program Protection
87
Table 5-5 Flash Memory Access Limit
87
Read Access
88
Special Functions
88
Security Library Settings
88
Boot Memory Used as Flash Memory Extension
89
CRC Verify
89
FLASH Memory Registers
89
Table 5-6 Flash Memory Register Map and Reset Value
89
Flash Performance Select Register (FLASH_PSR)
90
Flash Unlock Register (FLASH_UNLOCK)
91
Flash User System Data Unlock Register (FLASH_USD_UNLOCK)
91
Flash Status Register (FLASH_STS)
91
Flash Control Register (FLASH_CTRL)
91
Flash Address Register (FLASH_ADDR)
92
User System Data Register (FLASH_USD)
92
Erase/Program Protection Status Register (FLASH_EPPS)
92
Flash Security Library Status Register 0 (SLIB_STS0)
93
Flash Security Library Status Register 1 (SLIB_STS1)
93
Security Library Password Clear Register (SLIB_PWD_CLR)
94
Security Library Additional Status Register (SLIB_MISC_STS)
94
Flash CRC Address Register (FLASH_CRC_ADDR)
94
Flash CRC Control Register (FLASH_CRC_CTRL)
94
Flash CRC Check Result Register (FLASH_CRC_CHKR)
95
Security Library Password Setting Register (SLIB_SET_PWD)
95
Security Library Address Setting Register (SLIB_SET_RANGE)
95
Flash Extension Memory Security Library Setting Register (EM_SLIB_SET)
96
Boot Memory Mode Setting Register (BTM_MODE_SET)
96
Security Library Unlock Register (SLIB_UNLOCK)
96
Gpios and IOMUX
97
Introduction
97
Function Overview
97
GPIO Structure
97
Figure 6-1 GPIO Basic Structure
97
GPIO Reset Status
98
General-Purpose Input Configuration
98
Analog Input/Output Configuration
98
General-Purpose Output Configuration
98
I/O Port Protection
99
IOMUX Structure
99
Figure 6-2 IOMXU Basic Structure
99
Multiplexed Function Pull-Up/Down Configuration
100
IOMUX Input/Output
100
Table 6-1 Port a Multiplexed Function Configuration with GPIOA_MUX* Register
100
Table 6-2 Port B Multiplexed Function Configuration with GPIOB_MUX* Register
102
Table 6-3 Port C Multiplexed Function Configuration with GPIOC_MUX* Register
104
Table 6-4 Port D Multiplexed Function Configuration with GPIOD_MUX* Register
106
Table 6-5 Port E Multiplexed Function Configuration with GPIOE_MUX* Register
108
Peripheral MUX Function Configuration
110
IOMUX Mapping Priority
110
Table 6-6 Port F Multiplexed Function Configuration with GPIOF_MUX* Register
110
Table 6-7 Pins Owned by Hardware
110
External Interrupt/Wake-Up Lines
111
GPIO Registers
111
Table 6-8 GPIO Register Map and Reset Values
111
GPIO Configuration Register (Gpiox_Cfgr) (X=A
112
GPIO Output Mode Register (Gpiox_Omode) (X=A
112
GPIO Drive Capability Register (Gpiox_Odrvr) (X=A
112
GPIO Pull-Up/Pull-Down Register (Gpiox_Pull) (X=A
112
GPIO Input Data Register (Gpiox_Idt) (X=A
112
GPIO Output Data Register (Gpiox_Odt) (X=A
113
GPIO Set/Clear Register (Gpiox_Scr) (X=A
113
GPIO Write Protection Register (Gpiox_Wpr) (X=A
113
GPIO Multiplexed Function Low Register (Gpiox_Muxl) (X=A
113
GPIO Multiplexed Function High Register (Gpiox_Muxh) (X=A
114
GPIO Port Bit Clear Register (Gpiox_Clr) (X=A
114
GPIO Port Bit Toggle Register (Gpiox_Togr) (X=A
114
GPIO Huge Current Control Register (Gpiox_Hdrv) (X=A
114
System Configuration Controller (SCFG)
115
Introduction
115
SCFG Registers
115
SCFG Configuration Register 1 (SCFG_CFG1)
115
SCFG Configuration Register 2 (SCFG_CFG2)
115
Table 7-1 SCFG Register Map and Reset Value
115
SCFG External Interrupt Configuration Register 3 (SCFG_EXINTC3)
117
SCFG Ultra High Souring/Sinking Strength (SCFG_UHDRV)
119
External Interrupt/Event Controller (EXINT)
120
EXINT Introduction
120
Function Overview and Configuration Procedure
120
Figure 8-1 External Interrupt/Event Controller Block Diagram
120
EXINT Registers
121
Interrupt Enable Register (EXINT_INTEN)
121
Event Enable Register (EXINT_EVTEN)
121
Polarity Configuration Register 1 (EXINT_POLCFG1)
121
Table 8-1 External Interrupt/Event Controller Register Map and Reset Value
121
Polarity Configuration Register 2 (EXINT_POLCFG2)
122
Software Trigger Register (EXINT_SWTRG)
122
Interrupt Status Register (EXINT_INTSTS)
122
DMA Controller (DMA)
123
Introduction
123
Main Features
123
Function Overview
123
DMA Configuration
123
Figure 9-1 DMA Block Diagram
123
Handshake Mechanism
124
Arbiter
124
Programmable Data Transfer Width
124
Figure 9-2 Re-Arbitrate after Request/Acknowledge
124
Errors
125
Figure 9-3 PWIDTH: Byte, MWIDTH: Half-Word
125
Figure 9-4 PWIDTH: Half-Word, MWIDTH: Word
125
Figure 9-5 PWIDTH: Word, MWIDTH: Byte
125
Table 9-1 DMA Error Event
125
Interrupts
126
DMA Multiplexer (DMAMUX)
126
DMAMUX Function Overview
126
Figure 9-6 DMAMUX Block Diagram
126
Table 9-2 DMA Interrupts
126
Table 9-3 Flexible DMA1 / DMA2 Request Mapping
127
DMAMUX Overflow Interrupts
128
Figure 9-7 DMAMUX Request Synchronized Mode
128
Table 9-4 DMAMUX EXINT LINE for Trigger Input and Synchronized Input
128
DMA Registers
129
Figure 9-8 DMAMUX Event Generation
129
Table 9-5 DMA Register Map and Reset Value
129
DMA Interrupt Status Register (DMA_STS )
130
DMA Interrupt Flag Clear Register (DMA_CLR)
132
DMA Channel-X Configuration Register (Dma_Cxctrl) (X = 1
134
DMA Channel-X Number of Data Register (Dma_Cxdtcnt
134
DMA Channel-X Peripheral Address Register (Dma_Cxpaddr) (X = 1
135
DMA Channel-X Memory Address Register (Dma_Cxmaddr
135
DMAMUX Select Register (DMA_MUXSEL)
135
DMAMUX Channel-X Control Register (Dma_Muxcxctrl
135
DMAMUX Generator-X Control Register (Dma_Muxgxctrl
136
DMAMUX Channel Synchronization Status Register (DMA_MUXSYNCSTS)
136
DMAMUX Channel Interrupt Clear Register (DMA_MUXSYNCCLR)
137
DMAMUX Generator Interrupt Status Register (DMA_MUXGSTS)
137
DMAMUX Generator Interrupt Clear Register (DMA_MUXGCLR)
137
CRC Calculation Unit (CRC)
138
CRC Introduction
138
CRC Function Overview
138
Figure 10-1 CRC Block Diagram
138
CRC Registers
139
Data Register (CRC_DT)
139
Common Data Register (CRC_CDT)
139
Table 10-1 CRC Register Map and Reset Value
139
Control Register (CRC_CTRL)
140
Initialization Register (CRC_IDT)
140
Polynomial Register (CRC_POLY)
140
C Interface
141
I 2 C Instruction
141
I 2 C Main Features
141
C Function Overview
141
Figure 11-1 I C Bus Protocol
141
I 2 C Interface
142
Figure 11-2 I 2 C1 Interface Block Diagram
142
Figure 11-3 Block Diagram of I
142
C Timing Control
144
Figure 11-4 Setup and Hold Time
144
Data Transfer Management
145
Table 11-1 I 2 C Timing Specifications
145
I 2 C Master Communication Flow
147
Table 11-2 I 2 C Configuration Table
147
Figure 11-5 I 2 C Master Transmission Flow
149
Figure 11-6 Transfer Sequence of I
150
Figure 11-7 I 2 C Master Receive Flow
150
Figure 11-8 Transfer Sequence of I C Master Receiver
151
Figure 11-9 10-Bit Address Read Access When READH10=1
151
I 2 C Slave Communication Flow
152
Figure 11-10 10-Bit Address Read Access When READH10=0
152
Figure 11-11 I 2 C Slave Transmission Flow
154
Figure 11-12 I 2 C Slave Transmission Timing
154
Figure 11-13 I 2 C Slave Receive Flow
155
Figure 11-14 I C Slave Receive Timing
155
Smbus
156
Table 11-3 Smbus Timeout Specification
157
Table 11-4 Smbus Timeout Detection Configuration
157
Smbus Master Communication Flow
158
Table 11-5 Smbus Mode Configuration
158
Figure 11-15 Smbus Master Transmission Flow
159
Figure 11-16 Smbus Master Transmission Timing
160
Figure 11-17 Smbus Master Receive Flow
160
Smbus Slave Communication Flow
161
Figure 11-18 Smbus Master Receive Timing
161
Figure 11-19 Smbus Slave Transmission Flow
163
Figure 11-20 Smbus Slave Transmission Timing
164
Figure 11-21 Smbus Slave Transmission Timing
164
Data Transfer Using DMA
165
Figure 11-22 Smbus Slave Receive Timing
165
Error Management
166
Table 11-6 I 2 C Error Event
166
Wakeup from Deepsleep Mode at Address Matching Event
167
I 2 C Interrupt Requests
167
Table 11-7 I 2 C Interrupt Requests
167
I 2 C Debug Mode
168
I 2 C Registers
168
Control Register 1 (I2C_CTRL1)
168
Table 11-8 I 2 C Register Map and Reset Values
168
Control Register 2 (I2C_CTRL2)
169
Own Address Register 1 (I2C_OADDR1)
170
Own Address Register 2 (I2C_OADDR2)
170
Timing Register (I2C_CLKCTRL)
170
Timeout Register (I2C_TIMEOUT)
171
Status Register (I2C_STS)
171
Status Clear Register (I2C_CLR)
173
PEC Register (I2C_PEC)
173
Receive Data Register (I2C_RXDT)
173
Transmit Data Register (I2C_TXDT)
173
Universal Synchronous/Asynchronous Receiver/Transmitter (USART)
174
USART Introduction
174
Figure 12-1 USART Block Diagram
174
Full-Duplex/Half-Duplex Selector
175
Mode Selector
176
Introduction
176
Configuration Procedure
176
Figure 12-2 BFF and FERR Detection in LIN Mode
176
Figure 12-3 Smartcard Frame Format
177
Figure 12-4 Irda DATA(3/16) - Normal Mode
177
Figure 12-5 Hardware Flow Control
178
Figure 12-6 Mute Mode Using Idle Line or Address Mark Detection
178
USART Frame Format and Configuration
179
Figure 12-7 8-Bit Format USART Synchronous Mode
179
Figure 12-8 Word Length Configuration
180
DMA Transfer Introduction
181
Transmission Using DMA
181
Figure 12-9 Stop Bit Configuration
181
Reception Using DMA
182
Baud Rate Generation
182
Introduction
182
Configuration
182
Table 12-1 Error Calculation for Programmed Baud Rate
182
Transmitter
183
Transmitter Introduction
183
Transmitter Configuration
183
Figure 12-10 Variations When Transmitting TDC/TDBE
183
Receiver
184
Receiver Introduction
184
Receiver Configuration
184
Start Bit and Noise Detection
185
Table 12-2 Data Sampling over Start Bit and Noise Detection
185
Table 12-3 Data Sampling over Valid Data and Noise Detection
185
Table 12-4 Maximum Allowable Deviation
185
Low-Power Wakeup
186
Figure 12-11 Data Sampling for Noise Detection
186
Tx/Rx Swap
187
Interrupt Requests
187
Figure 12-12 Tx/Rx Swap
187
Table 12-5 USART Interrupt Requests
187
I/O Pin Control
188
USART Registers
188
Status Register (USART_STS)
188
Figure 12-13 USART Interrupt Map Diagram
188
Table 12-6 USART Register Map and Reset Value
188
Data Register (USART_DT)
190
Baud Rate Register (USART_BAUDR)
190
Control Register 1 (USART_CTRL1)
190
Control Register 2 (USART_CTRL2)
192
Control Register 3 (USART_CTRL3)
193
Guard Time and Divider Register (GDIV)
194
Receiver Timeout Detection Register (RTOV)
195
Interrupt Flag Clear Register (IFC)
195
Serial Peripheral Interface (SPI)
196
SPI Introduction
196
Function Overview
196
SPI Description
196
Figure 13-1 SPI Block Diagram
196
Full-Duplex/Half-Duplex Selector
198
Figure 13-2 Digital Clock Timing Diagram
198
Figure 13-3 SPI Two-Wire Unidirectional Full-Duplex Connection
199
Figure 13-4 Single-Wire Unidirectional Receive Only in SPI Master Mode
199
Figure 13-5 Single-Wire Unidirectional Receive Only in SPI Slave Mode
199
Chip Select Controller
200
Figure 13-6 Single-Wire Bidirectional Half-Duplex Mode
200
SPI_SCK Controller
201
Crc
201
DMA Transfer
202
TI Mode
202
Transmitter
203
Receiver
203
Motorola Mode
204
Figure 13-7 Master Full-Duplex Communications
204
Figure 13-8 Slave Full-Duplex Communications
205
Figure 13-9 Master Half-Duplex Transmit
205
Figure 13-10 Slave Half-Duplex Receive
205
TI Mode
206
Figure 13-11 Slave Half-Duplex Transmit
206
Figure 13-12 Master Half-Duplex Receive
206
Figure 13-13 TI Mode Continous Transfer
206
Interrupts
207
IO Pin Control
207
Precautions
207
Figure 13-14 TI Mode Continous Transfer with Dummy CLK
207
Figure 13-15 TI Mode Continous Transfer with Dummy CLK
207
Figure 13-16 SPI Interrupts
207
I 2 S Functional Description
208
S Introduction
208
Figure 13-17 I 2 S Block Diagram
208
S Full-Duplex
209
Operating Mode Selection
209
Figure 13-18 I S Full-Duplex Structure
209
Figure 13-19 I 2 S Slave Device Transmission
210
Figure 13-20 I 2 S Slave Device Reception
210
Figure 13-21 I 2 S Master Device Transmission
210
Audio Protocol Selector
211
Figure 13-22 I S Master Device Reception
211
I2S_CLK Controller
212
Figure 13-23 CK & MCK Source in Master Mode
212
DMA Transfer
213
Table 13-1 Audio Frequency Precision Using System Clock
213
Transmitter/Receiver
214
Interrupts
215
IO Pin Control
215
SPI Registers
215
SPI Control Register1 (SPI_CTRL1)
215
Mode)
215
Figure 13-24 I S Interrupts
215
Table 13-2 SPI Register Map and Reset Value
215
SPI Control Register2 (SPI_CTRL2)
217
SPI Status Register (SPI_STS)
217
SPI Data Register (SPI_DT)
218
SPICRC Register (SPI_CPOLY)
218
Mode)
218
Spirxcrc Register (SPI_RCRC)
218
Spitxcrc Register (SPI_TCRC)
219
SPI_I2S Register (SPI_I2SCTRL)
219
SPI_I2S Prescaler Register (SPI_I2SCLKP)
220
Timer
221
Table 14-1 TMR Functional Comparison
221
Basic Timer (TMR6 and TMR7)
222
TMR6 and TMR7 Introduction
222
TMR6 and TMR7 Main Features
222
TMR6 and TMR7 Functional Overview
222
Counting Clock
222
Counting Mode
222
Figure 14-1 Basic Timer Block Diagram
222
Figure 14-2 Control Circuit with CK_INT Divided by 1
222
Debug Mode
223
Figure 14-3 Basic Structure of a Counter
223
Figure 14-4 Overflow Event When PRBEN=0
223
Figure 14-6 Counting Timing Diagram When the Prescaler Division Is 4
223
TMR6 and TMR7 Registers
224
TMR6 and TMR7 Control Register1 (Tmrx_Ctrl1)
224
Table 14-2 TMR6 and TMR7 Register Table and Reset Value
224
TMR6 and TMR7 Control Register2 (Tmrx_Ctrl2)
225
TMR6 and TMR7 Dma/Interrupt Enable Register (Tmrx_Iden)
225
TMR6 and TMR7 Interrupt Status Register (Tmrx_Ists)
225
TMR6 and TMR7 Software Event Register (Tmrx_Sw EVT)
225
TMR6 and TMR7 Counter Value (Tmrx_Cval)
225
TMR6 and TMR7 Division (Tmrx_Div)
225
TMR6 and TMR7 Period Register (Tmrx_Pr)
226
General-Purpose Timer (TMR2 to TMR4)
227
TMR2 to TMR4 Introduction
227
TMR2 to TMR4 Main Features
227
TMR2 to TMR4 Functional Overview
227
Counting Clock
227
Figure 14-7 General-Purpose Timer Block Diagram
227
Figure 14-8 Counting Clock
227
Figure 14-9 Control Circuit with CK_INT, Tmrx_Div=0X0 and Tmrx_Pr=0X16
228
Figure 14-10 Block Diagram of External Clock Mode a
229
Figure 14-11 Counting in External Clock Mode A, Pr=0X32 and DIV=0X0
229
Figure 14-12 Block Diagram of External Clock Mode B
229
Figure 14-13 Counting in External Clock Mode B, Pr=0X32 and DIV=0X0
229
Counting Mode
230
Figure 14-14 Counter Timing with Prescaler Value Chang from 1 to 4
230
Table 14-3 Tmrx Internal Trigger Connection
230
Figure 14-5 Overflow Event When PRBEN=1
231
Figure 14-15 Basic Structure of a Counter
231
Figure 14-16 Overflow Event When PRBEN=0
231
Figure 14-18 Counter Timing Diagram with Internal Clock Divided by 4
232
Figure 14-19 Counter Timing Diagram with Internal Clock Divided by 1 and Tmrx_Pr=0X32
232
Figure 14-20 Encoder Mode Structure
233
Table 14-4 Counting Direction Versus Encoder Signals
233
TMR Input Function
234
Figure 14-21 Example of Counter Behavior in Encoder Interface Mode (Encoder Mode C)
234
Figure 14-22 Input/Output Channel 1 Main Circuit
234
Figure 14-23 Channel 1 Input Stage
234
Figure 14-24 PWM Input Mode Configuration Example
235
TMR Output Function
236
Figure 14-25 PWM Input Mode
236
Figure 14-26 Capture/Compare Channel Output Stage (Channel 1 to 4)
236
Figure 14-27 C1ORAW Toggles When Counter Value Matches the C1DT Value
237
Figure 14-28 Upcounting Mode and PWM Mode a
238
Figure 14-29 Up/Down Counting Mode and PWM Mode a
238
Figure 14-30 One-Pulse Mode
238
TMR Synchronization
239
Figure 14-31 Clearing Cxoraw (PWM Mode A) by EXT Input
239
Figure 14-32 Example of Reset Mode
239
Figure 14-33 Example of Suspend Mode
240
Figure 14-34 Example of Trigger Mode
240
Figure 14-35 Master/Slave Timer Connection
240
Figure 14-36 Using Master Timer to Start Slave Timer
241
Debug Mode
242
TMR2 to TMR4 Registers
242
Figure 14-37 Starting Master and Slave Timers Synchronously by an External Trigger
242
Table 14-5 TMR2 to TMR4 Register Map and Reset Value
242
Control Register 1 (Tmrx_Ctrl1)
243
Control Register 2 (Tmrx_Ctrl2)
244
Slave Timer Control Register (Tmrx_Stctrl)
244
Dma/Interrupt Enable Register (Tmrx_Iden)
245
Interrupt Status Register (Tmrx_Ists)
246
Software Event Register (Tmrx_Sw EVT)
247
Channel Mode Register1 (Tmrx_Cm1)
247
Channel Mode Register2 (Tmrx_Cm2)
249
Channel Control Register (Tmrx_Cctrl)
250
Table 14-6 Standard Cxout Channel Output Control Bit
250
Counter Value (Tmrx_Cval)
251
Frequency Division Value (Tmrx_Div)
251
Period Register (Tmrx_Pr)
251
Channel 1 Data Register (Tmrx_C1Dt)
251
Channel 2 Data Register (Tmrx_ C2DT)
252
Channel 3 Data Register (Tmrx_C3Dt)
252
Channel 4 Data Register (Tmrx_C4Dt)
252
DMA Control Register (Tmrx_Dmactrl)
252
DMA Data Register (Tmrx_Dmadt)
253
General-Purpose Timer (TMR9 and TMR12)
253
TMR9 and TMR12 Introduction
253
TMR9 and TMR12 Main Features
253
TMR9 and TMR12 Functional Overview
253
Counting Clock
253
Figure 14-38 Block Diagram of General-Purpose TMR9/12
253
Figure 14-39 Counting Clock
254
Figure 14-40 Control Circuit with CK_INT, Tmrx_Div=0X0 and Tmrx_Pr=0X16
254
Figure 14-41 Block Diagram of External Clock Mode a
255
Figure 14-42 Counting in External Clock Mode A, Pr=0X32 and DIV=0X0
255
Table 14-7 Tmrx Internal Trigger Connection
255
Counting Mode
256
Figure 14-43 Counter Timing with Prescaler Value Chang from 1 to 4
256
Figure 14-44 Basic Structure of a Counter
256
Figure 14-17 Overflow Event When PRBEN=1
257
Figure 14-45 Overflow Event When PRBEN=0
257
Figure 14-46 Overflow Event When PRBEN=1
257
Figure 14-47 Counter Timing Diagram with Internal Clock Divided by 4
257
Figure 14-48 Counter Timing Diagram with Internal Clock Divided by 1 and Tmrx_Pr=0X32
258
TMR Input Function
259
Figure 14-49 OVFIF in Upcounting Mode and Central-Aligned Mode
259
Figure 14-50 Input/Output Channel 1 Main Circuit
260
Figure 14-51 Channel 1 Input Stage
260
TMR Output Function
261
Figure 14-52 PWM Input Mode Configuration Example
261
Figure 14-53 PWM Input Mode
261
Figure 14-54 Channel 1 Output Stage
261
Figure 14-55 Channel 2 Output Stage
262
Figure 14-56 C1ORAW Toggles When Counter Value Matches the C1DT Value
263
Figure 14-57 Upcounting Mode and PWM Mode a
263
Figure 14-58 One-Pulse Mode
263
TMR Brake Function
264
Figure 14-59 Complementary Output with Dead-Time Insertion
264
Figure 14-60 TMR Output Control
265
TMR Synchronization
266
Figure 14-61 Example of TMR Brake Function
266
Figure 14-62 Example of Reset Mode
266
Debug Mode
267
TMR9 and TMR12 Registers
267
Figure 14-63 Example of Suspend Mode
267
Figure 14-64 Example of Trigger Mode
267
Table 14-8 TMR9 and TMR12 Register Map and Reset Value
267
TMR9 and TMR12 Control Register1 (Tmrx_Ctrl1)
268
TMR9 and TMR12 Control Register 2 (Tmrx_Ctrl2)
269
TMR9 and TMR12 Slave Timer Control Register (TMR1_STCTRL)
269
TMR9 and TMR12 Dma/Interrupt Enable Register (TMR X_Iden)
270
TMR9 and TMR12 Interrupt Status Register (Tmrx_Ists)
270
TMR9 and TMR12 Software Event Register (Tmrx_Sw EVT)
271
TMR9 and TMR12 Channel Mode Register 1 (Tmrx_Cm1)
272
TMR9 and TMR12 Channel Control Register (Tmrx_Cctrl)
274
TMR9 and TMR12 Counter Value (Tmrx_Cval)
274
TMR9 and TMR12 Division Value (Tmrx_Div)
274
TMR9 and TMR12 Period Register (Tmrx_Pr)
275
TMR9 and TMR12 Repetition Period Register (Tmrx_Rpr)
275
TMR9 and TMR12 Channel 1 Data Register (Tmrx_C1Dt)
275
TMR9 and TMR12 Channel 2 Data Register (Tmrx_C2Dt)
275
TMR9 and TMR12 Brake Register (Tmrx_Brk)
275
TMR9 and TMR12 DMA Control Register (Tmrx_Dmactrl)
277
TMR9 and TMR12 DMA Data Register (Tmrx_Dmadt)
277
General-Purpose Timer (TMR10/11/13/14)
278
Tmrx Introduction
278
Tmrx Main Features
278
Tmrx Functional Overview
278
Counting Clock
278
Figure 14-65 TMR10/11/13/14 Block Diagram
278
Figure 14-66 Basic Structure of a Counter
278
Counting Mode
279
Figure 14-67 Control Circuit with CK_INT, Tmrx_Div=0X0 and Pr=0X16
279
Figure 14-68 Basic Structure of a Counter
279
Figure 14-69 Overflow Event When PRBEN=0
280
Figure 14-70 Overflow Event When PRBEN=1
280
Figure 14-71 Counter Timing Diagram with Internal Clock Divided by 4
280
Figure 14-72 Counter Timing Diagram with Internal Clock Divided by 1 and Tmrx_Pr=0X32
281
TMR Input Function
282
Figure 14-73 OVFIF in Upcounting Mode and Central-Aligned Mode
282
TMR Output Function
283
Figure 14-74 Input/Output Channel 1 Main Circuit
283
Figure 14-75 Channel 1 Input Stage
283
Figure 14-76 Channel 1 Output Stage
283
Figure 14-77 C1ORAW Toggles When Counter Value Matches the C1DT Value
285
Figure 14-78 Upcounting Mode and PWM Mode a
285
Figure 14-79 One-Pulse Mode
285
TMR Brake Function
286
Figure 14-80 Complementary Output with Dead-Time Insertion
286
Debug Mode
287
Figure 14-81 TMR Output Control
287
Figure 14-82 Example of TMR Brake Function
287
Tmrx Registers
288
Tmrx Control Register1 (Tmrx_Ctrl1) (X=10/11/13/14)
288
Table 14-9 TMR10/11/13/14 Register Map and Reset Value
288
Tmrx Control Register 2 (Tmrx_Ctrl2) (X=10/11/13/14)
289
Tmrx Dma/Interrupt Enable Register (Tmrx_Iden
289
Tmrx Interrupt Status Register (Tmrx_Ists) (X=10/11/13/14)
290
Tmrx Software Event Register (Tmrx_Swevt) (X=10/11/13/14)
290
Tmrx Channel Mode Register1 (Tmrx_Cm1) (X=10/11/13/14)
291
Tmrx Channel Control Register (Tmrx_Cctrl) (X=10/11/13/14)
292
Table 14-10 Complementary Output Channel Ocx and Ocxn Control Bits with Brake Function
293
Tmrx Counter Value Register (Tmrx_Cval) (X=10/11/13/14)
294
Tmrx Division Value Register (Tmrx_Div) (X=10/11/13/14)
294
Tmrx Period Register (Tmrx_Pr) (X=10/11/13/14)
294
Tmrx Repetition Period Register (Tmrx_Rpr) (X=10/11/13/14)
294
Tmrx Channel 1 Data Register (Tmrx_C1Dt) (X=10/11/13/14)
294
Tmrx Brake Register (Tmrx_Brk) (X=10/11/13/14)
294
TMRX DMA Control Register (TMRX_DMACTRL
296
Tmrx DMA Data Register (Tmrx_Dmadt) (X=10/11/13/14)
296
TMR14 Channel Input Remap Register (Tmrx_Rmp)
296
Advanced-Control Timers (TMR1)
296
TMR1 Introduction
296
TMR1 Main Features
296
TMR1 Functional Overview
297
Counting Clock
297
Figure 14-83 Block Diagram of Advanced-Control Timer
297
Figure 14-84 Counting Clock
297
Figure 14-85 Control Circuit with CK_INT, Tmrx_Div=0X0 and Tmrx_Pr=0X16
298
Figure 14-86 Block Diagram of External Clock Mode a
299
Figure 14-87 Counting in External Clock Mode A, Pr=0X32 and DIV=0X0
299
Figure 14-88 Block Diagram of External Clock Mode B
299
Figure 14-89 Counting in External Clock Mode B, Pr=0X32 and DIV=0X0
299
Counting Mode
300
Figure 14-90 Counter Timing with Prescaler Value Changing from 1 to 4
300
Table 14-11 Tmrx Internal Trigger Connection
300
Figure 14-91 Basic Structure of a Counter
301
Figure 14-92 Overflow Event When PRBEN=0
301
Figure 14-93 Overflow Event When PRBEN=1
301
Figure 14-94 Counter Timing Diagram with Internal Clock Divided by 4
301
Figure 14-95 Counter Timing Diagram with Internal Clock Divided by 1 and Tmrx_Pr=0X32
302
Figure 14-96 OVFIF Behavior in Upcounting Mode and Center-Aligned Mode
303
Figure 14-97 Structure of Encoder Mode
303
Figure 14-98 Example of Encoder Interface Mode C
304
Table 14-12 Counting Direction Versus Encoder Signals
304
TMR Input Function
305
Figure 14-99 Input/Output Channel 1 Main Circuit
305
Figure 14-100 Channel 1 Input Stage
305
Figure 14-101 PWM Input Mode Configuration Example
306
TMR Output Function
307
Figure 14-102 PWM Input Mode
307
Figure 14-103 Channel Output Stage (Channel 1 to 3)
307
Figure 14-104 Channel 4 Output Stage
307
Figure 14-105 C1ORAW Toggles When Counter Value Matches the C1DT Value
309
Figure 14-106 Upcounting Mode and PWM Mode a
309
Figure 14-107 Up/Down Counting Mode and PWM Mode
309
Figure 14-108 One-Pulse Mode
310
Figure 14-109 Clearing Cxoraw (PWM Mode A) by EXT Input
310
TMR Brake Function
311
Figure 14-110 Complementary Output with Dead-Time Insertion
311
TMR Synchronization
312
Figure 14-111 TMR Output Control
312
Figure 14-112 Example of TMR Brake Function
312
Figure 14-113 Example of Reset Mode
313
Figure 14-114 Example of Suspend Mode
313
Figure 14-115 Example of Trigger Mode
313
Debug Mode
314
TMR1 Registers
314
TMR1 Control Register1 (TMR1_CTRL1)
314
Table 14-13 TMR1 Register Map and Reset Value
314
TMR1 Control Register2 (TMR1_CTRL2)
315
TMR1 Slave Timer Control Register (TMR1_STCTRL)
316
TMR1 Dma/Interrupt Enable Register (TMR1_IDEN)
317
TMR1 Interrupt Status Register (TMR1_ISTS)
318
TMR1 Software Event Register (TMR1_SWEVT)
319
TMR1 Channel Mode Register1 (TMR1_CM1)
319
TMR1 Channel Mode Register2 (TMR1_CM2)
321
TMR1 Channel Control Register (TMR1_CCTRL)
322
Table 14-14 Complementary Output Channel Cxout and Cxcout Control Bits with Brake Function
323
TMR1 Counter Value Register (TMR1_CVAL)
324
TMR1 Division Value Register (TMR1_DIV)
324
TMR1 Period Register (TMR1_PR)
324
TMR1 Repetition Period Register (TMR1_RPR)
324
TMR1 Channel 1 Data Register (TMR1_C1DT)
324
TMR1 Channel 2 Data Register (TMR1_C2DT)
325
TMR1 Channel 3 Data Register (TMR1_C3DT)
325
TMR1 Channel 4 Data Register (Tmrx_C4Dt)
325
TMR1 Brake Register (TMR1_BRK)
325
TMR1 DMA Control Register (TMR1_DMACTRL)
327
TMR1 DMA Data Register (TMR1_DMADT)
327
TMR1 Channel Mode Register3 (TMR1_CM3)
327
TMR1 Channel 5 Data Register (TMR1_C5DT)
327
Window Watchdog Timer (WWDT)
328
WWDT Introduction
328
WWDT Main Features
328
WWDT Functional Overview
328
Figure 15-1 Window Watchdog Block Diagram
328
Debug Mode
329
WWDT Registers
329
Control Register (WWDT_CTRL)
329
Figure 15-2 Window Watchdog Timing Diagram
329
Table 15-1 Minimum and Maximum Timeout Value When PCLK1=72 Mhz
329
Table 15-2 WWDT Register Map and Reset Value
329
Configuration Register (WWDT_CFG)
330
Status Register (WWDT_STS)
330
Watchdog Timer (WDT)
331
WDT Introduction
331
WDT Main Features
331
WDT Functional Overview
331
Debug Mode
332
WDT Registers
332
Figure 16-1 WDT Block Diagram
332
Table 16-1 WDT Timeout Period (Lick=40Khz)
332
Table 16-2 WDT Register and Reset Value
332
Command Register (WDT_CMD)
333
Divider Register (WDT_DIV)
333
Reload Register (WDT_RLD)
333
Status Register (WDT_STS)
333
Window Register (WDT_WIN)
334
Enhanced Real-Time Clock (ERTC)
335
ERTC Introduction
335
ERTC Main Features
335
Figure 17-1 ERTC Block Diagram
335
ERTC Function Overview
336
ERTC Clock
336
ERTC Initialization
336
Table 17-1 RTC Register Map and Reset Values
336
Periodic Automatic Wakeup
338
ERTC Calibration
338
Reference Clock Detection
339
Time Stamp Function
339
Tamper Detection
339
Multiplexed Function Output
340
ERTC Wakeup
341
Table 17-2 ERTC Low-Power Mode Wakeup
341
Table 17-3 Interrupt Control Bits
341
ERTC Registers
342
ERTC Time Register (ERTC_TIME)
342
Table 17-4 ERTC Register Map and Reset Values
342
ERTC Date Register (ERTC_DATE)
343
ERTC Control Register (ERTC_CTRL)
343
ERTC Initialization and Status Register (ERTC_STS)
344
ERTC Divider Register (ERTC_DIV)
346
ERTC Wakeup Timer Register (ERTC_WAT)
346
ERTC Alarm Clock a Register (ERTC_ALA)
346
ERTC Alarm Clock B Register (ERTC_ALB)
346
ERTC Write Protection Register (ERTC_WP)
347
ERTC Subsecond Register (ERTC_SBS)
347
ERTC Time Adjustment Register (ERTC_TADJ)
347
ERTC Time Stamp Time Register (ERTC_TSTM)
347
ERTC Time Stamp Date Register (ERTC_TSDT)
348
ERTC Time Stamp Subsecond Register (ERTC_TSSBS)
348
ERTC Smooth Calibration Register (ERTC_SCAL)
348
ERTC Tamper Configuration Register (ERTC_TAMP)
349
ERTC Alarm Clock a Subsecond Register (ERTC_ALASBS)
350
ERTC Alarm Clock B Subsecond Register (ERTC_ALBSBS)
350
ERTC Battery Powered Domain Data Register (Ertc_Bprx)
350
Analog-To-Digital Converter (ADC)
351
ADC Introduction
351
ADC Main Features
351
ADC Structure
352
Figure 18-1 ADC1 Block Diagram
352
ADC Functional Overview
353
Channel Management
353
Internal Temperature Sensor
353
Internal Reference Voltage
353
ADC Operation Process
353
Power-On and Calibration
354
Figure 18-2 ADC Basic Operation Process
354
Trigger
355
Sampling and Conversion Sequence
355
Figure 18-3 ADC Power-On and Calibration
355
Table 18-1 Trigger Sources for Ordinary and Preempted Channels
355
Conversion Sequence Management
356
Sequence Mode
356
Preempted Group Automatic Conversion Mode
356
Figure 18-4 Sequence Mode
356
Figure 18-5 Preempted Group Auto Conversion Mode
356
Repetition Mode
357
Partition Mode
357
Figure 18-6 Repetition Mode
357
Figure 18-7 Partition Mode
357
End of Conversion
358
Oversampling
358
Figure 18-8 ADABRT Timing Diagram
358
Table 18-2 Correlation between Maximum Cumulative Data, Oversampling Multiple and Shift Digits
358
Oversampling of Ordinary Group of Channels
359
Figure 18-9 Ordinary Oversampling Restart Mode Selection
359
Oversampling of Preempted Group of Channels
360
Data Management
360
Data Alignment
360
Figure 18-10 Ordinary Oversampling Trigger Mode
360
Figure 18-11 Oversampling of Preempted Group of Channels
360
Data Read
361
Voltage Monitoring
361
Figure 18-12 Data Alignment
361
Status Flag and Interrupts
362
ADC Registers
362
Table 18-3 ADC Register Map and Reset Values
362
ADC Status Register (ADC_STS)
363
ADC Control Register1 (ADC_CTRL1)
363
ADC Control Register2 (ADC_CTRL2)
365
ADC Sampling Time Register 1 (ADC_SPT1)
366
ADC Sampling Time Register 2 (ADC_SPT2)
368
ADC Preempted Channel Data Offset Register X (Adc_Pcdtox
370
ADC Voltage Monitoring High Threshold Register (ADC_VMHB)
370
ADC Voltage Monitor Low Threshold Register (ADC_VMLB)
370
ADC Ordinary Sequence Register 1 (ADC_OSQ1)
370
ADC Ordinary Sequence Register 2 (ADC_OSQ2)
370
ADC Ordinary Sequence Register 3 (ADC_OSQ3)
371
ADC Preempted Sequence Register (ADC_PSQ)
371
ADC Preempted Data Register X (Adc_Pdtx) (X=1
371
ADC Ordinary Data Register (ADC_ODT)
371
ADC Sampling Time Register 3 (ADC_SPT3)
372
ADC Ordinary Sequence Register 4 (ADC_OSQ4)
373
ADC Ordinary Sequence Register 5 (ADC_OSQ5)
373
ADC Ordinary Sequence Register 6 (ADC_OSQ6)
374
ADC Oversampling Register (ADC_OVSP)
374
ADC Calibration Value Register (ADC_CALVAL)
375
ADC Additional Register (ADC_MISC)
375
ADC Common Control Register (ADC_CCTRL)
375
Digital-To-Analog Converter (DAC)
376
DAC Introduction
376
DAC Main Features
376
Design Hints and Tips
376
Figure 19-1 DAC1/DAC2 Block Diagram
376
Functional Overview
377
Trigger Events
377
Noise/Triangular-Wave Generation
377
Table 19-1 Trigger Source Selection
377
Figure 19-2 LFSR Register Calculation Algorithm
378
Figure 19-3 Triangular-Wave Generation
378
DAC Data Alignment
379
DAC Registers
379
DAC Control Register (DAC_CTRL)
379
Table 19-2 DAC Register Map and Reset Values
379
DAC Software Trigger Register (DAC_SWTRG)
382
DAC1 12-Bit Left-Aligned Data Holding Register (DAC_D1DTH12L)
382
DAC1 8-Bit Right-Aligned Data Holding Register (DAC_D1DTH8R)
382
DAC2 12-Bit Right-Aligned Data Holding Register (DAC_D2DTH12R)
382
DAC2 12-Bit Left-Aligned Data Holding Register (DAC_D2DTH12L)
382
DAC2 8-Bit Right-Aligned Data Holding Register (DAC_D2DTH8R)
383
Dual DAC 12-Bit Right-Aligned Data Holding Register (DAC_DDTH12R)
383
Dual DAC 12-Bit Left-Aligned Data Holding Register (DAC_DDTH12L)
383
Dual DAC 8-Bit Right-Aligned Data Holding Register (DAC_DDTH8R)
383
DAC1 Data Output Register (DAC_D1ODT)
383
DAC2 Data Output Register (DAC_D2ODT)
383
DAC Status Register (DAC_STS)
384
Controller Area Network (CAN)
385
CAN Introduction
385
CAN Main Features
385
Baud Rate
385
Figure 20-1 Bit Timing
385
Figure 20-2 Frame Type
387
Interrupt Management
388
Figure 20-3 Transmit Interrupt Generation
388
Figure 20-4 Receive Interrupt 0 Generation
388
Figure 20-5 Receive Interrupt 1 Generation
388
Figure 20-6 Status Error Interrupt Generation
388
Design Tips
389
Functional Overview
389
General Description
389
Figure 20-7 CAN Block Diagram
389
Operating Modes
390
Test Modes
390
Message Filtering
391
Figure 20-8 32-Bit Identifier Mask Mode
391
Figure 20-9 32-Bit Identifier List Mode
391
Figure 20-10 16-Bit Identifier Mask Mode
392
Figure 20-11 16-Bit Identifier List Mode
392
Message Transmission
393
Figure 20-12 Transmit Mailbox Status
394
Message Reception
395
Error Management
395
Figure 20-13 Receive FIFO Status
395
CAN Registers
396
Table 20-1 CAN Register Map and Reset Values
396
CAN Control and Status Registers
397
CAN Master Control Register (CAN_MCTRL)
397
CAN Master Status Register (CAN_MSTS)
398
CAN Transmit Status Register (CAN_TSTS)
399
CAN Receive FIFO 0 Register (CAN_RF0)
402
CAN Receive FIFO 1 Register (CAN_RF1)
403
CAN Interrupt Enable Register (CAN_INTEN)
403
CAN Error Status Register (CAN_ESTS)
405
CAN Bit Timing Register (CAN_BTMG)
405
CAN Mailbox Registers
406
Transmit Mailbox Identifier Register (Can_Tmix) (X=0
406
Figure 20-14 Transmit and Receive Mailboxes
406
Transmit Mailbox Data Length and Time Stamp Register (Can_Tmcx)
407
Transmit Mailbox Data Low Register (Can_Tmdtlx) (X=0
407
Transmit Mailbox Data High Register (Can_Tmdthx) (X=0
407
Receive FIFO Mailbox Identifier Register (Can_Rfix) (X=0
407
Receive FIFO Mailbox Data Length and Time Stamp Register (Can_Rfcx
408
Receive FIFO Mailbox Data Low Register (Can_Rfdtlx) (X=0
408
Receive FIFO Mailbox Data High Register (Can_Rfdthx) (X=0
408
CAN Filter Registers
408
CAN Filter Control Register (CAN_FCTRL)
408
CAN Filter Mode Configuration Register (CAN_FMCFG)
408
CAN Filter Bit Width Configuration Register (CAN_FBWCFG)
409
CAN Filter FIFO Association Register (CAN_FRF)
409
CAN Filter Activation Control Register (CAN_ FACFG)
409
CAN Filter Bank I Filter Bit Register (CAN_ Fifbx) (I=0
409
Universal Serial Bus Full-Seed Device Interface (OTGFS)
410
OTGFS Structure
410
OTGFS Functional Description
410
Figure 21-1 Block Diagram of OTGFS Structure
410
OTGFS Clock and Pin Configuration
411
OTGFS Clock Configuration
411
OTGFS Pin Configuration
411
Table 21-1 OTGFS Input/Output Pins
411
OTGFS Interrupts
412
OTGFS Functional Description
412
OTGFS Initialization
412
Figure 21-2 OTGFS Interrupt Hierarchy
412
OTGFS FIFO Configuration
413
Device Mode
413
Table 21-2 OTGFS Transmit FIFO SRAM Allocation
413
Host Mode
414
Table 21-3 OTGFS Internal Storage Space Allocation
414
Refresh Controller Transmit FIFO
415
OTGFS Host Mode
415
Host Initialization
415
OTGFS Channel Initialization
416
Halting a Channel
416
Queue Depth
416
Figure 21-3 Writing the Transmit FIFO
417
Special Cases
418
Host HFIR Feature
418
Figure 21-4 Reading the Receive FIFO
418
Figure 21-5 HFIR Behavior When Hfirrldctrl=0X0
419
Initialize Bulk and Control in Transfers
420
Figure 21-6 HFIR Behavior When Hfirrldctrl=0X1
420
Initialize Bulk and Control OUT/SETUP Transfers
422
Figure 21-7 Example of Common Bulk/Control OUT/SETUP and Bulk/Control in Transfer
423
Initialize Interrupt in Transfers
424
Initialize Interrupt out Transfers
426
Figure 21-8 Shows an Example of Common Interrupt OUT/IN Transfers
427
Initialize Synchronous in Transfers
428
Initialize Synchronous out Transfers
429
Figure 21-9 Example of Common Synchronous OUT/IN Transfers
430
OTGFS Device Mode
431
Device Initialization
431
Endpoint Initialization on USB Reset
431
Endpoint Initialization on Enumeration Completion
432
Endpoint Initialization on Setaddress Command
432
Endpoint Initialization on Setconfiguration/Setinterface Command
432
Endpoint Activation
432
USB Endpoint Deactivation
433
Control Write Transfers (Setup/Data Out/Status IN)
433
Control Read Transfers (Setup/Data In/Status OUT)
433
Control Transfers (Setup/Status IN)
434
Read FIFO Packets
434
OUT Data Transfers
435
Figure 21-10 Read Receive FIFO
435
IN Data Transfers
437
Figure 21-11 SETUP Data Packet Flowchart
437
Non-Periodic (Bulk and Control) in Data Transfers
438
Non-Synchronous out Data Transfers
439
Synchronous out Data Transfers
441
Figure 21-12 BULK out Transfer Block Diagram
441
Enable Synchronous Endpoints
442
Incomplete Synchronous out Data Transfers
444
Incomplete Synchronous in Data Transfers
445
Periodic in (Interrupt and Synchronous) Data Transfers
445
OTGFS Control and Status Registers
447
CSR Register Map
447
OTGFS Register Address Map
448
Figure 21-13 CSR Memory Map
448
Table 21-4 OTGFS Register Map and Reset Values
448
OTGFS Global Registers
453
OTGFS Status and Control Register (OTGFS_GOTGCTL)
453
OTGFS Interrupt Status Control Register (OTGFS_GOTGINT)
453
OTGFS AHB Configuration Register (OTGFS_GAHBCFG)
453
OTGFS USB Configuration Register (OTGFS_GUSBCFG)
454
OTGFS Reset Register (OTGFS_GRSTCTL)
455
OTGFS Interrupt Register (OTGFS_GINTSTS)
456
OTGFS Interrupt Mask Register (OTGFS_GINTMSK)
460
OTGFS Receive Status Debug Read/Otg Status Read and POP Registers (OTGFS_GRXSTSR / OTGFS_GRXSTSP)
461
OTGFS Receive FIFO Size Register (OTGFS_GRXFSIZ)
462
Tx FIFO Size Registers (OTGFS_DIEPTXF0)
462
OTGFS Non-Periodic Tx FIFO Size/Request Queue Status Register
462
(Otgfs_Gnptxsts)
462
OTGFS General Controller Configuration Register (OTGFS_GCCFG)
463
OTGFS Controller ID Register (OTGFS_GUID)
463
OTGFS Host Periodic Tx FIFO Size Register (OTGFS_HPTXFSIZ)
463
OTGFS Device in Endpoint Tx FIFO Size Register (Otgfs_Dieptxfn) (X=1
464
Host-Mode Registers
464
OTGFS Host Mode Configuration Register (OTGFS_HCFG)
464
OTGFS Host Frame Interval Register (OTGFS_HFIR)
464
OTGFS Host Frame Number/Frame Time Remaining Register (OTGFS_HFNUM)
465
OTGFS Host Periodic Tx Fifo/Request Queue Register (OTGFS_HPTXSTS)
465
OTGFS Host All Channels Interrupt Register (OTGFS_HAINT)
466
OTGFS Host All Channels Interrupt Mask Register (OTGFS_HAINTMSK)
466
OTGFS Host Port Control and Status Register (OTGFS_HPRT)
466
OTGFS Host Channelx Characteristics Register (Otgfs_Hccharx)
468
Where X= Channel Number)
468
OTGFS Host Channelx Interrupt Register (Otgfs_Hcintx) (X = 0
469
OTGFS Host Channelx Interrupt Mask Register (Otgfs_Hcintmskx)
470
(X = 0
470
OTGFS Host Channelx Transfer Size Register (Otgfs_Hctsizx) (X = 0
470
Where X= Channel Number)
470
Device-Mode Registers
470
OTGFS Device Configure Register (OTGFS_DCFG)
470
OTGFS Device Control Register (OTGFS_DCTL)
471
OTGFS Device Status Register (OTGFS
472
Table 21-5 Minimum Duration for Software Disconnect
472
OTGFS Device OTGFSIN Endpoint Common Interrupt Mask Register (OTGFS_DIEPMSK)
473
OTGFS Device out Endpoint Common Interrupt Mask Register (OTGFS_DOEPMSK)
473
OTGFS Device All Endpoints Interrupt Mask Register (OTGFS_DAINT)
474
OTGFS All Endpoints Interrupt Mask Register (OTGFS_DAINTMSK)
474
OTGFS Device in Endpoint FIFO Empty Interrupt Mask Register (OTGFS_DIEPEMPMSK)
475
OTGFS Device Control in Endpoint 0 Control Register (OTGFS_DIEPCTL0)
475
OTGFS Device in Endpoint-X Control Register (Otgfs_Diepctlx)
476
(X=X=1
476
OTGFS Device Control out Endpoint 0 Control Register
478
(Otgfs_Doepctl0)
478
OTGFS Device Control out Endpoint-X Control Register (Otgfs_Doepctlx) (X= X=1
479
OTGFS Device in Endpoint-X Interrupt Register (Otgfs_Diepintx)
481
(X=0
481
OTGFS Device out Endpoint-X Interrupt Register (Otgfs_Doepintx) (X=0
482
OTGFS Device in Endpoint 0 Transfer Size Register
482
(Otgfs_Dieptsiz0)
482
OTGFS Device out Endpoint 0 Transfer Size Register
483
(Otgfs_Doeptsiz0)
483
OTGFS Device in Endpoint-X Transfer Size Register (Otgfs_Dieptsizx) (X=1
483
OTGFS Device in Endpoint Transmit FIFO Status Register (Otgfs_Dtxfstsx) (X=1
484
OTGFS Device out Endpoint-X Transfer Size Register
484
(Otgfs_Doeptsizx) (X=1
484
Power and Clock Control Registers
485
OTGFS Power and Clock Gating Control Register (OTGFS_PCGCCTL)
485
HICK Auto Clock Calibration (ACC)
486
ACC Introduction
486
Main Features
486
Interrupt Requests
486
Functional Description
486
Figure 22-1 ACC Interrupt Mapping Diagram
486
Table 22-1 ACC Interrupt Requests
486
Figure 22-2 ACC Block Diagram
487
Principle
488
Figure 22-3 Cross-Return Algorithm
488
Register Description
489
ACC Register Map
489
Status Register (ACC_STS)
489
Control Register 1 (ACC_CTRL1)
489
Table 22-2 ACC Register Map and Reset Values
489
Control Register 2 (ACC_CTRL2)
490
Compare Value 1 (ACC_C1)
490
Compare Value 2 (ACC_C2)
491
Compare Value 3 (ACC_C3)
491
Infrared Timer (IRTMR)
492
Figure 23-1 IRTMR Block Diagram
492
External Memory Controller (XMC)
493
XMC Introduction
493
XMC Main Features
493
XMC Architecture
494
Block Diagram
494
Figure 24-1 XMC Block Diagram
494
Table 24-1 NOR/PSRAM Pins
494
Address Mapping
495
Nor/Psram
495
Figure 24-2 XMC Memory Banks
495
Table 24-2 Memory Bank Selection
495
Operating Mode
496
Table 24-3 Pin Signals for nor and PSRAM
496
Table 24-4 Address Translation between HADDR and External Memory
496
Table 24-5 Data Access Width Vs. External Memory Data Width
496
Access Mode
497
Multiplexed Mode
497
Table 24-6 NOR/PSRAM Parameter Registers
497
Table 24-7 Multiplexed Mode - SRAM/NOR Flash Chip Select Control Register
497
Figure 24-3 NOR/PSRAM Multiplexed Mode Read Access
498
Table 24-8 Multiplexed Mode-SRAM/NOR Flash Chip Select Timing Register (XMC_BK1TMG) Configuration
498
Synchronous Mode
499
Figure 24-4 NOR/PSRAM Multiplexed Mode Write Access
499
Table 24-9 Synchronous Mode - SRAM/NOR Flash Chip Select Control Register
499
Figure 24-5 NOR/PSRAM Synchronous Multiplexed Mode Read Access
500
Table 24-10 Synchronous Mode-SRAM/NOR Flash Chip Select Timing Register (XMC_BK1TMG)
500
XMC Registers
501
Figure 24-6 NOR/PSRAM Synchronous Multiplexed Mode Write Access
501
Table 24-11 XMC Register Address Mapping
501
NOR Flash and PSRAM Control Registers
502
SRAM/NOR Flash Chip Select Control Register 1 (XMC_BK1CTRL1)
502
SRAM/NOR Flash Chip Select Control Register X (X=2, 4)
503
SRAM/NOR Flash Chip Select Timing Register X (X=1,2,4)
504
SRAM/NOR Flash Write Timing Register X (X=1,2,4)
505
SRAM/NOR Flash Extra Timing Register X(Xmc_Extx) (X=1,2, 4)
505
Debug (DEBUG)
507
Debug Introduction
507
Debug and Trace
507
I/O Pin Control
507
DEGUB Registers
507
Table 25-1 DEBUG Register Address and Reset Value
507
DEBUG Device ID (DEBUG_IDCODE)
508
DEBUG Control Register (DEBUG_CTRL)
508
DEBUG APB1 Pause Register (DEBUG_ APB1_PAUSE)
509
DEBUG APB2 Pause Register (DEBUG_ APB2_PAUSE)
511
DEBUG SERIES ID Register (DEBUG_SER_ID)
511
Revision History
512
Advertisement
Advertisement
Related Products
ARTERY AT32A423C8U7
ARTERY AT32A423C8T7
ARTERY AT32A423CBU7
ARTERY AT32A423CBT7
ARTERY AT32A423CCU7
ARTERY AT32A423TBU7
ARTERY AT32A423KCU7-4
ARTERY AT32A423TCU7
ARTERY AT32A423RCT7-7
ARTERY AT32A423RCT7
ARTERY Categories
Computer Hardware
Motherboard
Microcontrollers
Tool Storage
Cables and connectors
More ARTERY Manuals
Login
Sign In
OR
Sign in with Facebook
Sign in with Google
Upload manual
Upload from disk
Upload from URL