Hello,
I have tried to use _IQ16sinPU function from the C28x IQmath Library
for the sine wave generation on TMS320F2808. I used following code:
static unsigned short frequency = 32767; static unsigned short delta_phase = 0; static long int accumulator = 0; static long int u_a = 0; // 273 ~ 2*pi*50/12000*1/(2*pi)*65536 // frequency is for setting the desired output frequency, 50 Hz ~ 32767 delta_phase = ((((unsigned long)frequency)*273) >> 15); accumulator += delta_phase; accumulator &= 0xFFFF; u_a = _IQ16sinPU(accumulator);
My problem is that the output of _IQ16sinPU function is in interval <-65536, +65536> according to following graph.
Based on the documentation http://www.ti.com/lit/sw/sprc990/sprc990.pdf (page 10) I expected that the values should be in interval
<-32768, +32768>. Please can anybody tell me what could be wrong? There is graph's configuration menu below. Thanks in advance.

