[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] [PATCH] Firebee software poweroff



On Mon, 2013-12-16 at 07:58 +0100, Markus Fröschle wrote:

> Not sure if your shutdown code is entirely correct/complete, however. Of course, it shuts down the machine, so the primary goal is reached.
> 
> While there was only the power button to shut down the machine before, we now have a second way to do that.
> 
> Pressing the power button generates an exception that gets handled in BaS (handler_psc3 in exceptions.S). That handler reads out RTC data from the FPGA and saves it back into the PIC. This piece of code is now missing from the shutdown code.

When the PIC receives this message (0x0c, O, F, F) it initiates the same
power-down sequence as if the power button was pressed. This includes
requesting time and NVRAM from the CPU. So everything works as normal.
I've even tested it :)

Jo Even