2020-04-13 07:32 AM
Hello!
I want to use CPU1 (CM7) doing the following:
1) Hold CPU2 (CM4)
2) Flash new firmware for CPU2
3) Reset and release CPU2.
During this process CPU1 must be able to keep communicating to a Host via Ethernet / lwip.
______________________________
I can make CPU2 stop by using HSEM notification callbacks like this.
// CPU1 sends notification to CPU2
HAL_HSEM_FastTake(HSEM_ID_0);
HAL_HSEM_Release(HSEM_ID_0, 0);
// CPU2 receives notification from CPU1 and enters STOP Mode
void HAL_HSEM_FreeCallback(uint32_t SemMask)
{
HAL_PWREx_ClearPendingEvent();
HAL_PWREx_EnterSTOPMode(PWR_MAINREGULATOR_ON, PWR_STOPENTRY_WFE,
PWR_D2_DOMAIN);
}
I would continue using the HAL Flash libraries to flash new firmware for CPU2 using CPU1.
But how do i reset CPU2 after flashing its firmware using CPU1?
I'm pretty stuck and not sure if this is the way to go.
Thanks for any advices!
Best regards
ser_u