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/MSP430FR2533: Longer cycles than expected of two initialization function for CapTIvate..

Part Number: MSP430FR2533

Tool/software: Code Composer Studio

Hello Champs,

One of my customer is designing CapTIvate MCU for their application.

Currently they asked that initialization code seems to take longer time than they expected.
So I checked their code and found some library function take long clock cycles than expected. the function is : 
  - CS_initFLL( (MCLK_FREQ/1000), FLL_RATIO);
     ==> it takes 3,105,298 cycles
  - CAP_MANAGER_CALIBRATE_SENSOR(pApp->pSensorList[ui8SensorID]);
     ==> it takes 2,344,927 cycles

For their HW,
 - they removed external 32.768kHz oscillator and currently use internal REFO 32.768kHz.
 - 3 or 4 button cap touch is used with single button group.

For their SW, 
  - their software is based on the CapTIvate Design Center 1.8.0.
  - they modified codes for GPIO setting and REFO setting for CS for the initialization.
  - they use 16MHz MCLK

Issue1)
I'd like to know that these above two library functions need several million cycles at the initialization?

Issue2)
If this is normal, then I have one more question.

If I press the touch button right after the power on, then the LED response for touch is delayed than normal.
For example, I expect I can touch 3sec later after reset in normal state, but I press the button rapidly after reset, there's no LED response and should wait additional several seconds to LED response.


Can you explain why it happens and how to prevent this issue?

Best Regards, 
Ernest Cho

  • Hi Ernest

    For the CS_initFLL(); , you can remove it and replace it with configuration like this dev.ti.com/.../node For the reason here maybe the DCO trim operation in the CS_initFLL(); .
    - CAP_MANAGER_CALIBRATE_SENSOR(pApp->pSensorList[ui8SensorID]);
    What's the conversion count value do you set? Small count value will reduce this time and have you enable the noise immunity function? The noise immunity function will increase the calibration time.
  • Hi Gary

    Thank you for the information about CS_initFLL() replacement.

    And for the conversion count value, I remember it is default value of the design center. (500?)

    And they used noise immunity function.

    What do you think about the additional initialization delay when we touch th button rapidly?

    Any prevention is possible?

    Best regards

    Ernest Cho

  • Hi Ernest

    There is no better solution here if you touch the button rapidly without finish the calibration.
    If the count value no more than 1000 the "CAP_MANAGER_CALIBRATE_SENSOR(pApp->pSensorList[ui8SensorID]);" should not cost so much of time. Could you double check about it? And does the replacement of CS_initFLL() improve the start time?
  • Hi Gary,
    Thank you for your feedback.
    Once I modified CS_initFLL() as register based code, it didn't show significant improvements of cycle usage.
    It still shows around 3,xxx,xxx cycles.
    But I don't understand why FLL Lock check need such clock cycles? (Please provide information on this.)
    And from your guidance of Cap sensor calibration, I modified conversion count values as 100 from 500, then it shows significant improvements (around 887,621 cycles).
    I will let them know the improvements.
    Thank you
    Ernest Cho
  • Hi 

    I have test it from my side with the clock configuration time cost here

    That seems a little improved.

  • Hi Gary,

    Thank you for your guidance and sorry for late response.

    My customer agreed that the delays at the initialization code is essential for the clock stability and cap touch initialization.

    From their test, the delay of CAPT_calibrateUI() in the CAPT_appStart() is related by below parameter : 
    -  CAPT_CONDUCTED_NOISE_IMMUNITY_ENABLE is set to TRUE or FALSE
    - the number of Button Counts
    - the value of ui16ConversionCount
    - the value of ui8FreqDiv

    Thank you

**Attention** This is a public forum