Figure 9-16: Basic Operation Flow For Reload (Batch Rewrite) - NEC V850E/PH2 User Manual

32-bit single-chip microcontroller
Table of Contents

Advertisement

(2)
Reload method (Batch Rewrite)
When the TPnCCR0 and TPnCCR1 registers are written during timer operation via the CCRm
buffer register, the write data is used as the 16-bit counter comparison value. The TPnCCR0
register and the TPnCCR1 register can be rewritten when TPnCE = 1.
In order for the setting value when the TPnCCR0 register and the TPnCCR1 register are rewritten
to become the 16-bit counter comparison value (in other words, in order for this value to be
reloaded to the CCRm buffer register), it is necessary to rewrite TPnCCR0 and then write to the
TPnCCR1 register before the 16-bit counter value and the TPnCCR0 register value match.
Thereafter, the values of the TPnCCR0 and the TPnCCR1 register are reloaded upon TPnCCR0
register match.
Whether to enable or disable the next reload timing is controlled by writing to the TPnCCR1
register. Thus even when wishing only to rewrite the value of the TPnCCR0 register, also write the
same value to the TPnCCR1 register.

Figure 9-16: Basic Operation Flow for Reload (Batch Rewrite)

Caution:
Writing to the TPnCCR1 register includes enabling of reload. Thus, rewrite the
TPnCCR1 register after rewriting the TPnCCR0 register.
Remarks: 1. The above flowchart illustrates an example of the operation in the PWM mode.
2. n = 0 to 8
m = 0, 1
Chapter 9 16-Bit Timer/Event Counter P
START
Initial settings
Timer operation enable (TPnCE = 1)
Transfer of TPnCCRm values to
CCRm buffer register
TPnCCR0 rewrite
TPnCCR1 rewrite
Match between TPnCCR0 and
16-bit counter
16-bit counter clear & start
Reload of TPnCCRm values to
CCRm buffer register
User's Manual U16580EE3V1UD00
Reload enable
INTTPnCC0 output
277

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mupd70f3187

Table of Contents