m_y wrote:Resetting an N-L1 system is tricky.
Yeah :-)
Two other things that could be wrong: the code assumes to be run on node id 0,
and the other core has to have node id 0x8000.
It's no good wait for a response either. One never gets responses to PLL programming messages because the switch is reset and thus can't send a response message.
The trick is to reset the remote L1, wait until you know the message has gone out then reset locally. How do you know when this is? Good question! Depends on the link speed, mostly.
For a two-L1 system:
You can check when the message has left the local processor switch; what is left is
checking when the message has left the local system switch. If you know exactly
how the system switch does buffering, you could send some more data via the
local system switch to ensure the PLL write is sent.
Or you could just wait 1ms or so :-P
The situation is much more complex when you have more than two nodes. If you
do all PLL writes from a single core, you have to make sure the network (including
routing) is still connected after every node reset. Another option is to do the reset
via a higher level protocol, or to wire up stuff so that one core can pull all cores'
RESET lines.