Part Number: AM3358
Other Parts Discussed in Thread: SYSCONFIG,
Hello,
I have been unable to write the TBPRD and CMPA registers for PWM1. The following statements are true:
The PBPRD register is fixed at 0x0 and cannot be written.
The TBCNT register is verified rd/wr and is also verified to count-up as configured when initialized with a non-zero value i.e. 0x1 for instance.
The TBCNT register will count-up to 0xFFFF then roll over to 0x0 and stop there.
Register CMPB is verified rd/wr.
The SHDWBFULL bit accurately reflects a write to CMPB.
Register CMPA is verified NOT writable.
The SHDWAFULL bit does not reflect a write to CMPA.
Below is a debug listing of the relevant running code, with the relevant register contents.
-> **** IMU_10DOF::fire TBCNT = f501h
-> **** IMU_10DOF::fire TBPRD = 0h
-> **** IMU_10DOF::fire TBCTL = d030h
-> **** IMU_10DOF::fire CMPCTL = 200h
-> **** IMU_10DOF::fire CM_PER_EPWMSS0_CLKCTRL 2
-> **** IMU_10DOF::fire CM_PER_EPWMSS1_CLKCTRL 2
-> **** IMU_10DOF::fire CM_PER_EPWMSS2_CLKCTRL 2
-> **** IMU_10DOF::fire PWMSS_IDVER 47400001h
-> **** IMU_10DOF::fire PWMSS_SYSCONFIG ch
-> **** IMU_10DOF::fire PWMSS_CLKCONFIG 111h
-> **** IMU_10DOF::fire PWMSS_CLKSTATUS 111h
-> **** IMU_10DOF::fire setting TBPRD reg to 7800h
-> **** IMU_10DOF::fire TBPRD = 0h
-> **** IMU_10DOF::fire setting TBCNT reg to 1h
-> **** IMU_10DOF::fire TBCNT = 3h
-> **** IMU_10DOF::fire spinning for 400 1GHz clocks
-> **** IMU_10DOF::fire TBCNT = 2b
-> **** IMU_10DOF::fire TBCTL = d030
-> **** IMU_10DOF::fire TBPRD = 0h
-> **** IMU_10DOF::epwm_wr_cmp writing CMPA (servo_data[7]) = 19bh
-> **** IMU_10DOF::epwm_wr_cmp writing CMPB (servo_data[9]) = 174h
-> **** IMU_10DOF::epwm_wr_cmp CMPA = 0h
-> **** IMU_10DOF::epwm_wr_cmp CMPB = 174h
-> **** IMU_10DOF::epwm_wr_cmp writing CMPA = 1234h
-> **** IMU_10DOF::epwm_wr_cmp CMPA = 0h
-> **** IMU_10DOF::fire CMPCTL = 200h
-> **** IMU_10DOF::fire verifying TBCNT is counting up
-> **** IMU_10DOF::fire TBCNT = e6
-> **** IMU_10DOF::fire TBCNT = ef
-> **** IMU_10DOF::fire TBCNT = f8
-> **** IMU_10DOF::fire TBCNT = 101
-> **** IMU_10DOF::fire TBCNT = 10a
-> **** IMU_10DOF::fire TBCNT = 114
-> **** IMU_10DOF::fire TBCNT = 11d
-> **** IMU_10DOF::fire TBCNT = 126
-> **** IMU_10DOF::fire TBCNT = 12f
-> **** IMU_10DOF::fire TBCNT = 138
-> **** IMU_10DOF::fire TBCNT = 141