Closed
Description
I noticed that there are several times of cmsis_dap reset during the flash operation conducted in pyOCD. They were initiated by calling to self.transport.reset()
The negative impact of these cmsis_dap reset is that they doesn't stop at reset handler. Instead they a few mini-seconds before other resets happens (for example NVIC_AIRCR_SYSRESETREQ), and resulted some output to serial line that I don't expect on lpc1768. The behavior is:
- connect via pyOCD and gdb
- gdb initiate load command
- pyOCD reset target by flash.init->setTargetState->self.reset()->self.transport.reset()
- target runs for a while, producing unexpected output (people don't expect original program still runs when flashing it)
- execution stop when
self.writeMemory(DHCSR, DBGKEY | C_DEBUGEN)
self.writeMemory(DEMCR, VC_CORERESET)
self.writeMemory(NVIC_AIRCR, NVIC_AIRCR_VECTKEY | NVIC_AIRCR_SYSRESETREQ)
Here are my questions:
a. Why it is need to reset cmsis_dap in a flash operation?
b. If A is necessary, is there any way to halt the execution once cmsis_dap resets?
c. What's difference between NVIC_AIRCR_SYSRESETREQ (local reset) and SWJ nRESET (cmsis_dap reset)?
Metadata
Metadata
Assignees
Labels
No labels