This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F280039C: C2000 microcontrollers forum

Part Number: TMS320F280039C
Other Parts Discussed in Thread: C2000WARE

Hi,

I'm new to DSP domain.

I am looking forward a sample DSP program to run on TI C2000 F28003X board.

Thank you

  • Shalini,

    Please download C2000Ware, and look into C2000Ware_5_02_00_00\libraries\dsp. There are many examples and documents. You can import projects into CCS, build and run them.

  • Thank you

    will go through it.

  • Hi,

    I need to convert simple sine wave from time domain to frequency domain usinf FFT .

    so I download the simple folder from this libraries

    C:\ti\C2000Ware_5_01_00_00\libraries\dsp\FPU\c28\examples\fft\rfft_adc_f32

    but not able to see the output. and don't know how to plot the graphs.

    so please give some suggestions.

    Thank you 

  • Shalini,

    Please use rfft_f32 which has a fixed input test case and a golden output.

    Thanks,

    Sira

  • Hi,

    Thank you for your guidance.

    I downloaded the rfft_f32 and plot the graph for test_input , test_golden.

    Please find the attached screenshot.Is this the frequency domain representation of sine wave?

    Please help me out to understand.

    1. test_input

    2. test_golden

    Thank you

  • Please put a breakpoint in dsp_rfft.c at line 216 (after the magnitude computation) and then use Tools - Graph in CCS with the following properties.

    A 256-pt RFFT will have conjugate symmetry around N/2 which is why you can uniquely specify it just using the indices 0, 1, 2, ...N/2 i.e. N/2 + 1 complex values (128 + 1). So 129 magnitude values are plotted.

    test_golden is a large buffer containing the fft output (complex values), fft magnitude, fft phase.

  • Hi,

    I followed the steps what you suggested but not get actual output.

    getting infinite values in test_input buffer.

    Please find the attached screenshot.

    Thank you.

  • Are you using rfft_f32 from C2000Ware v5.02.00 (or 5.01.00) running on F280015x?

    Do you see Pass = 515 and Fail = 0 when you run the example?

  • Hi,

    I'm using rfft_f32 from C2000Ware v5.02.00 and running on F280039C.

    Pass = 515 and Fail = 0  what does this value means?

    I got different values and attached the same screenshot. 

    why the infinite values are stored in test_input buffer?

    do we need any external connections?

    Thank you

  • This example is built for F280015x, it cannot be expected to work for F28003x. The example is failing at your end (Pass = 2, Fail = 513). For it to Pass, Fail should be 0.

    Some detailed notes I made on this example:

    • Device – F280015x (C2000Ware 5.02.00), c28x_fpu_dsp_library_eabi.lib
    • 256-pt RFFT implemented using a 128-pt CFFT (CFFT_f32t followed by CFFT_f32_unpack)
    • N-pt RFFT uniquely specified by indices 0, 1, ..N/2 i.e. N/2 + 1 complex values, or N+2 real values (this is due to conjugate symmetry around N/2)
    • N-pt RFFT magnitude uniquely specified by indices 0, 1, …N/2 i.e. N/2 + 1 real magnitude values
    • N-pt RFFT phase uniquely specified by 1, 2, …N/2 i.e. N/2 real magnitude values (index 0 is DC)
    • Sum of the above is N+2 + N + 1= 2N + 3 = 515 (this is what is expected in the Pass count for the example)
    • However, test_golden[1024] i.e. 4N -> has more samples than above. (MATLAB generated data)
    • FFT values are present in test_golden[0,N+1] i.e. N+2 values; actual values are present in test_output
    • Magnitude values are present in test_golden[2N, 2N + N/2] i.e. N/2 + 1 values – actual values are present in test_input (this is because the output of the FFT calc. test_output becomes the input to the magnitude calc, and the input to the FFT calc. becomes the output of the magnitude calc.)
    • Phase values are present in test_golden[3N, 3N + N/2-1] i.e. N/2 values; actual values are in test_phase. However, it seems like the example starts with index 0 (DC phase of 0)
  • Hi,

    Thank you for the detailed explaination and it is very useful.

    currently I'm working on F280039C so is there any example code for F28003x?

     Please suggest me the steps to port the code  rfft_f32 from F280015x to F28003x.

    Thank you

  • Porting an example from one device to another is a different topic. I suggest we close this thread and you open another thread for that.

    Also, I will be out of office for 2 weeks beginning tomorrow.

  • Thank you for your guidance