This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

USBD does work debug out SES

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.

 

Parents
  • Hi,

    I think I found the solution. Apparently, when code is downloaded first time to the external board MCU, a proper power cycling is required. The reset that the debug out interface is performing is not sufficient and causes the issues described above. 

    The sequence is then:

    1) Download the code to the external MCU

    2) Power cycle

    3) Start debugging

    This sequence does not 'lock' the UDBD initialization.

    If this is an acceptable answer I can close the question.

Reply
  • Hi,

    I think I found the solution. Apparently, when code is downloaded first time to the external board MCU, a proper power cycling is required. The reset that the debug out interface is performing is not sufficient and causes the issues described above. 

    The sequence is then:

    1) Download the code to the external MCU

    2) Power cycle

    3) Start debugging

    This sequence does not 'lock' the UDBD initialization.

    If this is an acceptable answer I can close the question.

Children
Related