Sign In
Upload
Manuals
Brands
Cmsemicon Manuals
Microcontrollers
CMS32L051
Cmsemicon CMS32L051 Manuals
Manuals and User Guides for Cmsemicon CMS32L051. We have
1
Cmsemicon CMS32L051 manual available for free PDF download: User Manual
Cmsemicon CMS32L051 User Manual (703 pages)
Ultra-low-power 32-bit microcontroller based on the ARM Cortex-M0+
Brand:
Cmsemicon
| Category:
Microcontrollers
| Size: 16 MB
Table of Contents
Documentation Instructions
2
Table of Contents
3
Chapter 1 CPU
14
1.1 Overview
14
1.2 Cortex-M0+ Core Features
14
1.3 Debugging Features
14
1.4 SWD Interface Pin
16
1.5 ARM Reference Document
17
Chapter 2 Pin Function
18
2.1 Port Function
18
2.2 Port Multiplexing Function
18
2.3 Registers for Controlling Port Functions
19
Port Mode Register (Pmxx)
21
Port Register (Pxx)
22
Port Set Control Register (Psetxx)
23
Port Clear Control Register (Pclrxx)
24
Pull-Up Resistor Selection Register (Puxx)
25
Pull-Down Resistor Selection Register (Pdxx)
26
Port Output Mode Register (Pomxx)
27
Port Mode Control Register (Pmcxx)
28
Port Output Multiplexing Function Configuration Register (Pxxcfg)
29
Port Input Multiplexing Function Configuration Registers
33
Ti13Pcfg, Intp0Pcfg, Intp1Pcfg , Intp2Pcfg, Intp3Pcfg, Sdi00Pcfg, Sclki00Pcfg, Ss00Pcfg , Sdi20Pcfg, Sclki20Pcfg, Sdaa0Pcfg, Scla0Pcfg, Rxd1Pcfg )
33
SPI Port Multiplexing Configuration Register (SPIPCFG)
37
2.4 Handling of Unused Pins
38
Register Setting When Using the Multiplexed Function
39
Basic Idea When Using the Multiplexed Output Feature
39
Example of Register Settings Using Port Functions and Multiplexing Functions
40
EPWM Port Configuration Method
56
Chapter 3 System Structure
57
3.1 Overview
57
3.2 System Address Partition
58
Chapter 4 Clock Generation Circuit
60
4.1 Function of the Clock Generation Circuit
60
4.2 Structure of Clock Generation Circuit
62
4.3 Registers for Controlling Clock Generation Circuit
65
Clock Operation Mode Control Register (CMC)
65
System Clock Control Register (CKC)
67
Clock Operation Status Control Register (CSC)
68
Status Register of the Oscillation Stabilization Time Counter (OSTC)
69
Oscillation Stabilization Time Selection Register (OSTS)
71
Peripheral Enable Registers 0, 1 (PER0, PER1)
72
Subsystem Clock Supply Mode Control Register (OSMC)
76
High-Speed Internal Oscillator Frequency Selection Register (HOCODIV)
77
High-Speed Internal Oscillator Trim Register (HIOTRM)
78
Subsystem Clock Selection Register (SUBCKSEL)
79
4.4 System Clock Oscillation Circuit
80
X1 Oscillation Circuit
80
XT1 Oscillation Circuit
80
High-Speed Internal Oscillator
84
Low-Speed Internal Oscillator
84
4.5 Operation of Clock Generation Circuit
85
Clock Control
87
Example of Setting up a High-Speed Internal Oscillator
87
Example of Setting up an X1 Oscillation Circuit
89
Example of Setting up an XT1 Oscillation Circuit
90
State Transition Graph of the CPU Clock
91
Conditions before CPU Clock Transfer and Processing after Transfer
97
Time Required to Switch between CPU Clock and Main System Clock
99
Condition before the Clock Oscillation Stops
100
4.7 High-Speed Internal Oscillation Correction
101
High-Speed Internal Oscillation Self-Adjustment Function
101
Register Description
102
Operation Description
103
Precautions for Use
106
Chapter 5 Universal Timer Unit (Timer4)
107
5.1 Function of Universal Timer Unit
108
Independent Channel Operation Function
108
Multi-Channel Linkage Operation Function
110
8-Bit Timer Operation Function (Limited to Channel 1 and Channel 3 of Unit 0)
111
LIN-Bus Support Functions (Channel 3 of Unit 0 Only)
111
5.2 Structure of the Universal Timer Unit
112
List of Universal Timer Unit 0 Registers
115
List of Universal Timer Unit 1 Registers
116
Timer Count Register Mn (Tcrmn)
117
Timer Data Register Mn (Tdrmn)
118
5.3 Registers for Controlling General-Purpose Timer Unit
119
Peripheral Enable Register 0 (PER0)
120
Timer Clock Select Register M (Tpsm)
121
Timer Mode Register Mn (Tmrmn)
124
Timer Status Register Mn (Tsrmn)
129
Timer Channel Enable Status Register M (Tem)
130
Timer Channel Start Register M (Tsm)
131
Timer Channel Stop Register M (Ttm)
132
Timer Input-Output Select Register (TIOS0)
133
Timer Output Enable Register M (Toem)
134
Timer Output Register M (Tom)
135
Timer Output Level Register M (Tolm)
136
Timer Output Mode Register M (Tomm)
137
Noise Filter Enable Register 1 (NFEN1)
138
Noise Filter Enable Register 2 (NFEN2)
139
Registers for Controlling Timer Input/Output Pin Port Functions
140
5.4 Basic Rules of the Universal Timer Unit
141
Basic Rules of the Multi-Channel Linkage Operation Function
141
Basic Rules for the 8-Bit Timer to Operate the Function
143
5.5 Operation of the Counter
144
Count Clock (F TCLK )
144
Start Timing of Counter
146
Operation of Counter
147
Control of the Channel Output (Tomn Pin)
152
Structure of the Tomn Pin Output Circuit
152
Output Setting of the Tomn Pin
153
Cautions for Channel Output Operation
154
One-Time Operation of the Tomn Bit
158
Timer Interrupt and Tomn Pin Output When Counting Starts
159
Control of Timer Input (Timn)
160
Structure of Timn Pin Input Circuit
160
Noise Filter
161
Considerations When Manipulating Channel Inputs
162
5.8 Independent Channel Operation Function of the Universal Timer Unit
163
Operates as an Interval Timer / Square Wave Output
163
Operate as External Event Counter
167
Operates as Frequency Divider
170
Operates as Input Pulse Interval Measurement
173
Operation as Input Signal High and Low Level Width Measurement
176
Operation as Delay Counter
180
5.9 Multi-Channel Linkage Operation of the Universal Timer Unit
183
Operates as Single-Trigger Pulse Output Function
183
Operates as PWM Function
190
Operates as Multiplex PWM Output Function
197
Chapter 6 Function of EPWM Output Control Circuit
205
6.1 Structure of the Output Control Circuit
205
6.2 Registers for Controlling EPWM Output Control Circuit
206
Peripheral Enable Register 1 (PER1)
207
EPWM Input Source Selection Register (EPWMSRC)
207
EPWM Output Control Register (EPWMCTL)
207
EPWM Force Truncated Input Selection Register (EPWMSTC)
208
EPWM Force Truncated Output Selection Register (EPWMSTL)
209
EPWM Status Register (EPWMSTR)
209
6.3 Operation of EPWM Output Control Circuit
211
Initial Setup
211
Normal Operation
212
Force Truncation Processing
212
6.4 Control Example of Brushless DC Motor
214
Example of a Hardware Connection
214
Control Timing of Three-Phase Brushless DC Motors
215
Example of Register Setting
216
6.5 Example of Stepper Motor Control
217
Example of a Hardware Connection
217
Control Method
218
Example of Register Setting
219
Chapter 7 Real-Time Clock
220
7.1 Function of Real-Time Clock
220
7.2 Structure of Real-Time Clock
220
7.3 Registers for Controlling Real-Time Clock
222
Peripheral Enable Register 0 (PER0)
223
Real-Time Clock Selection Register (RTCCL)
224
Real-Time Clock Control Register0 (RTCC0)
225
Real-Time Clock Control Register1 (RTCC1)
226
Clock Error Correction Register (SUBCUD)
228
Second Count Register (SEC)
229
Minute Count Register (MIN)
229
Hour Count Register (HOUR)
230
Day Count Register (DAY)
232
Week Count Register (WEEK)
233
Month Count Register (MONTH)
234
Year Count Register (YEAR)
234
Alarm Minute Register (ALARMWM)
235
Alarm Hour Register (ALARMWH)
235
Alarm Week Register (ALARMWW)
236
Port Mode Register and Port Register
236
Operation of Real-Time Clock
237
Start of Real-Time Clock Operation
237
Shifting to Sleep Mode after Starting Operation
238
Read and Write to the Real-Time Clock Counter
239
Alarm Setting for Real-Time Clock
241
1Hz Output of the Real-Time Clock
242
Example of Clock Error Correction for a Real-Time Clock
243
Chapter 8 15-Bit Interval Timer
245
8.1 Function of 15-Bit Interval Timer
245
8.2 Structure of 15-Bit Interval Timer
245
8.3 Registers for Controlling 15-Bit Interval Timer
246
Peripheral Enable Register 0 (PER0)
246
Real-Time Clock Selection Register (RTCCL)
247
15-Bit Interval Timer Control Register (ITMC)
248
8.4 15-Bit Interval Timer Operation
249
15-Bit Interval Timer Operation Timing
249
Start of Count Operation and Re-Enter to Sleep Mode after Returned from Sleep Mode
250
Chapter 9 Clock Output/Buzzer Output Controller
251
9.1 Functions of Clock Output/Buzzer Output Controller
251
9.2 Structure of Clock Output/Buzzer Output Controller
253
9.3 Registers for Controlling Clock Output/Buzzer Output Controller
253
Clock Output Select Register N (Cksn)
253
9.4 Operation of Clock Output/Buzzer Controller
256
Operation of Output Pin
256
9.5 Cautions for Clock Output/Buzzer Output Control Circuitry
256
Chapter 10 Watchdog Timer
257
Function of Watchdog Timer
257
Structure of Watchdog Timer
257
Registers for Controlling Watchdog Timer
259
Watchdog Timer Enable Register (WDTE)
259
LOCKUP Control Register (Lockctl)And Its Protection Register (PRCR)
260
Operation of the Watchdog Timer
261
Operational Control of the Watchdog Timer
261
Watchdog Timer Overflow Time Setting
262
Setting Window Open Period of Watchdog Timer
263
Setting Watchdog Timer Interval Interruption
264
Operation of the Watchdog Timer During LOCKUP
264
A/D Converter
265
Function of A/D Converter
265
Control Registers of A/D Converter
267
Peripheral Enable Register 0 (PER0)
268
A/D Converter Mode Register 0 (ADM0)
269
A/D Converter Mode Register 1 (ADM1)
274
A/D Converter Mode Register 2 (ADM2)
275
A/D Converter Trigger Mode Register (ADTRG)
276
Analog Input Channel Specification Register (ADS)
277
12-Bit A/D Conversion Result Register (ADCR)
279
8-Bit A/D Conversion Result Register (ADCRI)
280
Conversion Result Comparison Upper Limit Setting Register (ADUL)
280
Conversion Result Comparison Lower Limit Setting Register (ADLL)
280
A/D Converter Sampling Time Extension Control Register (ADSMPWAIT)
281
Registers for Controlling the Function of the Analog Input Pin Port
281
Input Voltage and Conversion Results
282
Operation Mode of A/D Converter
283
Software Trigger Mode (Select Mode, Continuous Conversion Mode)
283
Software Trigger Mode (Select Mode, Single Conversion Mode)
284
Software Trigger Mode (Scan Mode, Continuous Conversion Mode)
285
Software Trigger Mode (Scan Mode, Single Conversion Mode)
286
Hardware Triggered No-Wait Mode (Select Mode, Continuous Conversion Mode)
287
Hardware Trigger No-Wait Mode (Select Mode, Single Conversion Mode)
288
Hardware Trigger No-Wait Mode (Scan Mode, Continuous Conversion Mode)
289
Hardware Trigger No-Wait Mode (Scan Mode, Single Conversion Mode)
290
Hardware Trigger Wait Mode (Select Mode, Continuous Conversion Mode)
291
Hardware Trigger Wait Mode (Select Mode, Single Conversion Mode)
292
Hardware Trigger Wait Mode (Scan Mode, Continuous Conversion Mode)
293
Hardware Trigger Wait Mode (Scan Mode, Single Conversion Mode)
294
Chapter 12 Universal Serial Communication Unit
295
Function of Universal Serial Communication Unit
296
3-Wire Serial I/O (SSPI00, SSPI01, SSPI10, SSPI11, SSPI20, SSPI21)
296
Uart (Uart0~Uart2)
297
Simple I 2 C (IIC00, IIC01, IIC10, IIC11, IIC20, IIC21)
298
Structure of Universal Serial Communication Unit
299
Shift Register
302
Registers for Controlling Universal Serial Communication Unit
304
Peripheral Enable Register 0 (PER0)
305
Serial Clock Select Register M (Spsm)
306
Serial Mode Register Mn (Smrmn)
307
Serial Communication Operation Setting Register Mn (Scrmn)
309
Serial Data Register Mn (Sdrmn)
311
Serial Flag Clear Trigger Register Mn (Sirmn)
313
Serial Status Register Mn (Ssrmn)
314
Serial Channel Start Register M (Ssm)
316
Serial Channel Stop Register M (Stm)
317
Serial Channel Enable Status Register M (Sem)
318
Serial Output Enable Register M(Soem)
319
Serial Output Register M (Som)
320
Serial Output Level Register M (Solm)
321
Input Switching Control Register (ISC)
323
Noise Filter Enable Register 0 (NFEN0)
324
Registers Controlling the Function of the Serial Input/Output Pin Port
325
Operation Stop Mode
326
Stopping the Operation by Units
326
Stopping the Operation by Channels
327
3-Wire Serial I/O (SSPI00, SSPI01, SSPI10, SSPI11, SSPI20, SSPI21) Communication
328
Master Transmission
329
Master Reception
338
Master Transmission and Reception
346
Slave Transmission
354
Slave Receiving
362
Slave Send and Receive
368
Calculation of Transmit Clock Frequency
377
Procedure for Handling Errors During 3-Wire Serial I/O Communication (SSPI00, SSPI01, SSPI10, SSPI11, SSPI20, SSPI21)
379
Operation of Clock-Synchronous Serial Communication with Slave Selection Input Function
380
Slave Transmission
383
Slave Receiving
393
Slave Transmission and Reception
400
Calculation of the Transmit Clock Frequency
410
Procedure for Handling Errors During Clock-Synchronous Serial Communication with the Slave Selection Input Function
411
Operation of UART (UART0~UART2) Communication
412
UART Transmission
413
UART Reception
422
Calculation of the Baud Rate
429
Handling Steps When an Error Occurs During UART (UART0~UART 2) Communication
433
Operation of LIN Communication
434
LIN Transmission
434
LIN Reception
437
Simplified I C (IIC00, IIC01, IIC10, IIC11, IIC20, IIC21) Communication Operation
442
Address Segment Transmission
443
Data Transmission
448
Data Reception
451
Generation of Stop Condition
455
Calculation of the Transfer Rate
456
Processing Steps When an Error Occurs in a Simple I2C (IIC00, IIC01, IIC10, IIC11, IIC20, IIC21)
458
Communication Process
458
Chapter 13 Serial Interface SPI
459
Serial Interface SPI Function
459
Structure of SPI
459
Registers for Controlling SPI
460
Peripheral Enable Register 0 (PER0)
461
SPI Operating Mode Register (SPIM)
462
SPI Clock Selection Register (SPIC)
463
Transmit Buffer Registers (SDRO)
464
Receive Buffer Register (SDRI)
464
SPI Pin Port Function Control Register
465
Operation of SPI
466
Master Tramission and Reception
467
Master Reception
470
Slave Send and Receive
473
Slave Reception
476
Chapter 14 Serial Interface IICA
479
Function of IICA
479
Structure of the Serial Interface IICA
482
Registers for Controlling Serial Interface IICA
485
Peripheral Enable Register 0 (PER0)
486
IICA Control Register N0 (Iicctln0)
486
IICA Status Register N (Iicsn)
491
IICA Flag Register N (Iicfn)
493
IICA Control Register N1 (Iicctln1)
495
IICA Low Level Width Setting Register N (Iicwln)
497
IICA High Level Width Setting Register N (Iicwhn)
497
Registers Controlling the IICA Pin Port Function
498
Function of I C-Bus Mode
499
Pin Structure
499
Setting the Transmit Clock Via Iicwln Register and Iicwhn Register
500
Definition and Control Method of I C-Bus
501
Start Conditions
502
Address
503
Designation of Transmission Direction
503
Acknowledge (ACK)
504
Stop Conditions
505
Wait
506
Release Method of Wait
508
Interrupt Request (Intiican) Generation Timing and Wait Control
509
Detection Method for Address Matching
510
Detection of Errors
510
Extension Code
511
Arbitration
512
Wake-Up Function
514
Communicate with Reservation
517
Other Cautions
521
Communication Operation
522
Generation Timing of I C Interrupt Request (Intiican)
531
Timing Diagram
552
Chapter 15 Irda
568
Function of Irda
568
Registers for Controlling the Irda
569
Peripheral Enable Register 0 (PER0)
569
Irda Control Register (IRCR)
570
Operation of Irda
571
Operating Steps for Irda Communication
571
Transmission
572
Reception
572
High Level Pulse Width Selection
573
Considerations When Using Irda
573
Chapter 16 Enhanced DMA
574
The Function of DMA
574
Structure of DMA
576
Registers for Controlling DMA
577
DMA Control Data Areas and DMA Vector Table Areas Allocation
578
Control Data Allocation
579
Vector Table
581
Peripheral Enable Register 1 (PER1)
583
DMA Control Register J(Dmacrj) (J=0~23)
583
DMA Block Size Register J (Dmblsj) (J=0~23)
585
DMA Transmit Count Register J(Dmactj) (J=0~23)
586
DMA Transmit Count Reload Register J(Dmrldj) (J=0~23)
587
DMA Source Address Register J(Dmsarj) (J=0~23)
588
DMA Destination Address Register J(Dmdarj) (J=0~23)
588
DMA Boot Enable Register I (Dmaeni) (I=0~2)
589
DMA Base Address Register (DMABAR)
591
DMA Operation
592
Start the Source
592
Normal Mode
593
Repeat Pattern
596
Chain Transfer
599
Precautions When Using DMA
601
DMA Controls the Settings of Data and Vector Tables
601
DMA Controls the Allocation of Data Areas and DMA Vector Table Areas
601
Number of Execution Clocks for DMA
602
Response Time of DMA
603
Startup Source for DMA
603
Operation in Standby Mode
604
Chapter 17 Linkage Controller (EVENTC)
605
Feature of EVENTC
605
Structure of EVENTC
605
Control Registers
606
Output Target Selection Register N (Elselrn) (N=00~14)
607
Operation of EVENTC
610
Chapter 18 Interrupt Function
611
Types of Interrupt Function
611
Interrupt Source and Structure
611
Registers Controlling Interrupt Function
616
Interrupt Request Flag Registers (IF00 to IF31)
616
Interrupt Mask Flag Register (MK00~MK31)
617
Register (EGN0)
618
Operation of Interrupt Handling
622
Acceptance of Maskable Interrupt Requests
622
Acceptance of Non-Maskable Interrupt Requests
622
Chapter 19 Key Interrupt Function
623
Function of Key Interrupt
623
Structure of Key Interrupt
623
Registers for Controlling Key Interrupt
625
Key Return Mode Register (KRM)
625
Port Mode Register (Pmx)
626
Chapter 20 Standby Function
627
Standby Function
627
Sleep Mode
628
Setting of the Sleep Mode
628
Release of Sleep Mode
631
Deep Sleep Mode
632
The Setting for Deep Sleep Mode
632
Release of Deep Sleep Mode
634
Chapter 21 Reset Function
636
Register for Confirming the Reset Source
641
Reset Control Flag Register (RESF)
641
Chapter 22 Power-On Reset Circuit
644
Function of Power-On Reset Circuit
644
Structure of Power-On Reset Circuit
645
Operation of Power-On Reset Circuit
645
Chapter 23 Voltage Detection Circuit
649
Function of Voltage Detection Circuit
649
Structure of Voltage Detection Circuit
650
Registers for Controlling Voltage Detection Circuit
651
Voltage Sense Register (LVIM)
651
Voltage Sense Level Register (LVIS)
652
Operation of Voltage Detection Circuit
655
Settings When Used in Reset Mode
655
Settings When Used in Interrupt Mode
657
Settings for Interrupt & Reset Mode
659
Considerations for Voltage Detection Circuits
665
Chapter 24 Security Features
667
Overview
667
Registers Used by Security Functions
668
Operation of Security Functions
668
Flash CRC Operation Function (High-Speed CRC)
668
CRC Operation Function (General CRC)
672
RAM Parity Error Detection Function
675
SFR Protection Function
677
Frequency Detection Function
678
A/D Test Function
679
Digital Output Signal Level Detection Function for Input/Output Pin
681
Product Unique Identification Register
682
Chapter 25 Temperature Sensor
683
Function of Temperature Sensor
683
Register for Temperature Sensor
683
Temperature Sensor Calibration Data Register TSN25
683
Temperature Sensor Calibration Data Register TSN85
683
Instructions for Use with the Temperature Sensor
684
How the Temperature Sensor Is Used
684
How to Use the Temperature Sensor
685
Chapter 26 Option Byte
686
Function of Option Byte
686
User Option Bytes (000C0H~000C2H)
686
Flash Data Protection Option Bytes (000C3H, 500004H)
687
Format of User Option Byte
688
Format of Flash Data Protection Option Bytes
694
Chapter 27 FLASH Control
695
Description of FLASH Control
695
Structure of FLASH Memory
695
Registers for Controlling FLASH
696
Flash Write Protection Register (FLPROT)
696
FLASH Operation Control Registers (FLOPMD1, FLOPMD2)
697
Flash Erase Control Register (FLERMD)
697
Flash Status Register (FLSTS)
698
Flash Full-Chip Erase Time Control Register (FLCERCNT)
698
Flash Sector Erase Time Control Register (FLSERCNT)
699
Flash Write Time Control Register (FLPROCNT)
700
FLASH Operation Method
701
Sector Erase
701
Chip Erase
702
Programming (Word Program)
702
Flash Read
702
Cautions for FLASH Operation
702
Appendix Revision History
703
Advertisement
Advertisement
Related Products
Cmsemicon CMS32H6157
Cmsemicon CMS32M65 Series
Cmsemicon CMS80F731 Series
Cmsemicon CMS80F751 Series
Cmsemicon CMS8S589 Series
Cmsemicon CMS8S369 Series
Cmsemicon CMS80F261 Series
Cmsemicon CMS80F251 Series
Cmsemicon CMS8S3660
Cmsemicon CMS8S6980
Cmsemicon Categories
Microcontrollers
More Cmsemicon Manuals
Login
Sign In
OR
Sign in with Facebook
Sign in with Google
Upload manual
Upload from disk
Upload from URL