I am using the nRF52832 (on Rigado BMD-300 EVAL kit). I am using keil IDE and nRF GO to upload my compiled code to my device. I am using SKD 15.2.0. Using Windows 10.
I am using the nRF52 chip to collect data from a second IC using SPI; I have modified the "SPI" example included in the nRF SDK to do so, and can see my data on a terminal listener (putty).
I would now like to transmit my data to a smartphone via BLE. I am trying to do this by modifying the example code in ble_app_uart. I have added the nrf spi driver to the ble_app_uart example, and can concurrently collect data from my IC (which I can see on the terminal) and connect to the nRF chip to my smartphone (using the nordic UART app on android).
I am now trying to understand how to load my data, collected from SPI, into the correct buffer to be transmitted to my device via bluetooth. I would like to see the output values in the app on my phone.
Here is my current understanding of how to do this: please correct any mistakes and let me know if I am missing something.
The data must be loaded in the the fifo rx buffer (m_rx_fifo), so that the function ble_app_uart_get can load it into data_array when called in uart_event_handle(). Once in memory, a uart event must also be triggered, with evt_type = APP_UART_DATA_READY, so that uart_event_handle() can be called.
If this is correct, please tell me what function I can use to load bytes into the m_fifo_rx buffer and also trigger a uart event with evt_type = APP_UART_DATA_READY, so that uart_event_handle() is called and the bytes are transmitted once a '\n' character is loaded into the buffer.