Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

New Contributor II

I just inherited code that sets a reserved bit that does make a difference in a capsense measurement.   When the reserved bit is set I get "proper behavior" .    I did not set this bit in a test and the capsense was reading out raw data at 255 range  when it should have been reading 0.  To get this design to work this bit has to be set.   What does this bit do and how in the world could of my predecessor known to set it???? 

This bit is bit 7 in CS_CR3 that is being set by the following code segment.

CS_CR3 |= 0x90; // Reference buffer to drive the analog global bus. Bit 7 is not used so why was it set? Reserved bits should not be set. Without it the raw capsense value reads 255 instead of 0
// CS_CR3 |= 0x10; // Reference buffer to drive the analog global bus.  Causes 255 to be read in raw value instead of 0 . 

Then the capsense code below this.



3 Replies