2 Replies Latest reply on Jul 31, 2020 5:49 AM by FrPe_4019641

    Error in Capsense Datasheet

    FrPe_4019641

      I am working with the CapSense demo kit and have found an error in the datasheet Document Number: 002-02479 Rev. *B

      https://www.cypress.com/file/217516/download

       

      I noticed the EEPROM was not working correctly and returned zero on reset. The datasheet points this out and proposes a fix. The problem, however, is the fix makes no sense:

       

      sensorEmptyOffset[i] = ((volotile int16 *))eepromEmptyOffset)[i];

       

      1. volotile should be volatile?

      2. Parenthesis are a mess. Should it be sensorEmptyOffset[i] = (volotile int16 *)(eepromEmptyOffset)[i]; ?

      3. This throws an error "Incompatible pointer to integer conversion assigning to 'int16' (aka 'short') from 'volatile int16 *' (aka 'volatile short *')

       

      Even if this line gets fixed, I'm not convinced this will allow reading from EEPROM. In the sample code, it was necessary to call Em_EEPROM_Read(~) which this code doesn't do. What is the correct fix to allow EEPROM to work? Thanks.

        • 1. Re: Error in Capsense Datasheet
          LinglingG_46

          1&2ļ¼švolatile should be volatile.

          I think there is a mistake in the datasheet:

          sensorEmptyOffset[i] = ((volotile int16 *))eepromEmptyOffset)[i];

          Should replace to :

          sensorEmptyOffset[i] = ((volotile int16 *)eepromEmptyOffset)[i];

          3: If you want to read the datas store in Em_EEPROM, it should be read the array eepromrmptyoffset.

          4: If there is a mistake in my understanding, we can discuss it. Hope it can be helpful for you.

          1 of 1 people found this helpful
          • 2. Re: Error in Capsense Datasheet
            FrPe_4019641

            Thanks LinglingG_46, this change, in addition to the other changes in the datasheet, did in fact allow reading from the Em_EEPROM.

             

            The correct line should be sensorEmptyOffset[i] = ((volatile int16 *)eepromEmptyOffset)[i];