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: CapTIvate - SYNC Pin in Dual MCU System

Part Number: MSP430FR2633

Hi.

Currently I'm working on a dual controller system with two CapTIvate MCUs (MSP430FR2633).

Both MCUs are running 16 (independent) Self-Cap-Buttons each.

I want the MCUs to measure one after the other - for best noise and emv performance.

One MCU should work as a SYNC Master (generating SYNC signal with a GPO) and the other MCU should start measurement cycle after a rising edge event at SYNC Input Pin P2.2 (SYNC Slave).

I can't get it to work right now.

Is there an example project using the sync pin in above manner ?

In the Documentation I don't find much about SYNC Pin usage. Maybe I searched in the wrong places.

  • Hi Tobias,

    You couldn't use the SYNC on P2.2 for your requirement.

    For your requirement, could you explain why you want the MCUs to measure on after the other to get best noise and EVM performance?
  • Hi Wei.
    Oh, maybe I have missunderstood the SYNC feature ?
    I want MCU2 to wait for an rising edge on P2.2 (SYNC Pin) before each measurment cycle. In other words: the cycle should be triggered by an edge on P2.2 instead of an constant timer value.

    Trace lines an Buttons are placed close to each other (fixed PCB specification) and therefore I get an influence if both MCUs measure at the same time (measurment cycle driftings and overlaps with the time).
  • You shouldn't get influence between self mode buttons even they scanned on the same time.

    Could you share the test result you got and the trace layout?

    Otherwise, why you are using two MCUs for 16 buttons of each? FR2633 could support up to 64 buttons for mutual mode.

  • Sorry I can't share results right now.
    My hardwaredesign is a little bit tricky. I use neighbor buttons which are placed close to each other as a GND reference for the active buttons (not active buttons are internally switched to GND). Therefore I need to make sure, that MCU2 waits for MCU1 to finish task.

    I am using 2 MCUs and self cap mode, because it is way more robust in terms of EMC performance. I need to resist high disturbances (like >=10 V/m).

    The Documentation tells, that the SYNC PIN is designed to wait for an external event (edge triggered) to start measurement and that is exactly what I am looking for. MCU2 should sleep till an edge event triggers my MCU2 measurement cycle. But I can't find documentation on how to setup and use this feature.

    Isn't there any example project or detailed documentation on how to use the SYNC Pin feature?
    This would help me a lot.

  • Hi Tobias,

    I'm confused with your design to locate the active button very close to the GND(the inactive button), which could be a strong base capacitance for the active button. I you are designing for terms of EMC performance, I would introduce you to use the noise immunity functions of the CapTIvate Library. Please find below guide sections for the noise immunity configuration.
    software-dl.ti.com/.../ch_glossary.html
    software-dl.ti.com/.../ch_library.html

    You could also refer the HW design guide for the noise immunity performance and a robust power supply for the MCU will be very helpful of the EMC performence.
    software-dl.ti.com/.../ch_design_guide.html


    I will check the SYNC function with our design team and feedback you if any example for your reference.
  • Hi Tobias,

    Please find the comments about the SYNC usage from our expert:

    "SYNC is not the best method to achieve what this customer is trying to do. The tricky part is that the sync edge needs to happen before the start of each time cycle. So if he has 16 buttons, and 4 time cycles, he would need to have 4 sync pulses for each scan interval. The timing of those pulses is also going to be important. You would need the SYNC pulse to come in after the software has loaded the next time slot and triggered CapTIvate to start on the next sync edge. The MCU that is sending the SYNC signal doesn’t have any way of knowing when the receiving MCU has loaded in the cycle and is ready to begin. Remember that the measurement time is not deterministic and depends on the measurement result itself, so the time window where you would need to be sending the sync signal is not going to be known. The only way I see this working easily is if the MCU that is sending the SYNC signal sends a pulse train (almost like a clock), but to me this is not the most effective method for setting the timing in this case.

    I think for this specific task, the best method to tail-chain the two MCU’s is to use a simple GPIO. The first MCU can signal the second MCU when it is time to start its 4 conversion slots. The second MCU can pend in a software loop and wait to call CAPT_updateUI() until after it receives an edge on the GPIO."

  • Thanks for the insightful information.
    Now I realize under which conditions the SYNC pin can be used at all. I did not find this information in the documentation.

    I will try the next week to implement the synchronization with a GPIO. For this I would probably disable the timer sync control at MCU2 (bTimerSyncControl = false) and take over the control via a GPIO interrupt.

    Thanks also for the other tips. Noise immunity with frecuency hopping is already used by my firmware.
    Just to explain my unusual design: there is no GND signal anywhere near the cap buttons. So i need the inactive buttons to be GND for the active buttons for a solid touch function.

  • Sounds good. Please feel free to come back if any further question.

    BTW, for your design with "So i need the inactive buttons to be GND for the active buttons for a solid touch function.",  I would advice you to take care about the GND(implemented by the inactive buttons) which be close to the active buttons. "Ground shields help reduce susceptibility to radiated and conducted interference, and the closer these structures are to the circuit being protected, the more effective they are. However, moving these structures closer to the capacitive touch circuit has an unwanted effect of increasing the parasitic capacitance and consequently lowering the sensitivity."

    Please make sure to go through the CapTIvate Technology guide->Design Guide for the related topics to review your design.

  • The synchronization works perfectly now, thanks again for the support.

    I have two more questions:

    1) After a call "CAPT_appHandler" or more precisely "CAPT_updateSensorWithEMC" the sensor touch status ("SENSOR.bSensorTouch") does not seem to update directly. In my assigned callback function "SENSOR.bSensorTouch" is still "false" (after the first measurment) with an Finger on the Sensor. Only "SENSOR.bSensorDetect" seems to update itself directly after a single call (but seems for me much more unreliable). After a second call "CAPT_updateSensorWithEMC", "SENSOR.bSensorTouch" was set to "true". How can I query the touch status after just one update call (to save power, I don't want to measure twice as much as needed)? My ugly workarround atm is that I call "CAPT_updateSensorWithEMC" a second time within one CAPT Timer Cycle if bSensorDetect == true.

    When exactly is "bSensorDetect" be set? I've seen "bSensorDetect" sometimes change to "true" with no fingers on a sensor.
    For testing I used slow CAPT_Timer cycle times of 2s. That means it takes up to 4s before my application get notice of a touch (with only a single measurment call each CAPT Time Cycle).

    2) After some captivate measurements, I would like to put the MSP430 temporarily in the LPM4 until it is woken up with a port interrupt. The RAM (or the calibration of the sensor) should be retained.

    CAPT_stopTimer ();
    CAPT_disableISR (CAPT_TIMER_INTERRUPT);
    setup_my_port_interupt (); // setting up falling edge at GPIO of my desire
    __bis_SR_register (LPM4_bits | GIE);
    __no_operation ();

    Works so far, but the power consumption is much too high for me (~ 18μA for one of the two MSP430). For testing I use __CAPT_NO_INTERFACE__ and no external clock. I tried a few things, but I could not manage to reduce the power consumption with help of API functions. Maybe I am missing the trick. What exactly do I have to do (uninitialize) to further reduce the current consumption? Using Proximity is not an option for my application.

    *edited*:

    Meanwhile I tried a few things and managed to reduce Power Consumption to  ~2,21µA (both MCUs @ LPM4) by adding this line to the above:

    MAP_CAPT_selectTimerSource(CAPT_TIMER_SRC_VLOCLK);

    Is there a more "correct" way to totally deactivate CAPTIVATE for lowest power possible?

  • Hi Tobias,

    Please find my comments:

    1.  You may need to check your sensor properties for "Prox_Debounce_In_Threshold" and "Touch_Debounce_In_Threshold" with default value of 1, which means  a threshold crossing will not effect the state unless the measurement stays past the threshold for at least 1 (initial sample) + 1 (debounce sample) = 2 total samples.

    2. I would suggest you to use the LowPowerOperation of technology guide, especially the Wake on Touch Operation (WOT) section for your application. You may take the suggested method on the guide for a lower system level power consumption.

**Attention** This is a public forum