Repository navigation
Pinned the ThreadX simulator tick rate in the Windows test build - #301
Merged
fdesbiens merged 1 commit intoNov 9, 2026
Merged
Conversation
ThreadX #833 changed the Windows simulators' defaults from a 1 ms timer interrupt processing five ticks to a 10 ms interrupt processing one, so that simulated time follows the host clock. This suite's Windows delays assume five ticks per millisecond, as its CMake comments say. Built against ThreadX dev without that rate, usbx_ux_device_class_storage_vendor_strings_test reconnects the storage device and then gets INQUIRY strings that do not match the ones it configured. The Windows build now sets TX_TIMER_PERIODIC=1 and TX_WIN32_TICKS_PER_INTERRUPT=5 on the ThreadX target. These equal the port defaults in ThreadX 6.5.2.202603, so nothing changes when building against that release. Against ThreadX dev at 44b394a3, the Win64 suite passes 433/433 with this change and 432/433 without it. The vendor strings test fails 10 of 10 runs without it and passes 10 of 10 with it. Assisted-by: Claude Code (Opus 5.5) <noreply@anthropic.com>
fdesbiens
added a commit
that referenced
this pull request
Nov 9, 2026
…302) After disconnecting, usbx_ux_device_class_storage_vendor_strings_test re-created the device and reconnected without waiting for the host to remove the old storage instance, so its readiness check could find that instance and the INQUIRY read the old strings. Its INQUIRY helper also built the command in the instance's shared CBW and sent it without the storage lock, while the class thread sends its media checks through the same CBW. The test now waits for the removal, as the CDC-ACM tests do, and its INQUIRY helper holds the storage lock while it builds and sends the command. With the wait alone, the INQUIRY reached the new instance and collided with a media check, which then ran a data phase without a buffer and crashed the host simulator. On Win64 against ThreadX dev, the test failed 10 of 10 runs before the change, with mismatched strings. With the removal wait alone it failed 10 of 10 with a segfault in _ux_hcd_sim_host_transaction_schedule. With both parts it passes 10 of 10, and 10 of 10 with the tick settings of #301. Not run on Linux. Assisted-by: Claude Code (Opus 5.5) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ThreadX #833 changed the Windows simulators' defaults from a 1 ms timer interrupt processing five ticks to a 10 ms interrupt processing one, so that simulated time follows the host clock. This suite's Windows delays assume five ticks per millisecond, as its CMake comments say. Built against ThreadX dev without that rate, usbx_ux_device_class_storage_vendor_strings_test reconnects the storage device and then gets INQUIRY strings that do not match the ones it configured.
The Windows build now sets TX_TIMER_PERIODIC=1 and TX_WIN32_TICKS_PER_INTERRUPT=5 on the ThreadX target. These equal the port defaults in ThreadX 6.5.2.202603, so nothing changes when building against that release.
Against ThreadX dev at 44b394a3, the Win64 suite passes 433/433 with this change and 432/433 without it. The vendor strings test fails 10 of 10 runs without it and passes 10 of 10 with it.