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.

MSP430FR2633: Update Sensors parameter on program

Guru 24520 points

Part Number: MSP430FR2633

Hi TI Experts,

Please let me confirm the following question.
[Question]
Would you please teach me the way to update the touch parameter like "Touch Threshold" on running program?
Should customer only to do the update with following parameters? Or does they need to use other API except for updating those parameters? 
********
tElement BTN00_E00 =
{
.ui8RxPin = 0,
.ui8RxBlock = 0,
.ui8TouchThreshold = 10,
.pRawCount = BTN00_E00_RawCnts,
.pTuning = BTN00_E00_Tuning,
};
********

I think that they need to call the "CAPT_calibrateUI(&g_uiApp);" after update those parameters. What do you think?

Best regards.
Kaka

  • Hi Kaka,
    Sure. It is the only way to update the touch parameters while the program is running. But we don't recommend to change these parameters while MCU is running, because improper update date may cause mis-triggering. May I ask way you need to change it on running program?
    And after update the parameters, you can call the "CAPT_calibrateUI(&g_uiApp);".

    Best regards,
    Cash Hao
  • Hi Cash,

    Thank you for your response. I will check the background to change the touch parameters during running.

    Anyway, if they would like to do, what timing should they change it?
    They might would like to know the chance to change it.

    Best regards.
    Kaka
  • Hi Kaka,
    You can change these parameters after a full scan cycle. Just do not change the parameters during the sensing period.

    Best regards,
    Cash Hao
  • HI Cash,

    Thank you for your information.I got it!
    Can customer check whether the CapTIvate IP scan or not by using any API?
    If I get background form our customer, I will report to you again.

    Best regards.
    Kaka
  • Sure. You can check the status using the "CAPT_ISR" interrupt vector.

    Best regards,
    Cash Hao
  • Hi Cash,

    I got it.

    I got feedback from my customer. They would like to adjust the parameters value at the factory line from based value which it was tuning by the CapTIvate Design Center. I will inform that they should change those value at not running that ISR.

    Best regards.
    Kaka
  • Hi Cash,

    I got one more question.
    Do you have any way to stop / start the CapTIvate IP?

    I think that they can stop the CapTIvate IP(ISR) by using "MAP_CAPT_stopTimer();" And to resume the CapTIvate IP, they should following sequence.

       MAP_CAPT_stopTimer();

        MAP_CAPT_clearTimer();

        MAP_CAPT_selectTimerSource(CAPT_TIMER_SRC_ACLK);

        MAP_CAPT_selectTimerSourceDivider(CAPT_TIMER_CLKDIV__1);

        MAP_CAPT_writeTimerCompRegister(CAPT_MS_TO_CYCLES(g_uiApp.ui16ActiveModeScanPeriod));

     MAP_CAPT_startTimer();

    What do you think?
    Best regards.
    Kaka

  • Hi Cash,

    I got feedback from them.
    They think that customer could not judge whether the CapTIvate IP scan by using the CAPT_ISR.
    Can they use the EOCIFG or interrupt for updating the parameter?

    Best regards.
    Kaka
  • Hi Kaka,
    I saw your feedback, you said the customer was updating the parameters by the CapTIvate Design Center. If so, there is no need to check the CapTIvate IP status. Just use the Design center to update whenever you want.
    You can start or stop the CapTIvate IP by calling "MAP_CAPT_startTimer();" or "MAP_CAPT_stopTimer();"

    Best regards,
    Cash Hao
  • Hi Cash,
    Thank you for your response.
    Please let me confirm the following question just in case.
    Can customer update the CapTivate paramters by CAPT_calibrateUI(&g_uiApp);" during Stop the timer of CapTIvate IP by "MAP_CAPT_stopTimer();?

    Best regards.
    Kaka
  • Hi Kaka,
    Sure. You can stop the timer first, then clear the timer, then calibrate.
    MAP_CAPT_stopTimer();
    MAP_CAPT_clearTimer();
    CAPT_calibrateUI(&g_uiApp);

    Best regards,
    Cash Hao
  • Hi Cash,

    Thank you for your response.
    I got it!

    Best regards.
    Kaka

**Attention** This is a public forum