Hi,
I am facing the same problem as in question 'USBD don't work with debugger' from @Dusautois Jérôme
I am trying the same code both on PCA10056 and my board. In PCA10056 works fine but on my board when debugging the USBD driver does not start but enters a never ending loop waiting for event.
I am powering my board by the supply of the PCA10056. When the debugger is disconnected and the program runs freely as in normal execution, then the problem does not appear. The USB is seen from the PC and enumerates as normal.
I am using SEGGER embedded studio and I don't quite understand what @Dusautois Jérôme has done.
Any answers are welcome.