From 8b4d2301373ffad5e3c2f78529bf092596a3eebd Mon Sep 17 00:00:00 2001 From: MiloradCvjetkovic Date: Sat, 11 Jul 2026 10:04:01 +0200 Subject: [PATCH 1/4] Update metadata files --- .../AppKit-E8_USB/SDS_Recordings/Camera.sds.yml | 6 ++---- .../AppKit-E8_USB/SDS_Recordings/ML_In.sds.yml | 6 ++---- .../AppKit-E8_USB/SDS_Recordings/ML_Out.sds.yml | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/RockPaperScissors/AppKit-E8_USB/SDS_Recordings/Camera.sds.yml b/RockPaperScissors/AppKit-E8_USB/SDS_Recordings/Camera.sds.yml index c4b6be0..7e230f4 100644 --- a/RockPaperScissors/AppKit-E8_USB/SDS_Recordings/Camera.sds.yml +++ b/RockPaperScissors/AppKit-E8_USB/SDS_Recordings/Camera.sds.yml @@ -1,11 +1,9 @@ sds: name: Video Stream - RGB565 description: RGB565 video frames from camera - frequency: 8.33 + sample-frequency: 8.33 content: - - value: Frame - type: uint16_t - image: + - image: pixel_format: RGB565 width: 640 height: 480 diff --git a/RockPaperScissors/AppKit-E8_USB/SDS_Recordings/ML_In.sds.yml b/RockPaperScissors/AppKit-E8_USB/SDS_Recordings/ML_In.sds.yml index 43baa45..30827f9 100644 --- a/RockPaperScissors/AppKit-E8_USB/SDS_Recordings/ML_In.sds.yml +++ b/RockPaperScissors/AppKit-E8_USB/SDS_Recordings/ML_In.sds.yml @@ -1,11 +1,9 @@ sds: name: ML input description: RGB888 video frames from camera - frequency: 8.33 + sample-frequency: 8.33 content: - - value: Frame - type: uint8_t - image: + - image: pixel_format: RGB888 width: 224 height: 224 diff --git a/RockPaperScissors/AppKit-E8_USB/SDS_Recordings/ML_Out.sds.yml b/RockPaperScissors/AppKit-E8_USB/SDS_Recordings/ML_Out.sds.yml index 6c43373..cf26704 100644 --- a/RockPaperScissors/AppKit-E8_USB/SDS_Recordings/ML_Out.sds.yml +++ b/RockPaperScissors/AppKit-E8_USB/SDS_Recordings/ML_Out.sds.yml @@ -1,7 +1,7 @@ sds: name: ML output description: ML classification results - frequency: 8.33 + sample-frequency: 8.33 content: - value: PAPER type: float From 8f58d1493e8c17767331ab654b187ed081072e7d Mon Sep 17 00:00:00 2001 From: MiloradCvjetkovic Date: Mon, 13 Jul 2026 08:27:35 +0200 Subject: [PATCH 2/4] Minor update to indentation in ML_out.sds.yml file --- .../AppKit-E8_USB/SDS_Recordings/ML_Out.sds.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/RockPaperScissors/AppKit-E8_USB/SDS_Recordings/ML_Out.sds.yml b/RockPaperScissors/AppKit-E8_USB/SDS_Recordings/ML_Out.sds.yml index cf26704..ac15573 100644 --- a/RockPaperScissors/AppKit-E8_USB/SDS_Recordings/ML_Out.sds.yml +++ b/RockPaperScissors/AppKit-E8_USB/SDS_Recordings/ML_Out.sds.yml @@ -3,11 +3,11 @@ sds: description: ML classification results sample-frequency: 8.33 content: - - value: PAPER - type: float - - value: ROCK - type: float - - value: SCISSORS - type: float - - value: UNKNOWN - type: float + - value: PAPER + type: float + - value: ROCK + type: float + - value: SCISSORS + type: float + - value: UNKNOWN + type: float From 101cc4d3e8cbb5e1b26d7628001f96dabe728130 Mon Sep 17 00:00:00 2001 From: MiloradCvjetkovic Date: Mon, 13 Jul 2026 12:36:01 +0200 Subject: [PATCH 3/4] Update stream view setting --- RockPaperScissors/AppKit-E8_USB/SDS.sdsio.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RockPaperScissors/AppKit-E8_USB/SDS.sdsio.yml b/RockPaperScissors/AppKit-E8_USB/SDS.sdsio.yml index dcfcacd..e1c74c8 100644 --- a/RockPaperScissors/AppKit-E8_USB/SDS.sdsio.yml +++ b/RockPaperScissors/AppKit-E8_USB/SDS.sdsio.yml @@ -7,9 +7,9 @@ sdsio: # Data stream information used by VS Code extension streams: - name: Camera - view: video + view: image - name: ML_In - view: video + view: image - name: ML_Out view: signal From 228d2dfa33a7f68fdf570dc986e4abb1328a8e18 Mon Sep 17 00:00:00 2001 From: MiloradCvjetkovic Date: Thu, 27 Aug 2026 14:23:37 +0200 Subject: [PATCH 4/4] Synchronize with SDS-Framework v3.1.0 --- .../Board/Corstone-320/vsi/python/arm_vsi3.py | 11 ++ .../Board/Corstone-320/vsi/python/sdsio.py | 168 ++++++++++++++---- RockPaperScissors/AppKit-E8_USB/README.md | 2 +- .../AppKit-E8_USB/SDS.cbuild-pack.yml | 4 +- .../AppKit-E8_USB/SDS.csolution.yml | 2 +- .../AppKit-E8_USB/algorithm/data_in_user.c | 2 +- .../AppKit-E8_USB/algorithm/sds_control.c | 3 +- .../AppKit-E8_USB/algorithm/sds_main.c | 6 +- .../sdsio/fvp/RTE/SDS/sds_config.h | 4 +- ...g.h.base@3.0.0 => sds_config.h.base@3.1.0} | 4 +- .../sdsio/fvp/sdsio_fvp.clayer.yml | 2 +- .../sdsio/usb/RTE/SDS/sds_config.h | 4 +- ...g.h.base@3.0.0 => sds_config.h.base@3.1.0} | 4 +- .../sdsio/usb/sdsio_usb.clayer.yml | 2 +- 14 files changed, 163 insertions(+), 55 deletions(-) rename RockPaperScissors/AppKit-E8_USB/sdsio/fvp/RTE/SDS/{sds_config.h.base@3.0.0 => sds_config.h.base@3.1.0} (95%) rename RockPaperScissors/AppKit-E8_USB/sdsio/usb/RTE/SDS/{sds_config.h.base@3.0.0 => sds_config.h.base@3.1.0} (93%) diff --git a/RockPaperScissors/AppKit-E8_USB/Board/Corstone-320/vsi/python/arm_vsi3.py b/RockPaperScissors/AppKit-E8_USB/Board/Corstone-320/vsi/python/arm_vsi3.py index 22b4d0a..6250c88 100644 --- a/RockPaperScissors/AppKit-E8_USB/Board/Corstone-320/vsi/python/arm_vsi3.py +++ b/RockPaperScissors/AppKit-E8_USB/Board/Corstone-320/vsi/python/arm_vsi3.py @@ -25,6 +25,7 @@ #More details. import os +import atexit import logging import logging.handlers from os import path @@ -214,6 +215,7 @@ def _build_sdsio_request(command: int, sid: int = 0, argument: int = 0, data: by Stream = sdsio_manager( work_dir=_work_dir, auto_playback=_auto_playback, + exit_after_playback=True, play_list=_play_list, mon_port=None, write_flush_records=_write_flush_records, @@ -222,6 +224,15 @@ def _build_sdsio_request(command: int, sid: int = 0, argument: int = 0, data: by control_input_factory=False, ) +# Shutdown SDSIO manager on exit +def shutdown(): + try: + Stream.shutdown() + except Exception: + logger.error("Failed to shutdown SDSIO manager.") + +# Register the shutdown function to be called on exit +atexit.register(shutdown) ## Process command # @param command requested SDSIO command diff --git a/RockPaperScissors/AppKit-E8_USB/Board/Corstone-320/vsi/python/sdsio.py b/RockPaperScissors/AppKit-E8_USB/Board/Corstone-320/vsi/python/sdsio.py index e6d8581..0d18f5d 100644 --- a/RockPaperScissors/AppKit-E8_USB/Board/Corstone-320/vsi/python/sdsio.py +++ b/RockPaperScissors/AppKit-E8_USB/Board/Corstone-320/vsi/python/sdsio.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import asyncio import os import os.path as path import threading @@ -26,7 +27,7 @@ # ---------------------------------------------------------------------------- # # SDSIO server-compatible stream implementation # # ---------------------------------------------------------------------------- # -SDSIO_VSI_VERSION = "3.0.0" +SDSIO_VSI_VERSION = "3.1.0" class StreamInfo(NamedTuple): name: str = None @@ -133,8 +134,12 @@ def __init__(self, auto_playback=False): self._set = SDS_FLAG_MASK_PLAYBACK_MODE | SDS_FLAG_MASK_START self._auto_start_pending = True - def apply(self, set_mask: int, clear_mask: int): + def apply(self, set_mask: int, clear_mask: int, auto_playback: Optional[bool] = None): with self._lock: + if auto_playback is not None: + self._auto_playback = auto_playback + self._auto_start_pending = auto_playback and bool(set_mask & SDS_FLAG_MASK_START) + self._auto_terminate_pending = False self._set = (self._set | set_mask) & ~clear_mask self._clear = (self._clear | clear_mask) & ~set_mask if set_mask & SDS_FLAG_MASK_PLAYBACK_MODE: @@ -166,14 +171,17 @@ def request_auto_playback_start(self) -> bool: self._auto_start_pending = True return True - def request_auto_playback_terminate(self) -> bool: + def request_auto_playback_terminate(self, _force=False) -> bool: with self._lock: if not self._auto_playback: return False - if self._auto_start_pending or self._auto_terminate_pending: - return False - if self._target_flags & SDS_FLAG_MASK_START: + if self._auto_terminate_pending: return False + if not _force: + if self._auto_start_pending: + return False + if self._target_flags & SDS_FLAG_MASK_START: + return False self._set |= SDS_FLAG_MASK_CI_TERMINATE self._clear &= ~SDS_FLAG_MASK_CI_TERMINATE self._auto_terminate_pending = True @@ -216,7 +224,10 @@ def __init__( self, work_dir, auto_playback=False, + exit_after_playback=False, + no_progress_info=False, play_list: Optional[list] = None, + play_step: Optional[int] = None, mon_port: Optional[int] = None, write_flush_records: Optional[int] = None, status_bar_factory=None, @@ -224,7 +235,7 @@ def __init__( control_input_factory=None, ): self._stream_id = 0 - self._play_step_index = 0 + self._play_step = 0 self._rec_index = None # recording session index (None = not yet determined) self._work_dir = path.normpath(work_dir) self._rec_dir = self._work_dir @@ -239,19 +250,23 @@ def __init__( self._read_buffers = {} # sid -> ByteStreamBuffer self._read_threads = {} # sid -> Thread self._read_stop = {} # sid -> Event - # lock to protect stream_id increment and open checks - self._manager_lock = threading.Lock() + # lock to protect playback selection and stream state transitions + self._manager_lock = threading.RLock() # timestamp of last stream read or write command self.time_last_rw = time.time() # status bar self._status = None - if status_bar_factory is None: + if status_bar_factory is None and not no_progress_info: status_bar_factory = StatusBar if status_bar_factory: self._status = status_bar_factory(self) self._playback_mode = False + self._exit_after_playback = exit_after_playback + self._send_ci_terminate_on_shutdown = False self._play_list = play_list + self._play_step_limit = len(play_list) if play_list else None + self._single_play_step_selected = False self._mon_port = mon_port self._write_flush_records = write_flush_records # SDS Control Flags @@ -262,9 +277,9 @@ def __init__( if monitor_factory is None: monitor_factory = sdsMonitorInterface if monitor_factory: - self._monitor = monitor_factory(self._mon_port, self._flags) + self._monitor = monitor_factory(self._mon_port, self._flags, self.select_play_step) self._ctrl_input = None - if control_input_factory is not False: + if control_input_factory is not False and sys.stdin.isatty(): if control_input_factory is None: control_input_factory = sdsControlInput if control_input_factory: @@ -275,6 +290,15 @@ def __init__( self._info_IdleRate: int = 0 self._last_async_time = time.time() self._last_playback_stream_name = None + try: + self._loop = asyncio.get_running_loop() + self._main_task = asyncio.current_task() + except RuntimeError: + self._loop = None + self._main_task = None + if play_step is not None: + if play_step < 0 or not self.select_play_step(play_step): + raise ValueError(f"Invalid play step: {play_step}") def shutdown(self): self.shutdown_requested.set() @@ -459,40 +483,93 @@ def _file_read_worker(self, sid, name, buf: ByteStreamBuffer, stop_evt): finally: buf.set_eof() + def _get_play_step_limit(self): + if not self._play_list: + return None + if self._play_step_limit is None: + return len(self._play_list) + return min(self._play_step_limit, len(self._play_list)) + + def _is_single_play_step_selected(self) -> bool: + return self._single_play_step_selected + + def select_play_step(self, play_step: Optional[int]) -> bool: + with self._manager_lock: + if self.opened_streams: + logger.error("Play step selection failed: streams are currently open.") + return False + if not self._play_list: + logger.error("Play step selection failed: no play steps are configured.") + return False + + if play_step is not None and (play_step < 0 or play_step >= len(self._play_list)): + logger.error(f"Play step selection failed: {play_step} is outside 0-{len(self._play_list) - 1}.") + return False + + if play_step is None: + self._play_step = 0 + self._play_step_limit = len(self._play_list) + self._single_play_step_selected = False + logger.debug(f"Selected all playback steps 0-{len(self._play_list) - 1}.") + else: + self._play_step = play_step + self._play_step_limit = play_step + 1 + self._single_play_step_selected = True + logger.debug(f"Selected playback step {play_step}.") + self._label_list.clear() + self._timestamp_boundaries.clear() + return True + def _create_play_label_list(self, name) -> list[str]: _labels = [] - if self._play_list and self._play_step_index < len(self._play_list): - _step = self._play_list[self._play_step_index] + _play_step_limit = self._get_play_step_limit() + if self._play_list and self._play_step < _play_step_limit: + _step = self._play_list[self._play_step] _labels = list(_step.get('labels', [])) else: - # No playlist: one file per open, indexed by play_step_index - _candidate = path.join(self._work_dir, f"{name}.{self._play_step_index}.sds") + # No playlist: one file per open, selected by play_step + _candidate = path.join(self._work_dir, f"{name}.{self._play_step}.sds") if path.exists(_candidate): - _labels.append(str(self._play_step_index)) + _labels.append(str(self._play_step)) return _labels def _has_next_auto_playback_step(self) -> bool: if not self._flags.auto_playback or self.opened_streams: return False if self._play_list: - return self._play_step_index < len(self._play_list) + return self._play_step < self._get_play_step_limit() if self._last_playback_stream_name: return bool(self._create_play_label_list(self._last_playback_stream_name)) return False def _request_auto_playback_if_needed(self, target_flags: Optional[int] = None): - _target_flags = self._flags.target_flags if target_flags is None else target_flags - if _target_flags & SDS_FLAG_MASK_START: + with self._manager_lock: + _target_flags = self._flags.target_flags if target_flags is None else target_flags + if _target_flags & SDS_FLAG_MASK_START: + return + if self.opened_streams: + return + if self._has_next_auto_playback_step(): + self._flags.request_auto_playback_start() + elif self._flags.auto_playback and self._last_playback_stream_name: + if self._flags.request_auto_playback_terminate(): + _complete_msg = "Playback complete - no more steps remaining." if self._play_list else "Playback complete." + logger.info(_complete_msg) + self._request_exit_after_playback("playback complete") + + def _request_exit_after_playback(self, _reason: str): + if not self._exit_after_playback: return - if self.opened_streams: - return - if self._has_next_auto_playback_step(): - self._flags.request_auto_playback_start() - elif self._flags.auto_playback and self._last_playback_stream_name: - if self._flags.request_auto_playback_terminate(): - logger.info("Playback complete - no more steps remaining.") - + logger.info(f"SDSIO-Server terminating ({_reason}).") + self._send_ci_terminate_on_shutdown = True + self.shutdown_requested.set() + if self._loop and self._main_task: + self._loop.call_soon_threadsafe(self._main_task.cancel) def _open(self, mode, name): + with self._manager_lock: + return self._open_locked(mode, name) + + def _open_locked(self, mode, name): _cmd = CMD_OPEN # prepare error response _resp_err = bytearray() @@ -523,12 +600,13 @@ def _open(self, mode, name): if self._playback_mode: if not self._label_list: # Get flags, Set working dir + _index_based_playback = False if self._play_list: - if self._play_step_index < len(self._play_list): - _step = self._play_list[self._play_step_index] + if self._play_step < self._get_play_step_limit(): + _step = self._play_list[self._play_step] _step_desc = _step.get('step', '') _desc_suffix = f": {_step_desc}" if _step_desc else "" - logger.info(f"Playback step {self._play_step_index + 1}/{len(self._play_list)}{_desc_suffix}.") + logger.info(f"Playback step {self._play_step}{_desc_suffix}.") _set_flags = _step.get('setflags', 0) _clear_flags = _step.get('clearflags', 0) _recdir = _step.get('recdir', None) @@ -538,10 +616,13 @@ def _open(self, mode, name): self._rec_dir = self._work_dir else: logger.error(f"Open Failed. End of playlist. No more steps available for playback stream '{name}'.") + if self._exit_after_playback and self._flags.request_auto_playback_terminate(_force=True): + self._request_exit_after_playback("playback data unavailable") return _resp_err else: _set_flags = 0 _clear_flags = 0 + _index_based_playback = True if _set_flags or _clear_flags: logger.debug(f"Applying flags for playback stream '{name}': set=0x{_set_flags:08X}, clear=0x{_clear_flags:08X}.") @@ -550,12 +631,16 @@ def _open(self, mode, name): # Create label list _play_label_list = self._create_play_label_list(name) if not _play_label_list: - if not self._play_list and self._play_step_index > 0: + if not self._play_list and self._play_step > 0: logger.error(f"Open Failed. No more files available for playback stream '{name}'.") else: logger.error(f"Open Failed. No files found for playback stream '{name}'.") + if self._exit_after_playback and self._flags.request_auto_playback_terminate(_force=True): + self._request_exit_after_playback("playback data unavailable") return _resp_err self._label_list = _play_label_list + if _index_based_playback and self._play_step == 0: + logger.info("No play steps, index based playback started.") else: if mode == 0: @@ -614,6 +699,8 @@ def _open(self, mode, name): for _sds_file_path in _file_paths: if not path.exists(_sds_file_path): logger.error(f"Missing file for playback stream '{name}': {self._format_path(_sds_file_path)}") + if self._exit_after_playback and self._flags.request_auto_playback_terminate(_force=True): + self._request_exit_after_playback("playback data unavailable") return _resp_err if not self._timestamp_boundaries: @@ -657,6 +744,10 @@ def _open(self, mode, name): return _resp def _close(self, sid): + with self._manager_lock: + return self._close_locked(sid) + + def _close_locked(self, sid): _resp = bytearray() _stream = self.opened_streams[sid] _name = _stream.name @@ -699,7 +790,7 @@ def _close(self, sid): if not self.opened_streams: if self._playback_mode: - self._play_step_index += 1 + self._play_step += 1 self._label_list.clear() self._timestamp_boundaries.clear() self._request_auto_playback_if_needed() @@ -809,7 +900,7 @@ def _info(self, flags: int, idle_rate: int, err_data: bytes): logger.info(f"{idle_rate}% idle.") self._info_IdleRate = idle_rate if err_data: - _status = int.from_bytes(err_data[0:4],'little') + _status = int.from_bytes(err_data[0:4], 'little', signed=True) _line = int.from_bytes(err_data[4:8],'little') _err_mgs = err_data[8:] if _status == 0: @@ -850,9 +941,14 @@ def get_async_response(self): def get_shutdown_flags(self): _resp = bytearray() _cmd = CMD_FLAGS + if self._send_ci_terminate_on_shutdown: + _set_mask = SDS_FLAG_MASK_CI_TERMINATE + else: + _set_mask = 0 + _clear_mask = SDS_FLAG_MASK_ALIVE _resp.extend(_cmd.to_bytes(4,'little')) - _resp.extend((0).to_bytes(4,'little')) - _resp.extend((1 << 28).to_bytes(4,'little')) + _resp.extend(_set_mask.to_bytes(4,'little')) + _resp.extend(_clear_mask.to_bytes(4,'little')) _resp.extend((0).to_bytes(4,'little')) return _resp diff --git a/RockPaperScissors/AppKit-E8_USB/README.md b/RockPaperScissors/AppKit-E8_USB/README.md index 3aa6f03..b15b6c4 100644 --- a/RockPaperScissors/AppKit-E8_USB/README.md +++ b/RockPaperScissors/AppKit-E8_USB/README.md @@ -10,7 +10,7 @@ To run this example: - Install [Keil Studio for VS Code](https://marketplace.visualstudio.com/items?itemName=Arm.keil-studio-pack) and run a Blinky example on the board to verify tool installation. -- Install SDS-Framework pack v3.0.0 or later from: +- Install SDS-Framework pack v3.1.0 or later from: - `https://github.com/ARM-software/SDS-Framework/releases` - Setup the [Python environment](https://arm-software.github.io/SDS-Framework/main/utilities.html#setup) for running the SDS Utilities. diff --git a/RockPaperScissors/AppKit-E8_USB/SDS.cbuild-pack.yml b/RockPaperScissors/AppKit-E8_USB/SDS.cbuild-pack.yml index d37ae8a..242cd2e 100644 --- a/RockPaperScissors/AppKit-E8_USB/SDS.cbuild-pack.yml +++ b/RockPaperScissors/AppKit-E8_USB/SDS.cbuild-pack.yml @@ -16,9 +16,9 @@ cbuild-pack: - resolved-pack: ARM::CMSIS-RTX@5.9.1 selected-by-pack: - ARM::CMSIS-RTX@^5.9.1 - - resolved-pack: ARM::SDS@3.0.0 + - resolved-pack: ARM::SDS@3.1.0 selected-by-pack: - - ARM::SDS@^3.0.0-0 + - ARM::SDS@^3.1.0-0 - resolved-pack: ARM::SSE_320_BSP@1.1.0 selected-by-pack: - ARM::SSE_320_BSP@1.1.0 diff --git a/RockPaperScissors/AppKit-E8_USB/SDS.csolution.yml b/RockPaperScissors/AppKit-E8_USB/SDS.csolution.yml index 1cee797..defc67d 100644 --- a/RockPaperScissors/AppKit-E8_USB/SDS.csolution.yml +++ b/RockPaperScissors/AppKit-E8_USB/SDS.csolution.yml @@ -15,7 +15,7 @@ solution: # Refer to https://open-cmsis-pack.github.io/cmsis-toolbox/ReferenceApplications/ for more information packs: - - pack: ARM::SDS@^3.0.0-0 + - pack: ARM::SDS@^3.1.0-0 - pack: AlifSemiconductor::Ensemble@^2.2.0-0 - pack: ARM::SSE_320_BSP@1.1.0 diff --git a/RockPaperScissors/AppKit-E8_USB/algorithm/data_in_user.c b/RockPaperScissors/AppKit-E8_USB/algorithm/data_in_user.c index 64d1714..bdb5767 100644 --- a/RockPaperScissors/AppKit-E8_USB/algorithm/data_in_user.c +++ b/RockPaperScissors/AppKit-E8_USB/algorithm/data_in_user.c @@ -172,7 +172,7 @@ int32_t GetInputData (uint8_t *buf, uint32_t max_len) { do { ret = sdsWrite(sds_camera_id, timeslot, CAM_Frame, sizeof(CAM_Frame)); if (ret == SDS_NO_SPACE) { - osDelay(10U); + osDelay(1U); } } while (ret == SDS_NO_SPACE); SDS_ASSERT(ret == sizeof(CAM_Frame)); diff --git a/RockPaperScissors/AppKit-E8_USB/algorithm/sds_control.c b/RockPaperScissors/AppKit-E8_USB/algorithm/sds_control.c index 2c8852d..c7db9f5 100644 --- a/RockPaperScissors/AppKit-E8_USB/algorithm/sds_control.c +++ b/RockPaperScissors/AppKit-E8_USB/algorithm/sds_control.c @@ -38,7 +38,8 @@ osThreadAttr_t attrAlgorithmThread = { // sdsControlThread thread attributes osThreadAttr_t attr_sdsControlThread = { - .name = "sdsControl" + .name = "sdsControl", + .priority = osPriorityNormal1 }; // Idle time counter diff --git a/RockPaperScissors/AppKit-E8_USB/algorithm/sds_main.c b/RockPaperScissors/AppKit-E8_USB/algorithm/sds_main.c index 8a9ee4d..3c041f8 100644 --- a/RockPaperScissors/AppKit-E8_USB/algorithm/sds_main.c +++ b/RockPaperScissors/AppKit-E8_USB/algorithm/sds_main.c @@ -196,7 +196,7 @@ __NO_RETURN void AlgorithmThread (void *argument) { do { ret = sdsRead(sds_data_in_id, ×lot, algo_data_in_buf, sizeof(algo_data_in_buf)); if (ret == SDS_NO_DATA) { - osDelay(10U); + osDelay(1U); DiscardInputData(); } } while (ret == SDS_NO_DATA); @@ -225,7 +225,7 @@ __NO_RETURN void AlgorithmThread (void *argument) { do { ret = sdsWrite(sds_data_in_id, timeslot, algo_data_in_buf, sizeof(algo_data_in_buf)); if (ret == SDS_NO_SPACE) { - osDelay(10U); + osDelay(1U); } } while (ret == SDS_NO_SPACE); SDS_ASSERT(ret == sizeof(algo_data_in_buf)); @@ -243,7 +243,7 @@ __NO_RETURN void AlgorithmThread (void *argument) { do { ret = sdsWrite(sds_data_out_id, timeslot, algo_data_out_buf, sizeof(algo_data_out_buf)); if (ret == SDS_NO_SPACE) { - osDelay(10U); + osDelay(1U); } } while (ret == SDS_NO_SPACE); SDS_ASSERT(ret == sizeof(algo_data_out_buf)); diff --git a/RockPaperScissors/AppKit-E8_USB/sdsio/fvp/RTE/SDS/sds_config.h b/RockPaperScissors/AppKit-E8_USB/sdsio/fvp/RTE/SDS/sds_config.h index 8d0b50c..ecd50a5 100644 --- a/RockPaperScissors/AppKit-E8_USB/sdsio/fvp/RTE/SDS/sds_config.h +++ b/RockPaperScissors/AppKit-E8_USB/sdsio/fvp/RTE/SDS/sds_config.h @@ -17,7 +17,7 @@ * * Name: sds_config.h * Purpose: SDS configuration options - * Rev.: V3.0.0 + * Rev.: V3.1.0 */ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -40,7 +40,7 @@ #define SDS_THREAD_STACK_SIZE 1024 // SDS system thread priority -#define SDS_THREAD_PRIORITY osPriorityNormal +#define SDS_THREAD_PRIORITY osPriorityNormal1 // SDS stream open timeout in kernel ticks #define SDS_OPEN_TIMEOUT 3000U diff --git a/RockPaperScissors/AppKit-E8_USB/sdsio/fvp/RTE/SDS/sds_config.h.base@3.0.0 b/RockPaperScissors/AppKit-E8_USB/sdsio/fvp/RTE/SDS/sds_config.h.base@3.1.0 similarity index 95% rename from RockPaperScissors/AppKit-E8_USB/sdsio/fvp/RTE/SDS/sds_config.h.base@3.0.0 rename to RockPaperScissors/AppKit-E8_USB/sdsio/fvp/RTE/SDS/sds_config.h.base@3.1.0 index 8d0b50c..ecd50a5 100644 --- a/RockPaperScissors/AppKit-E8_USB/sdsio/fvp/RTE/SDS/sds_config.h.base@3.0.0 +++ b/RockPaperScissors/AppKit-E8_USB/sdsio/fvp/RTE/SDS/sds_config.h.base@3.1.0 @@ -17,7 +17,7 @@ * * Name: sds_config.h * Purpose: SDS configuration options - * Rev.: V3.0.0 + * Rev.: V3.1.0 */ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -40,7 +40,7 @@ #define SDS_THREAD_STACK_SIZE 1024 // SDS system thread priority -#define SDS_THREAD_PRIORITY osPriorityNormal +#define SDS_THREAD_PRIORITY osPriorityNormal1 // SDS stream open timeout in kernel ticks #define SDS_OPEN_TIMEOUT 3000U diff --git a/RockPaperScissors/AppKit-E8_USB/sdsio/fvp/sdsio_fvp.clayer.yml b/RockPaperScissors/AppKit-E8_USB/sdsio/fvp/sdsio_fvp.clayer.yml index f4634a7..5c2f55a 100644 --- a/RockPaperScissors/AppKit-E8_USB/sdsio/fvp/sdsio_fvp.clayer.yml +++ b/RockPaperScissors/AppKit-E8_USB/sdsio/fvp/sdsio_fvp.clayer.yml @@ -3,7 +3,7 @@ layer: description: Layer with SDS and SDSIO using VSI packs: - - pack: ARM::SDS@^3.0.0-0 + - pack: ARM::SDS@^3.1.0-0 connections: - connect: SDS diff --git a/RockPaperScissors/AppKit-E8_USB/sdsio/usb/RTE/SDS/sds_config.h b/RockPaperScissors/AppKit-E8_USB/sdsio/usb/RTE/SDS/sds_config.h index 4d482f8..98c6faa 100644 --- a/RockPaperScissors/AppKit-E8_USB/sdsio/usb/RTE/SDS/sds_config.h +++ b/RockPaperScissors/AppKit-E8_USB/sdsio/usb/RTE/SDS/sds_config.h @@ -17,7 +17,7 @@ * * Name: sds_config.h * Purpose: SDS configuration options - * Rev.: V3.0.0 + * Rev.: V3.1.0 */ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -40,7 +40,7 @@ #define SDS_THREAD_STACK_SIZE 1024 // SDS system thread priority -#define SDS_THREAD_PRIORITY osPriorityNormal +#define SDS_THREAD_PRIORITY osPriorityNormal1 // SDS stream open timeout in kernel ticks #define SDS_OPEN_TIMEOUT 3000U diff --git a/RockPaperScissors/AppKit-E8_USB/sdsio/usb/RTE/SDS/sds_config.h.base@3.0.0 b/RockPaperScissors/AppKit-E8_USB/sdsio/usb/RTE/SDS/sds_config.h.base@3.1.0 similarity index 93% rename from RockPaperScissors/AppKit-E8_USB/sdsio/usb/RTE/SDS/sds_config.h.base@3.0.0 rename to RockPaperScissors/AppKit-E8_USB/sdsio/usb/RTE/SDS/sds_config.h.base@3.1.0 index 4d482f8..98c6faa 100644 --- a/RockPaperScissors/AppKit-E8_USB/sdsio/usb/RTE/SDS/sds_config.h.base@3.0.0 +++ b/RockPaperScissors/AppKit-E8_USB/sdsio/usb/RTE/SDS/sds_config.h.base@3.1.0 @@ -17,7 +17,7 @@ * * Name: sds_config.h * Purpose: SDS configuration options - * Rev.: V3.0.0 + * Rev.: V3.1.0 */ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- @@ -40,7 +40,7 @@ #define SDS_THREAD_STACK_SIZE 1024 // SDS system thread priority -#define SDS_THREAD_PRIORITY osPriorityNormal +#define SDS_THREAD_PRIORITY osPriorityNormal1 // SDS stream open timeout in kernel ticks #define SDS_OPEN_TIMEOUT 3000U diff --git a/RockPaperScissors/AppKit-E8_USB/sdsio/usb/sdsio_usb.clayer.yml b/RockPaperScissors/AppKit-E8_USB/sdsio/usb/sdsio_usb.clayer.yml index 0f7bc2d..f147122 100644 --- a/RockPaperScissors/AppKit-E8_USB/sdsio/usb/sdsio_usb.clayer.yml +++ b/RockPaperScissors/AppKit-E8_USB/sdsio/usb/sdsio_usb.clayer.yml @@ -3,7 +3,7 @@ layer: description: Layer with SDS and SDSIO using USB interface to the SDSIO-Server packs: - - pack: ARM::SDS@^3.0.0-0 + - pack: ARM::SDS@^3.1.0-0 - pack: Keil::MDK-Middleware@^8.0.0 connections: