This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

What am I doing wrong, I am reading the SAR GPAIN0 wrong value

What am I doing wrong, I am reading the SAR GPAIN0 which The SARPINCTRL register is set to channel select 2 and GND ON bit  is set to 0. I measured the input voltage to GPAIN0 which is 385 mV but the reading of the ADC is 0. ???

  • Sorry but our SAR expert is out for 2 weeks. However, there is a SARIntVolRef example in CSL3.04, would it be useful as a reference?
    Regards.
  • Hi,

    There are many factors that can affect the results. Did you check the value of SysClkDiv and ref voltage? SAR ADC can work at max clock f of 2Mhz on C5505. Before reading the data, we need to get the status of the ADC to confirm the data is ready. If the above are right, maybe the measurement parameters went wrong. I did that before using CSL example. It could be a good reference.

    regards,

    Bing

  • Hi,

      The CSL example is using channel 3 which is GPAIN1 which I do not have a problem with. My problem is specifically on GPAIN0 channel 2, The way I made it work

      is by setting bit 2 in SARPINCTRL register, but pin 2 is a reserved bit and I am concerned and wondering if any harm could be to controller ????

    Arie

  • The bit is reserved to keep the internal high voltage protection circuit forever on to prevent a voltage at GPAIN0 higher that VDD_ANA getting to the module demanding the chip. By setting to "1", this protection circuit is disabled.
    Regards.