Comments (4)
AFAIK ISO EP double buffering for the F103 and similar USBFS can't be disabled due to hardware design. Anyway, let me check the docs.
from libusb_stm32.
Yes. See RM008 Section 23.4.4 "Isochronous transfers"
from libusb_stm32.
Thank you for pointing me in the right direction. Seems clear that it is not intended to be used using a single buffer, and any possible solution will be non-standard.
However, for future reference, I might try these two things:
- Set TX_0 and TX_1 to the same packet buffers, without any other additional action taken. Hardware toggle of DTOG should have no effect then, however behaviour might be undefined
- Set one adress field to a small separate buffer and then manually toggle DTOG when I'm ready to send again, unless I want it to it shouldn't have to do anything with the small buffer
Will comment when I did try, but probably won't do for at least a few months.
from libusb_stm32.
I have a related followup, not sure if it is an issues per se though.
The TX pma buffers are not cleared after an isochronous IN transfer has been completed, resulting in the same data being send 2 frames afterwards if you do not explicitly overwrite the PMA. I adressed this by a usbd_ep_write(usbd, ep, NULL, 0);
call in the isochronous TX callback. Since all it needs to do is reset the PMA buffer count COUNTn_TX_x, this works as well:
if (!(*reg & USB_EP_DTOG_TX)) {
tbl->tx1.cnt = 0;
} else {
tbl->tx0.cnt = 0;
}
Since the TX callback is fired right when the DTOG is toggled (according to RM008), the usb driver user shouldn't have had the chance to write to the buffer yet, so I think this is a safe addition to the libusb_stm32 core (for isochronous transfers IN). This results in only the isochronous transfer immediately after a usbd_ep_write call to send the data, as expected.
On an unrelated note, I would think that a WCID example might be helpful. I recently implemented it and while it didn't take terribly long, it's simple copy-paste code that would be nice to have as an example, since I assume many people will be using WinUSB for windows. There are only two requests to cover and some custom data structures. If you want, I can create a simple example.
from libusb_stm32.
Related Issues (20)
- STM32F411: Sending corrupted data HOT 18
- Thoughts on unimplemented USB_STD_SET_FEATURE & USB_STD_CLEAR_FEATURE for Device? HOT 7
- STM32L151C8 pma_write and pma_read BUG? HOT 7
- USB Compliance test failed (Chapter9) HOT 6
- Howto use this lib in a real project? HOT 3
- Greetings HOT 1
- cdc_loop example at high speed HOT 3
- Mass storage? HOT 1
- Add STM32 U5 Support HOT 2
- Add common usb_conf.h HOT 1
- Missing STM32F103x8
- Host?
- Missing vendor request demo
- with pedantic, this two places wont compile HOT 1
- Find out if there is any real data to read for an interrupt. HOT 2
- gd32 usbfs support HOT 7
- STM32L476RG assert failed: endpoint busy HOT 1
- Get data for USB HID Keyboard's LED via Class Request 0x09 (Set Report)? HOT 3
- Best way to control EP data send flow (ACK/NACK)? HOT 1
- Warning in usbd_stm32f103_devfs.c HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libusb_stm32.