Part Number: TMS320F28P650SK
Other Parts Discussed in Thread: TMS320F28374S
Hi, experts
I use TMS320F28P650SK, CCS 12.8.1 with compiler 22.6.1.
In my project, once the code runs in the controller ISR for PWM duty calculation, it is bound to fall in ILLEGAL_ISR. The code is like below:
typedef struct
{ float32 alpha;
float32 beta;
float32 Vdc;
float32 aaa;
float32 bbb;
void (*calc)();
}SVPWM;
typedef SVPWM *SVPWM_handle;
#define SVPWM_DEFAULTS{
0,
0,
0,
0,
0,
(void (*)(Uint32))svpwm_calc
}
void svpwm_calc(SVPWM_handle);
SVPWM svpwm_instance = SVPWM_DEFAULTS;
In the controller ISR, calculate PWM duty by function pointer call like below:
svpwm_instance.calc(&svpwm_instance);
The cpu will fall in ILLEGAL_ISR, and I don't know how to debug for this issue.
So I try not use the way of function pointer call, and implment svpwm_calc directly in the
controller ISR, the code runs totally right.
By the way, the code is ported from TMS320F28374s based project, and the pwm calculation
with function pointer call runs without problem in TMS320F28374s project.
Thanks for your support.