Other Parts Discussed in Thread: C2000WARE
Hi,
I'm testing our HRPWM example code in C2000WARE.
For the code below, I did minor modification.
C:\ti\c2000\C2000Ware_3_02_00_00\device_support\f2803x\examples\c28\hrpwm
And I find that for DutyFine varying from 0-255, the actual duty cycle of PWM1A is 50% to 70%.
In this example code, PWM1 period=10, PWM1 CMPA=5.
1. My question is: we don't know MEP_ScaleFactor value, what will happen if CMPAHR=DutyFine>MEP_ScaleFactor?
Then we test the next example code below:
C:\ti\c2000\C2000Ware_3_02_00_00\device_support\f2803x\examples\c28\hrpwm_duty_sfo_v6
PRD=10, CMPA=5, MEP_ScaleFactor=128.
When
CMPAHR=0X0100, we get 50% duty cycle.
CMPAHR=0X8000, we get 55% duty cycle.
CMPAHR=0XFF00, we get 60% duty cycle.
2. So it seems that MEP_ScaleFactor is 255(0xFF) instead of 128, what's wrong here?