Nuvoton TRM KM1M7AF00 02 50 52 Vol1 Technical Reference Manual

  • Hello! I've thoroughly reviewed the Technical Reference Manual for the Nuvoton KM1M7AF00/02/50/52 series microcontrollers. This document is packed with information about the device's architecture, functionalities, and safety measures. It provides detailed insights into features such as the ARM Cortex-M7 core, power modes, timers, and serial interfaces. Feel free to ask me any questions you have about the device or the manual, and I'll do my best to assist you.
  • What type of processor core is used in the KM1M7AF00/02/50/52 series?
    What safety features are included in the KM1M7AF00/02/50/52 series?
    What kind of power saving modes are available?
KM1M7AF00/02/50/52 Series
ARM® Cortex®-M
32-bit Microcontroller
KM1M7AF00/02/50/52 Series
Technical Reference Manual Vol. 1
The information described in this document is the exclusive intellectual property of Nuvoton
Technology Corporation Japan and shall not be reproduced without permission from Nuvoton.
Nuvoton is providing document only for reference purposes of KM1M7AF00/02/50/52 Series
based system design.
Nuvoton assumes no responsibility for errors or commissions.
All data and specifications are subject to changed without notice.
For additional information or question, please contact Nuvoton Technology Corporation Japan.
www.nuvoton.co.jp
June 30.2023 Page 1 of 985 Rev 1.7
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
KM1M7AF00/02/50/52 Series
Request for your special attention and precautions
in using the technical information and semiconductors described in this book
(1) If any of the products or technical information described in this book is to be exported or provided to non-
residents, the laws and regulations of the exporting country, especially, those with regard to security export
control, must be observed.
(2) The technical information described in this book is intended only to show the main characteristics and
application circuit examples of the products. No license is granted in and to any intellectual property right or
other right owned by Nuvoton Technology Corporation Japan or any other company. Therefore, no
responsibility is assumed by our company as to the infringement upon any such right owned by any other
company which may arise as a result of the use of technical information de-scribed in this book.
(3) The products described in this book are intended to be used for general applications (such as office
equipment, communications equipment, measuring instruments and household appliances), or for specific
applications as expressly stated in this book.
It is to be understood that our company shall not be held responsible for any damage caused as a result of the
following special applications:
Special applications (such as for automotive, airplanes, aerospace, transport equipment, traffic signaling
equipment, combustion equipment, medical equipment and safety devices) in which exceptional quality and
reliability are required, or if the failure or malfunction of the products may directly jeopardize life or harm the
human body.
It is to be understood that our company shall not be held responsible for any damage incurred as a result of or
in connection with your using the products described in this book for any special application, unless our
company agrees to your using the products in this book for any special application.
(4) When designing your equipment, comply with the range of absolute maximum rating and the guaranteed
operating conditions (operating power supply voltage and operating environment etc.). Especially, please be
careful not to exceed the range of absolute maximum rating on the transient state, such as power-on, power-off
and mode-switching. Other-wise, we will not be liable for any defect which may arise later in your equipment.
Even when the products are used within the guaranteed values, take into the consideration of incidence of break
down and failure mode, possible to occur to semiconductor products. Measures on the systems such as
redundant design, arresting the spread of fire or preventing glitch are recommended in order to prevent physical
injury, fire, social damages, for example, by using the products.
(5) Comply with the instructions for use in order to prevent breakdown and characteristics change due to
external factors (ESD, EOS, thermal stress and mechanical stress) at the time of handling, mounting or at
customer's process. We do not guarantee quality for disassembled products or the product re-mounted after
removing from the mounting board. When using products for which damp-proof packing is required, satisfy the
conditions, such as shelf life and the elapsed time since first opening the packages.
(6) When reselling products described in this book to other companies without our permission and receiving
any claim of request from the resale destination, please understand that customers will bear the burden.
(7) This book may be not reprinted or reproduced whether wholly or partially, without the prior written
permission of our company.
June 30.2023 Page 2 of 985 Rev 1.7
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
KM1M7AF00/02/50/52 Series
June 30.2023 Page 3 of 985 Rev 1.7
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
KM1M7AF00/02/50/52 Series
n
n
June 30.2023 Page 4 of 985 Rev 1.7
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
Table of Contents
1. Overview .............................................................................................. 19
1.1 Overview .................................................................................................................................20
1.2 Product Summary....................................................................................................................20
1.2.1 Function Summary ........................................................................................................21
1.3 Features ..................................................................................................................................23
1.4 Pins .........................................................................................................................................26
1.4.1 Pin Configuration...........................................................................................................26
1.4.2 Pin Functions ................................................................................................................28
1.5 Electrical Characteristics .........................................................................................................49
1.5.1 Absolute Maximum Ratings ..........................................................................................49
1.5.2 Operation Conditions ....................................................................................................50
1.5.3 DC Characteristics ........................................................................................................53
1.5.4 Analog Characteristics ..................................................................................................58
1.5.5 AC Characteristics ........................................................................................................64
1.5.6 Flash EEPROM Characteristics ....................................................................................64
1.6 Package Dimension ................................................................................................................65
1.7 Cautions for Circuit Setup .......................................................................................................67
1.7.1 Cautions of Usage.........................................................................................................67
1.7.2 Pin Connections ............................................................................................................68
1.7.3 Unused pins ..................................................................................................................71
1.7.4 Cautions of Power Supply.............................................................................................72
1.7.5 Example of Oscillator Connection .................................................................................75
2. Safety Function.................................................................................... 77
2.1 Overview .................................................................................................................................78
2.1.1 Flash Memory Data Protection Function.......................................................................78
2.1.2 Flash-ECC Function......................................................................................................78
2.1.3 RAM-ECC function........................................................................................................79
2.1.4 MPU Function ...............................................................................................................79
2.1.5 Register Protection Function.........................................................................................79
2.1.6 WDT Function ...............................................................................................................80
2.1.7 Clock Monitoring Function.............................................................................................80
2.1.8 CRC Caluculation Function...........................................................................................80
2.1.9 A/D Fault Diagnosis Function........................................................................................81
2.1.10 Power Supply Voltage Detection Function ..................................................................81
2.1.11 Reset Factor Identifying Function................................................................................81
2.1.12 IO-level Monitoring Function .......................................................................................81
3. System Settings ................................................................................. 83
3.1 Reset .......................................................................................................................................84
3.1.1 Overview .......................................................................................................................84
3.1.2 Reset Controller Control Register .................................................................................84
3.1.3 Reset Definition.............................................................................................................84
KM1M7AF00/02/50/52 Series
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
June 30.2023 Page 5 of 985 Rev 1.7
3.1.4 Identifying Reset Factor ................................................................................................86
3.1.5 Start-Up Sequence after Reset .....................................................................................87
3.2 Flash Option ............................................................................................................................90
3.2.1 Overview of Flash Option..............................................................................................90
3.2.2 Detail of Flash Option....................................................................................................92
3.3 Software Start-UP ...................................................................................................................99
3.3.1 Overview of Software Start-Up......................................................................................99
3.3.2 Examples of Settings ....................................................................................................99
3.4 Clock Generator ....................................................................................................................100
3.4.1 Overview of Clock Generator ......................................................................................100
3.4.2 Clock Generator Control Register ...............................................................................102
3.4.3 Specification of Clock Generator.................................................................................102
3.4.4 Setting Example of Clock Generator...........................................................................107
4. CPU..................................................................................................... 109
4.1 Overview ...............................................................................................................................110
4.1.1 Cortex-M7 Processor and Core Peripheral Structure ................................................ 111
4.1.2 The list of Cortex-M7 Processor and Core Peripheral Interrupts ................................ 112
4.1.3 Block Diagram of Cortex-M7 Processor and Core Peripheral Blocks .........................112
4.2 Cortex-M7 Processor and Core Peripheral Control Register ...............................................113
4.3 Cortex-M7 Processor and Core Peripheral Controls.............................................................113
4.3.1 Enabling writing to the register on the Private Peripheral Bus ....................................113
5. Memory Map .......................................................................................115
5.1 Overview ...............................................................................................................................116
5.2 Memory map .........................................................................................................................117
5.3 Flash Memory Area ...............................................................................................................119
5.3.1 Access Wait Setting to Flash area .............................................................................. 119
5.3.2 Flash-ECC Functions ..................................................................................................119
5.4 ITCM......................................................................................................................................123
5.4.1 ITCM Access Wait Setting...........................................................................................123
5.4.2 RAM-ECC Function (ITCM) ........................................................................................124
5.5 DTCM (D0TCM/D1TCM).......................................................................................................130
5.5.1 DTCM Access Wait Setting .........................................................................................130
5.5.2 RAM-ECC Function (D0TCM/D1TCM) .......................................................................131
5.6 Peripheral Area .....................................................................................................................136
5.6.1 Register Map...............................................................................................................136
6. Low Power Mode ............................................................................... 145
6.1 Overview of Low Power Mode...............................................................................................146
6.1.1 Operation Modes.........................................................................................................146
6.1.2 Operation Mode Transition Diagram ...........................................................................147
6.2 Low Power Mode Control Register........................................................................................148
6.3 Detail of Low Power Mode ....................................................................................................149
KM1M7AF00/02/50/52 Series
June 30.2023 Page 6 of 985 Rev 1.7
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
6.3.1 Specification of Operation Mode .................................................................................149
6.3.2 Operating State of Functional Block............................................................................150
6.3.3 Entering and Exiting DEEPSLEEP Mode....................................................................151
6.3.4 Entering and Exiting SLEEP Mode .............................................................................153
6.3.5 Setting Example of Transition of Operation Mode.......................................................155
7. Interrupt Controller............................................................................ 157
7.1 Overview of the Interrupt Controller ......................................................................................158
7.2 Features of the Interrupt Controller .......................................................................................158
7.3 Block Diagram of the Interrupt Controller ..............................................................................158
7.4 The List of the Interrupt Factors ............................................................................................159
7.5 Control Registers of the Interrupt Controller..........................................................................169
7.6 Group Interrupt Function .......................................................................................................170
7.6.1 Overview .....................................................................................................................170
7.6.2 Function Descriptions..................................................................................................171
7.6.3 Example of Interrupt Settings......................................................................................172
7.7 Pin Protection Factor Detection Function..............................................................................177
8. DMA Controller .................................................................................. 179
8.1 Overview ...............................................................................................................................180
8.1.1 Functions of DMA controller........................................................................................180
8.1.2 Interrupt group list of DMA controller ..........................................................................181
8.1.3 DMA transfer factor list................................................................................................184
8.1.4 Block diagram of DMA controller.................................................................................188
8.2 Control Registers of DMA controller......................................................................................189
8.3 DMA controller operation.......................................................................................................195
8.3.1 DMA transfer target.....................................................................................................195
8.3.2 DMA transfer operation ...............................................................................................196
8.3.3 Addressing mode ........................................................................................................202
8.3.4 Priority level.................................................................................................................202
8.3.5 DMA transfer operation in DEEPSLEEP.....................................................................202
8.4 Setting example of DMA transfer ..........................................................................................203
9. I/O Port................................................................................................ 205
9.1 Overview of I/O Ports ............................................................................................................206
9.1.1 The List of I/O Ports ....................................................................................................209
9.1.2 The Default States of the I/O Ports .............................................................................213
9.1.3 The Circuit Diagram of the I/O Ports ...........................................................................217
9.2 I/O Port Control Registers .....................................................................................................218
10. Noise Filter....................................................................................... 223
10.1 Overview of Noise Filter ......................................................................................................224
10.1.1 List of Noise Filter Function.......................................................................................224
10.1.2 Noise Filter Block Diagram........................................................................................224
KM1M7AF00/02/50/52 Series
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
June 30.2023 Page 7 of 985 Rev 1.7
10.2 Control Registers of Noise Filter .........................................................................................226
10.3 Function of Noise Filter .......................................................................................................227
10.3.1 Specification of Noise Filter.......................................................................................227
10.3.2 Setting Example of Noise Filter.................................................................................228
11. 16-bit Timer ...................................................................................... 231
11.1 Overview of 16-bit Timer......................................................................................................232
11.1.1 List of 16-bit Timer.....................................................................................................232
11.1.2 List of 16-bit Timer Clock Sources.............................................................................233
11.1.3 List of 16-bit Timer Interrupt Groups..........................................................................234
11.1.4 List of 16-bit Timer Ports ...........................................................................................237
11.1.5 16-bit Timer Block Structure ......................................................................................243
11.2 16-bit Timer Control Register...............................................................................................246
11.3 Interval Timer.......................................................................................................................267
11.3.1 Function of Interval Timer..........................................................................................267
11.3.2 Timing of Interval Timer Operation ............................................................................268
11.3.3 Example of Interval Timer Settings............................................................................270
11.4 Timer Output........................................................................................................................272
11.4.1 Function of Timer Output...........................................................................................272
11.4.2 Timing of Timer Output Operation .............................................................................273
11.4.3 Example of Timer Output Settings.............................................................................274
11.5 PWM Output ........................................................................................................................276
11.5.1 Function of PWM Output ...........................................................................................276
11.5.2 Timing of PWM Output Operation .............................................................................277
11.5.3 Example of PWM Output Settings.............................................................................278
11.6 Event Count.........................................................................................................................280
11.6.1 Function of Event Count............................................................................................280
11.6.2 Timing of Event Count Operation ..............................................................................281
11.6.3 Example of Event Count Settings..............................................................................283
11.7 Phase Difference Pulse Count ............................................................................................285
11.7.1 Function of Phase Difference Pulse Count................................................................285
11.7.2 Timing of Phase Difference Pulse Count Operat.......................................................286
11.7.3 Example of Phase Difference Pulse Count Settings .................................................288
11.8 Up/Down Pulse Count .........................................................................................................290
11.8.1 Function of Up/Down Pulse Count ............................................................................290
11.8.2 Timing of Up/Down Pulse Count Operation...............................................................291
11.8.3 Example of Up/Down Pulse Count Settings ..............................................................292
11.9 Input Capture.......................................................................................................................294
11.9.1 Function of Input Capture..........................................................................................294
11.9.2 Timing of Input Capture Operation ............................................................................295
11.9.3 Example of Input Capture Operation Settings...........................................................296
11.10 1-Shot Output ....................................................................................................................298
11.10.1 Function of 1-Shot Output .......................................................................................298
11.10.2 Timing of 1-Shot Output Operation..........................................................................299
11.10.3 Example of 1-Shot Output Operation ......................................................................300
KM1M7AF00/02/50/52 Series
June 30.2023 Page 8 of 985 Rev 1.7
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
11.11 External Trigger .................................................................................................................302
11.11.1 Function of External Trigger ....................................................................................302
11.11.2 Timing of External Trigger Operation.......................................................................303
11.11.3 Example of External Trigger Settings ......................................................................304
11.12 Output Protection...............................................................................................................306
11.12.1 Function of Output Protection..................................................................................306
11.12.2 Timing of Output Protection Operation ....................................................................308
11.12.3 Example of Output Protection Settings ...................................................................310
11.13 Timer Interrupt Output Control...........................................................................................312
11.13.1 Function of Timer Interrupt Output Control..............................................................312
11.13.2 Timing of Timer Interrupt Output Control Operation ................................................313
11.13.3 Example of Timer Interrupt Output Control..............................................................314
11.14 A/D Converter Start ...........................................................................................................316
11.14.1 Function of A/D Converter Start ..............................................................................316
11.14.2 Timing of A/D Conversion Start Operation ..............................................................317
11.14.3 Example of A/D Converter Setting ..........................................................................318
11.15 Cascade Connection .........................................................................................................320
11.15.1 List of Cascade Connection Timer Functions..........................................................321
11.15.2 Function of Cascade Connection Timer ..................................................................323
11.15.3 Timing of Cascade Connection Timer Operation.....................................................325
11.15.4 Timing of Cascade Connection Interval Timer Operation........................................326
11.15.5 Example of Cascade Connection Timer Setting......................................................327
11.16 Phase Complementary PWM Output ................................................................................329
11.16.1 Function of Phase Complementary PWM Output ...................................................329
11.16.2 Timing of Phase Complementary PWM Output Operation......................................330
11.16.3 Example of Phase Complementary PWM Output Setting .......................................331
11.17 Dead Time .........................................................................................................................333
11.17.1 Function of Dead Time ............................................................................................333
11.17.2 Timing of Dead Time Operation...............................................................................334
11.17.3 Function of Dead Time Width Automatic Control ....................................................335
11.17.4 Timing of Dead Time Width Automatic Control Operation.......................................335
11.17.5 Example of Dead Time Setting................................................................................337
11.18 Output Shift........................................................................................................................340
11.18.1 Function of Output Shift...........................................................................................340
11.18.2 Timing of Output Shift Operation .............................................................................341
11.18.3 Example of Output Shift Setting ..............................................................................342
11.19 Duty Cut.............................................................................................................................344
11.19.1 Function of Duty Cut................................................................................................344
11.19.2 Timing of Duty Cut Operation ..................................................................................345
11.19.3 Example of Duty Cut Setting ...................................................................................346
11.20 Period cut ..........................................................................................................................348
11.20.1 Function of Period Cut.............................................................................................348
11.20.2 Timing of Period Cut Operation ...............................................................................349
11.20.3 Example of Period Cut Setting ................................................................................351
11.21 Leading Edge Blanking......................................................................................................353
KM1M7AF00/02/50/52 Series
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
June 30.2023 Page 9 of 985 Rev 1.7
11.21.1 Function of Leading Edge Blanking.........................................................................353
11.21.2 Timing of Leading Edge Blanking Operation ...........................................................354
11.21.3 Example of Leading Edge Blanking Setting ............................................................355
11.22 Task Overflow Detection....................................................................................................357
11.22.1 Function of Task Overflow Detection.......................................................................357
11.22.2 Timing of Task Overflow Detection Operation .........................................................358
11.22.3 Example of Task Overflow Detection Setting ..........................................................359
12. Power Control PWM ........................................................................ 361
12.1 Overview of Power Control PWM........................................................................................362
12.1.1 List of Power Control PWM Functions ......................................................................363
12.1.2 List of Power Control PWM Clock Sources...............................................................364
12.1.3 List of Power Control PWM Interrupt Groups............................................................364
12.1.4 List of Power Control PWM Ports..............................................................................365
12.1.5 Power Control PWM Block Diagram .........................................................................367
12.2 Control Registers for the Power Control PWM....................................................................368
12.3 Basic Operation of the Power Control PWM .......................................................................380
12.3.1 Waveform Mode ........................................................................................................380
12.3.2 GPWM Cycle Setting ................................................................................................382
12.3.3 GPWM Output Start and Stop...................................................................................382
12.3.4 Output Waveform Polarity .........................................................................................384
12.3.5 Double Buffer ............................................................................................................385
12.3.6 Double Buffer Load Timing........................................................................................387
12.4 Dead Time Setting Function ................................................................................................389
12.4.1 Details of the Dead Time Setting Function................................................................389
12.4.2 Dead Time Period Auto Control Function..................................................................391
12.5 "H"/"L" Level Output Function .............................................................................................392
12.5.1 Setting "H"/"L" Level Output Function .......................................................................392
12.5.2 Inserting Dead Time when Outputting "H"/"L" Levels................................................394
12.6 Output Shift Function...........................................................................................................395
12.6.1 Details of Output Shift Function ................................................................................395
12.7 Interrupt Output Control Function........................................................................................396
12.7.1 Details of Interrupt Output Control Function..............................................................396
12.8 Output Protection Function..................................................................................................398
12.8.1 Details of the Output Protection Function .................................................................398
12.9 Synchronous A/D Conversion Start Function......................................................................400
12.9.1 Details of Synchronous A/D Conversion Start Function............................................400
12.10 Count State Output Function.............................................................................................402
12.10.1 Details of Count State Output Function...................................................................402
12.11 Pin Output Order Selection................................................................................................403
12.11.1 Details of Pin Output Order Selection .....................................................................403
12.12 High-Resolution Output Function ......................................................................................404
12.12.1 High-Resolution Duty Function ...............................................................................404
12.12.2 High-Resolution Output Shift Function....................................................................406
KM1M7AF00/02/50/52 Series
June 30.2023 Page 10 of 985 Rev 1.7
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
12.12.3 High-Resolution Cycle Function..............................................................................407
12.13 Duty Cut Function..............................................................................................................408
12.13.1 Details of Duty Cut Function ...................................................................................408
12.13.2 The Operation Timing of Duty Cut Function............................................................409
12.14 Period Cut Function...........................................................................................................410
12.14.1 Details of Period Cut Function ................................................................................410
12.14.2 The Operation Timing of Period Cut Function......................................................... 411
13. Serial Interface 0.............................................................................. 413
13.1 Overview of Serial Interface ................................................................................................414
13.1.1 List of Serial Interface Functions...............................................................................415
13.1.2 List of Serial Interface Clocks....................................................................................416
13.1.3 List of Serial Interface Interrupt Groups ....................................................................417
13.1.4 List of Serial Interface Ports ......................................................................................417
13.1.5 Serial Interface Block Diagram..................................................................................418
13.2 Serial Interface Control Registers .......................................................................................419
13.3 Clock Specification ..............................................................................................................420
13.3.1 Clock Source.............................................................................................................421
13.3.2 Transfer Clock ...........................................................................................................423
13.4 Clock-Synchronous Serial Interface ....................................................................................424
13.4.1 Communication Function of Clock-Synchronous ......................................................424
13.4.2 Clock-Synchronous Communication Timing .............................................................436
13.4.3 Clock-Synchronous Setup Example..........................................................................441
13.5 IIC Communication .............................................................................................................447
13.5.1 Communication Function of IIC.................................................................................447
13.5.2 IIC Communication Timing ........................................................................................457
13.5.3 IIC Communication Setup Example ..........................................................................460
14. Serial Interface 1,2,5,6..................................................................... 465
14.1 Overview of Serial Interface ................................................................................................466
14.1.1 List of Serial Interface Functions...............................................................................467
14.1.2 List of Serial Interface Clocks....................................................................................469
14.1.3 List of Serial Interface Interrupt Groups ....................................................................470
14.1.4 List of Serial Interface Ports ......................................................................................471
14.1.5 Serial Interface Block Diagram..................................................................................472
14.2 Serial Interface Control Registers .......................................................................................473
14.3 Clock Specification ..............................................................................................................475
14.3.1 Clock Source.............................................................................................................476
14.3.2 Transfer Clock ...........................................................................................................478
14.4 Clock-Synchronous Serial Interface ....................................................................................479
14.4.1 Communication Function of Clock-Synchronous ......................................................479
14.4.2 Clock-Synchronous Communication Timing .............................................................492
14.4.3 Clock-Synchronous Setup Example..........................................................................497
14.5 UART Serial Interface .........................................................................................................504
14.5.1 Communication Function of UART............................................................................504
KM1M7AF00/02/50/52 Series
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
June 30.2023 Page 11 of 985 Rev 1.7
14.5.2 UART Communication Timing...................................................................................513
14.5.3 UART Setup Example ...............................................................................................515
15. Serial Interface 3,4........................................................................... 519
15.1 Overview of Serial Interface ................................................................................................520
15.1.1 List of Serial Interface Functions...............................................................................521
15.1.2 List of Serial Interface Clocks....................................................................................522
15.1.3 List of Serial Interface Interrupt Groups ....................................................................523
15.1.4 List of Serial Interface Ports ......................................................................................524
15.1.5 Serial Interface Block Diagram..................................................................................525
15.2 Serial Interface Control Registers .......................................................................................526
15.3 Clock Specification ..............................................................................................................527
15.3.1 Clock Source.............................................................................................................528
15.3.2 Transfer Clock ...........................................................................................................530
15.4 Clock-Synchronous Serial Interface ....................................................................................531
15.4.1 Communication Function of Clock-Synchronous ......................................................531
15.4.2 Clock-Synchronous Communication Timing .............................................................546
15.4.3 Clock-Synchronous Setup Example..........................................................................551
15.5 UART Serial Interface .........................................................................................................558
15.5.1 Communication Function of UART............................................................................558
15.5.2 UART Communication Timing...................................................................................566
15.5.3 UART Setup Example ...............................................................................................568
16. Serial Interface 7.............................................................................. 573
16.1 Overview of Serial Interface 7 .............................................................................................574
16.1.1 List of Serial Interface 7 Functions............................................................................574
16.1.2 List of Serial Interface 7 Interrupt Groups .................................................................576
16.1.3 List of Serial Interface 7 Ports ...................................................................................576
16.2 Serial Interface 7 Control Registers ....................................................................................577
16.3 Clock Specification ..............................................................................................................580
16.3.1 Clock Source.............................................................................................................582
16.3.2 Transfer Clock of Clock-Synchronous Communication.............................................583
16.3.3 Transfer Clock of UART ............................................................................................584
16.3.4 Transfer Clock of IIC .................................................................................................584
16.4 Clock-Synchronous Communication ...................................................................................587
16.4.1 Communication Function of Clock-Synchronous ......................................................587
16.4.2 Communication Timing of Clock-Synchronous ........................................................601
16.4.3 Example of Clock-Synchronous Communication Setting..........................................606
16.5 UART Communication.........................................................................................................613
16.5.1 Communication Functions of UART..........................................................................613
16.5.2 Communication Timing of UART ..............................................................................620
16.5.3 Example of UART Communication Setting ..............................................................622
16.6 IIC Communication..............................................................................................................627
16.6.1 Communication Function of IIC.................................................................................627
16.6.2 IIC Communication Flowchart ...................................................................................639
KM1M7AF00/02/50/52 Series
June 30.2023 Page 12 of 985 Rev 1.7
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
16.6.3 Example of IIC Communication Setting ...................................................................650
16.6.4 Access Timing of IIC .................................................................................................677
17. SMBus Interface .............................................................................. 679
17.1 Overview of SMBus Interface..............................................................................................680
17.1.1 List of SMBus Interface Functions ............................................................................680
17.1.2 List of SMBus Interface Clocks .................................................................................681
17.1.3 List of SMBus Interface Interrupt Groups..................................................................681
17.1.4 List of SMBus Interface Ports....................................................................................681
17.1.5 SMBus Interface Block Diagram ...............................................................................682
17.2 SMBus Interface Control Registers .....................................................................................683
17.3 Clock Specification ..............................................................................................................684
17.4 SMBus Communication.......................................................................................................685
17.4.1 Communication Function of SMBus..........................................................................685
17.4.2 Setting Example of SMBus (At Slave Communication).............................................693
17.4.3 Setting Example of SMBus (At Master Communication)...........................................701
18. LIN Controller................................................................................... 707
18.1 Overview of LIN Controller ..................................................................................................708
18.1.1 List of LIN Controller Functions.................................................................................708
18.1.2 List of LIN Controller Interrupt Groups ......................................................................709
18.1.3 List of LIN Controller Ports ........................................................................................709
18.1.4 LIN Controller Block Diagram....................................................................................710
18.2 Control Registers of LIN Controller .....................................................................................711
18.3 Details of LIN Controller ......................................................................................................712
18.3.1 Function of LIN Communication................................................................................712
18.3.2 Operation Timing of LIN Communication ..................................................................715
18.3.3 Setting example of LIN communication ....................................................................718
19. CAN FD Controller........................................................................... 723
19.1 Overview of CAN FD Controller ..........................................................................................724
19.1.1 List of CAN FD Controller Function...........................................................................724
19.1.2 List of CAN Controller Interrupt Groups ....................................................................725
19.1.3 List of CAN controller Ports.......................................................................................725
19.1.4 CAN FD controller Block Diagram.............................................................................726
19.2 Control Registers of CAN FD Controller..............................................................................727
19.3 Memory Map .......................................................................................................................731
19.4 Functions of CAN FD Controller..........................................................................................732
19.4.1 Message Transmission and Reception Function ......................................................732
19.4.2 Operation Mode ........................................................................................................733
19.4.3 Timestamp.................................................................................................................742
19.4.4 Timeout Counter........................................................................................................743
19.4.5 Rx Handling...............................................................................................................744
19.4.6 Tx Handling ...............................................................................................................753
19.4.7 FIFO Acknowledge Handling ....................................................................................757
KM1M7AF00/02/50/52 Series
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
June 30.2023 Page 13 of 985 Rev 1.7
19.4.8 Bit Timing ..................................................................................................................758
19.4.9 Watchdog Timer ........................................................................................................759
19.4.10 Error Counter ..........................................................................................................759
19.4.11 Bus-Off ....................................................................................................................759
19.5 Setting Example of CAN FD Controller Function ................................................................760
19.5.1 Initial Setting of CAN FD Controller...........................................................................760
19.5.2 Initial Setting of Message RAM .................................................................................762
19.5.3 Setting of Bit Timing ..................................................................................................762
19.5.4 Setting of Interrupt.....................................................................................................763
19.5.5 Setting of Message RAM ..........................................................................................763
19.5.6 Setting of Message Transmission .............................................................................765
19.5.7 Setting of Tx Buffer Element .....................................................................................768
19.5.8 Setting of Message Reception ..................................................................................771
19.5.9 Setting of External Timestamp ..................................................................................772
19.6 Message RAM.....................................................................................................................773
19.6.1 Standard Message ID (11-bit) Filter Element ............................................................775
19.6.2 Extended Message ID (29-bit) Filter Element ...........................................................777
19.6.3 Rx Buffer and FIFO Element.....................................................................................779
19.6.4 Tx Event FIFO Element.............................................................................................782
19.6.5 Tx Buffer Element .....................................................................................................784
19.7 ECC Function of Message RAM .........................................................................................787
19.7.1 Specification of ECC Function ..................................................................................787
20. A/D Converter .................................................................................. 789
20.1 Overview of A/D Converter..................................................................................................790
20.1.1 List of A/D Converter Functions ................................................................................790
20.1.2 List of A/D Conversion Clocks...................................................................................791
20.1.3 List of A/D Converter Interrupt Groups......................................................................791
20.1.4 List of A/D Converter Ports .......................................................................................792
20.1.5 A/D Converter Block Diagram ...................................................................................794
20.2 A/D Converter Control Registers.........................................................................................795
20.3 A/D Converter Functions .....................................................................................................802
20.3.1 A/D Conversion Operation ........................................................................................802
20.3.2 A/D Conversion Time ................................................................................................804
20.3.3 A/D Conversion Mode ...............................................................................................807
20.3.4 Conversion Start Trigger Reduction Function ...........................................................809
20.3.5 A/D Conversion Error Detection Function .................................................................810
20.3.6 A/D Conversion State Output Function ..................................................................... 811
20.3.7 A/D Fault Check Function .........................................................................................812
20.4 Examples of the A/D Converter Settings.............................................................................813
20.4.1 Example of the One-time Conversion Mode settings................................................813
20.4.2 Example of the Continuous Conversion Mode settings ............................................815
20.4.3 Example of Multi A/D Converter Concurrent Conversion settings. ...........................817
20.5 Notes on Using the A/D Converter ......................................................................................820
20.5.1 Anti-noise Measures .................................................................................................820
20.5.2 Recommended Circuit for Using the A/D Converter .................................................820
KM1M7AF00/02/50/52 Series
June 30.2023 Page 14 of 985 Rev 1.7
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
21. D/A Converter .................................................................................. 823
21.1 Overview of D/A Converter..................................................................................................824
21.1.1 List of D/A Converter Functions ................................................................................824
21.1.2 D/A Converter Block Diagram ...................................................................................825
21.2 Control Registers of D/A Converter.....................................................................................826
21.3 D/A Converter Functions .....................................................................................................829
21.3.1 Operation of D/A Conversion ....................................................................................829
21.3.2 Function of Slope Compensation ..............................................................................830
21.4 Setting Example of Slope Compensation............................................................................831
22. Comparator ...................................................................................... 833
22.1 Overview of Comparator .....................................................................................................834
22.1.1 List of Comparator Functions ....................................................................................834
22.1.2 List of Comparator Interrupt Groups .........................................................................836
22.1.3 List of Comparator Ports ...........................................................................................836
22.1.4 Comparator Block Diagram.......................................................................................838
22.2 Control Registers of Comparator.........................................................................................839
22.3 Details of Comparator .........................................................................................................840
22.3.1 Specification of Comparator......................................................................................840
22.3.2 Setting Example of Comparator ................................................................................845
23. VGA (Variable Gain Amplifier) ........................................................ 847
23.1 Overview of VGA.................................................................................................................848
23.1.1 List of VGA Functions ...............................................................................................848
23.1.2 List of VGA Ports.......................................................................................................848
23.1.3 List of VGA Output ....................................................................................................849
23.1.4 VGA Block Diagram ..................................................................................................850
23.2 VGA Control Registers ........................................................................................................851
23.3 Details of VGA.....................................................................................................................852
23.3.1 Specification of VGA .................................................................................................852
23.3.2 Setting Example of VGA ...........................................................................................853
23.3.3 Cautions of VGA .......................................................................................................854
24. Multi Feedback Assist..................................................................... 855
24.1 Overview of Multi Feedback Assist Functions.....................................................................856
24.1.1 The List of Multi Feedback Assist Functions.............................................................856
24.1.2 The Block Diagrams of Multi Feedback Assist Functions .........................................857
24.2 Control Registers for Multi Feedback Assist Functions.......................................................859
24.3 Synchronous Start Control Function ...................................................................................864
24.3.1 The Specifications of Synchronous Start Control Function.......................................864
24.3.2 The Operation Timing of Synchronous Start Control Function..................................865
24.3.3 A Setting Example of Synchronous Start Control Function.......................................866
24.4 Conflict Detection/Auto Avoidance Functions .....................................................................867
24.4.1 The Specifications of Conflict Detection/Auto Avoidance Functions.........................867
KM1M7AF00/02/50/52 Series
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
June 30.2023 Page 15 of 985 Rev 1.7
24.4.2 The Operation Timing of Conflict Detection/Auto Avoidance Functions....................870
24.4.3 A Setting Example of Conflict Detection/Auto Avoidance Functions.........................871
24.5 Blanking Function................................................................................................................873
24.5.1 The Specifications of the Blanking Function .............................................................873
24.5.2 The Operation Timing of Blanking Function ..............................................................873
24.5.3 A Setting Example of Blanking Function ...................................................................875
25. Power Supply Voltage Detection.................................................... 877
25.1 Overview of Power Supply Voltage Detection .....................................................................878
25.2 Power Supply Voltage Detection Control Register ..............................................................879
25.3 Detail of Power Supply Voltage Detection...........................................................................880
25.3.1 Specification of Power Supply Voltage Detection .....................................................880
25.3.2 Setting Examples of Power Supply Voltage Detection..............................................882
26. Watchdog Timer............................................................................... 885
26.1 Overview of Watchdog Timer ..............................................................................................886
26.1.1 List of Watchdog Timer Functions.............................................................................886
26.1.2 List of Watchdog Timer Interrupt Group ....................................................................886
26.1.3 Watchdog Timer Block Diagram................................................................................887
26.2 Watchdog Timer Control Registers .....................................................................................888
26.3 Detail of Watchdog Timer ....................................................................................................889
26.3.1 Specification of Watchdog Timer Overflow Detect Function .....................................889
26.3.2 Setting Example of Watchdog Timer Overflow Detect Function ...............................895
27. CRC Calculation Circuit.................................................................. 897
27.1 Overview of CRC Caluculation Function .............................................................................898
27.1.1 List of CRC Caluculation Function ............................................................................898
27.1.2 Block Diagram of CRC Caluculation Function ..........................................................899
27.2 Control Registers of CRC Caluculation Function ................................................................902
27.3 Setting Example of CRC Caluculation Function..................................................................903
28. Clock Monitoring Circuit................................................................. 905
28.1 Overview of Clock Monitoring Function...............................................................................906
28.1.1 Outline Specification of Clock Monitoring Function...................................................906
28.1.2 Outline of Clock Monitoring Interrupt Group..............................................................907
28.1.3 Clock Monitoring Circuit Block Diagram....................................................................907
28.2 Clock Monitoring Control Register.......................................................................................908
28.3 Detail of Clock Monitoring Function.....................................................................................909
28.3.1 Specification of Clock Monitoring Function ...............................................................909
28.3.2 Setting Example of Clock Monitoring Function .........................................................912
29. Internal Flash Memory .................................................................... 919
29.1 Overview of Internal Flash Memory.....................................................................................920
29.1.1 Outline Specification of Internal Flash Memory.........................................................920
KM1M7AF00/02/50/52 Series
June 30.2023 Page 16 of 985 Rev 1.7
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
29.1.2 Flash Memory Rewriting Method ..............................................................................921
29.1.3 Flash Memory Area...................................................................................................922
29.1.4 Data Protection Function...........................................................................................924
29.1.5 Sector Swap Function ...............................................................................................925
29.2 Flash Memory Control Registers.........................................................................................926
29.3 Rewriting Function...............................................................................................................928
29.3.1 Execution Method for rewriting..................................................................................928
29.3.2 Procedures for Rewriting...........................................................................................929
29.3.3 Details of Rewriting Commands................................................................................930
30. Debug Interface ............................................................................... 933
30.1 Overview of Debug Interface...............................................................................................934
30.1.1 Port List of Debug Interface ......................................................................................934
30.2 Control Register of Debug Interface ...................................................................................935
30.3 Setting of Trace Clock .........................................................................................................935
30.4 Pin Connection of Serial Programmer / On-board Debugger..............................................936
KM1M7AF00/02/50/52 Series
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
June 30.2023 Page 17 of 985 Rev 1.7
KM1M7AF00/02/50/52 Series
June 30.2023 Page 18 of 985 Rev 1.7
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
1. Overview
KM1M7AF00/02/50/52 Series
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
June 30.2023 Page 19 of 985 Rev 1.7
1.1 Overview
The KM1M7 function is a 32-bit micro controller with internal Flash memory. It is intended for develop-
ment of the C programming language with object-oriented program and is easy to use. It has fast
feedback processing required for control of power supply and motor.
This LSI adopts the Arm Cortex-M7 to the 32-bit micro controller part and are equipped with internal
memory(Flash and RAM) to instruction / data, DMA controller, clock generator, bus controller, interrupt
controller, standard peripheral circuits (timer and serial interface and so on), PWM control circuit
specialized for power supply and motor control, and high accuracy / high speed analog circuit.
As system safety design, this LSI has the various safety mechanisms (Memory-ECC, clock error
detection, power supply voltage detection, window watchdog timer, etc.).
1.2 Product Summary
The LSI shown in Table Table 1.2-1 is described in this manual.
Table 1.2-1 Product Summary
LSI series LSI product num-
ber Pins
ROM [KB] RAM [KB]
CAN VGA Package
Instruc-
tion Data Instruc-
tion Data
KM1M7AF0
series
KM1M7AF00N
144
512
64 64
64
- Ο
144 pins HQFP
20 mm x 20 mm
KM1M7AF00M 384 48
KM1M7AF00K 256 32
KM1M7AF02N
100
512 64
100pins HQFP
14 mm x 14 mm
KM1M7AF02M 384 48
KM1M7AF02K 256 32
KM1M7AF5
series
KM1M7AF50N
144
512
64 64
64
Ο Ο
144 pins HQFP
20 mm x 20 mm
KM1M7AF50M 384 48
KM1M7AF50K 256 32
KM1M7AF52N
100
512 64
100 pins HQFP
14 mm x 14 mm
KM1M7AF52M 384 48
KM1M7AF52K 256 32
Hint:
In this manual, the product names are classified as follows.
KM1M7AFxyz (x = 0, 5 y = 0, 2 z = N, M, K)
KM1M7AF00/02/50/52 Series
June 30.2023 Page 20 of 985 Rev 1.7
KM1M7AF00/02/50/52 Series Technical Reference Manual Vol. 1
/