- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);