Figure 18.30 Procedure For Selecting The Reset-Synchronized Pwm Mode - Renesas HD6417641 Hardware Manual

32-bit risc microcomputer superh risc engine family / sh7641 series
Table of Contents

Advertisement

Procedure for Selecting the Reset-Synchronized PWM Mode: Figure 18.30 shows an example
of procedure for selecting the reset synchronized PWM mode.
Reset-synchronized
PWM mode
Stop counting
Select counter clock and
counter clear source
Brushless DC motor
control setting
Set TCNT
Set TGR
PWM cycle output enabling,
PWM output level setting
Set reset-synchronized
PWM mode
Enable waveform output
Start count operation
Reset-synchronized PWM mode

Figure 18.30 Procedure for Selecting the Reset-Synchronized PWM Mode

Section 18 Multi-Function Timer Pulse Unit (MTU)
1
Clear the CST3 and CST4 bits in the TSTR to 0 to halt the
counting of TCNT. The reset-synchronized PWM mode must be
set up while TCNT_3 and TCNT_4 are halted.
Set bits TPSC2 to TPSC0 and CKEG1 and CKEG0 in the TCR_3
2
1
to select the counter clock and clock edge for channel 3. Set
bits CCLR2 to CCLR0 in the TCR_3 to select TGRA compare-
match as a counter clear source.
2
When performing brushless DC motor control, set bit BDC in the
3
timer gate control register (TGCR) and set the feedback signal
input source and output chopping or gate signal direct output.
4
Reset TCNT_3 and TCNT_4 to H'0000.
3
TGRA_3 is the period register. Set the waveform period value
5
in TGRA_3. Set the transition timing of the PWM output
waveforms in TGRB_3, TGRA_4, and TGRB_4. Set times
within the compare-match range of TCNT_3.
4
X ≤ TGRA_3 (X: set value).
Select enabling/disabling of toggle output synchronized with the
6
5
PMW cycle using bit PSYE in the timer output control register
(TOCR), and set the PWM output level with bits OLSP and
OLSN.
6
Set bits MD3 to MD0 in TMDR_3 to B'1000 to select the reset-
7
synchronized PWM mode. TIOC3A, TIOC3B, TIOC3D, TIOC4A,
TIOC4B, TIOC4C and TIOC4D function as PWM output pins.
Do not set to TMDR_4.
7
Set the enabling/disabling of the PWM waveform output pin in
8
TOER.
Set the CST3 bit in the TSTR to 1 to start the count operation.
9
8
9
Notes: *
The output waveform starts toggle operation at the point
of TCNT_3 = TGRA_3 = X by setting X = TGRA,
i.e., cycle = duty.
Rev. 4.00 Sep. 14, 2005 Page 589 of 982
REJ09B0023-0400

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sh7641

Table of Contents