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

USBD without logging

I'm having trouble with the USBD stack, and I've narrowed down my problem (at least one of my problems) to disabling the logging.

For example, simply disabling logging functionality in the usbd_cdc_acm example in SDK 14.1.0 by changing NRF_LOG_ENABLED to 0 in sdk_config.h line 752 causes issues.

The program will compile fine (I'm using gcc if that matters), but Windows will say "USB Device Not Recognized". If I instead compile with logging enabled then the device will enumerate just fine.

I've seen cases (inconsistent) where the device will enumerate if the chip is reset while already attached, but a fresh unplug and plug always causes the "USB Device Not Recognized" error.

It seems like there is probably some timing issue where logging is slowing down the chip enough to compensate, but I haven't investigated enough yet. Is this a known issue?

Related