Well, I’ve had some amount of success with MyUSB - I’ve managed to get the endpoint (that’s the layer which manages data transfer between the devices) configuration code written, and I can successfully create the control endpoint required to enumerate a device. I’ve also managed to get a VTARGET signal — but only after strangely enabling the OTG pad, just like in Atmel’s driver.
I’ve given up for the most part using Atmel’s driver as a reference, and am only using to compare drivers (checking the enabled and disabled register bits in AVRStudio and investigating the differences with the Datasheet). There seems to be at least a handful of macros that aren’t just faulty, they actually control registers and bits that don’t exist. The datasheet is most decidedly preliminary also, as it frequently mentions a register or bit once in a paragraph body, then never again. I’ve been emailing Atmel’s tech support in order to get clarification on what bits do and do not in fact exist on the finished USB AVR chip.
So far the demonstration application that comes with MyUSB is boring. When started it creates a psudo-task (MyUSB uses my own basic round-robbin scheduler which can start/stop/delay tasks and not much more) which looks at the joystick. When the joystick position changes, these changes are reflected on the two bi-colour LEDs as a demo of the MyUSB Joystick and LED drivers.
A second task is also created, which monitors the HWB (hardware button) on the USBKEY board. When pressed it disables the above task as well as itself while starting the USB interface and enabling a third task, which monitors the VBUS. This third task alternately flashes the bi-color LEDs when the VBUS signal is detected.
Next thing to do is to look into what I have to do to enumerate the device properly now that I can initialize the USB interface and configure the endpoints.
I really hope someone will find a use for this - it’s a fun project to work on, but the most satisfaction comes from knowing that others appreciate your labours. It’ll be open source when completed, but with the hope/request of donations from users so I can afford new toys :).

Recent Comments