On Sun, 5 Jul 2020 at 20:45, Mohannad Maklad <msala.w...@gmail.com> wrote: > > How can I reset the controller at runtime? when I call the NVIC reset API it > just hangs inside an infinite loop waiting for reset. Any way would be OK, I > thought > about executing "Execute 'mon system_reset'" But I didn't know how. I also > tried to find an address that maps NRST button but I also couldn't.
What specifically are you trying to do here, and what machine model are you using? The QEMU model of the NVIC will assert the "SYSRESETREQ" outbound GPIO when the guest writes to the AIRCR asserting the SYSRESETREQ bit (and with the correct VECTKEY). It's then up to the model of the specific machine to correctly wire that up (typically to some code which calls qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET)). (This corresponds to real hardware, where for instance the Cortex-M3 has a signal line "SYSRESETREQ" which it asserts when AIRCR is written to, and it's up to the SoC that embeds the CPU to make sure that a reset actually happens.) Looking at the codebase I think we wire up the SYSRESETREQ line correctly on some machine models but have forgotten it for others. Which machine model are you using? thanks -- PMM