Hi,
has anyone got the i.MX53 internal temperature sensor to work as described in AN4380?
Initially I could not access the PHY registers (the acknowledge bit was never set) but I found this was
because the SATA module did not have a clock (we haven't connected an external clock).
Blowing the fuse at 180C in fusebank 4 to set SATA_ALT_CLK_REF to 10 (internal USB Phy) fixed that
(I couldn't find another way to do it in software without blowing the fuse)
So I can now access the registers and implement the algorithm described in the application note.
The readings seem fairly stable but I get (at ambient temperature) m1=520 m2=683
Which, according to the formula in the AN is -106.6 C
Something is clearly wrong...
Cheers,
Martin
Hello,
I am facing similar issue of not able to get the clock for SATA block.
1. Even though i enabled SATA block clock gating, all registers read as 0, i.e. clock for this block is not really enabled. How to verify that clock for this block is really coming or not, is there any status register i can check?
2. How to set an internal PLL clock to generate clock for SATA block. like i want to have 50 MHz clock for SATA block through one of 4 PLLs. Can somebody give an idea on this?
Regards,
Rambabu
Martin
This discussion is closed since no activity. If you still need help, please feel free to reply with an update to this discussion, or create another discussion.
Thanks,
Yixing
Martin
Had your issue got resolved? If yes, we are going to close the discussion in 3 days. If you still need help, please feel free to reply with an update to this discussion.
Thanks,
Yixing
Hello, Martin!
Follow my function for get temperature from iMX53 SATA controller:
const char *file = "/sys/devices/platform/imx-ahci-hwmon/temp1_input";
int temperature_cpu(unsigned int *val)
{
FILE *fd = NULL;
char buf[7] = {0};
if (NULL == val)
return -1;
fd = fopen(file, "r");
if (NULL == fd)
return -1;
if (NULL == fgets(buf, 7, fd)) {
fclose(fd);
return -1;
}
fclose(fd);
*val = (unsigned int)atoi(buf);
return 0;
}
Hope this help you.
Slight update. There was a bug - the values are actually m1=1290, m2=1511 but that's even worst T=-173C