Olimex STM32-P103 USB Communication Problem

Hi,

I’v some problems with the Olimex STM32-P103 Dev Board and USB Communication.

I tried to adapt the Virtual_COM_Port Demo from the STM32_USB-FS-Device_Lib_V3.2.1, but it won’t work.

I could narrow the problem a bit, but now I’m stuck. Here is what I have:

When I connect the USB-cable to the device I get a raising flank on PC4 (from 0 V to 3 V), but no interrupt! If I unplug the cable (falling flank on PC4), USB_ISTR:RESET is set to 1 and the “USB_LP_CAN1_RX0_IRQHandler” gets called.

Now the RESET routine starts to set all the USB Endpoints and so on. So everything is correctly initialized when the cable is unplugged.

If I now replug the cable, no interrupt is raised, but all USB_EPxR and USB_FNR register are set to NULL.

What am I doing wrong?

The USB code is the almost the same as in the demo. No big changes.

If somebody could help me here, it would be great.

Andy