2025-07-16 3:18 PM
I have this SRC1m1 board and would like to run some tests with it at 20V. Your user manual is conspicuously not mentioning running it above 5V. It does have a lot to say about running it at 5V if you do not have UCPD. Sortof implying if you do have UCPD you can run it above 5V. But I don't see how.
Can anyone clue me in on how you can run this board with a 20V source? As far as I know PD requires 5V connection, then negotiation to get 20V. This board has no capability to output more than a single voltage. So there is no way to do the negotiation at 5V then switch to 20V. So running above 5V is not possible. Correct?
Or am I supposed to monitor the PD data when when I see the ACCEPT message sent out I should quickly (within tPSTransition 550ms) change my PSU to 20V?
Solved! Go to Solution.
2025-07-22 1:26 PM - edited 2025-07-22 1:29 PM
I have edited src1m1_usbpd_pwr.c and added in the osDelay call. It gives me a delay.
/**
* @brief Set a fixed PDO and manage the power control.
* PortNum Type-C port identifier
* This parameter can take one of the following values:
* @arg @ref USBPD_PWR_TYPE_C_PORT_1
* VbusTargetInmv the vbus Target (in mV)
* OperatingCurrent the Operating Current (in mA)
* MaxOperatingCurrent the Max Operating Current (in mA)
* @retval BSP status
*/
int32_t BSP_USBPD_PWR_VBUSSetVoltage_Fixed(uint32_t PortNum,
uint32_t VbusTargetInmv,
uint32_t OperatingCurrent,
uint32_t MaxOperatingCurrent)
{
int32_t ret = BSP_ERROR_NONE;
UNUSED(MaxOperatingCurrent);
UNUSED(OperatingCurrent);
UNUSED(VbusTargetInmv);
osDelay(350);
/* Check if instance is valid */
if (PortNum >= USBPD_PWR_INSTANCES_NBR)
{
ret = BSP_ERROR_WRONG_PARAM;
}
return ret;
}
Then I use a script to both push the button in the STM32CubeMonitor UCPD window and remotely change the voltage of my PSU. I am able to slip the voltage rise nicely between the ACCEPT and PS_RDY messages.
2025-07-18 8:10 AM - edited 2025-07-18 8:14 AM
Hi @Carl_G
X-NUCLEO-SRC1M1 board is primarily designed to operate as a 5V source, especially when not having UCPD controller. The board hardware and firmware are set up to support USB PD power negotiation to dynamically switch voltages up to 5V. Regarding your question for operation at 20V:
How to enable 20V operations?
To support 20V, you need to add a 20V PDO in your source application firmware to allow the PD negotiation to accept 20V as a valid power profile.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-07-18 8:30 AM
Hi,
I am able to define a PDO that offers 20V. I am able to then with my SNK to request the 20V PDO. However, there is no way to synchronize with the logic running in the MCU to switch to the 20V source. Would be cool if the MCU sensed the voltage and only sent out PSRDY once it sees 20V. But I guess coding that logic is left up to me as this is only a demo board.
I am using this as part of my test bench. I am using this to test my own hardware. I want to be able to send voltages and do other various things. This is working well with STM32CubeMonitor-UCPD. My plan now is when I push the button for my SNK to request 20V, I will at that moment push a button on another interface that will switch my PSU to 20V. I was hoping that this board would have at least 2 power paths to allow a power switch, but it does not. So I believe my only choice is to come up with a way to do the switch manually as indicated.
Do you think this will work? This board will have no problem delivering 20V? I also have the SNK1m1 and it works well at whatever voltage I send to it.
Also note I am using this with the NUCLEO-G071RB which does have USBPD.
Thanks.
2025-07-20 8:26 PM
Is there a place in the source of src1m1 where i can add some delay between sending ACCEPT and PS_RDY?
2025-07-21 4:35 AM
Hi @Carl_G
I don't support power management cases about 5V. I can give you hints on where to dive deeper but this is out of my scope. You can refer to the schematics provided
Also, in user manual section 6.2 Power supply, caution when the ST-Link is used as power source there is a risk to get an over voltage on connector CN7. You need to apply default demonstration configuration, follow the steps 1, and ensure protection on software side.
If the requested power can be met, the communication will end with an Accept message followed by a PS_RDY message. Not sure if possible to implement delay in user section.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-07-21 6:19 AM
At the moment the source for the src1m1 demo does not care about what voltage is present of if any voltage at all. At power up it starts advertising it's PDOs even without any voltage. If you request a 20V PDO it will send accept immediately followed by PS_RDY without any check on the actual voltage being provided. So what I want to do is actually for it to be more compliant.
When you say "if the requested power can be met" the existing software only checks the source PDOs. Which is fine for ACCEPT. But for PS_RDY it should check the actual voltage. At least it should delay sending PSRDY for as long as it can if it does not yet see the voltage. I get that if the voltage never comes thats a kind of software design issue you might not want to tackle in this demo.
2025-07-22 1:26 PM - edited 2025-07-22 1:29 PM
I have edited src1m1_usbpd_pwr.c and added in the osDelay call. It gives me a delay.
/**
* @brief Set a fixed PDO and manage the power control.
* PortNum Type-C port identifier
* This parameter can take one of the following values:
* @arg @ref USBPD_PWR_TYPE_C_PORT_1
* VbusTargetInmv the vbus Target (in mV)
* OperatingCurrent the Operating Current (in mA)
* MaxOperatingCurrent the Max Operating Current (in mA)
* @retval BSP status
*/
int32_t BSP_USBPD_PWR_VBUSSetVoltage_Fixed(uint32_t PortNum,
uint32_t VbusTargetInmv,
uint32_t OperatingCurrent,
uint32_t MaxOperatingCurrent)
{
int32_t ret = BSP_ERROR_NONE;
UNUSED(MaxOperatingCurrent);
UNUSED(OperatingCurrent);
UNUSED(VbusTargetInmv);
osDelay(350);
/* Check if instance is valid */
if (PortNum >= USBPD_PWR_INSTANCES_NBR)
{
ret = BSP_ERROR_WRONG_PARAM;
}
return ret;
}
Then I use a script to both push the button in the STM32CubeMonitor UCPD window and remotely change the voltage of my PSU. I am able to slip the voltage rise nicely between the ACCEPT and PS_RDY messages.