Timeout on VBUS detect when powered by usb

nRF54LM20A

NCS 3.4.0

Our device is powered by a usb-c connection.  When it is connected to a PC usb port, we want the usb to serve as the console.  We are using the cdc_asm example to test it.  It works fine on the DK, but not on our custom board.

I can view the log output using the RTT Viewer and see this error:

udc_dwc2: Quirk pre enable failed -116

Using the debugger, usbhs_enable_core() times out waiting for VBUS ready. Here:

if (!k_event_wait(events, NRF_USBHS_VBUS_READY, false, timeout)) {
				return -ETIMEDOUT;
			}

Obviously, VBUS is present, since that is what is powering the board.  It will not see the transition on the VBUS line.  How can I make the driver 'see' that the VBUS is already at 5V?

prj.conf

CONFIG_USB_DEVICE_STACK_NEXT=y

CONFIG_STDOUT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_LINE_CTRL=y
CONFIG_USBD_CDC_ACM_CLASS=y

CONFIG_LOG=y
CONFIG_USBD_LOG_LEVEL_ERR=y
CONFIG_UDC_DRIVER_LOG_LEVEL_ERR=y
CONFIG_USBD_CDC_ACM_LOG_LEVEL_ERR=y

#CONFIG_SAMPLE_USBD_PID=0x0001
#CONFIG_SAMPLE_USBD_PRODUCT="USBD CDC ACM sample"

# TV
CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT=y

# Zero waits forever inside the USB init that runs before main. A missing
# VBUS sense then never reaches the status LED or the rest of the app.
CONFIG_UDC_DWC2_USBHS_VBUS_READY_TIMEOUT=1000
CONFIG_CDC_ACM_SERIAL_MANUFACTURER_STRING="MyCompany"
CONFIG_CDC_ACM_SERIAL_PRODUCT_STRING="MyProduct"
CONFIG_CDC_ACM_SERIAL_VID=0x1915
CONFIG_CDC_ACM_SERIAL_PID=0x0001

# MDF
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n
CONFIG_USE_SEGGER_RTT=y

overlay

/ {
	chosen {
		nordic,pm-ext-flash = &mx25r64;
		zephyr,console = &cdc_acm_uart0;
		zephyr,shell-uart = &cdc_acm_uart0;
	};

	aliases {
		spi-flash0 = &mx25r64;
	};

	wz_cs_out {
		compatible = "gpio-leds";
		wzcs: wzcs_0 {
			gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
			label = "W5500 CS";
		};
	};
};

&wdt31 {
	status = "okay";
};

&zephyr_udc0 {
	cdc_acm_uart0: cdc_acm_uart0 {
		compatible = "zephyr,cdc-acm-uart";
	};
};

/* USBHS wrapper takes a device handle to VREGUSB. The parent block is
 * disabled in the SoC dts, which keeps the child from existing as a device.
 */
&regulators {
	status = "okay";
};

&vregusb {
	status = "okay";
};

Thanks,

Mary

Related