pyOCD/coresight/cortex_m.py
def reset(self, software_reset=None):
        """
        reset a core. After a call to this function, the core
        is running
        """
        self.notify(Notification(event=Target.EVENT_PRE_RESET, source=self))

        if software_reset == None:
            # Default to software reset if nothing is specified
            software_reset = True

        self._run_token += 1

        if software_reset:
            # Perform the reset.
            try:
                self.writeMemory(CortexM.NVIC_AIRCR, CortexM.NVIC_AIRCR_VECTKEY | CortexM.NVIC_AIRCR_SYSRESETREQ)
                # Without a flush a transfer error can occur
                self.dp.flush()
            except DAPAccess.TransferError:
                self.dp.flush()

        else:
            self.dp.reset()

        # Now wait for the system to come out of reset. Keep reading the DHCSR until
        # we get a good response with S_RESET_ST cleared, or we time out.
        startTime = time()
        while time() - startTime < 2.0:
            try:
                dhcsr = self.read32(CortexM.DHCSR)
                if (dhcsr & CortexM.S_RESET_ST) == 0:
                    break
            except DAPAccess.TransferError:
                self.dp.flush()
                sleep(0.01)

        self.notify(Notification(event=Target.EVENT_POST_RESET, source=self))

        reset a core. After a call to this function, the core
        is running
        
reset a core. After a call to this function, the core
is running
reset a core . After a call to this function the core is running
def reset(self, software_reset=None):
        self.notify(Notification(event=Target.EVENT_PRE_RESET, source=self))
        if software_reset == None:
            software_reset = True
        self._run_token += 1
        if software_reset:
            try:
                self.writeMemory(CortexM.NVIC_AIRCR, CortexM.NVIC_AIRCR_VECTKEY | CortexM.NVIC_AIRCR_SYSRESETREQ)
                self.dp.flush()
            except DAPAccess.TransferError:
                self.dp.flush()
        else:
            self.dp.reset()
        startTime = time()
        while time() - startTime < 2.0:
            try:
                dhcsr = self.read32(CortexM.DHCSR)
                if (dhcsr & CortexM.S_RESET_ST) == 0:
                    break
            except DAPAccess.TransferError:
                self.dp.flush()
                sleep(0.01)
        self.notify(Notification(event=Target.EVENT_POST_RESET, source=self))
def reset ( self , software_reset = None ) : self . notify ( Notification ( event = Target . EVENT_PRE_RESET , source = self ) ) if software_reset == None : software_reset = True self . _run_token += 1 if software_reset : try : self . writeMemory ( CortexM . NVIC_AIRCR , CortexM . NVIC_AIRCR_VECTKEY | CortexM . NVIC_AIRCR_SYSRESETREQ ) self . dp . flush ( ) except DAPAccess . TransferError : self . dp . flush ( ) else : self . dp . reset ( ) startTime = time ( ) while time ( ) - startTime < 2.0 : try : dhcsr = self . read32 ( CortexM . DHCSR ) if ( dhcsr & CortexM . S_RESET_ST ) == 0 : break except DAPAccess . TransferError : self . dp . flush ( ) sleep ( 0.01 ) self . notify ( Notification ( event = Target . EVENT_POST_RESET , source = self ) )
reset a core.
reset a core .
"""
        reset a core. After a call to this function, the core
        is running
        """ # Default to software reset if nothing is specified # Perform the reset. # Without a flush a transfer error can occur # Now wait for the system to come out of reset. Keep reading the DHCSR until # we get a good response with S_RESET_ST cleared, or we time out.
self
software_reset