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

Advertising and Fast ADC Sampling

Hi, I am a newbie. I understand that a similar question was asked earlier, but I couldn't get an answer specific to my questions. My goal is to sample an analog signal at 40 KHz with 8 bit resolution, do some processing and advertise one integer value as manufacturer specific data. I understand from S110_SoftDevice_Specification_2.0 that the CPU halts during BLE events and there is advertising latency. Without the SoftDevice, I can do this as the ADC of nrf51822 (Rev3) can sample at 50KHz with 8 bit resolution. With the SoftDevice however, I can only sample at 1KHz. Is it possible to actually sample at 40 KHz with the SoftDevice? If not, what's the maximum sampling rate that I can get? Will the Time Slot API help? Thanks in advance!

Parents
  • How long for and how often do you need to do the sampling? The timeslot API will give you a fairly long slot if you ask for it, but you'll get it at random times, the longer the slot you want, the more random the times you'll get it.

    If all you're doing is advertising the value, you could just turn off advertising, shutdown the softdevice, do your sampling and calculation, then turn it all on again and advertise your value until the next time.

Reply
  • How long for and how often do you need to do the sampling? The timeslot API will give you a fairly long slot if you ask for it, but you'll get it at random times, the longer the slot you want, the more random the times you'll get it.

    If all you're doing is advertising the value, you could just turn off advertising, shutdown the softdevice, do your sampling and calculation, then turn it all on again and advertise your value until the next time.

Children
No Data
Related