HI ,
I wan to disable the vBus "VBUS is not valid, and the pull-up resistor on D+ is disabled." on nRF54LM20,
I try to write to disconnect usb from PC :
HI ,
I wan to disable the vBus "VBUS is not valid, and the pull-up resistor on D+ is disabled." on nRF54LM20,
I try to write to disconnect usb from PC :
Hi,
Your second line uses the wrong mask register. You are applying USBHS_PHY_INPUTOVERRIDE_VBUSVALID_Msk to PHY.OVERRIDEVALUES, but these are two separate registers with different bit layouts. You need to clear the VBUSVALID bit in PHY.OVERRIDEVALUES using the correct mask for that register.
According to the datasheet:
PHY.INPUTOVERRIDE — Enables the override for a specific signal (e.g., VBUSVALID field, bit F). Set this bit to activate the override. [PHY.INPUTOVERRIDE]
PHY.OVERRIDEVALUES — Sets the actual value driven to the PHY when the override is active. For VBUSVALID (bit F): [PHY.OVERRIDEVALUES]1 = VBUS is valid, pull-up on D+ enabled0 = VBUS is not valid, pull-up on D+ disabledSo, could you try the following:
NRF_USBHS->PHY.OVERRIDEVALUES &= ~USBHS_PHY_OVERRIDEVALUES_VBUSVALID_Msk;
NRF_USBHS->PHY.INPUTOVERRIDE |= USBHS_PHY_INPUTOVERRIDE_VBUSVALID_Msk;
Set the value before enabling the override, to avoid a glitch where the PHY briefly sees the wrong value.
-Priyanka
Hi,
Your second line uses the wrong mask register. You are applying USBHS_PHY_INPUTOVERRIDE_VBUSVALID_Msk to PHY.OVERRIDEVALUES, but these are two separate registers with different bit layouts. You need to clear the VBUSVALID bit in PHY.OVERRIDEVALUES using the correct mask for that register.
According to the datasheet:
PHY.INPUTOVERRIDE — Enables the override for a specific signal (e.g., VBUSVALID field, bit F). Set this bit to activate the override. [PHY.INPUTOVERRIDE]
PHY.OVERRIDEVALUES — Sets the actual value driven to the PHY when the override is active. For VBUSVALID (bit F): [PHY.OVERRIDEVALUES]1 = VBUS is valid, pull-up on D+ enabled0 = VBUS is not valid, pull-up on D+ disabledSo, could you try the following:
NRF_USBHS->PHY.OVERRIDEVALUES &= ~USBHS_PHY_OVERRIDEVALUES_VBUSVALID_Msk;
NRF_USBHS->PHY.INPUTOVERRIDE |= USBHS_PHY_INPUTOVERRIDE_VBUSVALID_Msk;
Set the value before enabling the override, to avoid a glitch where the PHY briefly sees the wrong value.
-Priyanka