Re: [PATCH 3/5] iio: adc: xilinx: Fix VREFP scale

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Hartmut:

> > The scaling factor for VREFP is 3.0/4096, not 1.0/4096; fix this to 
get
> > correct readings.
> 
> I just had a look at the datasheet [1], table 3-1 on page 37, and 
> get the feeling
> that this scaling factor also applies to the VREFN channel. What is 
> your opinion?
> 
> [1] http://www.xilinx.com/support/documentation/user_guides/
> ug480_7Series_XADC.pdf

The table provides the following references:
- VREFP: Figure 2-10, transfer function 3*unsigned(code)/4096
- VREFN: Figure 2-3, transfer function 1*unsigned(code)/4096

The table also says about VREFN: "The supply sensor is also used to 
measure VREFN, thus 1 LSB = 3V/4096." I agree that this is not consistent 
(by Figure 2-3, 1 LSB = 1V/4096), but I didn't have the means to check 
which version is true as VREFN is close to 0V either way.

The situation is simpler for VREFP as UG480 is unambiguous here, and by 
measuring the actual voltage we can tell 1.25V and 0.41V easily apart, 
even when taking some measurement errors into account. In other words, we 
have to use the factor 3 to get correct results for VREFP (thus the 
patch), while either factor returns plausible results for VREFN.

I would suggest opening a webcase with Xilinx for clarification, and 
adding another patch for VREFN if the factor 3 is confirmed. Can you do 
this? If not, I can take care of it, but it may take a while as I am 
pretty busy at the moment.

Best regards,
Thomas
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux