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

SAADC reading during BLE transmit

SDK: 15.2
IDE: Keil
SoftDevice: 6.1.1
Board: Custom

Hello,

I would like to synchronize an SAADC reading during a BLE transmit event.  The power source to my board is a CR2032 battery.  As you may know, there are voltage dips in this supply during BLE transmit events that are related to the internal resistance of the battery.  I would like to know if it is possible, when using the SoftDevice to take SAADC readings during these BLE transmit events to calculate the amount of voltage change during this event.

Thanks in advance,

E

  • Hi,

    You can trigger SAADC sampling from a TIMER through PPI, so it is possible to do sampling during BLE transmits. Are you asking about how to synch this, or just if it is possible?

    Best regards,
    Jørgen

  • Hello Jorgen,

    Thank you for confirming this is possible.  My follow up question is how to sync these 2 events.

  • That depends a bit on what you want to sample. Do you want to sample both during TX and RX? A single sample, or a continuous sample during radio activity?

    If you want a single sample, you may use the RADIO->EVENTS_ADDRESS event to trigger the SAADC->TASKS_SAMPLE task directly.

    If you want continuous sampling, you can use the RADIO->EVENTS_READY and RADIO->EVENTS_DISABLED events to start and stop a TIMER. The TIMER should be configured to trigger the SAADC->TASKS_SAMPLE task at the shortest possible delay given by the configured acquisition time. One potential problem with this approach is that you may not know how many samples have been taken during the radio event. This could possibly be solved by clearing the entire buffer before starting sampling. When you read the buffer and encounter a cleared sample, you know that you have read all valid samples.

    Note that both TIMER and SAADC have high current consumption while running. It may be smart to keep it running only for a short period if possible when running of a coin-cell battery.

Related