Part Number: TMS320F28379D
Other Parts Discussed in Thread: LAUNCHXL-F28379D, C2000WARE
Tool/software: Code Composer Studio
Godd morning.
I'm adding HRPWM capabilities to "pfc3phvienna_nonpowerSUITE_F2837x" project running it on LAUNCHXL-F28379D.
I'm quite in trouble wirth the SFO library initialization.
I added a debug counter to check SFO enties on init loop (see below).
sfo_status = SFO_INCOMPLETE;
// Calling SFO() updates the HRMSTEP register with calibrated MEP_ScaleFactor.
// HRMSTEP must be populated with a scale factor value prior to enabling
// high resolution period control.
while(sfo_status == SFO_INCOMPLETE) // Call until complete
{
debug_cnt++;
sfo_status = SFO();
if (sfo_status == SFO_ERROR)
{
error(); // SFO function returns 2 if an error occurs & # of MEP
} // steps/coarse step exceeds maximum of 255.
}
Running it in "hrpwm_deadband_sfo_cpu01" project, SFO() is runned 3143 times, MEP_ScaleFactor and HRMSTEP are set to 0x003E. (reasonable 62 steps)
Running it in "pfc3phvienna_nonpowerSUITE_F2837x" project, SFO() is runned 6 times, MEP_ScaleFactor is set to 0x8000 and HRMSTEP is set to 0x0000 (not so reasonable).
I add SFO() init loop immediately after "setupDevice();" line in main.
Project is in FLASH configuration with SFO added to "ramfuncs".
I suppose there is something wrong in my initialization but I can't fix it.
I hope that someone can help.
Best regards,
Giovanni