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

52840 LE CODED App_UART with GPIOTE - crash

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();

Parents Reply
  • Sorry, I see you mentioned it now. I assumed you used the 52840 since you were attempting to enabled CODED PHY, which is not supported by the 52832 RADIO peripheral.

    But just to make sure, are you trying to run the exact same project on that works on 52832 on the nRF52840 DK? That will not work because it requires different startup files, Softdevice, and memory configuration.

Children
Related