-
Notifications
You must be signed in to change notification settings - Fork 19
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
General USB fixes ported from the new mmu bootloader #323
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,16 +2,16 @@ | |
|
||
#define USB_DEVICE_ONLY | ||
#define DEVICE_STATE_AS_GPIOR 0 | ||
// #define ORDERED_EP_CONFIG | ||
#define ORDERED_EP_CONFIG | ||
#define FIXED_CONTROL_ENDPOINT_SIZE 8 | ||
#define FIXED_NUM_CONFIGURATIONS 1 | ||
#define INTERRUPT_CONTROL_ENDPOINT | ||
#define USE_FLASH_DESCRIPTORS | ||
#define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL) | ||
#define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_MANUAL_PLL) | ||
#define NO_INTERNAL_SERIAL | ||
#define NO_DEVICE_SELF_POWER | ||
#define NO_DEVICE_REMOTE_WAKEUP | ||
// #define NO_SOF_EVENTS | ||
#define NO_SOF_EVENTS | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤔 this sounds dangerous, we had tons of trouble with SOF events on Buddy platform... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SOF is not used by the CDC class. In device mode, only stuff that does isochronous streams of data cares about SOF, such as UAC and UVC. So disabling the handling of the flag in the interrupt has no adverse effect. We don't care about the SOF callback. |
||
#define F_USB F_CPU | ||
#define DEVICE_VID 0x2C99 | ||
#define DEVICE_PID 0x0004 |
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.
🤔 just a thought - can't we run into mysterious issues with flashing the MMU board on some platforms? Hopefully not, USB arbitration should be hidden from the avr-dude, but who knows?
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.
Yes, the endpoint structure is hidden from avrdude. It's the OS CDC class driver that handles this. As for whether it can be a problem, I very much doubt it. There is no hardcoded order in which endpoints have to be allocated, so any driver should handle this. The only maybe risky driver is the custom one on Windows that applies the MMU product name instead of a generic name to the virtual com port, but that seems to be working just fine on my end, so I doubt there will be any issue caused by this.