Two frdm k64f boards in parallel with hot stand-by sparing

Hello,
I want to connect two frdm k64f boards with hot stand-by sparing. One of the two is the master and the other one is the slave. Commands should be executed only from the master. Master has self-testing and if it fails to execute, the results are provided to the slave. then slave takes charge.