Hi
I am using an Analog Devices chip as a SPI master and BMD350 (based on nRF52832 chip) as a SPI slave. I want my phone app to send command to the BMD 350 (SPI Slave via Bluetooth) upon a request from the SPI Master and then the SPI Slave should respond with data/command it received from the phone via the MISO line while also receiving the data from the Master on the MOSI line and send it out to the phone app.
How I am trying to make this work: I have integrated the ble_app_uart example with the spis example from SDK 16.0.0 by creating a function called spi_init() and placing it in the main() of ble_app_uart and defining it similar to the spis example in the SDK.
The issue I have is when I comment this part of the code, the BLE radio displays the device name for me to connect using my phone app but when I uncomment it, the BLE radio doesn't show the device name. It looks like only the SPI functionality or the Bluetooth functionality work at a time but not both together. I would appreciate if someone can help me understand how the ble and spi slave functionality can work together in the ble_app_uart example.
What is the function of this part of the code?
// while (1)
// {
// memset(m_rx_buf, 0, m_length);
// spis_xfer_done = false;
//
// APP_ERROR_CHECK(nrf_drv_spis_buffers_set(&spis, m_tx_buf, m_length, m_rx_buf, m_length));
//
// while (!spis_xfer_done)
// {
// __WFE();
// }
//
// NRF_LOG_FLUSH();
// NRF_LOG_INFO((char *)m_tx_buf);
//
// bsp_board_led_invert(BSP_BOARD_LED_0);
// }
Kind regards,
Tejas