Other Parts Discussed in Thread: C2000WARE
Hi,
I am referring to the example at Location; C:\ti\c2000\C2000Ware_4_02_00_00\device_support\f2806x\examples\c28\hrcap_capture_hrpwm; Example_2806xHRCap_Capture_HRPwm.c
EPWM is having 400 as a Period with SYSCLK as 60 MHz, meaning ePWM will generate a signal with a period of 6.67 Microseconds.
When I check the expression 'pulsewidthhigh' value in CCS for the same example I get the value as '17582918' which is in Q16 format, and I convert the same to uint16 and get the value as 4292. which is in the number of HCCAPCLK cycles and I convert it to seconds ( HCCAPCLK Frequency is 120 MHz in the example ), I get the High Pulse Width value as 35.76 Microseconds.
Since the duty cycle is 50 in the example , meaning Period according to CCS should be 71.52 Micro seconds which is different from the period value generated by ePWM (6.67 Micro seconds )
Am I doing the wrong calculation?