Error in Capsense Datasheet

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
FrPe_4019641
Level 1
Level 1

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 = ((volotile int16 *))eepromEmptyOffset);

1. volotile should be volatile?

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

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.

0 Likes
1 Solution
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

1&2:volatile should be volatile.

I think there is a mistake in the datasheet:

sensorEmptyOffset = ((volotile int16 *))eepromEmptyOffset);

Should replace to :

sensorEmptyOffset = ((volotile int16 *)eepromEmptyOffset);

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.

View solution in original post

2 Replies
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

1&2:volatile should be volatile.

I think there is a mistake in the datasheet:

sensorEmptyOffset = ((volotile int16 *))eepromEmptyOffset);

Should replace to :

sensorEmptyOffset = ((volotile int16 *)eepromEmptyOffset);

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.

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 = ((volatile int16 *)eepromEmptyOffset);

0 Likes