LPC1768 usbDeviceError

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1768 usbDeviceError

1,020 Views
ali_asadzadeh
Contributor I

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 

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

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

Labels (5)
Tags (1)
0 Kudos
1 Reply

719 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

I did a test with Keil MCB1700 board with Keil provided MCB1700 driver and examples software Rev.2.3.0 with Keil V5 IDE.

Customer could download Keil provided MCB1700 drivers and examples software from here.

I tested the [USB Host Keyboard] demo, which works and will print the characters at LCD display:

pastedImage_1.png


Wish it helps.

Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos