STM32-103STK usb connection

Hi,

I have a STM32-103STK board with the keil ulink-me usb jtag programmer. My job is to get a usb connection. But i can’t get it working.

I’ve got the usb examples for a stm32f10x from st.com. I try custom_hid and but it doesn’t work.

Are these settings correct for this board?

 #define USB_DISCONNECT                      GPIOD  
  #define USB_DISCONNECT_PIN                  GPIO_Pin_9
  #define RCC_APB2Periph_GPIO_DISCONNECT      RCC_APB2Periph_GPIOD

  #define RCC_APB2Periph_GPIO_KEY             RCC_APB2Periph_GPIOB
  #define RCC_APB2Periph_GPIO_TAMPER          RCC_APB2Periph_GPIOC
  #define RCC_APB2Periph_GPIO_IOAIN           RCC_APB2Periph_GPIOC
  #define RCC_APB2Periph_GPIO_LED             RCC_APB2Periph_GPIOC

  #define GPIO_KEY                            GPIOB
  #define GPIO_TAMPER                         GPIOC
  #define GPIO_IOAIN                          GPIOC
  #define GPIO_LED                            GPIOC

  #define GPIO_KEY_PIN                        GPIO_Pin_9   /* PB.09 */
  #define GPIO_TAMPER_PIN                     GPIO_Pin_13  /* PC.13 */
  #define GPIO_IOAIN_PIN                      GPIO_Pin_4   /* PC.04 */
  
  #define GPIO_LED1_PIN                       GPIO_Pin_6   /* PC.06 */
  #define GPIO_LED2_PIN                       GPIO_Pin_7   /* PC.07 */ 
  #define GPIO_LED3_PIN                       GPIO_Pin_8   /* PC.08 */
  #define GPIO_LED4_PIN                       GPIO_Pin_9   /* PC.09 */ 

  #define GPIO_KEY_PORTSOURCE                 GPIO_PortSourceGPIOB
  #define GPIO_KEY_PINSOURCE                  GPIO_PinSource9
  #define GPIO_KEY_EXTI_Line                  EXTI_Line9

  #define GPIO_TAMPER_PORTSOURCE              GPIO_PortSourceGPIOC
  #define GPIO_TAMPER_PINSOURCE               GPIO_PinSource13
  #define GPIO_TAMPER_EXTI_Line               EXTI_Line13

  #define ADC_AIN_CHANNEL                     ADC_Channel_14