Hey all,
I have a USB CDC ACM application that works great when it starts, but I'm not able to get it running without the debugger. This is SDK 17.0.2, there is a SoftDevice but all the BLE functionality is commented out right now, using a J-Link. After downloading code, the rest of my application (blinking LEDs) runs fine, but the USB CDC ACM doesn't start (Windows 10). Here are the only two conditions under which the USB CDC starts:
- Running the debugger from SES.
- Connect J-Link, erase the device, download the code to the device, then reconnect the J-Link and reset the device with the J-Link.
I added code to the BLE template example to make the application, and besides adding the app_usb_cdc_asm library (and pre-requisites for it) and a couple of peripherals (nrfx_twim with TWIM 0, nrfx_spim with SPIM 3, nrfx_timer with Timer 2), I don't think I added anything that would account for this. I have logging turned off. It's clearly my application because the usb_cdc_acm example works fine. EDIT: I should add that the usb_cdc_acm example works on my DKs and my custom board but not my application - which pretty much confirms that it's something I'm doing along the way.
I'm under the assumption that somehow the app_usb_cdc_acm library is crashing without the debugger, but I'm not sure how to debug it without the debugger... I do have a red LED that I set to light if I get an error code a few times along the way, but it's not lighting... If there anything obvious that I'm missing?
EDIT: Now that I've had a chance to hook it up to the scope, I can see that with the J-Link plugged in and issuing a reset, I get data on USB. Without the J-Link, there is no activity on the USB data lines.