Chapter 10Motor Control PWMX - 22 Operation■ Double BufferEach of the PWM registers is double-buffered to allow data changes during PWM operation. Registers read fromand written to by the microcontroller are independent of registers referenced by the PWM. This makes it possiblefor microcontroller’s register values to be loaded into PWM’s registers in synchronization with PWM period. ThePWM mode register (PWMMDn) is single-buffered as it is a basic register that controls PWM operation mode.However, double buffer and single buffer are selectable with all other PWM control registers. Therefore, the con-figuration that best suits the application can be selected. Check the PWM control register list for buffer configura-tion. Double buffer load timing can be set by overflow and underflow of PWM period.The PWMMDn registercan be used to enable or disable either of these timings. Data in all double buffers for control registers is loadedinto a PWM at the same timing. However, this timing can be specified separately for each PWM. If the PWMnbinary counter is stopped with counting operation disabled, the double buffer values are directly loaded intoPWM registers.Table:10.3.4 Buffer Configuration Available with PWM Control RegistersRegister Double-buffered Single-buffered RemarksPWMMDn - OOUTMDn O O Switching by the SDSLAn flag in the PWMMDnregisterPWMSELn O O Switching by the SDSLBn flag in the PWMMDnregisterPWMSETn O -TCMPnA O -TCMPnB O -TCMPnC O -DTMSETn O -PWMDCNTn O -PWMOFF - O