Basic PMBus querying from userspace
Credits for this code go to David Brownell who sent this to lm-sensors in 2008. Adopted by Jan Kundrát.
Talk to PMBus devices via I2C from userspace
Home Page: https://marc.info/?l=lm-sensors&m=120915211327396
Credits for this code go to David Brownell who sent this to lm-sensors in 2008. Adopted by Jan Kundrát.
Hi,
thanks for your efforts @jktjkt .
After checking 4 different repos in order to get some pmbus readings at all, this here was the only one which worked for me.
I'm using it for a Dell D1600E-S0
which seems to be the same as DS1600SPE-3 - detailed documentation can be found here:
https://www.artesyn.com/power-supplies/product-docs/508/ds1600spe/trn_ac-dc_ds1600spe-3_trn_rele1413032695_techref.pdf
I had an issue with the vout value (screenshot attached).
And solved it by dividing the value by 512. I changed the code like this:
... (@line ~1710) of pmbus_peek.c
case 0:
if (op->units == BITS) {
printf("(BITMAP)");
} else {
double d = value & 0x03ff;
Change:
if (strstr(name, "vout")) {
d = value / 512.0;
} else {
(Unchanged, just added the corresponding bracket "}" )
/* LINEAR encoding:
* - 11 LSBs are signed mantissa
* - 5 LSBs are signed exponent
*/
if (value & 0x0400)
d = -d;
if (value & 0x8000)
d /= 1 <<
(0x0f + 1 - (value >> 11) & 0x0f);
else if (value & 0x7100)
d *= 1 << (value >> 11);
}
printf("%g", d);
}
break;
Bests
Konrad
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.