Why disconnected USB cable blocks running code ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why disconnected USB cable blocks running code ?

525 Views
peteraugustin
Contributor I

Hello, I use LPC11U35 on my board and it is powered by battery. It is developed under mbed.org platform and I have a problem with USBSerial (USB CDC). The board works fine with connected USB cable or without USB cable. The problem is when I disconnect USB cable from running board because then running code is stoped. I do not know where is problem. Is it a problem with mbed library or is it a hardware problem ?

Labels (1)
Tags (1)
0 Kudos
3 Replies

386 Views
peteraugustin
Contributor I

Hello, Thanks for your answer. One more thing, when I turn off my PC by standard shutdown process with connected USB cable then the problem does not Occur and the code continues.

0 Kudos

386 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Peter,

As the Con Verse mentioned, it needs to use a debugger to figure out the root cause of the issue.

Hope this is clear.
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

386 Views
converse
Senior Contributor V

Probably a problem with your code... Some suggestions:

- removing the power causes a dip in power that is detected as a brown-out, and you have a handler

- there is a USB interrupt dfor device removal that is not being handled

- there is a fault being generated

Whatever the problem, you will need to use a debugger to find the cause

0 Kudos