This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Configuring ADC sampling rate and simultaneous reading from multiple channels.

Hi, guys! I'm using the nRF52 SDK 15.3 BLE_APP_UART peripheral example.

I wish to add 3 ADC channels (12-bit) to read 3 potentiometers at a sampling frequency of 6kHz.

When I tried the timer interrupt, I think I can generate a timer interrupt which is millisecond range.

Can I ask these;

0. Can I set a timer to sample analog value at 6kHz? Or due to the spec (SoftDevice, BLE, etc), is this not possible?

1. I'm using 3 channels (A0, A1, A2). Is there a way to read all 3 simultaneously? I don't want to read A0 -> A1 -> A2.

2. After reading it, I wish to send these values using NUS (Nordic UART service) to the central.

I think the TX buffer will not be empty if I send these after each ADC readings.

In the past, I used the TX complete BLE event to send multiple data. From SDK 15, how can I send these chunk of data?

3. Do you think using a different BLE service would be better instead of using NUS?

THanks for the help

Related