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

Replace call to serial stream with channel equivalent that has timeout #1606

Merged
merged 1 commit into from
Apr 21, 2020

Conversation

josesimoes
Copy link
Member

Description

  • The calls to write and read to/from the serial channel where using a function without timeout.

Motivation and Context

  • The existing code was causing the call to block when the buffer got full because there was no one at the other end to read it. The end result was that the watchdog was kicking in.
    When booting the device sends a ping to check if there is a debugger listening. When there is no answer the execution continues happily. If VS is running the system will get a reply to that ping and will set the flag CLR_EE_DBG_SET( Enabled ); .
    On any subsequent calls that are checked against that flags, like the CLR_EE_DBG_EVENT_BROADCAST their execution has to be timed risking blocking the execution because the debugger may go away for some reason or even that there is no debug session actually going on.
  • Resolves Use of SPI APIs stops device deploy/debug after first execution Home#596.

How Has This Been Tested?

  • SPI sample app from samples repo running on a STM32F429 disco. The app now continues execution with or without VS connected.

Screenshots

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]

@josesimoes josesimoes added Type: bug Platform: STM32 Everything related specifically with ChibiOS platform labels Apr 21, 2020
@nfbot
Copy link
Member

nfbot commented Apr 21, 2020

Hi @josesimoes,

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

A human will be reviewing it shortly. 😉

@josesimoes josesimoes merged commit e759b00 into nanoframework:develop Apr 21, 2020
@josesimoes josesimoes deleted the fix-596 branch April 21, 2020 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: STM32 Everything related specifically with ChibiOS platform Type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use of SPI APIs stops device deploy/debug after first execution
2 participants