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/MSP430FR2633: Enabling Multiple Reference Caps at the Same Time

Part Number: MSP430FR2633

Tool/software: Code Composer Studio

Hello,

I'm trying to enable two reference caps for two CapTIvate blocks but as soon as a ref cap for the second block is enabled, the ref cap for the fist block is disabled automatically. I need both of them enabled at the same time. The following code sample from the CAPT_HAL.h file shows that multiple ref caps are availible but is it possible to enable size 1 and 3 (for mutual mode) at the same time since both have the same value. 

//!  Enable a Reference cap for a specific block.  The element definition,
//!  tElement.ui8RxBlock, is used to determine which block the reference 
//!  capacitor is applied to.  The reference capacitor size is defined in the 
//!  following table:
//!  Size   Self Value  Mutual Value
//!     0    1.0pF         0.1pF
//!     1    1.0pF         0.5pF
//!     2    5.0pF         0.1pF
//!     3    5.0pF         0.5pF
//!     4    1.1pF         0.1pF
//!     5    1.5pF         0.1pF
//!     6    5.1pF         0.1pF
//!     7    5.5pF         0.1pF
//!
//!  \param pElement = pointer to element
//!  \param capSize = size of cap
//!  \par Returns
//!		none
//
//*****************************************************************************
extern void CAPT_enableRefCap(tElement* pElement, uint8_t capSize);

Maybe it is also the very same ref cap and that's the reason why it can be enabled for both blocks? But even when I choose two different sized ref caps, only the latter one remains enabled.
Maybe the way I implement the code is bad practice. In the main.c file right after "CAPT_appStart();" line I wrote these lines:

CAPT_enableRefCap(&BTN00_E00, 3);
CAPT_enableRefCap(&BTN00_E16, 1);

BTN00_E00 and BTN00_E16 refer to arbitrary sensor elements on two different CapTIvate blocks.

I thought of a workaround where I enable a ref cap for a specific element (or rather the block it is assigned to) right before it gets updated. For this I needed to separate the sensor matrix into the two respective capTIvate blocks and then add an if clause in the for loops of the void CAPT_calibrateUI and the void CAPT_calibrateupdateUI functions in the CAPT_Manager.c file. It seems to work as it is now but this solution "feels" kind of awkward. I would be glad if you clould provide me another way to keep multiple reference caps enabled. Also it would be nice if there is a way to enable multiple ref caps for one block at the same time for higher capacitance values. Thanks in advance!

Best Regards
Canbey

  • Hello Canbey,

    There is one reference capacitor circuit per device and you can configure which block it connects to. Let's say if you have an btn00_E0 element and it is assigned to Block 0. When you set ref cap to btn00_E0, it will connect to Block 0.

    As far as the ref cap size, I think there is typo in the function comment section which we will fix it in next release. I will recommend to use the Reference Capacitor Sizes flags to pass the size to the function. The flags are in CAPT_HAL.h line 116 - 125.

    Thanks,
    Yiding
  • I see, thanks for the fast reply. So there is no way to enable multiple ref caps because of only one availible ref cap circuit. Fortunately the workaround from my last paragraph works. Also what are the actual values of the mutual ref caps then? Do CAPT_REFERENCE_CAP__MUTUAL_0P5PFM_1P0PF and CAPT_REFERENCE_CAP__MUTUAL_0P5PFM_5P0PF mean the same for mutual mode, namely 0.5 pF? And for self capacitance mode 1 pF and 5 pF respectively?

    Best regards
    Canbey

  • Hello Can,

    Yes.
    There is only one ref cap in the chip so you can only enable it for one block at a time.
    For mutual mode, they both give you 0.5pF for mutual mode but since mutual mode you have TX and Rx you have Cm (mutual capacitance between TX and Rx) and Cp (parasitic capacitance between RX and GND).
    CAPT_REFERENCE_CAP__MUTUAL_0P5PFM_1P0PF means Cm = 0.5pF and Cp = 1pF.
    CAPT_REFERENCE_CAP__MUTUAL_0P5PFM_5P0PF means Cm = 0.5pF and Cp = 5pF.

    For self cap mode, you only have RX so you only have Cp.

    Thanks,
    Yiding

**Attention** This is a public forum