It has been noted that unless the M4 core is put to STOP mode, IMX7 won't go to suspend mode. So we created a FreeRTOS application which gets the request from linux through RPMsg and puts M4 to STOP mode, after which the A7 core can go to suspend.
While this has been working properly, the problem arises when we try to put the M4 to STOP again in the same boot. When A7 wakes up from suspend, M4 reboots from the beginning. As this happens, all RPMsg communications fail. So from this point on, it is impossible to take A7 to suspend mode, due to the always alive M4 core.
Is there any way to restart communication with the M4 core, after M4 reboots or is there a way to prevent M4 from rebooting entirely?