Thanks Edward.
I have looked through my code and can confirm I am using the asm(WAI) command to put the MCU to sleep.
Your answer seems to imply that this would be an appropriate method; is this true?
Perhaps it will help if I supply more information.
Please find a CAN trace snippet below of what I am seeing upon the initial start of the MCU:
| 2084.0 Rx | 010 8 FF 01 00 00 00 00 00 00 |
| 2085.2 Rx | 201 8 59 DF 01 01 00 77 4E DF |
| 2184.0 Rx | 010 8 FF 02 00 00 00 00 00 00 |
| 2185.1 Rx | 201 8 59 DF 02 02 00 00 03 A5 |
| 2284.1 Rx | 010 8 FF 03 00 00 00 00 00 00 |
| 2285.2 Rx | 201 8 27 DE 03 03 12 7E EF 30 |
| 2384.1 Rx | 010 8 FF 04 00 00 00 00 00 00 |
| 2385.2 Rx | 201 8 27 DE 04 04 03 5B E9 91 |
| 2484.2 Rx | 010 8 FF 05 00 00 00 00 00 00 |
| 2485.4 Rx | 201 8 FF 01 05 05 00 00 00 10 |
| 2584.2 Rx | 010 8 FF 06 00 00 00 00 00 00 |
| 2585.4 Rx | 201 8 FF 02 06 06 00 00 00 10 |
| 2684.2 Rx | 010 8 FF 07 00 00 00 00 00 00 |
| 2685.5 Rx | 201 8 FF 03 07 07 00 00 00 10 |
0x010 is my "command msg" - Bytes 0 and 1 are to be echoed back on Bytes 0 and 1 on the MCU's ack msg (0x201) - all other Bytes are set to 0x00
In Bytes 2 and 3 of the ack msg, the MCU should write its internal "wakeup counter" i.e. the number of times that it is woken up. Bytes 4, 5, 6 and 7 is the CAN ID of the msg that it just received.
This is why I am confused. The MCU clearly sends its ack msg as expected, but it's data is... corrupt?
Only after 4 cmd msgs have been sent does the MCU ack msg appear to do what I expect, but even then it seems to be 4 msgs behind according to Byte 1...
Further suggestions would be greatly appreciated.