Other Parts Discussed in Thread: TMS320F28027
Hello everybody,
i'm trying to get SFO() function working but without an success. The code is running on C2000 LaunchPad XL with TMS320F28027.
My code is as simple as this:
---
main () {
while (1){
int status, x;
status = SFO_INCOMPLETE;
while (status==SFO_INCOMPLETE) {
status = SFO();
}
if(status!=SFO_ERROR) { // IF SFO() is complete with no errors
EALLOW;
EPwm1Regs.HRMSTEP=MEP_ScaleFactor;
EDIS;
}
}
}
---
The problem is in that SFO() function don't return anything else than 0 and 2 so it can't update HRMSTEPS. I have tried both version of LIB file, standard and "b" version, the same issue. Other header files are included correctly, compilation pass without an problem.
I put some break-points in code and observe all relevant vars from this code. Most of time, looping is done in first "while" statement then exit that loop and skip next "if" branch, because return status was "2".
Also tried similar code in other program, same problem.
What can be an problem here? Maybe some clock configuration (tried 50MHz and 60MHz)?
Thank You in advance.