Jump to content

Recommended Posts

Posted

I recently had a sopine module start to fail on me. The symptom was most boots would fail partway through the boot. It would just stop, serial console output stops, the board powers off. Note that this is identical to lower power but in this case was not (I have multiple sopine modules and work with them daily).

 

I successfully mitigated this issue by underclocking. Specifically I did three things:

 

Underclocking in U-Boot

I added the following line to `/boot/boot.cmd` and compiled the file:

mw 0x1c20000 0x80000900

Per the Allwinner A64 manual (p84), this sets the CPU to the lowest clock speed possible: 240MHz.

 

The formula used to set the clock speed is `(24Mhz*N*K)/(M*P)`. The high bit switches should always be the same, and the low bits used in the formula are padded to align to hexadecimal digits. This yields the following map for the formula: `0x800PNNKM` with a max value of `0x80031F33`.

 

Underclocking in the kernel

The easiest way to do this is set `CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y`. The powersave governor operates the cpu at the lowest clockspeed possible.

 

If you disable all userspace cpu frequency utils, you can stop here. Alternatively, you may skip this step and just do the following.

 

Set powersave governor in /etc/init.d/cpufrequtils

Here's a oneliner that does this:

sed -i 's/^GOVERNOR=.*/GOVERNOR="powersave"/' /etc/init.d/cpufrequtils

After underclocking, the sopine module has been operating fine. If you are installing A64 chips in the field that don't require high performance, you can use this to enable a longer device life.

Posted

I has similar shutdowns with the SoPine module + baseboard. As far as I could tell this was due to undervoltage - the SODIMM socket is not exactly designed for high currents (even when multiple pins are used for powering), and PMIC cut off the power to prevent undervoltage (easy to distinguish from kernel crashes because it also turns off the on-module LED). In my case sometimes it was enough to remove and reinsert the module or use a different power supply.

Posted

That's what made this issue weird to troubleshoot: it looked like a power issue. But in this case (module going from working fine to not working, and other modules performing fine in the same setup),  it doesn't look like it.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines