Hello
When using the Power component to configure StandBy mode, set the callback function in McuErrorIsrNotification in the [General] tab, and found that in the generated code, only the Error notification in the Power_Ip_PrepareSocStandby function called in the Power_Ip_SetMode function calls the configured callback function, but in other In the called function (such as Power_Ip_MC_ME_ConfigurePartitionClock) the Error notification does not call the configured callback function.
How to configure all error handling callback functions when switching Power mode?
(My purpose is that if an error occurs during the process of entering StandBy, I can be notified of the error and can make a corresponding recovery action)
Thanks
已解决! 转到解答。
Hi @Simon-Liu ,
McuErrorIsrNotification() just used for errors about voltage that cause interrupt.
Seem that at IP layer, you need to defined error callback by yourself. You need to create input parameter for the function Power_Ip_InstallNotificationsCallback() to install callback that you want to get when have error. For example: I'll create the function Power_ReportPowerErrorsCallback() that contains all callback functions for errors.
You can install it before Power_Init() called by:
Power_Ip_InstallNotificationsCallback(Power_ReportPowerErrorsCallback);
with Power_ReportPowerErrorsCallback() defined as:
So, you have as below:
Best regards,
Nhi
Hi @Simon-Liu ,
McuErrorIsrNotification() just used for errors about voltage that cause interrupt.
Seem that at IP layer, you need to defined error callback by yourself. You need to create input parameter for the function Power_Ip_InstallNotificationsCallback() to install callback that you want to get when have error. For example: I'll create the function Power_ReportPowerErrorsCallback() that contains all callback functions for errors.
You can install it before Power_Init() called by:
Power_Ip_InstallNotificationsCallback(Power_ReportPowerErrorsCallback);
with Power_ReportPowerErrorsCallback() defined as:
So, you have as below:
Best regards,
Nhi