This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

USB Host HID usbDeviceError

Hi
I have made a simple program for LPC4337 Device, this is my code for initiating the HID mouse that I have connected to my board. The problem is that I got this error usbDeviceError

and my USB function initialize Ok

int main(void)
{
   osKernelInitialize (); // initialize RTOS kernel
   osKernelStart ();                              // start kernel with job2 execution

   usbStatus  usbst;

   usbst=USBH_Initialize(0);               // USB Host 0 Initialize

   while(1)
   {
       usbst=USBH_HID_GetDeviceStatus (0U); // Get HID device status
   }
}

Parents
  • Hi Ali,

    it would be very helpful if you could see USB bus traffic, as a lot could be concluded from that.

    There is however a way for you to get more information on what is going on in the USB Library.
    You can use so called Event Recorder and Debug variant of the USB Library and look into debug messages that USB Library will output.

    To enable Event Recorder you need do the following:
    In Manage Run-Time Environment you should: - Component Compiler:Event Recorder:DAP check the checkbox - Component USB:CORE select Debug variant instead of Release
    In your main file: - add #include "EventRecorder.h" - in start of main function call EventRecorderInitialize (EventRecordAll, 1);

    Then build the project, download to flash, start the debug session (Ctrl +F5), go to menu View -> Analysis Window -> Event Recorder

    In Event Recorder window you should see debug messages output by USB Library, that should help you to determine what is going on in the USB Library.

    Best regards, Milorad

Reply
  • Hi Ali,

    it would be very helpful if you could see USB bus traffic, as a lot could be concluded from that.

    There is however a way for you to get more information on what is going on in the USB Library.
    You can use so called Event Recorder and Debug variant of the USB Library and look into debug messages that USB Library will output.

    To enable Event Recorder you need do the following:
    In Manage Run-Time Environment you should: - Component Compiler:Event Recorder:DAP check the checkbox - Component USB:CORE select Debug variant instead of Release
    In your main file: - add #include "EventRecorder.h" - in start of main function call EventRecorderInitialize (EventRecordAll, 1);

    Then build the project, download to flash, start the debug session (Ctrl +F5), go to menu View -> Analysis Window -> Event Recorder

    In Event Recorder window you should see debug messages output by USB Library, that should help you to determine what is going on in the USB Library.

    Best regards, Milorad

Children