app_timer.h bug?

Hello,

I encountered a compilation issue when using the app_timer function. The error message is: "'TickType_t' undeclared (first use in this function)". I believe the problem is related to some incorrect configuration in FreeRTOS, specifically with the  #define configTICK_RATE_HZ ((TickType_t)1000), but I'm unsure how to modify it.

I would appreciate it if you could assist in analyzing the issue.

Thank you in advance for your help!

Best regards,

Parents Reply
  • Thanks,

    I think my project is correct, there is no app_timer.c in it, only app_timer_freertos.c, the error here is mainly because APP_TIMER_TICKS (MS) is used, if I use a tick value is correct, but I now need to convert ms to tick.

    #ifndef FREERTOS
    #define APP_TIMER_TICKS(MS) \
    ((uint32_t)ROUNDED_DIV( \
    (MS) * (uint64_t)APP_TIMER_CLOCK_FREQ, \
    1000 * (APP_TIMER_CONFIG_RTC_FREQUENCY + 1)))
    #else
    #include "FreeRTOSConfig.h"
    #define APP_TIMER_TICKS(MS) (uint32_t)ROUNDED_DIV((MS)*configTICK_RATE_HZ,1000)
    #endif

    the macro definition FREERTOS is defined.

Children
No Data
Related