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

SDK8.1 and SDK 9.0 app_gpiote and nrf_drv_gpiote conflict

In SDK8.1 and SDK9.0 we have new driver nrf_drv_gpiote which has GPIOTE interrfupt handler in conflict with app_gpiote library. How to fix this

Parents
  • I have tried to merge the conflicted GPIOTE_IRQHandler and tested few use cases, they seems to work. Make sure that you do not use same pin in both app_gpiote library and nrf_drv_gpiote driver.

    1. delete the GPIOTE_IRQHandler in app_gpiote.c file
    2. replace the below code with GPIOTE_IRQHandler handler in nrf_drv_gpiote.c file
    3. in app_gpiote.c file remote static keyword for m_enabled_users_mask, m_user_array_size,m_user_count, mp_users, sense_level_toggle and sense_level_disable

    SDK_8.1

    merge_gpiote_handler .c

    SDK_9.0

    sdk_9.0.merge_gpiote_handler.c

    Diff for fix in SDK 9.0 from @pkarc: www.diffchecker.com/nub7badx

    Once again, make sure that there are no pin conflicts between library and driver and this should work just fine.

    NOTE: Tested only on Keil

  • Hi, I merged merge_gpiote_handler.c into nrf_drv_gpiote.c. But A linker error happened: Undefined symbol pin_from_port_port_get. Please let me know how I can fix it. Also, after putting the function as a null function, I downloaded axf file to PC10028. The program had NO_CHANNELS from channel_port_alloc() function in nrf_drv_gpiote.c (I did #define GPIOTE_ENABLED 1). I would appreciate having your advice. Thanks.

Reply
  • Hi, I merged merge_gpiote_handler.c into nrf_drv_gpiote.c. But A linker error happened: Undefined symbol pin_from_port_port_get. Please let me know how I can fix it. Also, after putting the function as a null function, I downloaded axf file to PC10028. The program had NO_CHANNELS from channel_port_alloc() function in nrf_drv_gpiote.c (I did #define GPIOTE_ENABLED 1). I would appreciate having your advice. Thanks.

Children
No Data
Related