cancel
Showing results for 
Search instead for 
Did you mean: 

Knowledge Base Articles

PSoC 1 SmartSense_EMC and SmartSense_EMCplus Module Initialization Special Point – KBA222962

chaitanyav_41
Employee

PSoC 1 SmartSense_EMC and SmartSense_EMCplus Module Initialization Special Point – KBA222962

Version: **

Translation - Japanese: PSoC 1 SmartSense_EMCおよびSmartSense_EMCplusモジュール初期化特別ポイント- KBA222962 - Community Translated (JA)

Question:

When I use the SmartSense_EMCplus module together with a custom Rawdata Filter, the sensor gets stuck always.

Answer:

In PSoC® 1 CapSense® modules, sensor rawdata and baseline are always stored in waSnsResult[] and waSnsBaseline[] arrays. In general, both these arrays are updated after the InitializeBaselines() API is executed, but this is not true for SmartSense_EMC and SmartSense_EMCplus modules.

In SmartSense_EMC and SmartSense_EMCplus modules, waSnsResult[] remains in an unassigned state until ScanSensor() (or ScanAllSensors()) functions are executed. Therefore, if you use a custom filter in your project, execute ScanSensor() (or ScanAllSensors()) functions once before initializing the filter.

Correct code template is as follows:

     /****************************************/ 

           M8C_EnableGInt;

CapSense_Start();

CapSense_InitializeBaselines();

     CapSense_ScanAllSensors();

     Filter_Init(); // Initialize customize filter

     ……

  /****************************************/

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎Feb 12, 2018 11:14 PM
Updated by:
 
Contributors