Hi,
I have an existing application built on top of the ble_att_mtu_throughput example. I want to send log data over a BLE connection, and I am trying to use the CLI over BLE module to do this.
However, I'm having trouble porting the example to my project. Specifically, using the task manager module immediately triggers a hard fault (BusError or UsageFault_StateError). It fails at the line (inside task_switch)
VLDMIANE SP!, {S0-S31} /* If FPCA set, restore FPU registers. */
When not using the task manager module (never call nrf_cli_task_create), the code crashes upon connecting to the server. The CLI over BLE example has no trouble connecting and sending data to this webpage.
The error appears in the sd_ble_gap_phy_update function inside PHY_UPDATE case under ble_evt_handler. Error code returned is 4 (NRF_ERROR_INVALID_STATE). So I'm essentially stuck being unable to send log data over a BLE connection. Any advice would be much appreciated!
case BLE_GAP_EVT_PHY_UPDATE_REQUEST: { ble_gap_phys_t const phys = { .rx_phys = BLE_GAP_PHY_AUTO, .tx_phys = BLE_GAP_PHY_AUTO, }; err_code = sd_ble_gap_phy_update(p_gap_evt->conn_handle, &phys); APP_ERROR_CHECK(err_code); } break;