Closed eliasbakken closed 3 years ago
It seem that the problem might be related to some shared resources between ATF and ar100.bin. If the file is exchanged with a blank file of the same size, there is no issue, but using the ar100.bin we have now, the shutdown does not work.
Worth noticing is that halt
does not completely turn off the board like shutdown now
does.
The problem seems to be related to setting the AR100 clock rate. Commenting that out in the AR100 code seems to make the shutdown routine work again. This is consistent with the documenation in crust: https://github.com/crust-firmware/crust/blob/master/docs/abi.md
r_prcm_set_cpus_clk_rate(PLL_PERIPH);
A possible workaround is to flash a file that will reset the AR100 clock to 24 MHz. This can be a separate binary that is flashed in the same way as the original binary, but as a ExecStopPost action in the service file.
Merged to master with PR#220
It seems that the AR100 firmware is still interfering with the shutdown-routine. A quick test to verify this is to disable Klipper. This will allow the board to shut down completely:
systemctl disable klipper
After a reboot:shutdown now
The board should go completely black.