Hello, I wanted to first ask if you have already referenced our HRPWM software examples in C2000Ware? ([C2000Ware]\driverlib\f2837xd\examples\cpu1\hrpwm) these would be helpful for you to refer to if you haven't already. We have examples that specifically implement high-resolution duty control (CMPAHR/CMPBHR). If you want to change the duty, you can just use CMPAHR/CMPBHR to control this where CMPAHR applies HR to channel A and CMPBHR applies HR to channel B (this note can be confusing sometimes since CMPA and CMPB are not specific to channel A and B in the same way). If you want to control the frequency, you would use TBPRDHR. Please note that you have to enable HR control by setting the HRPE bit in either of these cases. Is there a particular reason you do not want to use SFO library and autoconversion? The SFO library calibrates the HR delay elements based upon ambient conditions and normalizes it to your EPWM clock period (e.g. when the 8-bit CMPAHR is maxed out to equal 255, this is equivalent to 1 EPWM clock cycle). Using autoconversion is recommended and helps by performing background calculations for you - otherwise, you will need to do the calculations yourself in software. Best Regards, Allison
↧