cancel
Showing results for 
Search instead for 
Did you mean: 

Adapt USB DFU Bootloader to STM32F103VET6

thomasblender9
Associate II
Posted on May 21, 2010 at 13:00

Adapt USB DFU Bootloader to STM32F103VET6

#stm32
3 REPLIES 3
Nickname12657_O
Associate III
Posted on May 17, 2011 at 13:51

Hi ,

To tailor USB DFU to your Specific hardware board. in your case it is Primer2 , you have to go to header file : ''platform_config.h'' then Replace these lines :

#elif defined (USE_STM3210E_EVAL)

#define USB_DISCONNECT GPIOB

#define USB_DISCONNECT_PIN GPIO_Pin_14

#define RCC_APB2Periph_GPIO_DISCONNECT RCC_APB2Periph_GPIOB

In Primer2,

http://www.stm32circle.com/resources/download.php?schema_stm32_primer2_1_2.PDF

, this connection/disconnection is Pin 83 : ''PD3'' , so Try to modify it to :

#elif defined (USE_STM3210E_EVAL)

#define USB_DISCONNECT

GPIOD

#define USB_DISCONNECT_PIN

GPIO_Pin_3

#define RCC_APB2Periph_GPIO_DISCONNECT

RCC_APB2Periph_GPIOD

Of course you need to run '' STM3210E_EVAL'' workspace from Ride project.

Hope it helps you

0690X0000060MlBQAU.gif

Cheers,

STOne-

thomasblender9
Associate II
Posted on May 17, 2011 at 13:51

Hello STOne-32,

thank you for your answer. I replaced this lines in the header file.

The result is better than my first try. Now I have a reaction from Windows. Unfortunately I got the message USB-Device not recognized. I installed the DfuSe USB device driver like shown in UM0412. Also the device description couldn't be read, which should be ''STM Device in DFU Mode''.

Could you help me to solve this problem?

Best regards

Thomas

thomasblender9
Associate II
Posted on May 17, 2011 at 13:51

Hello,

I solved the problem. It was a problem of clock configuration.

I set the USB clock

RCC_USBCLKConfig(RCC_USBCLKSource_PLLCLK_1Div5);

so the PLL should be 72MHz. The crystal in PRIMER2 is 12MHz.

Thank you for your support with the USB Disconnect Pin.

Best regards