From b13f4826e7b94ce86ca13730696d360e1e1f7b5c Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Thu, 26 Oct 2023 23:54:15 +0900 Subject: [PATCH] Change to use Transfer for one byte transfer on CMSIS-DAP --- pyocd/probe/pydapaccess/dap_access_cmsis_dap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py b/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py index 23fc03fe9..fbd5aeb4b 100644 --- a/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py +++ b/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py @@ -467,7 +467,7 @@ def encode_data(self): """ assert self.get_empty() is False self._data_encoded = True - if self._block_allowed: + if self._block_allowed and (self._read_count > 1 or self._write_count > 1): data = self._encode_transfer_block_data() else: data = self._encode_transfer_data() @@ -478,7 +478,7 @@ def decode_data(self, data): """ assert self.get_empty() is False assert self._data_encoded is True - if self._block_allowed: + if self._block_allowed and (self._read_count > 1 or self._write_count > 1): data = self._decode_transfer_block_data(data) else: data = self._decode_transfer_data(data)