cancel
Showing results for 
Search instead for 
Did you mean: 

F429 Disco USB Stick problem

warcatz
Associate II
Posted on October 13, 2013 at 19:50

Hi 🙂

As usual 'Murphy law' i get little problem ....

I have connect 3 different USB Stick on 3 Different F429 Disco Board though the microSD connector with no results.

I then tried with a USB connector directly connected to the USB dedicated pins with the same no results :(

Is it something special to do to made it work ??

From the docs i doesn't see anything special to do for the micro usb port , i have think it will

be functional directly with the provided demo ...

I formatted them in fat16 and fat32 for be sure and they are 1,2 and 4Gb.

Cheers.

#discovery #stm32f429 #lcd-tft
22 REPLIES 22
mitcharnaud31
Associate II
Posted on October 14, 2013 at 13:20

Hi,

I have also the same problem on the STM32F429i-Disco board. But I think there is a problem on the USB : I don't know if it coming from the hardware of from the USB drivers stack from ST, because I tried to use the OTG USB driver and the USB device driver as CDC class in my software but it does not work. I have configured the USB stack with OTG_HS in FS mode, use the embedded PHY.

This USB stack was working well(USB device CDC and HOST) on the the STM32F4 discovery but the OTG_FS was used.

So because the demo is not working, (when I plug USB stick of 4Gb in FAT or FAT32), is there is an issue on the SW side or HW side ?

Thank you !

Posted on October 14, 2013 at 14:24

I've had it work on F4 and F401 Discovery boards, will peek at it today if I find time.

Consider also if you can get 48 MHz when running at 180 MHz?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on October 14, 2013 at 17:55

Reading an MSC on the F429 seems to be working Ok (via FW_Upgrade example), uses the HS controller rather than the FS of the prior F4-DISCO. Might want to compare/contrast via a Merge tool of your choice related to pin and configuration differences.

I recall there being a general warning about some of the cheaper drives not using a crystal, and being out of spec wrt timing. Using an 8GB here, dumping FATFS transactions.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
warcatz
Associate II
Posted on October 14, 2013 at 20:47

Hi 🙂

This demo ''LTDC_AnimatedPictureFromUSB'' from the ''\Project\Peripheral_Examples\'' is working ..

I have to look deeper into it for know what is the difference that made this one work and not the general demo 🙂

Cheers.

mitcharnaud31
Associate II
Posted on October 14, 2013 at 22:10

To configure the USB as a device (connected to a PC), here is my pin configuration :

PB12 : Alternate, HS used as FS (function 12), Speed 100 MHz, output open-drain, pull-up

PB13/14/15 :  Alternate, HS used as FS (function 12), Speed 100 MHz, output push-pull, no pull-up/down

Clock of USB_HS enabled, interrupt enabled.

Posted on October 14, 2013 at 23:05

RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOB , ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12 |
GPIO_Pin_14 |
GPIO_Pin_15;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
GPIO_InitStructure.GPIO_OType = GPIO_OType_OD;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP ;
GPIO_Init(GPIOB, &GPIO_InitStructure);
GPIO_PinAFConfig(GPIOB,GPIO_PinSource14,GPIO_AF_OTG2_FS) ;
GPIO_PinAFConfig(GPIOB,GPIO_PinSource15,GPIO_AF_OTG2_FS) ;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
GPIO_Init(GPIOB, &GPIO_InitStructure);
RCC_AHB1PeriphClockCmd( RCC_AHB1Periph_OTG_HS, ENABLE) ;

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mitcharnaud31
Associate II
Posted on October 15, 2013 at 00:17

I have tried this configuration to setup the board as a USB CDC device plugged to the PC but it is not working :( The PC see the PID and VID but not the informations behind (String of the descriptor).

The micro requests continuously some HS ISR ...

I tried the LTDC_AnimatedPictureFromUSB and it is working well with a good USB flash. With the same USB flash, the Demonstration SW is not working, but I think the pin configuration is different from the LTDC. LTDC is coherent to your configuration.

Is the pin configuration is the same for configuring the board as USB Host or USB Device ?

In your configuration, I think it strange that you setup PB12/14/15 as alternate, but you put the function number for only PB14/15 … What about PB12 ?
Posted on October 15, 2013 at 00:33

This is directly from the BSP code supplied by ST, presumably the AF mapping remains at the default, or PB12 (ID) isn't important here.

The BSP is for a HOST, it works as supplied reading an external USB Flash Drive.

STM32F429I-Discovery_FW_V1.0.0\Projects\FW_upgrade\src\usb_bsp.c
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on October 15, 2013 at 01:45

Consider also if you can get 48 MHz when running at 180 MHz

I'll reiterate my earlier point, because the demo does appear to be compiled for 180 MHz operation, I don't see how USB is going to work from 51.43 MHz, you'd need a PLL_Q of 7.5!?!

STM32F429I-Discovery_FW_V1.0.0\Projects\Demonstration\Core\Devices\STM32F4xx\system_stm32f4xx.c
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..