-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Remove support for tmrCOMMAND_START_DONT_TRACE #305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Prior to this commit, the timer task used tmrCOMMAND_START_DONT_TRACE to reload a "backlogged" auto-reload timer -- one for which a reload operation would have started a period that had already elapsed. If the command queue contained a stop or delete command when tmrCOMMAND_START_DONT_TRACE was put into the queue for a reload, the timer unexpectedly restarted when the timer task processed tmrCOMMAND_START_DONT_TRACE. This commit implements a new method of reloading auto-reload timers and eliminates support for tmrCOMMAND_START_DONT_TRACE. No other code sends this private command. However, the symbol tmrCOMMAND_START_DONT_TRACE remains defined, with its original command value, so as not to impact trace applications. Also fix one-shot timers that were not reliably being marked as not active: - when they expired before the start command could be processed - when the expiration was processed during the timer list switch Also improve consistency: - Always reload auto-reload timers *before* calling the callback. - Always call traceTIMER_EXPIRED() just prior to the callback.
Codecov Report
@@ Coverage Diff @@
## main #305 +/- ##
=======================================
Coverage 90.60% 90.60%
=======================================
Files 3 3
Lines 532 532
Branches 142 142
=======================================
Hits 482 482
Misses 14 14
Partials 36 36
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
Change was intended to faithfully work through a backlog that spanned a list switch, and before processing a stop or delete command. But, (1) it isn't important to do that, and (2) the code didn't accomplish the intention when *two* auto-reload timers were backlogged across a list switch. Best to simply leave this part of the code as it was before.
ca1a166 to
f275a66
Compare
n9wxu
approved these changes
Apr 13, 2021
h2zero
added a commit
to h2zero/NimBLE-Arduino
that referenced
this pull request
Nov 25, 2021
This adds a workaround for a bug in FreeRTOS xTimerIsTimerActive function that would return true when the timer has expired. This bug was introduced in FreeRTOS V10.2.0, and fixed in V10.4.4. See: FreeRTOS/FreeRTOS-Kernel#305
h2zero
added a commit
to h2zero/esp-nimble
that referenced
this pull request
Nov 25, 2021
This adds a workaround for a bug in FreeRTOS xTimerIsTimerActive function that would return true when the timer has expired. This bug was introduced in FreeRTOS V10.2.0, and fixed in V10.4.4. See: FreeRTOS/FreeRTOS-Kernel#305
3 tasks
h2zero
added a commit
to h2zero/esp-nimble
that referenced
this pull request
May 15, 2022
This adds a workaround for a bug in FreeRTOS xTimerIsTimerActive function that would return true when the timer has expired. This bug was introduced in FreeRTOS V10.2.0, and fixed in V10.4.4. See: FreeRTOS/FreeRTOS-Kernel#305
copybara-service bot
pushed a commit
to pigweed-project/pigweed
that referenced
this pull request
Jul 25, 2023
After further research, it was determined that there was no race condition. The actual issue is that xTimerIsTimerActive is unreliable in certain circumstances in FreeRTOS before FreeRTOS/FreeRTOS-Kernel#305. Bug: b/291346908 Change-Id: I2d17045d536e9353934d1558fe3b0429f9ea354f Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/159231 Reviewed-by: Ewout van Bekkum <[email protected]> Pigweed-Auto-Submit: Wyatt Hepler <[email protected]> Presubmit-Verified: CQ Bot Account <[email protected]> Commit-Queue: Auto-Submit <[email protected]>
h2zero
added a commit
to h2zero/esp-nimble
that referenced
this pull request
Feb 23, 2024
This adds a workaround for a bug in FreeRTOS xTimerIsTimerActive function that would return true when the timer has expired. This bug was introduced in FreeRTOS V10.2.0, and fixed in V10.4.4. See: FreeRTOS/FreeRTOS-Kernel#305
h2zero
added a commit
to h2zero/esp-nimble
that referenced
this pull request
Jun 10, 2024
This adds a workaround for a bug in FreeRTOS xTimerIsTimerActive function that would return true when the timer has expired. This bug was introduced in FreeRTOS V10.2.0, and fixed in V10.4.4. See: FreeRTOS/FreeRTOS-Kernel#305
h2zero
added a commit
to h2zero/esp-nimble
that referenced
this pull request
Feb 9, 2025
This adds a workaround for a bug in FreeRTOS xTimerIsTimerActive function that would return true when the timer has expired. This bug was introduced in FreeRTOS V10.2.0, and fixed in V10.4.4. See: FreeRTOS/FreeRTOS-Kernel#305
h2zero
added a commit
to h2zero/esp-nimble
that referenced
this pull request
Feb 9, 2025
This adds a workaround for a bug in FreeRTOS xTimerIsTimerActive function that would return true when the timer has expired. This bug was introduced in FreeRTOS V10.2.0, and fixed in V10.4.4. See: FreeRTOS/FreeRTOS-Kernel#305
h2zero
added a commit
to h2zero/esp-nimble
that referenced
this pull request
Feb 9, 2025
This adds a workaround for a bug in FreeRTOS xTimerIsTimerActive function that would return true when the timer has expired. This bug was introduced in FreeRTOS V10.2.0, and fixed in V10.4.4. See: FreeRTOS/FreeRTOS-Kernel#305
h2zero
added a commit
to h2zero/esp-nimble
that referenced
this pull request
Apr 13, 2025
This adds a workaround for a bug in FreeRTOS xTimerIsTimerActive function that would return true when the timer has expired. This bug was introduced in FreeRTOS V10.2.0, and fixed in V10.4.4. See: FreeRTOS/FreeRTOS-Kernel#305
h2zero
added a commit
to h2zero/esp-nimble
that referenced
this pull request
Apr 16, 2025
This adds a workaround for a bug in FreeRTOS xTimerIsTimerActive function that would return true when the timer has expired. This bug was introduced in FreeRTOS V10.2.0, and fixed in V10.4.4. See: FreeRTOS/FreeRTOS-Kernel#305
h2zero
added a commit
to h2zero/esp-nimble
that referenced
this pull request
Apr 16, 2025
This adds a workaround for a bug in FreeRTOS xTimerIsTimerActive function that would return true when the timer has expired. This bug was introduced in FreeRTOS V10.2.0, and fixed in V10.4.4. See: FreeRTOS/FreeRTOS-Kernel#305
h2zero
added a commit
to h2zero/esp-nimble
that referenced
this pull request
Apr 17, 2025
This adds a workaround for a bug in FreeRTOS xTimerIsTimerActive function that would return true when the timer has expired. This bug was introduced in FreeRTOS V10.2.0, and fixed in V10.4.4. See: FreeRTOS/FreeRTOS-Kernel#305
h2zero
added a commit
to h2zero/esp-nimble
that referenced
this pull request
Apr 17, 2025
This adds a workaround for a bug in FreeRTOS xTimerIsTimerActive function that would return true when the timer has expired. This bug was introduced in FreeRTOS V10.2.0, and fixed in V10.4.4. See: FreeRTOS/FreeRTOS-Kernel#305
h2zero
added a commit
to h2zero/esp-nimble
that referenced
this pull request
Apr 17, 2025
This adds a workaround for a bug in FreeRTOS xTimerIsTimerActive function that would return true when the timer has expired. This bug was introduced in FreeRTOS V10.2.0, and fixed in V10.4.4. See: FreeRTOS/FreeRTOS-Kernel#305
h2zero
added a commit
to h2zero/esp-nimble
that referenced
this pull request
Apr 22, 2025
This adds a workaround for a bug in FreeRTOS xTimerIsTimerActive function that would return true when the timer has expired. This bug was introduced in FreeRTOS V10.2.0, and fixed in V10.4.4. See: FreeRTOS/FreeRTOS-Kernel#305
h2zero
added a commit
to h2zero/esp-nimble
that referenced
this pull request
Apr 22, 2025
This adds a workaround for a bug in FreeRTOS xTimerIsTimerActive function that would return true when the timer has expired. This bug was introduced in FreeRTOS V10.2.0, and fixed in V10.4.4. See: FreeRTOS/FreeRTOS-Kernel#305
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.
Remove support for tmrCOMMAND_START_DONT_TRACE
Description
This PR is a potential replacement for #303 and fixes the same issues but using a more direct approach.
This PR also fixes one-shot timers that were not being marked as inactive:
and also improves consistency:
Test Steps
See FreeRTOS/FreeRTOS#553.
Related Issue
https://forums.freertos.org/t/freertos-time-correction/11856
https://forums.freertos.org/t/timer-start-dont-trace-race-condition/12168
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.