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.

CC2642R-Q1: Capacitive Touch and SCE

Part Number: CC2642R-Q1
Other Parts Discussed in Thread: BOOSTXL-ULPSENSE


My customer who tries to use Capacitive Touch with SCE has some question about Procedures the Sensor Controller Studio has.
(Currently using LaunchPad + BOOSTXL-ULPSENSE)

 1) tdcGetValue
Our assumption is that there is a difference in the value (source clock freq) obtained by tdcGetValue() between the following two cases, but is this correct?
Case 1: the tdcSetCntSource() is just set to 96M (not divided by tdcEnablePrescaler())
Case 2: If tdcSetCntSource() is set to 96M and tdcEnablePrescaler() is set to 16 divisions

2) How to drive tdcEnablePrescaler
It is recognized that #startTrigger in tdcSetTriggers() must be set to TDC_STARTTRIG_TDC_PRE and #stopTrigger to TDC_STOPTRIG_TDC_PRE if the prescaler is used.
However, when this value is set, the return value of tdcCheckDoneEv() is not done(1), and even if forced tdcGetValue() to get the value, valueL is only fixed at 2 (valueH is 0).
(The ignoredStopTriggerCount in tdcSetTriggers() was done with 0 and 1).

Could I have a sample code that can execute the tdcEnablePrescaler?

Thank you for your support.


  • Hi Nona,

    I will check with the Sensor Controller Development Team and get back with you within 24 hours.



  • Hi Nonaka,

    I have also been reviewing the TDC resources provided in the Sensor Controller Studio User's Guide, as well as the Capacitive Touch SLA.  Unfortunately all of these examples do not use the prescaler, however there is a recommended use case:

    • Measure N periods of a continuous signal (for example a clock signal), frequency up to 24 MHz
      • Enable the TDC prescaler with division factor 16 or 64
      • Select TDC prescaler as start and stop trigger
      • Select stop trigger ignore count N / "prescaler division factor"
        • Stop trigger ignore count must be N rather than N - 1 because the stop signal is active at startup
      • Use synchronous start
      • Timing requirements:
        • Time between rising edges on the signal: 42 ns or more

    Is the customer making sure to use a valid ignoredStopTriggerCount in tdcSetTriggers as well as tdcArm with TDC_START_SYNC?

    The TDC prescaler must be used to measure frequencies higher than 2.4 MHz (up to 24 MHz).  If this is not required then results should be similar to not using the prescaler.


  • Response from the SCS Dev Team is as follows:

    The prescaler cannot be used with cap touch.  It's used to reduce the number of (stop) events, but with cap touch you only get one event after the start event (so you end up with zero events if you divide by 16 or 64).  From the documentation: For frequency/period measurements on a single signal, the maximum signal frequency is 2.4 MHz. To measure a higher frequency signal, up to 24 MHz, the TDC prescaler must be used. The prescaler detects rising edges on the input signal, and effectively divides the signal frequency by a factor 16 or 64.