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

NRF51822 Audio Application & Compression

Hello,

I am working on an application that involves sampling audio data ~8KHz. I have a few questions

  1. The real time clock module has a maximum interrupt frequency of 32768/5 = 6554 Hz. Is there another mechanism to achieve a slightly greater interrupt frequency ~8KHz using the RTC? Or will I need to move to the Timer/Counter. Does nordic provide support for the Timer peripheral like it does for the RTC?

  2. Considering the BLE throughput limitation of the Iphone 5s = 4KB/s I will need to compress the audio data before transmission. Is nordic aware of any codec that works well on the Cortex M0 core of the NRF51822?

Lucas

  • Thank you for pointing out the exact code that limits the frequency to 32768/5 Hz. I actually did not realize that. I guess it has to do with the RTC delay/jitter specification described in sections 18.1.8 and 18.1.9 in the nRF51 Series Reference Manual and the way the application timer is implemented. I did not realize you were using the application timers actually. For higher frequency you could of cource use a TIMER peripheral instead but that will cost you up to ~1mA of extra current consumption.

    The thing that decides the CPU blocking time is how many packets you send in a BLE connection event and how many payload bytes are present in each packet. Shortest blocking time is when no payload is sent from peripheral or central. Longest blocking time is for maximum throughput in both directions, i.e. 6 packets sending and receiving, each with 20 bytes.

  • Stefan, Thank you for the information. This will be extremely useful moving forward. Where is it documented how much power each peripheral uses when active? Lucas

  • You can see the current consumption of a TIMER peripheral in the nRF51822_PS v2.0, sections 8.13, which is 30uA. However, the TIMER needs 1.2V regulator and 16MHz clock source (either RC or external crystal (XOSC)) and that will consume extra 880uA or 810uA respectively, see table 27.

  • Stefan,

    One last clarification. Does the nrf51822 manage clock selection for the user? If the radio is being used it will use the 16MHZ X0SC? Otherwise it will use RC? Enabling and disabling of clocks in not left up to the user it is handled demand based by the nrf51822?

  • There are two clock sources in the system, low frequency 32kHz clock and high frequency 16MHz clock. You can see in table 28 in the nRF51822 PS v2.0 what clock source each peripheral requires. For both high and low frequency clocks you can select either internal RC oscillator or external crystal. High frequency external crystal is mandatory for any radio communication, Low frequency external crystal is optional but is the best choise for low power application. You have to enable the low frequency clock explicitly and specify if you wish to use internal RC or external crystal as the low frequency clock source. If you do not explicitly enable a high frequency clock, the internal RC is automatically enabled when any peripherals require a 16MHz clock, and it is disabled again when no peripheral require it. You must however explicitly enable the 16MHz external crystal clock source

Related