dapjs icon indicating copy to clipboard operation
dapjs copied to clipboard

Add local reset via VECTRESET support for cortex-m device

Open windowsair opened this issue 1 year ago • 3 comments

When use setTargetResetState method, apart from using external signals for a global reset through SYSRESETREQ, sometimes we prefer to trigger local reset, which is achieved through VECTRESET.

windowsair avatar Jun 06 '24 15:06 windowsair

I'm not sure how I would test this. @jreineckearm does this look sensible?

thegecko avatar Jun 28 '24 21:06 thegecko

I'm not sure how I would test this. @jreineckearm does this look sensible?

@thegecko , IIRC, the VECTRESET shouldn't affect parts of the CPU like SysTick or NVIC. It definitely is not supposed to affect device specific peripherals as they are considered part of the system, not the CPU. So, it may be worth to verify the behavior based on a device specific peripheral.

jreineckearm avatar Jun 30 '24 10:06 jreineckearm

Here are two points:

  • The added VECTRESET only applies to armv7m, which only resets the CPU core, and we can determine the reset behavior based on the value of the CPU register file. I'm not sure it makes sense to add one of these more restricted features?
  • Perform reset detection, does this cover all scenarios due to the complexity of the hardware implementation?

windowsair avatar Jun 30 '24 12:06 windowsair