The firmware used operate properly in the past, but it no longer does after we replaced the MCU(nrf52832). During SOFTDEVICE_HANDLER_INIT, the MCU is stopped.
The previous chip: nrf52832 QFAAB0 1608AE/1645EG
The chips that malfucntion after the replacement are: nrf52832/QFAAB0/1619BL
They operated properly before the replacement. But after replacing the MCU, they do not.
Firmware, SDK, all can be downloaded.
static void ble_stack_init(void) {
uint32_t err_code;
uint32_t count = 0;
//nrf_clock_lf_cfg_t clock_lf_cfg = NRF_CLOCK_LFCLKSRC;
nrf_clock_lf_cfg_t clock_lf_cfg = { .source = NRF_CLOCK_LF_SRC_SYNTH,
.rc_ctiv = 0,
.rc_temp_ctiv = 0,
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM
};
// Initialize the SoftDevice handler module.
SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL);
ble_enable_params_t ble_enable_params;
err_code = softdevice_enable_get_default_config(CENTRAL_LINK_COUNT,
PERIPHERAL_LINK_COUNT,
&ble_enable_params);
APP_ERROR_CHECK(err_code);
// Check the ram settings against the used number of links
CHECK_RAM_START_ADDR(CENTRAL_LINK_COUNT, PERIPHERAL_LINK_COUNT);
// Enable BLE stack.
#if (NRF_SD_BLE_API_VERSION == 3)
ble_enable_params.gatt_enable_params.att_mtu = NRF_BLE_MAX_MTU_SIZE;
#endif
err_code = softdevice_enable(&ble_enable_params);
APP_ERROR_CHECK(err_code);
// Register with the SoftDevice handler module for BLE events.
err_code = softdevice_ble_evt_handler_set(ble_evt_dispatch);
APP_ERROR_CHECK(err_code);
// Register with the SoftDevice handler module for BLE events.
err_code = softdevice_sys_evt_handler_set(sys_evt_dispatch);
APP_ERROR_CHECK(err_code);
SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL);
is where the MCU error occurs.When it does, rebooting is repeatedly done.
We have no clue as to why the previously oeprating firmware stops working after changing the MCU.
How do I solve this problem?