Tool/software:
Hello,
I am using AM62-LP-SK evm.
My requirement is to reset only the MCU domain alone while main domain still runs.
How can I achieve this?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hello,
I am using AM62-LP-SK evm.
My requirement is to reset only the MCU domain alone while main domain still runs.
How can I achieve this?
I have tried a couple of ways for this.
One is,
I thought of inducing a crash in the M4F by creating a fault like calling an uninitialized pointer.
Modified hello world application for M4F in MCU+SDK such that I could induce a reset,
#include <stdio.h> #include <kernel/dpl/DebugP.h> #include "ti_drivers_config.h" #include "ti_drivers_open_close.h" #include "ti_board_open_close.h" __attribute__((noinline)) int divide_by_zero() { volatile float a=0.0; volatile float b=5.0; return b/a; } void hello_world_main(void *args) { volatile int c; volatile int*ptr=NULL; volatile int *ptr1; ptr1= (int*)0xFFFFFFFF; int itr=0; DebugP_log("Hello World!\r\n"); DebugP_log("Causing exception\r\n"); while(itr<=3) { switch(itr) { case 0: divide_by_zero(); DebugP_log("Divide exception didn work\r\n"); break; case 1: c=*ptr; DebugP_log("Dereference null pointer didn work\r\n"); break; case 2: *ptr1=10; DebugP_log("Invalid address exception didn work\r\n"); break; case 3: __asm__("udf #0"); DebugP_log("invalid instruction didn work\r\n"); break; } itr++; } DebugP_log("out of loop\r\n"); }
Hello,
I have assigned this thread to the correct expert.
Meanwhile the expert comments, can you take a look at the API:
Hello Vaibhav,
I have tried calling SOC_generateSwWarmResetMcuDomain(),
and it seems to reset both MCU and main domains.
I have tried it by enabling Reset Isolation too.
void hello_world_main(void *args)
{
for(uint32_t count = 0; count < 10u; count++)
{
ClockP_sleep(1);
DebugP_log("I am running (MCU) !!:- %d\r\n", count);
if (count == 5u)
{
/* Reset */
// DebugP_log("Resetting Main domain !!\r\n");
//SOC_generateSwWarmResetMainDomainFromMcuDomain();
DebugP_log("Trying to reset only MCU domain !!\r\n");
SOC_generateSwWarmResetMcuDomain();
}
}
}
Log from M4f UART terminal :
I am running (MCU) !!:- 1
I am running (MCU) !!:- 2
I am running (MCU) !!:- 3
I am running (MCU) !!:- 4
I am running (MCU) !!:- 5
Trying to reset only MCU domain !!
[IPC RPMSG ECHO] Version: REL.MCUSDK.09.02.01.01+ (May 12 2024 22:05:58):
[IPC RPMSG ECHO] Remote Core waiting for messages at end point 13 ... !!!
[IPC RPMSG ECHO] Remote Core waiting for messages at end point 14 ... !!!
Main terminal which is for A53 also reboots.
I am using AM62-LP-SK evm.
My requirement is to reset only the MCU domain alone while main domain still runs.
How can I achieve this?
Hello Kanishk,
This is not possible.
The AM62X device does not support making only the MCU Reset.
In AM62X, the MCU core can be configured as a safety core.
After the MCU core is configured as Safety core, then making MAIN domain Reset from MAIN or MCU CTRL MMR registers.
The Rest is Propageate through the MAIN domain and not with the MCU domain. So, the MCU core is fully isolated.
If you do MCU WarmReset in both Isoaltion MCU core and not Isolated MCU core cases, the Reset effect is propagated through both domains.
Please look at the FAQ for more details about how MAIn domain and MCU the domains resets will be affected in Isolation MCU core and not Isolation MCU core.
Regards,
Anil.
Hello Anil,
Got it! Thanks for clarification.
So, it's not possible to reset M4F alone. But,
My core objective is to understand what happens if there's an early reset/crash happens in the M4F?
**Will it affects the A53's operation?**
That's why I was trying to reset m4 alone.
What about intentionally inject a crash in the M4F (What I have tried, it's in the 1st chat of this thread). But, I couldn't cause a crash in the M4F. Is there any other ways that I can try or am I missing something?
Your thoughts on this?
Thanks,
Kanishk
Hello ,
In addition to the above question, I do need some clarity on LPSC local reset.
I came across this in the AM62X family manual,
It is said in the manual that some of the LPSC can
be used to provide local reset function for the processors, such as A53 and R5 and M4F core.
What does this API lpsc_module_set_local_reset() in psc.c do? and also Sciclient_pmSetModuleRst() - what about this API in sciclient_pm.h?
Can we use any of these API to locally reset M4F?
Hello Kanishk,
My core objective is to understand what happens if there's an early reset/crash happens in the M4F?
**Will it affects the A53's operation?**
That's why I was trying to reset m4 alone.
This is not possible with the M4F core.
But this method is applicable for to the A53 use.
For example, a Linux crash was detected in the M4F core.
So, M4F can do the reset of MAIN domain cores and not the M4F core.
What about intentionally inject a crash in the M4F (What I have tried, it's in the 1st chat of this thread). But, I couldn't cause a crash in the M4F. Is there any other ways that I can try or am I missing something?
If you inject a crash, the control goes to an exceptional state.
Please help me to get more details on how you are injecting the exception, and what is the core state ?
e2e.ti.com/.../quote]Please look at the FAQ for local cpu reset.
Sciclient_pmSetModuleRst API used for local CPU Reset .
This API is used in SBL as well.
Regards,
Anil.