Q & a, 1 how do i set (rewrite) a cycle and a duty, 2 how do i enable or disable ppg operations – FUJITSU MB91460 SERIES FR60 User Manual
Page 829: 4 how do i get it restarted

813
Chapter 39 Programmable Pulse Generator
7.Q & A
7. Q & A
7.1 How do I set (rewrite) a cycle and a duty?
Period and duty value settings
• Set each cycle value in PPG Period Setting Register PCSR.
• Set each duty value in PPG Duty Setting Register PDUT.
• The PPG Period Setting and the PPG Duty Setting registers each have a buffer to allow the user to ignore
the write timing.
• Equation
PCSR register value = {Cycle/Count clock} –1
PDUT register value = {“H” width (duty)
*
/Count clock} –1
*: Normal polarity (OSEL= 0)
• Allowed range
PCSR register value = PCSR register value - FFFFh (65535)
PDUT register value = 0 - PCSR register value
Note: Be sure to set a cycle following the setting of a cycle. (See “
7.2 How do I enable or disable PPG operations?
Enabling the PPG operation
Use the PPG operation enable bit (PCN.CNTE).
Enable PPG operation before starting the PPG.
(See “
”.)
7.3 How do I set the PPG operation mode (PWM operation/one-shot operation)?
Operation mode selection
Use the mode selection bit (PCN.MDSE).
(See “
”.)
7.4 How do I get it restarted?
Enable restart.
A restart of a PPG can be enabled while the PPG is in operation.
Use the Enable Restart bit (PCN.RTRG) to set.
(See “
”.)
Control
PPG Operation Enable Bit (CNTE)
To stop a PPG operation
Set “0”.
To enable a PPG operation
Set “1”.
Operation Mode
Mode Selection Bit (MDSE)
To implement a PWM operation
Set “0”.
To implement a one-shot operation
Set “1”.