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

Nrf51 Fast GPIOTE + Ble

Hi,

Im using S130softdevice.i wanna make dimmer by using experimental_ble_app_blinky project on gpioet But i have a problem with detecting 10 milisecond time (it means that i expect interrupt but it doesnt happen after each 10 milisecond)the lamb which i use flickers.

What can i do for gpioet to work better?

Thank You!

void GPIOTE_IRQHandler(void)
{

		 if(NRF_GPIOTE->EVENTS_PORT != 0)
    {
               
            NRF_GPIOTE->EVENTS_PORT= 0;
            nrf_delay_us(5000);	
		nrf_gpio_pin_set(16);
		nrf_delay_us(50);
		nrf_gpio_pin_clear( 16);
        
    }
		
}

static void gpiote_setup()
{
  uint32_t gpiote_event_addr;
  uint32_t gpiote_task_addr;
  ret_code_t err_code;

    // Initialise the button event GPIOTE
  nrf_drv_gpiote_in_config_t event_config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(false);

  err_code = nrf_drv_gpiote_in_init(29, &event_config, button_handler);
  APP_ERROR_CHECK(err_code);

  gpiote_event_addr = nrf_drv_gpiote_in_event_addr_get(29);

  nrf_drv_gpiote_in_event_enable(29, true);

}
Parents Reply Children
No Data
Related