2010-05-21 04:00 AM
Adapt USB DFU Bootloader to STM32F103VET6
#stm322011-05-17 04:51 AM
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_DISCONNECTGPIOD
#define USB_DISCONNECT_PINGPIO_Pin_3
#define RCC_APB2Periph_GPIO_DISCONNECTRCC_APB2Periph_GPIOD
Of course you need to run '' STM3210E_EVAL'' workspace from Ride project. Hope it helps you Cheers, STOne-2011-05-17 04:51 AM
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 Thomas2011-05-17 04:51 AM
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