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

Xtensa: Set up time slice before switching task, tweak tick rate #323

Merged
merged 3 commits into from
Nov 1, 2023

Conversation

bugadani
Copy link
Contributor

@bugadani bugadani commented Oct 31, 2023

Similar to how it's done for RISC-V, set up the time-slice timer before switching tasks. This ensures that after a yield_task, the next task has the full time-slice to run.

I've changed the Xtensa tick rate to 30MHz. It doesn't affect much, and it's easier to calculate. We could probably use the original 240MHz but the wifi stack works with 32-bit timestamps and the 17 second range could be a bit too tight.

@bugadani bugadani changed the title Set up time slice before switching task Xtensa: Set up time slice before switching task Oct 31, 2023
@bugadani bugadani changed the title Xtensa: Set up time slice before switching task Xtensa: Set up time slice before switching task, tweak tick rate Oct 31, 2023
@bugadani bugadani marked this pull request as draft October 31, 2023 13:39
@bugadani bugadani marked this pull request as ready for review October 31, 2023 13:53
Copy link
Contributor

@bjoernQ bjoernQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bjoernQ bjoernQ merged commit 316e9a5 into esp-rs:main Nov 1, 2023
@bugadani bugadani deleted the timeslice branch November 1, 2023 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants