CPU Kernel Reset

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User19711
Level 1
Level 1
could you please elaborate how to reset via CPU Kernel Reset Registers as I tried to reset by writing ‘1’ into both of reset registers CPU0_KRST1.RST and CPU0_KRST0.RST but nothing affected however CPU0_KRST0.RSTSTAT bit = 0x2 which indicates that is kernel reset was requested by software.
Kindly advice if there are any additional configurations required to trigger the CPU reset or if the mentioned configurations are enough so how to make sure that the CPU0 reset is done correctly.
0 Likes
10 Replies
User19711
Level 1
Level 1
I want to reset only one core not the whole system.
I think setting these registers can help me to do that
0 Likes
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored
Of course the kernel will be reset by this way and this is also be done. In case of reset the kernel is restarted and begin to run from the reset address. Your program is executed after the reset, maybe therefore you thing that nothing happens. If you use a debugger then set a breakpoint to your start address and then make the kernel reset.
You will see that the program execution is stopped at this breakpoint.
0 Likes
User19711
Level 1
Level 1
MoD wrote:
Of course the kernel will be reset by this way and this is also be done. In case of reset the kernel is restarted and begin to run from the reset address. Your program is executed after the reset, maybe therefore you thing that nothing happens. If you use a debugger then set a breakpoint to your start address and then make the kernel reset.
You will see that the program execution is stopped at this breakpoint.


I already set a breakpoint to your start address but the program keep running and when I break the program I see it stuck at the while loop.
I have a question do the kernel reset of CPU0 for example should be done in the main of CPU0 or in the main of the other CPU?

Kindly advice me how to find understand what happens
Thanks in advance.
0 Likes
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored
You set a hw breakpoint or sw breakpoint? You stuck in the while loop because the CPU was running until this loop. What is the content of your first valid BMHD?
0 Likes
User19711
Level 1
Level 1
hw breakpoint and My BMHD is 0xB359
0 Likes
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored
0xB359 is only the BMHID, what is BMI and STAD?
Which debugger is used?
0 Likes
User19711
Level 1
Level 1
B359000E
STAD: A0000020
Debugger: UDE
0 Likes
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored
Seems be good, I made test with STAD 0xA0000000, HW breakpoint on 0xA0000000 and 0xA0000004 and Lauterbach Debugger. There is no issue, after reset via KRST register the CPU stops on the breakpoint address and was reset. Maybe you have an issue with your debugger.
0 Likes
User19711
Level 1
Level 1
Thanks a lot for your help I will try a Lauterbach Debugger.
I have another question regarding configuring WDT alarms to generate a NMI, I configure it and the WDT expired but I don't know how I confirm that the NMI is fired and where should I but the handling?
0 Likes
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored
You should have configured the WDT alarms that there will be generated a trap (NMI) if the WDT expired. This trap will be distributed to all CPU which are enabled for SMUT trap request. Per default the trap will not be generated because it is switch off. You must switched on the trap request via SCU_TRAPDIS0 and SCU_TRAPDIS1. You can distribute the trap to a single CPU or to all CPUs.
In the selected CPUs the trap handler for NMI will be executed. What you will do in this handler is your decision (e.g. switch off some pin, save anything in the flash, execute a software reset or whatever you want).
0 Likes