When I execute the following line
sprintf(answ, "Fdb = %f\n\r", mVoltagePid.Fdb);
The program execution jumps directly to:
interrupt void ILLEGAL_ISR(void) // Illegal operation TRAP
FYI, mVoltagePid is of type PIDREG3 (so Fdb member is of type float) and I am running on eZdsp TMS320F28335 (a floating point DSP).
If I replace the %f with %d, the sprintf does not do an illegal operation but the value displayed is incorrect?
I tried casting the float to a int32 and using %d but the value is always 0 (even if the float value is more than 1).
Anybody has seen this particular behavior?
I absolutely have to send the PID current status to the serial port for tuning.
Thank.