BAT32G137 User's Guide |Documentation Usage Instructions
www.mcu.com.cn 8 / 1052 V2.1.1
10.3 Register for controlling timer M............................................................................................................................ 278
10.3.1 Peripheral Enable Register 1 (PER1)................................................................................................................ 279
10.3.2 timer M EVENTC register (TMELC)................................................................................................................... 280
10.3.3 Timer M Start Register (TMSTR)....................................................................................................................... 281
10.3.4 timer M mode register (TMMR).......................................................................................................................... 282
10.3.5 Timer M PWM Function Selection Register (TMPMR) ...................................................................................... 283
10.3.6 Timer M Functional Control Register (TMFCR)................................................................................................. 284
10.3.7 Timer M outputs master permissive register 1 (TMOER1) ................................................................................ 285
10.3.8 Timer M outputs Master Permissive Register 2 (TMOER2)............................................................................... 286
10.3.9 Timer M Output Control Register (TMOCR) ...................................................................................................... 287
10.3.10 timer m digital filter function selection register i (TMDFi) (i=0,1)........................................................................ 290
10.3.11 Timer M control register i (TMCRi) (i=0,1)......................................................................................................... 292
10.3.12 Timer MI/O control register Ai(TMIORAi) (i=0,1) ............................................................................................... 297
10.3.13 Timer MI/O control register Ci(TMIORCi) (i=0,1)............................................................................................... 299
10.3.14 Timer M Status Register 0 (TMSR0) ................................................................................................................. 301
10.3.15 Timer M Status Register 1 (TMSR1) ................................................................................................................. 306
10.3.16 timer m interrupt enable register i (TMIERi) (i=0,1) ........................................................................................... 312
10.3.17 timer MPWM function output level control register i (TMPOCRi) (i=0,1)............................................................ 313
10.3.18 timer M counter i (TMi) (i=0,1)........................................................................................................................... 314
10.3.19 timer m general register ai, bi, ci, di................................................................................................................... 316
10.3.20 Port Mode Register (PMxx, PMCxx).................................................................................................................. 325
10.4 Common Issues on Multiple Models.................................................................................................................... 326
10.4.1 count source...................................................................................................................................................... 326
10.4.2 buffer operation ................................................................................................................................................. 327
10.4.3 synchronous operation ...................................................................................................................................... 330
10.4.4 Forced Cutoff of Pulse Output........................................................................................................................... 331
10.4.5 Events entered from the Event Coordination Controller(EVENTC).................................................................... 333
10.4.6 Events output to the event Coordination Controller(EVENTC)/data transfer controller (DMA) .......................... 334
10.5 Operation of timer M............................................................................................................................................ 335
10.5.1 Input capture function........................................................................................................................................ 335
10.5.2 output comparison function ............................................................................................................................... 340
10.5.3 PWM function.................................................................................................................................................... 345
10.5.4 Reset synchronous PWM mode........................................................................................................................ 350
10.5.5 complementary PWM mode .............................................................................................................................. 353
10.5.6 PWM3 mode...................................................................................................................................................... 358
10.6 Timer M interrupt ................................................................................................................................................. 360
10.7 Precautions when using timer M.......................................................................................................................... 363
10.7.1 Read and write access to SFR.......................................................................................................................... 363
10.7.2 mode switching.................................................................................................................................................. 363
10.7.3 count source...................................................................................................................................................... 364
10.7.4 Input capture function........................................................................................................................................ 364
10.7.5 Set-up steps for TMIOAi, TMIOBi, TMIOCi, TMIODi pins (i=0,1)....................................................................... 364
10.7.6 external clock TMCLK ....................................................................................................................................... 365
10.7.7 complementary PWM mode .............................................................................................................................. 365