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.

CCS/CC1312R: SensorControllerStudio: Can't set local fw_templates directory

Part Number: CC1312R
Other Parts Discussed in Thread: CC1310

Tool/software: Code Composer Studio

Hello,

when modifying SCE procedures, it is not possible to specify local directory for fw_templates.  This complicates keeping code organized in TI style (ACLK_REF_SRC is missing in ddi_defs__1.asm, but it is defined in ddi_defs__0.asm)

Regards,

Petr Ledvina 

  • Is it possible to get a short top level description of what you are trying to do? 

    It is possible to copy and hack firmware framework files in <Documents>\Texas Instruments\Sensor Controller Studio\fw_templates, but this is not recommended, and unfortunately it does not include register definitions (e.g. ddi_defs__1.asm).

     

    The define for ACLK_REF_SRC  was not included for the CC13x2/CC26x2 devices, since we do all oscillator calibration in the Power driver (provided with the SimpleLink SDKs). If you search through the installation directory, you'll find that it is also unused for the CC13x0/CC26x0 devices.

     

    We found that it would be difficult to use the Sensor Controller for RTC calibration, since:

    -          We want one solution for all devices and applications, and always running it on the Sensor Controller would take milliseconds every time it'd run, would use a significant amount of RAM, and would be painful to integrate.

    -          The required calculations would be difficult at least on the CC13x0/CC26x0 Sensor Controller, but are trivial on the CM3/CM4.

    -          Coordination with the application's need for XOSC_HF would be complex.

    -          As stated in the TDC resource documentation ("XOSC" = XOSC_HF): Note that using XOSC as counter clock source can interfere with fast XOSC startup for the application and radio stack, and can potentially break radio protocol timing.

  • Thanks for reply, Ter.

    For now, I'm looking into XOSC_LF frequency measurement using Launchpad TCXO (to get easy reference). I did look at RCOSC calibration driver, but it's quite complicated.  It seemed much easier to use Sensor controller (about 20 lines of code) and pass measurement result using fwGenAlertInterrupt (It fits quite nicely into my RTOS application).

    In longer term I need to synchronize XOSC_LF of multiple devices in linear network, using master device clock as reference (absolute accuracy is not important). The devices are outdoor, with quite large temperature difference in winter (tuning fork 32.768 crystal is far from compensated temperature). Synchronization beacon/packet is sent after 16 seconds, so with 1ms listen margin about 60ppm timing accuracy is necessary. And 1ms is considerable time in comparison to sync+preamble (50kbit, ~1.3ms), so even better synchronization would be helpful.

    With XOSC_LF synchronized, I can measure XOSC_HF offset and use it for radio frequency compensation (maybe not necessary, HF crystal tolerance shall be good enough with expected temperature differences)

    It is possible to copy and hack firmware framework files in <Documents>\Texas Instruments\Sensor Controller Studio\fw_templates, but this is not recommended, and unfortunately it does not include register definitions (e.g. ddi_defs__1.asm).

    For me, it is easier to modify SCS installation. I just like to have modified files under project tree (which was added for other directories) and omitting fw_templated seemed like omission ... 

    We want one solution for all devices and applications, and always running it on the Sensor Controller would take milliseconds every time it'd run, would use a significant amount of RAM, and would be painful to integrate.

    Yes, I understand this in general case. But I need to support only CC1310 and CC1312, I'm already using sensor controller for other tasks and have enough memory. I'm assuming that rountime for calibration is about the same for M3/M4 and power consumption may be a bit lower on SC. Also using wakeup vector from TDC will minimize influence on other tasks.

    The required calculations would be difficult at least on the CC13x0/CC26x0 Sensor Controller, but are trivial on the CM3/CM4.

    In my case I need only measurement and only one crystal is measured, so SC will only pass TDC result to main CPU. I understand that RCOSC calibration is handling more complicated task.

    -          Coordination with the application's need for XOSC_HF would be complex.

    -          As stated in the TDC resource documentation ("XOSC" = XOSC_HF): Note that using XOSC as counter clock source can interfere with fast XOSC startup for the application and radio stack, and can potentially break radio protocol timing.


    Is there some documentation I can read about this area? From RM it seems that selecting XOSC_HF as TDC source will bring it up and keep it running, but from the warnings it is probably more complicated ... 

    I also posted TDC REFCLK changes (https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz/f/156/p/880576/3258782#3258782) and M-W replied to it, clarifying some parts and linking to M3 TDC code that is much simpler.  It seems that SC way wasn't best idea and I'll reconsider it (I'm quite an expert on finding ways that don't work ;-) )

    Best Regards,

    Petr Ledvina