Replies: 1 comment
-
More data: The Pico seems to think it has a PID error (expected Data0 but got Data1 or visa versa). By design, it is supposed to ignore these. But, then it gets in a loop where it retries on every USB time slice. Each time the device sends the same data, which is again ignored by the Pico and this continues on forever.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm writing a custom host bulk transfer support for a device using usbh_app_driver_get_cb() on a Pico as the host. Get it to connect but when an IN is sent and the device sends data, I get no callback to my app nor is an ACK is sent to the device. I can see this using a USB analyzer. Is this a endpoint config issue? I know the control endpoints work as I can query the device, getting its PID/VID and endpoints (which I used to set up my bulk endpoints).
FYI - I borrowed a lot of my of my code from the cdc_host example, including the setup and use of streams.
All the control endpoint messages work fine. I'm only having issues with creating a BULK endpoint pair.
I have a class_driver (usbh_class_driver_t) set up with the name and the 6 functions filled in
I set up my app to have a usbh_app_driver_get_cb() function.
This gets called and I return a pointer to my class driver.
.init gets called and I create a stream for each direction:
.open gets called and I open the end point and connect the streams:
.set_config gets called and I set the stream to read:
tu_edpt_stream_read_xfer(daddr, &sek_inf.stream.rx);
I send data to the device to request some info:
tu_edpt_stream_write(sek_inf.daddr, &sek_inf.stream.tx, buffer, bufsize);
then flush the stream:
return tu_edpt_stream_write_xfer(sek_inf.daddr, &sek_inf.stream.tx);
I then can see the data on a USB analyzer begin sent. This seems to always be followed up by a SOF in which the devices replays IN-NAK because it has not process the request for data. From that point on, the host send IN which the device send the requested data but the host does not ACK so the device sends again and this repeats over and over.
Beta Was this translation helpful? Give feedback.
All reactions