Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 217522

Forum Post: CCS/MSP430FR2633: Enabling Multiple Reference Caps at the Same Time

$
0
0
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

Viewing all articles
Browse latest Browse all 217522

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>