-
Notifications
You must be signed in to change notification settings - Fork 537
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
examples/foc: add real time data capture with nxscope lib #1765
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks cool! :-)
@raiden00pl did you consider USB HID? It uses small fast interrupt transfers and provides quite good portability (+python modules on the host side). There is an interesting discussion at libusb/hidapi#274 (comment) on High-Speed vs Full-Speed HID problems and improving transfers at low level and hidapi vs hidraw implementation for various OS in favor of hidraw replacing hidapi :-) I have just ordered cheap ESP32-S2 devkits maybe they will provide necessary USB Device to play with.. and the second device has OLED Display :-) |
@cederom that's interesting idea. I have no experience with usbdev as HID and NuttX doesn't seem to support HID device driver, so it's not so easy to verify :) |
There is a HIDKBD example app but I did not use it yet.. lets see when ESP32-S2 comes and some free time to play :-) https://github.com/apache/nuttx-apps/tree/master/examples/hidkbd If that chip works with both USB and WiFi then I could finally create virtual hid tester / fuzzer one day.. I have this idea to emulate various USB HID devices for host stack and libraries testing.. as for now people need to have whole bunch of devices while usually it is only the descriptor part that matters and some payload data all this could be provided over WiFi :-) |
For HIDAPI I have used the testing devices mentioned here. ESP32 C3/S2/S3/C6 should have have USB HID support and BLE HID support. |
Summary
Impact
It's now possible to capture controller data easily and then visualizing them. Useful for controller tuning and debugging.
Testing
Tested with nxscope client https://github.com/railab/nxscli
Data stream on UART works fine.
Data stream on full-speed CDCACM device adds too much uC overload which breaks FOC control loops and is not recommended (usbdev full-speed packet limit is too small). High-speed CDCACM should be more practical, but I don't have proper hardware to test.