This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

INIT_GPIOTE

I have a nRF51DK with SD 8.0 flashed.

I would like to start and stop a pwm signal with the buttons on the board(BUTTON_1 and BUTTON_2). The pwm is working fine. But when I add the part with the 2 buttons I get errors.

The problem is the gpiote_init file:

static void gpiote_init(void)
{
    APP_GPIOTE_INIT(APP_GPIOTE_MAX_USERS);
}

Error:Undefined symbol APP_GPIOTE_INIT (referred from main.o).

When I add app_gpiote file to the Libraries, I will get a new error.

Error: Symbol GPIOTE_IRQHandler multiply defined (by app_gpiote.o and nrf_drv_gpiote_1.o).

So if I want to use the Buttons, do I have do add app_gpiote or nrf_drv_gpiote to the librarie?

main.c

image description

"app_gpiote.h" is also included.

Motorsteurung.zip

Parents
  • This is declared in app_gpiote.h file and I see that you have included in main.c file

    #define APP_GPIOTE_INIT(MAX_USERS)                                                                 \
        do                                                                                             \
        {                                                                                              \
            static uint32_t app_gpiote_buf[CEIL_DIV(APP_GPIOTE_BUF_SIZE(MAX_USERS), sizeof(uint32_t))];\
            uint32_t ERR_CODE = app_gpiote_init((MAX_USERS), app_gpiote_buf);                          \
            APP_ERROR_CHECK(ERR_CODE);                                                                 \
        } while (0)
    

    Are you using packs? is it something with the version of library you are using? can you open app_gpiote.h and see if this declaration exists? by the way, which SDK are you using? 8.1 or 9.0?

Reply
  • This is declared in app_gpiote.h file and I see that you have included in main.c file

    #define APP_GPIOTE_INIT(MAX_USERS)                                                                 \
        do                                                                                             \
        {                                                                                              \
            static uint32_t app_gpiote_buf[CEIL_DIV(APP_GPIOTE_BUF_SIZE(MAX_USERS), sizeof(uint32_t))];\
            uint32_t ERR_CODE = app_gpiote_init((MAX_USERS), app_gpiote_buf);                          \
            APP_ERROR_CHECK(ERR_CODE);                                                                 \
        } while (0)
    

    Are you using packs? is it something with the version of library you are using? can you open app_gpiote.h and see if this declaration exists? by the way, which SDK are you using? 8.1 or 9.0?

Children
No Data
Related