Author Topic: LPC1768 usbDeviceError  (Read 1187 times)

0 Members and 1 Guest are viewing this topic.

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1905
  • Country: ca
LPC1768 usbDeviceError
« on: February 01, 2017, 02:43:11 pm »
Hi
I have made a simple program for my LPC1768 using keil V5.22 the LPC should act like a USB host to a mice that I have attached to it. the problem is that I will always got the usbDeviceError from the USBH_HID_GetDeviceStatus function.
 
Here is my USB thread code

Code: [Select]
void USB_Thread (void const *arg)
{
     static usbStatus myst;
     static      usbHID_MouseState mymouse;
     myst=USBH_Initialize (0);                       /* Initialize USB Host 0         */
     
  while (1)
     {
            osDelay(10);
         myst=USBH_HID_GetDeviceStatus(0);
     }

}

and this is my main function

Code: [Select]
osThreadDef(USB_Thread,  osPriorityNormal, 1, 2048);
osThreadId tsk_USB;

int main (void) {
        osKernelInitialize ();                    // initialize CMSIS-RTOS
        osKernelStart ();                         // start thread execution
        tsk_USB = osThreadCreate(osThread(USB_Thread),  NULL);  //it's used for USB mouse
     while(1)
     {
     }
}


Here are some pictures of my RTX and USB configuration boxes
Do you have any Idea?
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1905
  • Country: ca
Re: LPC1768 usbDeviceError
« Reply #1 on: February 02, 2017, 04:36:22 pm »
Any Ideas?
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf