Hi,
I am working with a board that uses an NXP LPC1837 and want to get the USB VCOM port working.
I downloaded the example (RTOSTutorial_Ex10A-LPC18xx) for the LPC1857 and modified it to match my hardware. ( took out the graphics controller, changed the USART from 3 to 0. Pulled USB1 from the run time environment. Removed SPI. Changed the CPU to LPC1837. Updated the pinouts in RTE_Device.h... I am not using PPWR, PWR_FAULT, and INDI1 on this USB port. )
It compiles and downloads OK. The calls to USBD_Initialize() and USBD_Connect() return usbOK.
However when I plug into a Windows 7 or Windows 10 PC nothing happens in device manager. Even if I have the driver wrong I should see something happen when I attach the board. I did go ahead and install the VCOM driver that was included with the example.
Anyway, I am using the same 12MHz crystal as on the demo board and the USB0 is pretty vanilla. Not much to customize.
I know my hardware works as I can install and run a Mass storage device demo that NXP makes available for USB0 on this part.
So I am not sure where to look next... is there an update to the VCOM example for this part? Did I forget something. I am using uVision 7.20.0.0. I have read most of the literature on CDC ATM and the example program... will spend the rest of today looking for something that I may have missed.
Thanks
I think I was using the recommended starting example after all. I got to it from a link in the RTOS tutorial so I labeled it accordingly. Anyway, I downloaded the example again just to be sure and edited it to remove the graphics and second USB.
I had fooled myself last time thinking that the USBD_Configured() call was returning GOOD. I had forgotten to turn optimization off and it appeared that the branch was taken when stepping in the debugger.
So now I can see that USBD_Initialize(0) and USBD_Connect(0) are returning GOOD. However USBD_Configured(0) never returns TRUE.
I should get this even if the USB cable is not connected, right?
So I am going to study the evaluation board schematics and try to see if anything on my hardware is different in a way that would prevent the example from working. ( my hardware works, I can run a mass storage example that NXP provides and I can ( with a boot jumper ) make the NXP bootloader work on USB0.
Any ideas would be appreciated. Also can you verify that USBD_Configured(0) should return TRUE even if I don't connect the USB cable? That would remove the PC configuration from the equation.
Thanks, Tony
I think I have it.
My board is a USB DEVICE and to be safe I resistor divided the 5V USB_VBUS before it connects to the processor. The board was built with the wrong divider resistors and the CPU never saw a HIGH on USB_VBUS.
I jumpered the divider out and it seems to be working. Guess the NXP driver does not care about the USB_VBUS input.