AnsweredAssumed Answered

USB HID mouse

Question asked by Beh on May 8, 2014
Latest reply on May 9, 2014 by Beh
Hi

I want to create custom HID device with stm32f407 and as first step I tried to rebuild the demo project for usb Mouse HID on my own, i've added needed libraries and definitions (frome demo project) and use USB_init as below to config the usb on micro, but when I connect USB to pc, after some second it says "not usb recognized device"
anything more should I do for config the usb?

#include "stm32f4xx.h"
 
#include "usbd_hid_core.h"
#include "usbd_usr.h"
#include "usbd_desc.h"
#include "usbd_conf.h"
#include "usb_conf.h"
 
__ALIGN_BEGIN USB_OTG_CORE_HANDLE  USB_OTG_dev __ALIGN_END;
 
int main(void)
{  
    USBD_Init(&USB_OTG_dev,
            USB_OTG_FS_CORE_ID,
            &USR_desc,
            &USBD_HID_cb,
            &USR_cb);
     
    while(1) {}
     
    return 0;
}

thank you

Outcomes