Please see the following code:
volatile _iq15 DEBUG;
volatile long DEBUG1;
DEBUG= _IQ15 (DEBUG1) ;
When DEBUG1 is changed in the debug window. The variable DEBUG doesn't change it is always 0.
See: IQMathlib.h
#define _IQ15(A) (long) ((A) * 32768.0L)
the Significant field of float is 23 bits. So any value greater then (23 - 15) will give an overflow in the conversion.
When I change it to:
#define _IQ15(A) (long) ((A) * 32768L)
It works fine.