PelionIoT / mbed-os-example-pelion-psoc64

Mbed OS example for Pelion Device Management using Cypress PSoC® 64 Secure Microcontroller
Apache License 2.0
2 stars 5 forks source link

Serial data output hangs if Buffered Serial is enabled #17

Open maclobdell opened 3 years ago

maclobdell commented 3 years ago

Describe the bug

If the platform.stdio-buffered-serial feature is enabled in _mbedapp.json, then the system will typically hang some indeterminate time after the Pelion Client is initialized.

"platform.stdio-buffered-serial"            : true,

Normally, enabling buffered serial can result in better stability. But in this case, it causes either the system or just the serial output to crash.

By default we have turned off Buffered Serial until this issue can be resolved. At that point it should be re-enabled.

Things I've investigated

To Reproduce Steps to reproduce the behavior:

  1. Set "platform.stdio-buffered-serial" to true
  2. Follow the other steps in the readme to build and run the application.
  3. See error

Expected behavior It should not hang.

Logs none

Host system (please complete the following information):

Device information:

Additional context none

ifyall commented 3 years ago

@maclobdell, do you know if this only impacts the PSoC 064 board, or is it seen in PSoC 062 boards as well?

Thank you in advance,

Ian

moshe-shahar commented 3 years ago

I think it was not tested on PSoC 062. It was faster to reproduce it if the profile was debug (mbed compile --profile debug) and traces were enabled.

Also, I was using ModusToolbox 2.1 for the debugger but I couldn't reproduce it when the debugger was connected.