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

usb backend does not discover nrf51822 mbed board #36

Closed
clemtaylor opened this issue Jun 22, 2014 · 4 comments
Closed

usb backend does not discover nrf51822 mbed board #36

clemtaylor opened this issue Jun 22, 2014 · 4 comments

Comments

@clemtaylor
Copy link

I'm trying to use pyOCD with the nrf51822 mbed board. pyOCD detects the board when I plug it in, but it does not discover the endpoints ("ERROR:root:Endpoints not found"). I am using the default libusb backend and the issue seems to be that getAllConnectedInterface() is looking for both an ep_out and ep_in. However, lsusb shows that the nrf51822 mbed board only has an in endpoint for the MBED CMSIS-DAP HID Interface.

If I use the test case in the hidapi library it seems to discover the board just fine.
By default interface/init.py uses pyusb for non-Darwin posix os. So I built the cython-hidapi (from https://github.com/trezor/cython-hidapi.git) and ran the try.py with the vid/pid for the mbed board and it opens the device and reads back some data. But when I force the backend to 'hidapiusb' via PYOCD_USB_BACKEND, basic_test.py segfaults doing a hid_write() someplace in inside of chooseBoard().

Should the pyusb backend work with the nrf51822 mbed board? I'm using a new install of fedora 20 on a x86_64 box.

I was using the nordic branch of pyOCD, but pyOCD never gets far enough in the startup for the nordic changes to have any effect.

@ECNU3D
Copy link
Contributor

ECNU3D commented Jun 23, 2014

Hi clemtaylor, I've just noticed this issue #33, maybe the support for nrf51822 haven't been merged.

@clemtaylor
Copy link
Author

I was using the nordic branch of pyOCD, but pyOCD never gets far enough for the nordic patches to take effect. It is not getting past chooseBoard() which is just looking at pid/vid/endpoints.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 10, 2014

@clemtaylor , did the new pull request (not merged, just pull it from their branch) solve your issue?

@clemtaylor
Copy link
Author

Yes, the EP0 fix worked for me.

I'm still running into other unrelated pyOCD/nrf51822 issues, but I can connect, flash non-softdevice applications and do some basic debug. I need to file another bug on usability issues with pyOCD and the nrf51822.

mmahadevan108 pushed a commit to flit/pyOCD that referenced this issue Apr 14, 2017
Add support for the nrf51-dk and atsam3u hdk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants