8 Replies Latest reply on Sep 4, 2018 12:16 AM by rzzh

    Read a fix rawcount value if CapSense sensor more than 8

    derekgui

      Hello, there

       

      I have a CapSense project using CY8C4025AXI-S412 to calculate absolute capacitances value from the raw counts. When I set the total number of sensor more than 8, the raw count reading from the RAM always gives a fixed value.

       

      Here is the function where I read the raw counts, and I put all the sensors under button0 widget, even I split the sensors into two widgets, still read a fixed value when I set the total sensor more than 8.

       

      void ProcessAllSensors(sensor_data* p_sensor_data)
      {
          
          
          interruptState = CyEnterCriticalSection();
                   
                  for(uint8 snsId = CSD_BUTTON0_SNS0_ID; snsId < CSD_TOTAL_SENSORS; snsId++)
                  {
                  p_sensor_data[snsId].rawCounts = CSD_dsRam.snsList.button0[snsId].raw[0];
                  p_sensor_data[snsId].capacitance = CalculateCapacitance(p_sensor_data[snsId].rawCounts);
                  
                  }       
          /* Enable interrupts for servicing ISR */
          CyExitCriticalSection(interruptState); 
       } 
      

       

      When I adapt all project into the CY8CKIT-048 kit and keep all the settings and code the same, it works fine with CY8C4A45LQI-483.

       

      My question is what difference between  CY8C4A45LQI-483 and CY8C4025AXI-S412 cause this issue?

      How can I exceed the total number of sensor more than 8 on CY8C4025AXI-S412?

       

      Here I have attached a small test project for that issue tracking.