I am trying to configure SPI with BLE using softdevice S130. But SPI is not working properly when I used it with BLE, although it is working fine without BLE
I am trying to configure SPI with BLE using softdevice S130. But SPI is not working properly when I used it with BLE, although it is working fine without BLE
There are absolutely no details in your question at all.
"Not working properly" means what, "trying to configure", how.
Post some code snippets and some error messages or at least a description of what 'not working properly' means.
int main(void) { uint32_t err_code; bool erase_bonds;
// Initialize.
err_code = NRF_LOG_INIT();
APP_ERROR_CHECK(err_code);
timers_init();
spi_init();
buttons_leds_init(&erase_bonds);
ble_stack_init();
peer_manager_init(erase_bonds);
if (erase_bonds == true)
{
NRF_LOG_DEBUG("Bonds erased!\r\n");
}
gap_params_init();
advertising_init();
services_init();
sensor_simulator_init();
conn_params_init();
// Start execution.
application_timers_start();
advertising_start();
APP_LOG("\r\nGLS Start!\r\n");
// Enter main loop.
nrf_delay_ms(AS3993_DELAY_STARTUP_US);
spi_test();
for(;;)
{
power_manage();
}
}
This is the main function. First I initialize the BLE related features and then I tried to initialize spi and read, write some data using spi but it is not reading or writing data in this case. But when i commented out the BLE initialization functions, in that case spi is properly reading and writing the data.
You should debug it and see where it gets stuck. Do you still see the advertising, and just the spi is not working?
It did not stuck anywhere, yes advertising is on. SPI reads 0xFF in any case and write is not working. In case of SPI with BLE, UART(for log) is also showing garbage data on terminal(putty etc).