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

BACKPORT of upstream NuttX stm32_serial: fix freezing serial port. #7260

Merged
merged 1 commit into from May 20, 2017

Conversation

Projects
None yet
6 participants
@davids5
Copy link
Member

davids5 commented May 17, 2017

Thanks to Jussi Kivilinna

https://bitbucket.org/nuttx/nuttx/commits/9169ff6a15fe65ba4af134b470dbf89220274c19

stm32_serial: fix freezing serial port. Serial interrupt enable/disable functions
do not disable interrupts and can freeze device when serial interrupt is received
while execution is at those functions.

Trivially triggered with two or more threads write to regular syslog stream and to
emergency stream. In this case, freeze happens because of mismatch of priv->ie
(TXEIE == 0) and actually enabled interrupts in USART registers (TXEIE == 1),
which leads to unhandled TXE interrupt and causes interrupt storm for USART.

David Sidrane
BACKPORT of upstream NuttX stm32_serial: fix freezing serial port.
   Thanks to Jussi Kivilinna

   https://bitbucket.org/nuttx/nuttx/commits/9169ff6a15fe65ba4af134b470dbf89220274c19

   stm32_serial: fix freezing serial port.  Serial interrupt enable/disable functions
   do not disable interrupts and can freeze device when serial interrupt is received
   while execution is at those functions.

   Trivially triggered with two or more threads write to regular syslog stream and to
   emergency stream. In this case, freeze happens because of mismatch of priv->ie
   (TXEIE == 0) and actually enabled interrupts in USART registers (TXEIE == 1),
   which leads to unhandled TXE interrupt and causes interrupt storm for USART.
@mhkabir

This comment has been minimized.

Copy link
Member

mhkabir commented May 17, 2017

@tops4u You might want to test this.

@tops4u

This comment has been minimized.

Copy link
Contributor

tops4u commented May 17, 2017

@mhkabir Thanks for the Info. I'll try to look into this tomorrow.

@davids5

This comment has been minimized.

Copy link
Member Author

davids5 commented May 17, 2017

@tops4u @mhkabir - is there an issue that can be cross linked here?

@davids5 davids5 referenced this pull request May 17, 2017

Closed

Release v1.6 sign-off #7258

8 of 21 tasks complete
@Avysuarez

This comment has been minimized.

@davids5

This comment has been minimized.

Copy link
Member Author

davids5 commented May 17, 2017

@PX4TestFlights Please ensure to test with equipment that relies on many serial connection. 915 Mhz and OSD with GPS would be good. A companion computer over serial wold also be a good test.

@Avysuarez

This comment has been minimized.

Copy link

Avysuarez commented May 18, 2017

@LorenzMeier LorenzMeier merged commit 6bf19d2 into master May 20, 2017

5 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/sitl/pr Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
semaphoreci The build passed on Semaphore.
Details

@LorenzMeier LorenzMeier deleted the master_stm32_serail_hang_fix branch May 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.