This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can I resolve the issue - including arm_math.h makes systick function unavailable?

I tried to use FFT functions in a project and included the header file required for CMSIS library, arm_math.h.

But I found one issue.

Including “arm_math.h” in a project disables systick function which is used as timer event implementing source for the project.

#define __CMSIS_GENERIC         /* disable NVIC and Systick functions */

If this is removed, any of CMSIS library functions becomes unavailable.

What is the reason of disabling Systick function?

Is there any work-around way on the issue?

Parents
  • Hello simplehhan,

    The CMSIS DSP library (arm_math.h) includes the CMSIS core files (e.g.: core_cm4.h) but uses only the core generic part of the CMSIS core file. The core dependant part, which contains also the SysTick defines is not used and therefore not included. This is achieved with setting the define __CMSIS_GENERIC.

    The CMSIS core file is also included in the device specific header file, which needs to be CMSIS compliant (as an example you can check file .\Keil\ARM\Device\ARM\ARMCM4\Include\ARMCM4.h)
    If you want to use the CMSIS DSP library together with the CMSIS SysTick definitions you need to include both arm_math.h and CMSIS compliant device header file.

    e.g.:

    #include "arm_math.h"

    #include "ARMCM4.h"

    Best Regards,
    Martin Guenther

Reply
  • Hello simplehhan,

    The CMSIS DSP library (arm_math.h) includes the CMSIS core files (e.g.: core_cm4.h) but uses only the core generic part of the CMSIS core file. The core dependant part, which contains also the SysTick defines is not used and therefore not included. This is achieved with setting the define __CMSIS_GENERIC.

    The CMSIS core file is also included in the device specific header file, which needs to be CMSIS compliant (as an example you can check file .\Keil\ARM\Device\ARM\ARMCM4\Include\ARMCM4.h)
    If you want to use the CMSIS DSP library together with the CMSIS SysTick definitions you need to include both arm_math.h and CMSIS compliant device header file.

    e.g.:

    #include "arm_math.h"

    #include "ARMCM4.h"

    Best Regards,
    Martin Guenther

Children