I have a STM3240G_EVAL board, I think it's a nice board but it seems to be a bit uncommon so there is no much as demos or examples on the net. I'm new to Chibios, but what I have seen is great, congrats to all for that.
The board has a STM32F407 and a bunch of peripherals includig 2 USB ports, OTG1, a FS with internal phy on the micro and OTG2 HS with external phy.
I'm running Chibios 2.6.6 on it using USART 3 for debugging and I'm trying to setup a usb serial port as I can't use the USART3 if I want to use the SD card (the pins are used by both peripherals).
I started to build a new board.h and board.c from the 407Discovery board and I'm trying to adapt the code from the STM32F4xx-USB_CDC to run in the board.
The code for the discovery used OTG2 and I wanted to use OTG1 (I need to make a small design, so I try to use the microcontroler peripherals ), I changed this (I took me a long while to figure it out) in this line :
Code: Select all
static const SerialUSBConfig serusbcfg = {&USBD1, USBD2_DATA_REQUEST_EP,
USBD2_DATA_AVAILABLE_EP,
USBD2_INTERRUPT_REQUEST_EP};Keeping the value of the constants USBD2_DATA_REQUEST_EP and so.
After this I see a new device in the usb tree in my Windows 7 64 machine, but it only says "unknown device", there are no hardware ids (USB\UNKNOWN) .
I've searched all over the code, the forum and the internet, I've seen that the constants values are the same when you use OTG1 (other examples including the OTG1 port use them) but I've been unable to make it work,
I'm attaching a zip file with the code and board.h just in case somebody can try it or read it.
I'm using Chibistudio and it's tools (GCC).
Thanks a lot
Olgierd