Hi,
I am having a problems with USB enumerating with a custom board based on the nRF52840. The board is self powered by LiPo battery. I am developing by connecting to the board with a J-Link Pro over SWD. I am using the armgcc toolchain. My application is SDK 15 based and implements a BLE peripheral and I'm trying to support a USB virtual com port. My applications BLE functionality is working great. I am able to see NRF_LOG_INFO print outs.
Using USBD CDC, I am able to connect my device over USB to my Macbook Pro and send/receive bytes to my application over USB using app_usbd_cdc_acm_write() and receiving in my cdc_acm_user_ev_handler().
I am able to plug and un-plug the USB cable and I see the /dev/tty.usbmodem**** appear and disappear and I receive related events in my cdc_acm_user_ev_handler(). After disconnect/reconnect, I am continue to be able to send/receive bytes to my application over USB.
The problem comes when I quit JLinkExe (regardless of leaving the J-Link Pro connected to the target):
When I quit JLinkExe, my Mac and the target continue to be able to communicate over USB, however if I disconnect the USB cable, and reconnect, I can not get the device to re-enumerate no matter how many times I unplug and re-plug the cable.
If I relaunch JLinkExe, and type "connect", I immediately see my custom board enumerating on the Mac.
I read the following threads:
And I updated the erreta to 0x20, but my application does not link retarget.c so I don't understand the __putchar signature change. I tried making that change and adding retarget.c, but it does not get used by the linker (and results in no change). I disabled logging with NRF_LOG_ENABLED, and I no longer see any printouts via JLinkRTTClient, but I still have the same failure to enumerate if JLinkExe is not connected.
Any ideas?
Thanks!
Jeremy