Hello, Keil users,
I am trying to get a connection between LPC4357 and a U-Blox modem over USB. First of all I connected the modem to PC, it was recognized correctly, it adds 6 COM ports.
I have looked at examples provided by Keil, and created a simple project where I initialize my MC as USB CDC Host. For the second test I took another device based on the same MC that is initialized as a USB CDC Device and connected to a USB Host, created at a previous step, the connection between two LPC4357 MC is successful. The next step was to try the connection with a modem. For debug purposes Event recorder was enabled. The problem is that I am getting PipeReceiveFailed event, of length 15, and error is 64. This error happens when I am trying to get the device status.
I have looked for this error and it is "Transfer handshake was stall".
Are there hints how to prevent this error and to establish the communication correctly?
I attach the screenshot of the event recorder
https://ibb.co/d1RniH
Here is the code listing
usb_status = USBH_Initialize(0); if (usb_status != usbOK) printf ("InitFailure!\n"); while(1){ con = (USBH_CDC_ACM_GetDeviceStatus(0) == usbOK); if (con ) { connected = true; if (con == true) { con_last = true; LED_On(0); USBH_CDC_ACM_Send(0, buff, 3); } else { con_last = false; LED_Off(0); } } else { osDelay(1000); } }