Add timer system state snapshot APIs - #1462
Open
Zepp-Hanzj wants to merge 1 commit into
Open
Conversation
|
Contributor
Author
|
FreeRtos_test_TimerSnapShot.txt |
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.



Description
Add a development-time snapshot API for software timers, analogous to the existing task system-state API:
TimerStatus_t,uxTimerGetNumberOfTimers(), anduxTimerGetSystemState()whenconfigUSE_TRACE_FACILITY == 1.StaticTimer_tsize compatibility with the internal timer structure.The snapshot API is intended for diagnostics. Timer commands still waiting in the timer command queue are intentionally not reflected, and returned handles/pointers are borrowed. There is no added per-timer cost when
configUSE_TRACE_FACILITY == 0; trace-enabled builds add one link pointer per timer.Test Steps
configUSE_TRACE_FACILITYand create active/inactive, auto-reload/one-shot, dynamic/static timers.uxTimerGetNumberOfTimers()anduxTimerGetSystemState()before scheduler start and while the scheduler is running.Validation
Target validation used an STM32F407ZGT6 with the GCC/ARM_CM4F port, HSE 8 MHz, SYSCLK 168 MHz, and TIM2 at 10 kHz.
created == deleted, the registry returned to 4 base timers, free heap remained 39,304 bytes,BASEPRIremained zero, and the accumulated error count remained zero.FINAL PASS sec=3600 ... errors=0.arm-none-eabi-gcc; ELF symbols, interrupt vector placement, and scheduler suspend/resume calls were also checked.git diff --checkpassed.The full UART log will be added separately in a PR comment.
Checklist:
Related Issue
Closes #1313.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.