I have been trying to read in values from the ADC of the Psoc 4700s, but I have not been successful with producing results. I am using the 10 bit ADC described in this datasheet, but I still can't find any tutorials using this ADC. In my code I start the ADC, Start Conversion, and read, but I am still not getting any values. Here is some code that I am using:
ADC_Start(); ADC_StartConvert(0u); uint16 val = ADC_ReadResult_mVolts(0u);
However in the debug mode I am receiving optimized_out for the value of val, but other variables have values so I know that the debugger is working.