I'm trying to make a VME graphics accelerator for an Atari TT (http://www.atari-forum.com/viewtopic.php?f=27&t=25339 if you're interested) as a hobby project, and am running into trouble with USB.
The STM32F4 is basically implementing a VME-style interface on one end, and a high-speed USB2 interface on the other end, which talks to a PCDuino dev-board, which runs linux and produces an HDMI output. What I need in terms of USB2 is a bulk transport that I can send drawing commands from the TT to the PCDuino. There's a readback channel as well, but let's not get ahead of ourselves. The VME bus can sustain 20 MBytes/sec, so it needs to be high-speed USB.
I've got Chibios up and running on my Wavefront board, can blink LEDs etc, and I'm patched up with the code at http://sourceforge.net/p/chibios/bugs/377 , but the only USB event I'm getting sent is USB_EVENT_RESET. I was more or less working from the demo code included with the above patch.
I can post code if necessary, but at the moment I'm wondering if there's just some configuration option I may need to set that I'm missing. I've been over the descriptors, and they (to my untutored eye) look ok:
(Device descriptor)
Code: Select all
/******************************************************************************\
|* USB Device Descriptor
\******************************************************************************/
static const uint8_t _usbDevDescData[18] =
{
USB_DESC_DEVICE (0x0200, // bcdUSB USB version:
// 0x0100 (USB1.0)
// 0x0110 (USB1.1)
// 0x0200 (USB2.0)
0xFF, // bDeviceClass (FF=Vendor specific)
0x00, // bDeviceSubClass.
0x00, // bDeviceProtocol.
0x40, // bMaxPacketSize.
0x0483, // idVendor (ST).
0x5417, // idProduct.
0x0001, // bcdDevice Device Release Number
1, // iManufacturer
2, // iProduct.
3, // iSerialNumber.
1) // bNumConfigurations.
};
Config/Endpoint descriptors
Code: Select all
/******************************************************************************\
|* Configuration Descriptor
\******************************************************************************/
static const uint8_t _usbCfgDescData[9+9+7+7] =
{
// Configuration descriptor - 9 Bytes
USB_DESC_CONFIGURATION(sizeof _usbCfgDescData, // wTotalLength
0x01, // bNumInterfaces
0x01, // bConfigurationValue
0, // iConfiguration
0xC0, // self-powered
50), // bMaxPower (100mA)
// Interface Descriptor - 9 Bytes
USB_DESC_INTERFACE (0x00, // bInterfaceNumber.
0x00, // bAlternateSetting.
0x02, // bNumEndpoints.
0xFF, // bInterfaceClass (VendorSpecific)
0x00, // bInterfaceSubClass
0x50, // bInterfaceProtocol (bulk only)
0), // iInterface.
// Endpoint 1 Descriptor, Direction in - 7 Bytes
USB_DESC_ENDPOINT (EP_IN|USB_RTYPE_DIR_DEV2HOST, // bEndpointAddress
0x02, // bmAttributes (Bulk)
IN_PACKETSIZE, // wMaxPacketSize
0x00), // bInterval
// Endpoint 2 Descriptor Direction out - 7 Bytes
USB_DESC_ENDPOINT (EP_OUT|USB_RTYPE_DIR_HOST2DEV, // bEndpointAddress
0x02, // bmAttributes (Bulk)
OUT_PACKETSIZE, // wMaxPacketSize
0x00) // bInterval
};
Any help very gratefully received
Simon