This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/CC2652R: PostEvent timing

Part Number: CC2652R

Tool/software: TI-RTOS

Hi,

I currently using CC2652 Launchpad with Accelerometer sensor connected.

I`m using OAD example as a base code.

I configure the sensor to collect x samples and trigger interrupt.

In the interrupt I`m posing event and pend it in the SimplePeripheral_taskFxn. 

I got noticed that I have 400us latency in the post event - You can see attached image.

In case that I reading the Sensor FIFOfrom the interrupt I have minimal latency - - This is only for latency test. 

Is there a way to minimize the post event latency ????

  • Hello,

    Let me see if I understand correctly,

    You have an interrupt that posts an event to the simple_periph task, and when the simple periph main loop runs and does its other BLE stuff it also checks for this event. If the event is detected it reads the FIFO and clears the event?

    If this is correct, I would recommend creating a new task in charge of reading the FIFO that pends on an event or semaphore with higher priority than simpleperiph task but lower than ICALL task. This should lower latency, as you will have a dedicated task to reading the FIFO when the interrupt is triggered.

    Regards,
    AB
  • Thanks AB,
    (I'm working with Ohad on this issue).

    Creating another task and handling the interrupt-induced event there, reduced the latency from 400 to 120 micro-sec.
    That's better - but is that the minimum latency expected?

    is it possible to have an even lower latency on the cortex-M4F + TI-RTOS, or is it required to use the Sensor-Controller for achieving even lower latencies?
    Can the sensor control use the SPI peripheral? (we're reading from the sensor via SPI).
  • Hi,

    I created new task with his own resources. 

    This reduce the latency to 64us. We can live with that.

    Thanks for the help.