-
Notifications
You must be signed in to change notification settings - Fork 3k
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
USB Serial constructor blocking #53
Comments
Hi again, I did some more research on this issue (that more than me seem to have - according to some entries on mbed.org). There are several issues (all tested on FRDM-KL25Z):
https://github.com/mbedmicro/mbed/blob/master/libraries/USBDevice/USBDevice/USBDevice.cpp#L711
https://github.com/mbedmicro/mbed/blob/master/libraries/USBDevice/USBDevice/USBDevice.cpp#L835 I am going to try to see if there is any way (maybe only for the FRDM-KL25Z board specifically) to detect if there is something connected to do a graceful startup/shutdown of the USB chain. Also - if the code in USBDevice.cpp#L835 knows that it's pending for a long time (e.g. 20 checks..) then there should be a way to throw an exception (I know... not exception but C-style callbacks, etc.) up through the chain AS WELL as doing a graceful shutdown/reset of anything in the transfer buffer. The current mechanism leaves room for improvement at least :) - I am happy to contribute with my findings but please help me out a bit..we have to deliver 30 educational packages to a high-school soon.. based on this. br |
I am wondering why the writable operation is not implemented to return something useful? https://github.com/mbedmicro/mbed/blob/master/libraries/USBDevice/USBSerial/USBSerial.h#L99 |
Make CircleCI install GCC ARM 4.9 instead of 5.x or 6.x
ARM Internal Ref: IOTMORF-331 |
… from a1982c1..e125164 e125164 Check secure session pointer in timer callback (ARMmbed#61) f49e596 Update unit tests (ARMmbed#59) 6a5634a Support for multiple virtual services (ARMmbed#58) 7fe6b98 Remove yotta files (ARMmbed#57) 5c5c8fe Fix socket send return value overflow (ARMmbed#56) 0870d05 Update unit test stubs to match latest socket api (ARMmbed#55) e687be8 Merge pull request ARMmbed#54 from ARMmbed/warn_fixes b8fe613 updated unittests 8640d05 Compilation warnings fixed eea83e5 Flag out entropy source addition (ARMmbed#53) 7d72eb4 Fix unittests (ARMmbed#52) 4a6991e Avoid referencing ns_msghdr_t::flags git-subtree-dir: features/nanostack/FEATURE_NANOSTACK/coap-service git-subtree-split: e125164
…8c23..af5f59cd2 af5f59cd2 Add CMakeLists.txt to support PAL Tools (#61) 24e16e766 Fix header documentation (#58) 23ea8f51c Update README.md (#57) 99aaa6eef Provide environment-agnostic configuration macros. (#54) da9eb9f3a Merge pull request #53 from ARMmbed/max_trace_level 0a51dcae8 Flash size can be limited by defining MBED_TRACE_MAX_LEVEL git-subtree-dir: features/FEATURE_COMMON_PAL/mbed-trace git-subtree-split: af5f59cd2cbac4064875be0c339da114d88fd5e1
GitHib issue review: Closed due to inactivity. Please re-file if critical issues found. |
Checking for version, for OS master support
* Add support for UBLOX_C030_U201
Fixes ARMmbed#53 Fixes ARMmbed#32
Changed LP ticker count to 32 because the effective bitcount in Mbed …
Because of a blocking connect function in USBDevice ( https://github.com/mbedmicro/mbed/blob/master/libraries/USBDevice/USBDevice/USBDevice.cpp#L711 ) called from the USBCDC constructor ( https://github.com/mbedmicro/mbed/blob/master/libraries/USBDevice/USBSerial/USBCDC.cpp#L34 ), instatiating USB Serial with nothing connected on the actual port blocks execution.
I tried just commenting the while loop out and everything seems to run fine (connect/disconnect and CDC/serial communication with a host computer.
Maybe this should be solved in a different way - but especially when running on battery on KL25Z, this is a problem (the blocking).
The text was updated successfully, but these errors were encountered: