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

Beginner's questions - Hi-Res timer + BLE SoftDevice / SDK

Hi,

we're evaluating NRF52 as a platform for a project in the agricultural space and I have some beginner's questions:

  • Is it feasible to use a timer firing at 100kHz together with the BLE soft device?  The timer service routine needs to set a few GPIO bits based on a pulse train stored in RAM, so it will only need about 20 instructions, but it has strict timing requirements.  Would this interfere with the needs of the BLE soft device, particularly when Bluetooth throughput requirements are high?
  • Is using a project from the examples folder of the SDK and modifying it for the needs of the application the best way to create an application, or am I overlooking a way to create projects, including the build dependencies from the SDK, from scratch?

Any advice would be greatly appreciated.

Thanks,
Hans

Parents
    1. SW interrupts with real-time requirements at 100kHz is not possible with the SoftDevice. You either have to turn off the SoftDevice or find another solution using PPI and peripherals. 

      Can you share more details on exactly what you need to do with the GPIOs?

    2. Best practice is to modify an existing example. The ble_app_uart example is a fairly good one to use as a template. 
  • Thanks for getting back.  I need to generate short bursts of 100kHz on an output pin with a specified, adjustable number of pulses (10-250) and an adjustable pause between the bursts (20µs-1ms).  In fact, we want to be able to control the duty cycle of the pulse bursts as well, so it may overall not be feasible to do this in software.  Any thoughts?

  • Maybe the PWM peripheral can be used. 

    What determines the changes, is it predetermined or based of input from somewhere?

    Can you share a spec of the ping toggling/communication?

  • The number of pulses required and the frequency and overall cycle time need to be adjustable, and we'll probably also need the duty cycle of the pulse train to be changed during development as we're working on a scientific instrument.  We have experimented with the PWM peripheral, but in our initial assessment we found it difficult to precisely control the number of pulses sent.  We're now considering to use SPI as that'd give us good control over the pulse train as well as DMA.  In terms of conflicts with the Bluetooth stack, we're considering to use a separate CPU for communications if that'd be necessary.  The application is not extremely cost sensitive, but we'd like to avoid having to use an FPGA for the signal generation as that'd be less flexible and more involved on the development side of things.

  • Maybe the SPIM peripheral can be used, but I do not know your specification. 

    Do you need a BLE connection while you're generating the bitstream?

Reply Children
Related