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.

MSP432 Launchpad - CMSIS DSP Library - FFT Example - Debug Problem

Hello,


I have a debug problem on arm_fft_bin_example in CMSIS DSP Library examples folder with my MSP432 Launchpad. I compiled and run the arm_matrix_example in CMSIS DSP Library examples correctly and I did not have any problem.


When I debug the project, the code can not be embedded on MSP432. In the example, an array with 32 bit 2048 floats used as external variable. The variable is defined in a different source code. I can not embed the code in that way.  When I erase the source file in which the array is and define a new variable with zeros that has the same name, the code can be embedded. However, if I filled the array with 2048 elements different from zeros, the code could not be embedded. 


I use CCS 6.1.0, CCS compiler 5.2.2 and CMSIS Release 4.3.


I tried the same code, same settings, same compiler, same CMSIS wity TIVA Connected Launchpad, there was no problem. I thought that there might be FLASH memory problem. But TIVA launchpad and MSP423 launchpad has same flash size and memory size.


What is the problem? I couldn not handle the embedding on MSP432.

  • Hello Okan,

    I am going to need some more information before investigating your issue. Where did you get this specific example from, a TIVA library perhaps? By not being able to embed the code do you mean that CCS will not compile it? Does CCS provide an error message as to why it will not compile, and if so can you provide a screen shot of the error?

    Thanks,
    Ryan
  • Hello Ryan,

    First I dowloaded CMSIS from official ARM CMSIS link.

    Then in the compressed file, I found the example by following the the path below,

    CMSIS-<version>/CMSIS/DSP_Lib/Examples.

    These are the standart examples by CMSIS.

    I compile it by reading 'spma041f' pdf file and it works for 'arm_matrix_example'. But 'arm_fft_bin_example' does not work. I followed the steps for running examples in 'spma041f'. I know the pdf file is for TM4C MCUs. But the settings for MSP432 and Tiva MCUs are same.

    When I try to run 'arm_fft_bin_example', I am following the steps below,

    1- Creating CCS Project,

    2-Setting project properties according to steps in 'spma041f' pdf file.

    3-Copying the source files in  'arm_fft_bin_example' to my project folder.

    4-Debug it.

    It can not be embedded. I do not have an error message. The CCS does not pop out any error message. When I debug the project, there is a weird ‘Reset is occured on target’ messages in the debug window. If you see the red windowed parts, you can see the 'A reset occured on target' thing. There is no error message. I thought that it could be flash problem but I think it is not. Because code runs on Tiva Conencted Launchpad that has the same SRAM and FLASH size perfectly.

    if I changed the code below in the example

    extern float32_t testInput_f32_10khz[TEST_LENGTH_SAMPLES];

    So, if I changed it like

    float32_t testInput_f32_10khz2[TEST_LENGTH_SAMPLES] =  {0};


    the code works. So, I think there is no memory problem. The problem is different. But I do not figure out the problem.

    Thank you

  • Hi Okan,

    I think the device is getting reset because the watchdog timer (WDT) is not stopped by the example code. You need to include the <msp.h> header and add the line:

       WDTCTL = WDTPW | WDTHOLD;           // Stop watchdog timer

    However, I think the large array containing the fft input data takes a long time to initialize, and the WDT will reset the device before it reaches main(). Therefore, you will need to modify msp432_startup_ccs.c and hold the WDT inside the resetISR instead of in main():

    #include <msp.h>
    
    ...
    
    void resetISR(void)
    
    {
    
       WDTCTL = WDTPW | WDTHOLD;           // Stop watchdog timer
    
    ...
    }

    Regards,
    Eric C.

  • Hello Eric,

    That's totally correct. I modified msp432_startup_ccs.c. It works now. Thank you.

**Attention** This is a public forum