The code is running on 52832 (BLE) and transmit msg over BLE (NUS) each time GPIO is active (GPIOTE).
But same code (after adding LE CODED Phy) is crashing once it reached the GPIOTE initialization
What can be the problem?
here is my main code:
int main(void)
{
bool erase_bonds;
uint32_t err_code;
// Initialize.
//uart_init();
log_init();
NRF_LOG_INFO("Start");
timers_init();
buttons_leds_init(&erase_bonds);
power_management_init();
ble_stack_init();
gap_params_init();
app_timer_start(bas_timer, APP_TIMER_TICKS(20* 1000), NULL);
gatt_init();
services_init();
advertising_init();
conn_params_init();
err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, m_advertising.adv_handle, TX_POWER);
APP_ERROR_CHECK(err_code);
if (!nrf_drv_gpiote_is_init())
{
err_code = nrf_drv_gpiote_init();
VERIFY_SUCCESS(err_code);
}
nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_HITOLO(true);
in_config.pull = NRF_GPIO_PIN_PULLUP;
err_code = nrf_drv_gpiote_in_init(PIN_IN1, &in_config, in_pin_handler1);
APP_ERROR_CHECK(err_code);
err_code = nrf_drv_gpiote_in_init(PIN_IN2, &in_config, in_pin_handler2);
APP_ERROR_CHECK(err_code);
err_code = nrf_drv_gpiote_in_init(PIN_IN3, &in_config, in_pin_handler3);
APP_ERROR_CHECK(err_code);
err_code = nrf_drv_gpiote_in_init(PIN_IN4, &in_config, in_pin_handler4);
APP_ERROR_CHECK(err_code);
err_code = nrf_drv_gpiote_in_init(PIN_IN5, &in_config, in_pin_handler5);
APP_ERROR_CHECK(err_code);
nrf_drv_gpiote_in_event_enable(PIN_IN1, true);
nrf_drv_gpiote_in_event_enable(PIN_IN2, true);
nrf_drv_gpiote_in_event_enable(PIN_IN3, true);
nrf_drv_gpiote_in_event_enable(PIN_IN4, true);
nrf_drv_gpiote_in_event_enable(PIN_IN5, true);
// Start execution.
//printf("\r\nUART started.\r\n");
NRF_LOG_INFO("Debug logging for UART over RTT started.");
advertising_start();