Reply by Nitin Madhukar Yewale March 25, 20032003-03-25
Hi,

I have configured one quad timer in variable frequency PWM mode
and would like to swap it's on/off time after some time.

Please find attached application 56F827 in which I am using two quad
timers to simulate required functionality. i.e Change the on/off time by
using COMPARE_AND_LOAD_REGISTER of quad timer.

BSP_DEVICE_NAME_QUAD_TIMER_A_1 timer is a free running timer.
BSP_DEVICE_NAME_QUAD_TIMER_A_2 timer is configured such that after
specified interval it will swap on and off time of
BSP_DEVICE_NAME_QUAD_TIMER_A_1

I have observed that in Callback of BSP_DEVICE_NAME_QUAD_TIMER_A_2
[CallbackOnCompare2] it will swap the on off time but when it loads Off
time into QT_LOAD_COMPARATOR_LOAD_REG2 register and on time
QT_LOAD_COMPARATOR_LOAD_REG1 the on/off time which I am getting on the
CRO are not the reversed. [Else part in the callback]

Could any one please tell me how to use COMPARE_AND_LOAD_REGISTER usage?
At that time shall I stop the timer?

According to the documentation in User manaul of 826/7 CMPLD1 and CMPLD2
are special registers provided in 827 so that we can load on/off time
for next cycle using them and after completeing the current cycle 827
will load CMP1 and CMP2 values from CMPLD1 and CMPLD2. [Page No 356 Last
sentence of 13.6.12]

Thanks and Regards,
Nitin


Attachment (not stored)
TestQuad_OnOff.zip
Type: application/x-zip-compressed