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/CC1310: CC1310 : How to wakeup from Standby by timer(RTC)every 8ms

Part Number: CC1310

Tool/software: TI-RTOS

Hello,

            we  should   wake up   cc1310  every eight  milliseconds   from standby ;After doing some work (3ms),reenter  Standby 。        

How to wakeup from  Standby  by timer(RTC)every  8ms  ?

Best  regards

  • Hello Jun,

    RTC belongs to EON domain and is clocked by 32.768 kHz.
    262 time ticks will give you 7.9956 ms time interval.
    To get exactly 8 ms with 262 ticks you will need calibrate an oscillator to a 32.750 kHz.
    It is 550 ppm change from 32.768 kHz. Huge change. Probably impossible to achieve.
    Till tomorrows evening I would have no time to verify the above.

    If you need exactly 8 ms and it cannot ve achieved using RTC an option is to use one of universal timers.

    If you accept an intervals a bit shorter then 8 ms then:
    - AON_RTC
    - channel 0
    - compare mode
    - within an event capture you will do what you need.
    Please, check RTC API:
    dev.ti.com/.../group__aonrtc__api.html

    Could you check a calibration range for 32.786 kHz and decide which timer you would use?
  • Hi Jun,

    If you are using TI-RTOS, you can simply configure a Clock object to have a 8 ms period. The Clock module itself is based on the RTC and allows for standby modes to be used.
  • Hi M-W,

    your statement means that I have provided a misleading information.
    I would like to clarify that when you are back.
  • Hi Tomasz,

    In theory there is nothing wrong with the info you posted. However, when using TI-RTOS, the RTC is used by the kernel Timer module as the generic timer proxy for the whole RTOS (used for everything from semaphore timeouts to clock objects etc). This means that configuring it manually using the driverlib functions could affect the whole RTOS system.

    You could hook into RTC channel 1 when using TI-RTOS. How you would do this is described in the kernel API documentation of the Timer module:
    dev.ti.com/.../index.html
  • Hi M-W,

    <<< the RTC is used by the kernel Timer module as the generic timer proxy for the whole RTOS
    I did not expected RTC in that role. How to achieve a 1us tick with RTC?
    I would expect that having 8 ms Clock object, RTOS would not switch to standby because 8 ms in that mode cannot be achieved.
    Concept like with peripheral modules not allowing to switch into standby when power domain clocks are working.

    <<< You could hook into RTC channel 1 when using TI-RTOS.
    If I hook RTOS on RTC channel then o.k., assuming I know what I am doing.

    I need to elaborate that.
  • Ho Tomasz,

    You don't achieve 1us ticks using the RTC. For the CC26xx and CC13xx devices you are limited to the resolution of the RTC. The RTC is running in "dynamic mode" which means it will only trigger an interrupt when needed to which will be the closest hit to what was actually requested, this means there will be some jitter in the Clock module.

    If you need timer with better resolution, you could use the GPTimer hardware or the SysTick module, these will however not work in standby.

    If the RTOS switches to standby or not depends on several reasons such as drivers not allowing this (as you said).  Assuming standby is allowed, the Power driver will try to get into standby as long as there is enough time to the next scheduled tick. If the time is > 2 ms (The worst case to get into or out of standby is considered to be 1 ms) then it will proceed into standby.

    One thing to keep in mind with the hook is that it potentially introduce some additional latency as the ISR now handles all channel (starting with the system one).

  • Hi Jun Jun, M-W,

    post title:
    RTOS/CC1310: CC1310 : How to wakeup from Standby by timer(RTC)every 8ms

    Answer: not achievable!

    Dear M-W,
    many thanks for your your last remark:
    One thing to keep in mind with the hook is that it potentially introduce some additional latency as the ISR now handles all channel (starting with the system one).

    M-W,
    it is easy to say that my application has one, two or three tasks,
    however protecting these tasks for running is a different issue.
    The above implies question:
    do you have any tools, recommendations how to collect, catalogue, sort and index hints like the last one you have provided?
  • Hi Tomasz,

    I'm not completely sure I understand just what tips you wanted, maybe you could elaborate a bite more on this. 

    In general, the ROV is a great tool to figure out what is happening on the RTOS level. You could extract a lot of information from the ROV that is helpful when understanding the application behavior. UIA is another tool that can be useful, it is however quite tricky to setup for use. 

  • Hi M-W,

    post was issued by Jun Jun.
    I tried to give him an answer.

    Many thanks for your guides related to RTC source clocking in Standby.