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); } }
Hello Andrew Neil,
I did double check of the requirements, and have found that my idea is not possible in a way I planned it, bcos USB0 with high speed of MC is already used, and to use USB1 with full speed will load my MC too much (in Full speed modem the buffer size is 64 bytes and delays between tranfers are too long), that it will stack with this job all the time, so I will need to redesign my system with this modem.
Thanks for your answer!