Comments (3)
Maybe you could copy the result to a local variable and see the reason (the value at *reg):
volatile uint16_t *reg = EPR(ep);
switch (*reg & (USB_EPTX_STAT | USB_EP_T_FIELD | USB_EP_KIND))
:
from libusb_stm32.
The mask (USB_EPTX_STAT | USB_EP_T_FIELD | USB_EP_KIND) is 0x0730.
reg is pointing to adr. 0x40005C04 which is I guess is register USB_EP1R, ep is 0x81.
In good case (case (USB_EP_TX_NAK | USB_EP_BULK):) reg is 0x7061 when entering the case and 0x70A1 when leaving the case.
In bad case (default:) reg is for example 0xA0A1 or 0xE0A1 (breakpoint at return statement)
FYI: I use a jLink debugger and can therefore inspect these values.
I also tried resending after -1 is returned in a do-while-loop. This didn't work either, but I need to deep dive more into it. This seems to be the obvious solution.
So Dmitry is from Ukraine? I really hope he is safe. I am of course not in the position to expect any answer from him.
from libusb_stm32.
Well, FWIW, I never wrote at that level, I always used usbd_ep_write().
I'm going to hazard a guess that the endpoint isn't ready, try again later... you could implement that and see if the situation resolves if you do retry.
It's probably the middle of the night where Dmitry is and/or the war might be affecting him or his locale.
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
- 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 2
- 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.