On/Off power button with "soft off" functionality

Ricardo, I’m not very experienced with the fin myself but let me try and clarify what Nico suggested. You might have gotten the impression it’s possible to achieve this purely with hardware (by adding a button) but that’s not the case, you’ll definitely need to write some software.

First you’ll need to connect a button to a GPIO pin from the coprocessor (checkout the datasheet to figure out which one).

Then you’ll need to write some custom code that reacts to the button press.

  • If the CM was off then you’ll need to enable PC9, this means you’ll need to tell the coprocessor to set pin PC9 to HIGH/5v.
  • If the CM was on then you’ll need to do two things: shutdown the CM and set pin PC9 to LOW/0v.

Note that grounding PC9 or setting it to high must be done by the coprocessor so you’ll need to flash some firmware for it.
Shutting down the CM needs to be done from the CM itself to ensure a proper shutdown procedure is in place. You’ll need to send a signal from the coprocessor over to the CM using a GPIO pin on the CM and then shut it down. Here is an example in Python.

Let me know if this clarifies a bit the scenario.