Hi
I am trying to run this code:
void in_pin_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
{
current_event_timestamp = get_current_time_ms();
// Calculate the time difference in milliseconds
uint32_t time_diff_ms = (current_event_timestamp >= last_event_timestamp)
? (current_event_timestamp - last_event_timestamp)
: (UINT32_MAX - last_event_timestamp + current_event_timestamp + 1);
// Update the last event timestamp
last_event_timestamp = current_event_timestamp;
// Ignore the event if it occurred too soon (less than 100ms) after the last event
if (time_diff_ms > 100)
{
if (counter<50)
counter++;
else
counter=0;
sd_ble_gap_adv_stop(m_adv_handle);
advertising_init();
}
}
But it get stuck. What is the problem?