How to use the pyocd.core.exceptions.TransferFaultError function in pyocd

To help you get started, we’ve selected a few pyocd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mbedmicro / pyOCD / pyocd / probe / cmsis_dap_probe.py View on Github external
def _convert_exception(exc):
        if isinstance(exc, DAPAccess.TransferFaultError):
            return exceptions.TransferFaultError(*exc.args)
        elif isinstance(exc, DAPAccess.TransferTimeoutError):
            return exceptions.TransferTimeoutError(*exc.args)
        elif isinstance(exc, DAPAccess.TransferError):
            return exceptions.TransferError(*exc.args)
        elif isinstance(exc, (DAPAccess.DeviceError, DAPAccess.CommandError)):
            return exceptions.ProbeError(*exc.args)
        elif isinstance(exc, DAPAccess.Error):
            return exceptions.Error(*exc.args)
        else:
            return exc
github mbedmicro / pyOCD / pyocd / probe / stlink / stlink.py View on Github external
addr += thisTransferSize
                size -= thisTransferSize
            
                # Check status of this read.
                response = self._device.transfer([Commands.JTAG_COMMAND, Commands.JTAG_GETLASTRWSTATUS2], readSize=12)
                status, _, faultAddr = struct.unpack('
github XIVN1987 / DAPCmdr / pyocd / coresight / dap.py View on Github external
def _handle_error(self, error, num):
        if LOG_DAP:
            self.logger.info("error:%06d %s", num, error)
        # Clear sticky error for Fault errors only
        if isinstance(error, exceptions.TransferFaultError):
            self.clear_sticky_err()