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.

MCU-PLUS-SDK-AM273X: HWA2.0 for FFT and other Signal Processing

Part Number: MCU-PLUS-SDK-AM273X

Tool/software:

Hello support team,

We would like to use AM273x's HWA2.0 to do Windows, FFT, and Magnitude calculations without DMA.

Is there any sample project we can follow?

Or could you give us some detailed instruction how we can start?  

Thank you very much for your help and support.

Looking forward to hearing from you.

Best regards,

Lin

  • Hi Lin,

    There are two examples for HWA in AM273x MCU+ SDK 09.02.00.60:

    C:\ti\mcu_plus_sdk_am273x_09_02_00_60\examples\drivers\hwa\hwa_real_fft

    C:\ti\mcu_plus_sdk_am273x_09_02_00_60\examples\drivers\hwa\hwa_bfp_compression

    Please refer to the URL for details: AM273x MCU+ SDK: HWA

    Best regards,

    Ming 

  • Hi Ming,

    Thank you so much for your quick response and helpful sample projects and HWA link.

    I will import the sample project you suggested and learn more about HWA from your URL link.

    FYI, at first I searched and found the sample code at: C:\ti\mcu_plus_sdk_am273x_09_02_00_60\examples\sdl\hwa\hwa_main. When I got into the code, I noticed it's with the DMA. I even couldn't find the README file in the project. 

    What's the difference between the sample projects between the one under ...\examples\sdl\hwa and one under ...\examples\sdl\hwa?

    Best regards,

    Lin

  • Hi Lin,

    SDL is the Safety Diagnostic Library, therefore the example in SDL is more a unit test for the HWA SDL. C:\ti\mcu_plus_sdk_am273x_09_02_00_60\examples\drivers\hwa, on the other hand, are the examples for the HWA driver. They are well documented as the other MCU+ SDK examples.

    Best regards,

    Ming

  • Hi Ming,

    Thanks for your answer and information.

    Best regards,

    Lin

  • Hi Ming,

    After reading the URL link of the HWA and checking the readme of the sample projects, I found that hwa_real_fft is most close to our purpose.

    At this stage we don't want to use the EDMA function. And as you know we have already configure the AD7389-4 via SPI signal. Now we can get 4 channels of raw data from the AD7389-4 and buffered data as convertedData[SAMPLES][CHANNELS] (1024 X 4).

    Could you give us your suggestion how we can integrate the convertedData[ ][ ] array into the sample hwa_real_fft project without EDMA? It's a kind of combination of sample mibspi_loopback project and hwa_real_fft project.

    Appreciate your help and support.

    Best regards,

    Lin

  • Hi Ming,

    I may make a unreasonable request to disable the EDMA in the sample project in my last message. It seems there are lots of code related to EDMA. 

    If it's hard to do that I will keep use the EDMA and replace the input data sine_wave_peak_17_bin and audio_1031Hz_and_5156Hz with my own data.

    Any advice or instruction is appreciated.

    Best regards,

    Lin

  • Hi Ming,

    May I ask a quick question. What's the sampling rate of the sample data sine_wave_peak_17_bin and audio_1031Hz_and_5156Hz in the hwa_real_fft project?

    Best regards,

    Lin

  • Could you give us your suggestion how we can integrate the convertedData[ ][ ] array into the sample hwa_real_fft project without EDMA? It's a kind of combination of sample mibspi_loopback project and hwa_real_fft project

    The convertedData is interleaved 4 channel ADC data. You will need to de-inerleave it into 4 i-D arraies: adcData1[SAMPLES], adcData2[SAMPLES], adcData3[SAMPLES], adcData4[SAMPLES], then call hwa_real_fft 4 times.

  • May I ask a quick question. What's the sampling rate of the sample data sine_wave_peak_17_bin and audio_1031Hz_and_5156Hz in the hwa_real_fft project?

    From the name of the data file, it seems to be the mix of 1031hz audio and 5156hz audio. You should be able to tell after it does the FFT. You can also draw the data using CCS graph feature. In fact, the sampling rate is not important here. The number of samples is important.

  • I may make a unreasonable request to disable the EDMA in the sample project in my last message. It seems there are lots of code related to EDMA. 

    If it's hard to do that I will keep use the EDMA and replace the input data sine_wave_peak_17_bin and audio_1031Hz_and_5156Hz with my own data.

    Please de-interleave the data first, then use the de-interleaved data for hwa_real_fft.

  • Hi Ming,

    Where / How can I get the CCS graph feature? That will be helpful for my test.

    Best regards,

    Lin

  • Hi Ming,

    Thanks for the link. I will study it.

    Best regards,

    Lin

  • Hi Ming,

    I can't find the Tools menu in the CCS. Any hint for it?

    Best regards,

    Lin

  • Hi Lin,

    You will need to be in the Debug perspective to be able to see the Tools menu.

    Best regards,

    Ming

  • Hi Ming,

    Thank you so much for your quick reply.

    Yes, I see the Tools menu in the Debug perspective. 

    However, I can't get the expected graph. I get the FFT magnitude array and open the Tools -> graph -> single time as shown below. The data is correct and you can see the mag[17] has the max value. The left side is my setting in the graph tool. 

    I got following graph.

    Could you help me to check if anything wrong in my setting or I miss something.

    Best regards,

    Lin

  • The Data Type should have been the float, not signed 32-bit integer.

  • Hi Ming,

    After changing that, I got it.

    Appreciate your help and support.

    Best regards,

    Lin

  • Hi Lin,

    Can you close this thread? Thanks!

    Best regards,

    Ming

  • Hi Ming,

    Sure, I can close this thread. I do have some questions about the sample project hwa_real_fft, but I can ask in a new thread.

    Thanks again for your help and time.

    Best regards,

    Lin