Skip to content
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

MCP750 should set up a timebase like other PSPs do #171

Closed
jphickey opened this issue Jun 16, 2020 · 1 comment · Fixed by #286 or #289
Closed

MCP750 should set up a timebase like other PSPs do #171

jphickey opened this issue Jun 16, 2020 · 1 comment · Fixed by #286 or #289
Assignees
Labels
enhancement New feature or request mcp750

Comments

@jphickey
Copy link
Contributor

Is your feature request related to a problem? Please describe.
MCP750 currently uses a (Very inaccurate) infinite loop with an OS_TaskDelay() to mimic a 1Hz callback. This is inaccurate as it drifts over time and not the best way to create a 1Hz tick.

Describe the solution you'd like
In pc-linux and pc-rtems this just sets up a timebase object so CFE_TIME (or anything else) can register their own 1Hz timer and have it by synchronized to the PSP Time source. Recommend to use this on MCP750 too.

Additional context
Infinite loops with no exit condition are also bad for unit testing.

This code to set up a PSP timebase using kernel timer could be modularized, as the implementation is already abstracted in OSAL.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey self-assigned this Jun 16, 2020
@jphickey jphickey added the enhancement New feature or request label Jun 16, 2020
@jphickey
Copy link
Contributor Author

The time has now come where this probably needs to be addressed. With the facility now provided via #264 the "preferred" 1Hz/timing logic for example platforms (where it is generated from OSAL) can be put into a module and used on all 3 platforms.

Making a module still allows easy customization for users that do not want to use OSAL/RTOS timers as the source of 1Hz/timing info.

I also need this (or something like it) to provide a better alternative to CFE_PSP_GetTime() so that nasa/cFE#1244 can be solved.

jphickey added a commit to jphickey/PSP that referenced this issue Mar 30, 2021
Add a new PSP module that instantiates an OSAL abstract timebase
for use with cFE services.  This single module is then used
across all 3 implementations (mcp750, pc-linux, pc-rtems) and
does not need to be duplicated.
jphickey added a commit to jphickey/PSP that referenced this issue Mar 30, 2021
Add a new PSP module that instantiates an OSAL abstract timebase
for use with cFE services.  This single module is then used
across all 3 implementations (mcp750, pc-linux, pc-rtems) and
does not need to be duplicated.
astrogeco added a commit that referenced this issue Apr 6, 2021
Fix #171, use OSAL timebase for CFE timers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mcp750
Projects
None yet
2 participants