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

Work on PAL events and PAL time #690

Merged
merged 4 commits into from
May 17, 2018

Conversation

josesimoes
Copy link
Member

@josesimoes josesimoes commented May 16, 2018

Description

  • Rename PAL events timer to improve clarity
  • Correct bug in Events_WaitForEvents: wrong call to HAL_Time_CurrentSysTicks instead of HAL_Time_CurrentTime because nF ticks are required for HAL_COMPLETION
  • Events_WaitForEvents is now using OS Yield instead of OS Wait for a smoother execution
  • Rework PAL time by using a timer with callback to schedule HAL_COMPLETION events instead of checking for that on every sysTick
  • Remove Time_Interrupt_Hook() from CH_CFG_SYSTEM_TICK_HOOK (not required anymore)
  • Rename some argumens to improve clarity
  • Clean up code in PAL events for ESP32

Motivation and Context

How Has This Been Tested?

  • Tested with Blinky app in STM32F429I-DISCO and ESP32

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Signed-off-by: josesimoes [email protected]

- Rename PAL events timer to improve clarity
- Correct bug in Events_WaitForEvents: wrong call to HAL_Time_CurrentSysTicks instead of HAL_Time_CurrentTime because nF ticks are required for HAL_COMPLETION
- Events_WaitForEvents is now using OS Yield instead of OS Wait for a smoother execution
- Rework PAL time by using a timer with callback to schedule HAL_COMPLETION events instead of checking for that on every sysTick
- Remove Time_Interrupt_Hook() from CH_CFG_SYSTEM_TICK_HOOK (not required anymore)
- Rename some argumens to improve clarity
- Clean up code in PAL events for ESP32

Signed-off-by: josesimoes <[email protected]>
@josesimoes josesimoes added Type: enhancement Area: Interpreter Everything related with the interpreter, execution engine and such Series: STM32xx Everything related specifically with STM32 targets Series: ESP32 Everything related specifically with ESP32 series targets labels May 16, 2018
@nfbot
Copy link
Member

nfbot commented May 16, 2018

Hi @josesimoes,

I'm nanoFramework bot.
Thank you for your contribution!

A human will be reviewing it shortly. 😉

@josesimoes
Copy link
Member Author

@MatthiasJentsch and @ishvedov appreciate if you could give a try with this PR for ESP32. Thanks!

Signed-off-by: josesimoes <[email protected]>
@ishvedov
Copy link

@josesimoes working with little performance degradation. Or may be my test faulted.

@josesimoes
Copy link
Member Author

OK. Thanks. 👍

@MatthiasJentsch
Copy link
Contributor

I'm not sure how to test this. @ishvedov how did you test it?

@ishvedov
Copy link

@MatthiasJentsch, go to Slack.

@josesimoes
Copy link
Member Author

I'm now able to test this with ESP32. It's performing as expected.

@josesimoes josesimoes merged commit a550b18 into nanoframework:develop May 17, 2018
@josesimoes josesimoes deleted the rework-on-events branch May 17, 2018 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Interpreter Everything related with the interpreter, execution engine and such Series: ESP32 Everything related specifically with ESP32 series targets Series: STM32xx Everything related specifically with STM32 targets Type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Thread.Sleep() is not accurate
4 participants