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

gpio interrupt with ble

hi hi ;

i'm trying to control gpio pin 20 with my smart phone and with event at gpio pin 5 (when the state of the pin 5 changes the gpio pin 20 toggeles )
but my problem is when i add the function gpio_init() the ble stops working .

any help will be appreciated

i'm using nrf51822 s110 sdk 9 pca 20006

our_service.h

Parents
  • Hi,

    when i add the function gpio_init() the ble stops working

    Have you debugged? This is most likely because your code asserts inside gpio_init(). If you debug and step through that function you might find valuable clues regarding what goes wrong. 

  • yeh i have already debugged the code there is no problem with the gpio_read () and when i add it the nrf51822 stops advertising

  • Have you checked the return code of nrf_drv_gpiote_in_init(PIR, &config, in_pin_handler) with APP_ERROR_CHECK(err_code) at line 278?

  • i didn't do that , how can i check the return of the function as you know i'm using pca 20006 ?

  • It is usually done like this in the SDK:

Reply Children