Hello team!
Just for your review, after discussing this with customer, we got to the following architecture, our main concerns are: independent reset and watchdog behavior.
First some definitions:
1) A5 is the hardware master (pin configuration) and will run u-boot.
2) M4 is the operation master on software perspective though.
3) A5 runs Linux and M4 runs MQX.
4) If operation on A5 (Linux) freezes, but not on M4 (MQX), M4 should assert a soft reset on A5, without interfering with M4 operation.
5) If operation on M4 freezes, everything must reset asap, so a hardware reset should be asserted.
The watchdog implementation is being thought as:
1) The hardware watchdog is fed by M4 only, in case this core freezes, everything is reset.
2) M4 (MQX) will implement a software WTD to monitor A5 (Linux) operation, in case needed it will assert a soft reset on A5 operation only.
3) A5 will implement a software WTD feed function, probably over the MCC stack, to communicate with the SW WTD master MQX on M4.
The needed changes we see:
A) u-boot
1) needs to change the way it initializes peripherals, it should not touch anything that is being used by M4. M4 peripheral initialization should be done my MQX only.
2) should somehow identify if MQX is already running on M4, and in case it is running healthy, shouldn't touch anything related to it.
2.1) In case M4 isn't already running MQX healthily, should proceed copying MQX image asap and starting that core operation.
3) should normally initialize any peripherals that are in use only by A5 and Linux.
4) should boot Linux and rootfs normally, being sure nothing affects M4 operation.
B) linux/rootfs
1) should implement a SW WTD feed task, in order to communicate to SW master M4 it is running ok. To be done probably with MCC calls.
2) should not touch any peripherals used by M4 and MQX.
C) MQX
1) should initialize all the peripherals it needs, as u-boot / linux will not do it.
1.1) need to understand having both cores initializing different peripherals at any given time can cause unexpected behaviors. Comments are very welcome.
2) should implement a SW WTD function to receive WTD feeds from A5/Linux.
2.1) In case A5 stops feeds, should proceed with a soft reset of A5 core.
2.2) we still need to better understand, during a soft reset, what exact address the A5 Program Counter should point to inside u-boot, not sure if the very first address is the best idea. Comments are very welcome.
What do you think about this solution architecture?
Thanks!
Bruno