Greetings,
I am bringing up the USB on our custom board with an nRF5340 SoC. As always I start with a sample, in this case usb cdc acm.
This sample works as expected with my 5340DK and my 52840DK. However, it fails to enumerate our custom board.
The first indication that something is wrong is the chirp and speed detection as a low speed device (Beagle 480 Traces below).
Setup is as follows:
Windows 11
Zephyr version: 3.3.99 (C:/ncs/v2.4.0/zephyr)
Our custom board has to add the following to prj.conf
# Internal LP OSC
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME=y
# Note: The NFC pins are enabled by default.
# NFC can be disabled and GPIOs enabled by setting
# the CONFIG_NFCT_PINS_AS_GPIOS to y
CONFIG_NFCT_PINS_AS_GPIOS=y
Custom board description
USB4085-GF-A connector: CC pins not setup, DP1 DP2 connected together, DN1 DN2 connected together
TS5USBC41: DP/DN routed here then to A11/A12
5340DK Trace
0,FS,2,0:10.513.323,,,,,,<Full-speed>,
0,FS,3,0:10.516.323,97.678.500 ms,,,,,<Suspend>,
0,FS,4,0:10.614.002,54.862.616 ms,,,,,<Reset> / <Chirp J> / <Tiny J>,
0,FS,5,0:10.668.864,,,,,,<Full-speed>,
0,FS,6,0:10.669.430,11.003.250 ms,,,,,[12 SOF],[Frames: 1280 - 1291]
0,FS,7,0:10.681.205,21.750 us,0 B,,00,00,Set Address,Address=04
1,FS,8,0:10.681.205,12.833 us,8 B,,00,00, SETUP txn,00 05 04 00 00 00 00 00
2,FS,9,0:10.681.205,2.083 us,3 B,,00,00, SETUP packet,2D 00 10
2,FS,10,0:10.681.209,7.416 us,11 B,,00,00, DATA0 packet,C3 00 05 04 00 00 00 00 00 EB 70
2,FS,11,0:10.681.217,750 ns,1 B,,00,00, ACK packet,D2
1,FS,12,0:10.681.219,7.500 us,0 B,,00,00, IN txn,
2,FS,13,0:10.681.219,2.083 us,3 B,,00,00, IN packet,69 00 10
2,FS,14,0:10.681.223,2.083 us,3 B,,00,00, DATA1 packet,4B 00 00
2,FS,15,0:10.681.226,750 ns,1 B,,00,00, ACK packet,D2
0,FS,16,0:10.681.431,3.002.416 ms,,,,,[4 SOF],[Frames: 1292 - 1295]
0,FS,17,0:10.684.435,148.416 us,8 B,,04,00,Get Device Descriptor,Index=0 Length=8
Custom Board Trace
0,,2,0:00.000.000,15.892.469.383 s,,,,,<Reset> / <Chirp K> / <Tiny K>,
0,,3,0:15.892.469,163.850.616 ms,,T,,,<Reset> / <Target disconnected>,
0,LS,4,0:18.322.844,,,,,,<Low-speed>,
0,LS,5,0:18.325.844,98.225.333 ms,,,,,<Suspend>,
0,LS,6,0:18.424.069,54.862.550 ms,,,,,<Reset> / <Chirp K> / <Tiny K>,
0,LS,7,0:18.478.932,,,,,,<Low-speed>,
0,LS,8,0:18.479.885,11.002.483 ms,,,,,[12 KEEP-ALIVE],
0,LS,9,0:18.491.228,85.433 us,8 B,I,00,00,SETUP txn,00 05 0B 00 00 00 00 00
1,LS,10,0:18.491.228,16.483 us,3 B,,00,00, SETUP packet,2D 00 10
1,LS,11,0:18.491.254,59.433 us,11 B,,00,00, DATA0 packet,C3 00 05 0B 00 00 00 00 00 EB 8F
0,LS,12,0:18.491.353,85.116 us,8 B,I,00,00,SETUP txn,00 05 0B 00 00 00 00 00
1,LS,13,0:18.491.353,16.233 us,3 B,,00,00, SETUP packet,2D 00 10
1,LS,14,0:18.491.378,59.783 us,11 B,,00,00, DATA0 packet,C3 00 05 0B 00 00 00 00 00 EB 8F
0,LS,15,0:18.491.477,85.533 us,8 B,I,00,00,SETUP txn,00 05 0B 00 00 00 00 00
1,LS,16,0:18.491.477,16.583 us,3 B,,00,00, SETUP packet,2D 00 10
1,LS,17,0:18.491.503,59.533 us,11 B,,00,00, DATA0 packet,C3 00 05 0B 00 00 00 00 00 EB 8F
0,LS,18,0:18.494.563,246.548.216 ms,,T,,,<Suspend>,
0,LS,19,0:19.492.156,54.862.566 ms,,,,,<Reset> / <Chirp K> / <Tiny K>,
0,LS,20,0:19.547.019,,,,,,<Low-speed>,
0,LS,21,0:19.547.600,54.862.550 ms,,,,,<Reset> / <Chirp K> / <Tiny K>,
0,LS,22,0:19.602.462,,,,,,<Low-speed>,