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
  • Now somehow Systick function is working. I don't know what was different in the first.

    In my source code, arm_math.h is included and ARM_MATH_CM4 is defined in complier preprecessor setup.

    Is that the point of the your comment - just including arm_math.h and armcm4.h will resolve the issue?

    "arm_math.h" included has the following codes.

    The function of the code below, what I expect is, to disable Systick if arm_math.h is included.

    #ifndef _ARM_MATH_H
    #define _ARM_MATH_H

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

    #if defined (ARM_MATH_CM4)
    #include "core_cm4.h"

    ...
    #else
    #include "ARMCM4.h"
    #warning "Define either ARM_MATH_CM4 OR ARM_MATH_CM3...By Default building on ARM_MATH_CM4....."
    #endif    /* I (Hyeong Han) think this is the end of block end starting with  #ifdef_ARM_MATH_H, which means

                     the definition code enabling Systick functions is not entered if arm_math.h is included in the source code.

    #undef  __CMSIS_GENERIC         /* enable NVIC and Systick functions */
    #include "string.h"
    #include "math.h"
    #ifdef __cplusplus
    extern "C"
    {
    #endif

    Thank you Martin for your support.

    Best regards,

    Hyeong Han

Reply
  • Now somehow Systick function is working. I don't know what was different in the first.

    In my source code, arm_math.h is included and ARM_MATH_CM4 is defined in complier preprecessor setup.

    Is that the point of the your comment - just including arm_math.h and armcm4.h will resolve the issue?

    "arm_math.h" included has the following codes.

    The function of the code below, what I expect is, to disable Systick if arm_math.h is included.

    #ifndef _ARM_MATH_H
    #define _ARM_MATH_H

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

    #if defined (ARM_MATH_CM4)
    #include "core_cm4.h"

    ...
    #else
    #include "ARMCM4.h"
    #warning "Define either ARM_MATH_CM4 OR ARM_MATH_CM3...By Default building on ARM_MATH_CM4....."
    #endif    /* I (Hyeong Han) think this is the end of block end starting with  #ifdef_ARM_MATH_H, which means

                     the definition code enabling Systick functions is not entered if arm_math.h is included in the source code.

    #undef  __CMSIS_GENERIC         /* enable NVIC and Systick functions */
    #include "string.h"
    #include "math.h"
    #ifdef __cplusplus
    extern "C"
    {
    #endif

    Thank you Martin for your support.

    Best regards,

    Hyeong Han

Children
No data