AnsweredAssumed Answered

Different USB behaviour with Hard Reset and JTAG reset

Question asked by stokic.srdjan on Jan 20, 2016
Latest reply on Jan 21, 2016 by stokic.srdjan
Hello all,

This problem is baffling me for quite some time.

I have a STM32L151VGT6 device, running as a VCP device on USB. If I use the device with a debugger, everything is fine. I can transfer hundreds of megabytes without any issues.

But if I disconnect the J-Link, and power reset the device, the behavior changes. Fairly often I get USB problems, for example I cannot transfer more than 10MB of data. By looking at the USB lines, it looks like the USB loses synchronization and the whole communication fails.
I'm fairly certain that the way the device is reset makes the difference. Somehow power reset makes the whole system behave differently, compared to soft reset using the j-link.

What can cause this kind of problems, and what's the difference between running the firmware while on debugger, and running it standalone? I'm using IAR, with JLink.

Outcomes