Hi,
I'm currently doing a project where I want to sample an SAADC and send it over Bluetooth to another nRF52840 device with different sampling frequencies. The problem is that my sampling seems inconsistent from what I can see from my logs when I'm sending over Bluetooth. I'm using J-Link RTT Viewer with NRF_LOG_INFO() and I'm working with the NUS examples from the SDK 14.2.0. Here is what my logs show when I use a sampling of 1kHz without the ble_nus_send function (left value = time in ms, right value = ADC):
When I'm uncommenting the ble_nus_send function, I'm getting this :
It seems like the data is in group of 4 before sending. Since I don't want to lose any data, I'm sending only the ADC value with the ble_nus_send function in a "do while" loop.
Sender =>
Receiver =>
Portion of code =>
Also, when I use a sampling frequency >=2kHz, it seems like some data aren't even sampled by the SAADC. I thought maybe the logs aren't showing fast enough and some lines are lost. I also tried to change some variables in the sdk_config without success.
Thank you for your help,
Keven