SelectConfiguration causes new samples to not be available? | Cypress Semiconductor
SelectConfiguration causes new samples to not be available?
I am trying to use a DelSig ADC to read voltages from a strain gage and a battery voltage source. Obviously, the range of voltages between these two devices is very different necessitating the use of two configurations. I have verified that the ADC can read the values from both voltage sources independently, and have added a mux and confirmed that I am able to read the voltages from both sources when one configuration is used.
However, I am having an issue when I try to switch between two configurations to switch to different ranges. When I use the ADC_SelectConfiguration() function, the following ADC_Read16() function fails to return any values. I have used the function's built-in reset function to restart the ADC, and I have also set that parameter to 0 and used ADC_Start() and ADC_StartConvert to get the values. Neither works and the ADC_Read16() function continues to block. Is there something I'm missing? I have posted a link to the code below.