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

NRF52840 not detected when using USBD CDC example.

I have made a custom board based on the raytac NRF52840 module (MDBT50). When i load in the USBD CDC example (SDK version: 15.2),  The device is not detected. There is no output on the 'dmesg' (my OS is Ubuntu 16.04). What could be the problem? Do i need to merge the USB CDC example with Soft Device?

On the hardware side I have directly connected the D+ and D- pins to the USB connector and 5V from USB connector to VBUS ans VDDH. and GND to GND. Do i need to add any other components? 

The log from UART after adding few more log statements (see attached main.c):

<info> app: USBD CDC ACM example started.
<info> app: USB power detected
<info> app: USB ready
<info> app: USB event started
<info> app: DRV Suspend
uart_cli:~$

Update 1: I also tried connecting 1.8V  to VDD and VDDH but still it does not work.

Update 2: tried with 3.3v to VDD and VDDH, still not working

Update 3: I power it with another 3V supply, I was able to get it to work once but after that this is printed in dmesg (3V is observed on D+ line)

[ 7216.966807] usb 1-1.3: new full-speed USB device number 61 using ehci-pci
[ 7217.046771] usb 1-1.3: device descriptor read/64, error -32
[ 7217.234809] usb 1-1.3: device descriptor read/64, error -32
[ 7217.422730] usb 1-1.3: new full-speed USB device number 62 using ehci-pci
[ 7217.502821] usb 1-1.3: device descriptor read/64, error -32
[ 7217.690761] usb 1-1.3: device descriptor read/64, error -32
[ 7217.878816] usb 1-1.3: new full-speed USB device number 63 using ehci-pci
[ 7218.294801] usb 1-1.3: device not accepting address 63, error -32
[ 7218.374801] usb 1-1.3: new full-speed USB device number 64 using ehci-pci
[ 7218.790747] usb 1-1.3: device not accepting address 64, error -32
[ 7218.790855] usb 1-1-port3: unable to enumerate USB device

and NRF LOG:

<info> app: USBD CDC ACM example started.
<info> app: USB power detected
<info> app: USB ready
<info> app: USB event started
<info> app: DRV Suspend 
<info> app: DRV Resume
<info> app: DRV Suspend
<info> app: DRV Resume
<info> app: DRV Suspend
uart_cli:~$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**
* Copyright (c) 2017 - 2018, Nordic Semiconductor ASA
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form, except as embedded into a Nordic
* Semiconductor ASA integrated circuit in a product or a software update for
* such product, must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
* contributors may be used to endorse or promote products derived from this
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX