MS51
Dec. 17, 2019 Page 3 of 316 Rev 1.01
MS51 SERIES TECHNICAL REFERENCE MANUAL
6.2.16 External Interrupt Pins ................................................................................................. 169
6.3 Flash Memory Contorl .............................................................................................. 180
6.3.1 In-Application-Programming (IAP) ............................................................................. 180
6.3.2 In-Circuit-Programming (ICP) ..................................................................................... 190
6.3.3 ON-CHIP-DEBUGGER (OCD) ................................................................................... 190
6.3.4 96-Bit Unique Code ...................................................................................................... 192
6.4 General Purpose IO (GPIO) .................................................................................... 193
6.4.1 GPIO Mode ................................................................................................................... 193
6.4.2 Control Registers of GPIO .......................................................................................... 195
6.4.3 Read-Modify-Write Instructions .................................................................................. 198
6.4.4 Pin Interrupt ................................................................................................................... 199
6.5 Timer ............................................................................................................................ 205
6.5.1 Timer/Counter 0 And 1 ................................................................................................. 205
6.5.2 Timer2 And Input Capture ........................................................................................... 210
6.5.3 Timer3 ............................................................................................................................ 225
6.6 Watchdog Timer (WDT) ............................................................................................ 228
6.6.1 Time-Out Reset Timer .................................................................................................. 229
6.6.2 General Purpose Timer ............................................................................................... 229
6.7 Self Wake-Up Timer (WKT) ...................................................................................... 232
6.8 Serial Port (UART0 & UART1) ................................................................................ 235
6.8.1 Operating Mode ............................................................................................................ 235
6.8.2 Baud Rate ...................................................................................................................... 237
6.8.3 Framing Error Detection .............................................................................................. 240
6.8.4 Multiprocessor Communication .................................................................................. 241
6.8.5 Automatic Address Recognition ................................................................................. 241
6.8.6 Control Register of UART............................................................................................ 243
6.9 Serial Peripheral Interface (SPI) ............................................................................. 255
6.9.1 Operating Modes .......................................................................................................... 257
6.9.2 Clock Formats and Data Transfer .............................................................................. 257
6.9.3 Slave Select Pin Configuration ................................................................................... 260
6.9.4 Mode Fault Detection ................................................................................................... 260
6.9.5 Write Collision Error ..................................................................................................... 260
6.9.6 Overrun Error ................................................................................................................ 260
6.9.7 SPI Interrupt .................................................................................................................. 261
6.9.8 Control Register ............................................................................................................ 261
6.10 Inter-Integrated Circuit (I
2
C) ............................................................................... 265
6.10.1 Functional Description ................................................................................................. 265
6.10.2 Operation Modes .......................................................................................................... 269
6.10.3 Miscellaneous States ................................................................................................... 274
6.10.4 I
2
C Time-Out .................................................................................................................. 274