HW-Sensors interface?

A forum for general AmigaOS 4.x support questions that are not platform-specific
Post Reply
amifrog
Posts: 37
Joined: Thu Feb 02, 2017 11:12 am

HW-Sensors interface?

Post by amifrog »

Hello,

is there a general way to read temperature sensors inside the machines CPU(Core)?

Are on the AmigaOne motherboards other buses present, which could act as interfaces to sensors, I2C for instance? Is there an API available to address those?

Is it possible to list all sensors (cpu temperature, SATA HDD temperature, fan speed etc.) from e.g. CLI?

I've seen the x1000temp.docky, which is rather old and does not support the x5000, obviously.

How could one implement support for reading most machine's sensors, is there a 'hwsensors.library' or similiar?

Any code snippets to find an read sensors available somwhere, suggestions?
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: HW-Sensors interface?

Post by tonyw »

You obviously don't have an X5000 or A1222 as the user manual for those machines tells you how to read the data.

Each machine has two serial controllers, one of which is hard-wired to the CPU "Hypervisor". By sending and receiving short (cryptic) messages, you (or anyone else) can interrogate the HW to get the data you want (CPU voltages, temperatures, fan speed, etc). It then remains only to present the data in a user-readable form (GUI, Docky, etc).

There is an API already designed for the X5000, A1222 and later machines. Support functions already exist. A-Eon are working on it, so it might be already in the Enhancer package or destined for it.
cheers
tony
amifrog
Posts: 37
Joined: Thu Feb 02, 2017 11:12 am

Re: HW-Sensors interface?

Post by amifrog »

Thanks for your answer. Of course i have an A1222, it sits right next to my Amiga laptop (it has real unicorn-skin). :roll:

I just couldn't find anything about sensors in the developer wiki, not even a CPUinfo or anything like that.

So a temperature docky that suits to all machines seems quite easily possible, if i understand you correctly?

That is nice.
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: HW-Sensors interface?

Post by nbache »

amifrog wrote:So a temperature docky that suits to all machines seems quite easily possible, if i understand you correctly?
If by "all" you mean all machines from A-Eon, then it sounds possible, although the question is whether it would be worth the effort to put those seemingly quite different procedures into the same module as opposed to just sticking to X1kTemp.docky for the X1000 and a new one for the new machines.

Best regards,

Niels
amifrog
Posts: 37
Joined: Thu Feb 02, 2017 11:12 am

Re: HW-Sensors interface?

Post by amifrog »

Well, i expect some kind of abstraction layer, installed with the OS, like x1000.resource and so on.
The interface used by the docky would not know by itself which machine it is running on; instead it would ask for the machines name, and the number of sensors and their specifics and give the user a selectable choice which sensors to show.
So the different machines from PPC604 to the newer CPUs would not have to be represented by own code in a single library this way.
If one machine needs some special serial interface, than this would be handled by the library/resource installed for this machine.
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: HW-Sensors interface?

Post by nbache »

The thing is, at the moment you have one machine with an implemented docky (X1000) and two more with an expected (common) API - different from the first one.

Nobody seems to have ever looked at implementing anything for the older machines (Sams, A1s, A4k/A1k2 with Phase5 PPCs), and my guess is it's because there isn't any (known) API or even the necessary sensors for those.

So just about the best we can do is hoping for a uniform API to continue from X500/A1222 onwards to future machines, and make use of that, while keeping the existing docky for X1000. And that's where I am doubtful about the effort for knitting those two situations into a common docky.

But again, it's just my guess.

Best regards,

Niels
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: HW-Sensors interface?

Post by tonyw »

BTW, you will find the A1222 docs in the Technical Reference Manual (trm_tabor_xxx.pdf), Section 8 "MCU", not in the developer wiki.
cheers
tony
User avatar
Spektro
Beta Tester
Beta Tester
Posts: 122
Joined: Sat Jun 18, 2011 6:55 am
Location: Finland
Contact:

Re: HW-Sensors interface?

Post by Spektro »

nbache wrote: Sat Jan 11, 2020 1:40 am Nobody seems to have ever looked at implementing anything for the older machines (Sams, A1s, A4k/A1k2 with Phase5 PPCs), and my guess is it's because there isn't any (known) API or even the necessary sensors for those.
There is a CPU temperature monitor for AmigaOne: http://os4depot.net/?function=showfile& ... putemp.lha
- Janne Peräaho
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: HW-Sensors interface?

Post by nbache »

Spektro wrote: Wed Mar 04, 2020 5:06 pmThere is a CPU temperature monitor for AmigaOne: http://os4depot.net/?function=showfile& ... putemp.lha
So there is! And it seems it should also work on a BlizzardPPC (and maybe a CSPPC, but that wasn't tested).

Interesting.

Best regards,

Niels
User avatar
Spektro
Beta Tester
Beta Tester
Posts: 122
Joined: Sat Jun 18, 2011 6:55 am
Location: Finland
Contact:

Re: HW-Sensors interface?

Post by Spektro »

It looks like some PowerPC processors have a Thermal Assist Unit (TAU) which can tell the current CPU temperature. See here for more information: https://www.nxp.com/docs/en/application-note/AN1800.pdf.
- Janne Peräaho
Post Reply