Questions regarding STUSB4500 Breakout

I have a few questions regarding the [STUSB4500 Breakout board.

I think it is possible to dynamically set PD parameters on-the-fly without writing to nvm and doing a hard reset but this functionality isn’t available in the current [SparkFun_STUSB4500_Library.

Can someone confirm this by taking a look at [STSW-STUSB003 firmware docs. [This comment on ST forum makes me think on-the-fly setting is possible.

Also, I was hoping to use the on-board mosfet controlled by VBUS_EN_SINK pin of STUSB4500 as a switch… but seems like taking control of that pin from software using i2c is not possible.

Am I correct?

As a workaround for this I thought of the following workflow to disable/enable the output :-

  • - Enable PowerAbove5vOnly
  • - To disable power... explicitly tell STUSB4500 to negotiate PDO1... ignore PDO2 & PDO3.
  • - To re-enable power... set any PDO except PDO1.
  • Can someone confirm that the above mentioned workflow works. Is there any other way to achieve what I am trying to do here?

    In [SparkFun_STUSB4500_Arduino_Library this would be similar to running the following :-

    #include <Wire.h>
    #include <SparkFun_STUSB4500.h>
    
    STUSB4500 usb;
    
    void setup() 
    {
      Serial.begin(115200);  
      Wire.begin(); //Join I2C bus
      
      delay(500);
      
      if(!usb.begin())
      {
        Serial.println("Cannot connect to STUSB4500.");
        Serial.println("Is the board connected? Is the device ID correct?");
        while(1);
      }
      
      Serial.println("Connected to STUSB4500!");
      delay(2500);
    
      // The following should disable the output
      setPdoNumber(1);
      setPowerAbove5vOnly(1);
     
      // The following should re-enable the output
      setPdoNumber(3);
    }
    
    void loop() {}
    

    ](GitHub - sparkfun/SparkFun_STUSB4500_Arduino_Library: Communicates with the STUSB4500 over I2C to easily add USB-C Power Delivery into your project.)](How can I determine Source PDO capabilities? - STMicroelectronics Community)](STUSB4500/Firmware at master · usb-c/STUSB4500 · GitHub)](GitHub - sparkfun/SparkFun_STUSB4500_Arduino_Library: Communicates with the STUSB4500 over I2C to easily add USB-C Power Delivery into your project.)](SparkFun Power Delivery Board - USB-C (Qwiic) - DEV-15801 - SparkFun Electronics)