Tool/software:
Hi teams:

Best Regards!
Iris
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hi teams:
Best Regards!
Iris
Hello,
I can see now your reference is to GPIO10 and when the IRQ is not selected.
Will test on our side to understand what is happening with the GPIO.
Regards,
Chris
Hello,
I can confirm that the Raw:Int 0: Hex 0 is correct and that this cannot be changed by selecting the Value []. This applies to both GPIO10 and GPIO11. Can you use a different GPIO?
Regards,
Chris
Hello,
I have another question to ask you. Under what circumstances does I2Ct_iRQ issue an interrupt?
The event defined in the Interrupt Mask for I2C1 Register (0x16) is set to '1' and the event occurs.
Regards,
Chris
Hello,
I have tied this I2Ct_IRQ to 1V8 through a 10K resistor. However, I can see there is 3V3 output from this pin.
By default there is an internal pullup enabled.
Is there a way to configure it to operate at 1V8 ?
You could attempt to clear this value in the GPIO10 view and then return the Multiplexing for GPIO10 to 'Pin Multiplexed to Alternate Function(I2Ct_IRQ), however, i do not know if that will work. I will also test on my side, but this may be a limitation of the configuration tool.
Regards,
Chris
Hello,
I was able to confirm that the pullup can be disabled by first disabling in the GPIO10 perspective and then returning to the I2Ct_IRQ function/perspective.
Regards,
Chris
Hi Chris,,
thanks for the reply
1. I followed the steps you suggested but I still see 3V3 at I2Ct_IRQ.
2. and also we noticed that the low region binary generated using GUI version V1.1.0 and V1.0.2 are having different file size (68KB vs 79KB).
V1.0.2 can load patch successfully and works well with our code but V.1.1.0 is not.
Is it recommended to use the older version V1.0.2 GUI ?
Best Regards!
Iris
Hello,
1. I followed the steps you suggested but I still see 3V3 at I2Ct_IRQ.
Thank you for testing on your side. The EVM has a pullup to LDO_3V3, so i am only able to confirm that the binary changes when I perform the steps.
Is it recommended to use the older version V1.0.2 GUI ?
If you need to mee the latest specification, then use 1.1.0.
* updated PD firmware to meet latest PD specification v3.2.1.1
V1.0.2 can load patch successfully and works well with our code but V.1.1.0 is not.
Are you using a custom programmer or the EVM/GUI tool?
Regards,
Chris
Hi Chris,
thanks for your reply. It looks like we've already resolved the issues mentioned earlier.
However, we're currently encountering a challenge related to the DRP power sink/source behavior.
Specifically, when we connect to a mobile phone, the TPS25751 functions as a source and supplies power to the phone. In contrast, when connected to a laptop, we want the TPS25751 to operate as a sink and draw power from the laptop.
Is there any register configuration in the TPS25751 that allows it to distinguish between a mobile phone and a laptop in order to handle the power role accordingly?
Best Regards!
Iris
Hello,
Is there any register configuration in the TPS25751 that allows it to distinguish between a mobile phone and a laptop in order to handle the power role accordingly?
You can use the GPPi command to get information from the port partner and then issue a SWSk or SWSr command.
Depending upon the phone and laptop you could use the advanced configuration and set the ability to initiate and swap power roles in the port control register. if the phone requests a Power Role Swap so the TPS25751 is to become the source then select process swap to source. When initiate swap to sink is set, The tps25751 will initiate a power role swap to become the sink (if the initial negotiation results in the tps25751 becoming the source) and the phone or laptop can choose to accept or reject the power role swap.
Regards,
Chris
Hi Iris,
TI USA is off on 4th of July, we will share a response to you early next week.
Thanks and Regards,
Hello,
During PTCH mode the PD controller unmasks the ready for patch interrupt. Once the patch is successfully downloaded the mask will be defined by the configuration in the patch.
You can read register 0x14 to determine the source of the interrupt if multiple interrupts are unmasked.
https://www.ti.com/lit/ug/slvucr8a/slvucr8a.pdf#page=19
The interrupt mask can be set in the configuration with the GUI from the advanced configuration view.
Regards,
Chris
Hello Chris,
thanks for your reply.
The first thing we need to solve now is to stabilize the IRQ at a high level, because after initialization, there is no event triggered yet, so the IRQ should be at a high level
But our current situation is that once the power is turned on, the IRQ is likely to be lowered, and there are also cases where it is raised, but the probability is very small
Best Regards!
Iris
multiple
After successfully downloading the patch, we directly read the value of the 0x14 register and found that Bit 0, 1, and 3 were all set to 1. There is a question that Bit3 of the 0x14 register is set to 1 when inserting or unplugging the USB, but we do not have any USB insertion or unplugging actions
Hello,
As part of the device flow the Ready for Patch interrupt will be set to indicate that the PD controller has completed boot and is ready for the patch. So you should expect that the interrupt line will be pulled low. Bit0 is reserved, so that is not expected. Also, if only the Plug Insert Removal (bit3) is selected in register 0x16 then the other bits should not be set.
After the patch download can you clear interrupts and confirm that the system is stable? Is the download from an embedded controller or an EEPROM?
Regards,
Chris
Hello,
Please be advised that the I2C communication uses SMBUS protocol so the first byte is the number of bytes in the register. Using the EVM i was able to capture the following during the patch load process on I2Cc.
The 0x0B is the size of the register. 11bytes*8bits = 88bits => 0-87
When i write to register 0x18 then the interrupt goes high (red, channel D2).
Regards,
Chris
Hello,
If the EC is used to load the image to the PD controller via patch burst mode, then I would consider using the Command Complete interrupt (30). Since this is used during PTCH this is not configured in the GUI but must be configured by the EC at run time. Please find the attached example.
I would recommend using Command Complete (30) and the plug insert removal (3). Upon insertion you can then query to the PD controller to determine the state and perform the GPPI/MBRd command to determine what the port partner is and that you are in the desired power role. If not in the desired power role then a swap command can be issued (SWSk or SWSr).
https://www.ti.com/lit/ug/slvucr8a/slvucr8a.pdf#page=59
Regards,
Chris
Hi Chris,
After some troubleshooting, we are able to see the IRQ going high after clearing the 0x18 register. Thanks for your support.
Could you advise which fields in the interrupt mask register (0x16) are recommended to monitor?
Our product is a Bluetooth speaker, the PD is controlled by an embedded controller and operates in DRP mode
(act as a sink when is connected to AC adaptor/ powerbank/ laptop, and act as a source when is connected to mobile phone).
...
Bset Regards!
Iris
Hi Chris,
Thanks for your reply!
We added it to the interruption event PD Hardreset(0)、Plug Insert or Removal(3)、Overcurrent(9)、New Contract as Provider(13)、liquid detection(60) What should we do to trigger PD Hardreset and New Contract as Provider interrupts among these five events, and do we need any other interrupt events?
As well as your previous suggestion to add the CMD1 Complete (30) interrupt, what should we do and how to use the GPPI/MBRd command? Can you provide a reference code example
Best Regards!
Iris
Hello,
do we need any other interrupt events?
I do not believe so.
As well as your previous suggestion to add the CMD1 Complete (30) interrupt, what should we do and how to use the GPPI/MBRd command? Can you provide a reference code example
I do not have any example code at this time. I would recommend using the PD standard to help establish a flow to determine the port partner. For example:
(1) Does the port partner support dual role power (B29 in source PDO)? If a source and B29=0 then most likely an AC adapter.
(2) Does the port partner support Communications (B26) and/or dual-role Data (25)? If no then likely a power bank.
(3) Does the port partner have batteries(Source_Capabilities_Extended Message, Byte 22)?
(4) What is the Battery Capabilities Message? What is the Battery Design Capacity, VID, PID? if less than X, then likely a mobile phone
Regards,
Chris
What should we do to trigger PD Hardreset and New Contract as Provider interrupts among these five events, and do we need any other interrupt events?
Hi Chris,
Is it correct for us to disable the OTG of the charger in the PD Hardreset interrupt operation and enable the OTG mode of the charger in the New Contract as Provider interrupt operation? Or do you have any suggestions?
Best Regards!
Iris
(1) Does the port partner support dual role power (B29 in source PDO)? If a source and B29=0 then most likely an AC adapter.
hi Chris,
In order to solve the problem of connecting our product (Speaker) to a computer, where the product charges the computer instead of the computer charging the product, the following steps have been taken
(1) USB insertion
(2) Check if it is currently a sink. If so, do not process it. If it is a source, read the opposite MSDK_USB_CiPadOS P_PD∝PDO_SOURCE-RX
(3) Extract the first PDO and check if it supports Dual Role Power (B29=1). If so, initiate SWSK
(4) Does the rotation training character become Sink
Is this operation OK? And there is a question, is the third step of extracting PDO extracting the first PDO? Or do we need to judge based on what?
Best Regards!
Iris
Hello,
Is it correct for us to disable the OTG of the charger in the PD Hardreset interrupt operation and enable the OTG mode of the charger in the New Contract as Provider interrupt operation? Or do you have any suggestions?
Yes. This is correct. If there is a discharge capability, then it is also recommended to discharge the power path so when transitioning from a disconnect or hard reset the previous voltage is not seen when the connection is re-established (which will start as a 5V implicit contract).
Regards,
Chris
Hello,
Is this operation OK? And there is a question, is the third step of extracting PDO extracting the first PDO? Or do we need to judge based on what?
I believe that is ok. The first PDO will contain the Dual Role Power for the port.
Regards,
Chris
Hello,
If using PPHV/PP3, which register should be read if there is OVC?
The TPS25751 does not support OVC on PPHV, only PP5V.
Regards,
Chris
Hi Chris,
Thanks for your reply!
Current version:
① Adapter charging computer;
② Speaker charging external devices (such as fans, headphones, phones)
③ Speaker charging computer instead of computer charging Nina
I want to ask how to plug in the computer to power Speaker
Hi Li Lefty,
If you want the computer to power the speaker, you will want the speaker to be the USB-C PD sink.
Depending on your configuration, you may need to do a couple things.
Check that you are acting as a source
1. to initiate a swap to sink, you can use send the 4CC "SWSk" command to attempt to PR_SWAP to sink
2. Make sure that the Port Control -> "Initiate swap to source" field is not set, otherwise the TPS25751 will automatically attempt to do a PR_Swap after you send the SWSk command.
3. Make sure that the Port Control -. "Process swap to sink" field is set as well.
Thanks and Regards,
Chris
to initiate a swap to sink, you can use send the 4CC "SWSk" command to attempt to PR_SWAP to sink
Hi Chris,
May I ask under what circumstances to use the 4CC "SWSk" command? What judgment needs to be made before executing the 4CC "SWSk" command?
The pictures are some of my configurations
Best Regards!
Iris
Hi Iris,
May I ask under what circumstances to use the 4CC "SWSk" command? What judgment needs to be made before executing the 4CC "SWSk" command?
From the TRM.
You can technically use it at any time, but the PD controller may reject it if certain conditions are not met.
Why do you have try.Src set? Do you prefer to be DFP/Source on initial connection? If you don't have a preference, you may want to set the support option to none supported.
Thanks and Regards,
Chris
Hi Chris
If we set the initial a swap to sink, there will be a phenomenon where the speaker cannot charge the phone and the laptop does not implement it
Here is the relevant code for executing SWSK. You can take a look
static void nina_usb_pd_try_swap_to_sink_if_needed(const msdk_device_t *dev) { #ifdef CONFIG_MSDK_DRV_TPS25751 msdk_usb_c_propval_t val = {0}; msdk_status_t status; /*Step 1: Read the current Power Role (Source or Sink)*/ status = tps25751_property_get(dev, MSDK_USB_C_PROP_SOURCE_SINK, &val); if (status != MSDK_STATUS__OK) { MSDK_LOG_ERR("[PD] Failed to get current role"); return; } bool is_source = val.source_sink; // true = Source, false = Sink MSDK_LOG_DBG("val.source_sink=%d",val.source_sink ); if (!is_source) { MSDK_LOG_INF("[PD] Already in Sink role. No swap needed."); return; } MSDK_LOG_INF("[PD] Current role: Source. Checking port partner capabilities..."); /*Step 2: Read the PDO (Port Partner Source Capabilities) of the peer device*/ status = tps25751_property_get(dev, MSDK_USB_C_PROP_PD_FIX_PDO_SOURCE_RX, &val); if (status != MSDK_STATUS__OK) { MSDK_LOG_ERR("[PD] Failed to get partner source capabilities"); return; } /*Step 3: Analyze the B29 (Dual Role Power) field of the first PDO*/ uint32_t raw_pdo = 0; memcpy(&raw_pdo, &val.source_pdos_rx[0], sizeof(uint32_t)); if (!is_host_like_partner(raw_pdo)) { MSDK_LOG_INF("[PD] Partner is not host-like (likely mobile or accessory). Stay as Source."); return; } MSDK_LOG_INF("[PD] Partner supports DRP. Attempting to swap to Sink..."); /*Step 4: Use property set encapsulation to send 'SWSk' (Swap to Sink)*/ msdk_usb_c_propval_t swap_val = { .custom.usb_pd_pr_swap = true }; status = tps25751_property_set(dev, MSDK_USB_C_PROP_CUSTOM__USB_PD_PR_SWAP, &swap_val); if (status != MSDK_STATUS__OK) { MSDK_LOG_ERR("[PD] Failed to initiate power role swap (SWSk)"); return; } /*Step 5: Polling waiting becomes Sink*/ uint32_t elapsed = 0; while (elapsed < PD_SWAP_TIMEOUT_MS) { msdk_usb_c_propval_t check_val = {0}; if (tps25751_property_get(dev, MSDK_USB_C_PROP_SOURCE_SINK, &check_val) == MSDK_STATUS__OK) { if (!check_val.source_sink) { MSDK_LOG_INF("[PD] Swap to Sink successful."); return; } } msdk_time_delay_ms(POLL_INTERVAL_MS); elapsed += POLL_INTERVAL_MS; } MSDK_LOG_DBG("[PD] Swap to Sink failed or timed out."); #endif // CONFIG_MSDK_DRV_TPS25751 } static bool is_host_like_partner(uint32_t raw_pdo) { bool b29_dual_role_power = (raw_pdo & (1 << 29)) != 0; bool b26_usb_comm_capable = (raw_pdo & (1 << 26)) != 0; bool b25_dual_role_data = (raw_pdo & (1 << 25)) != 0; return b29_dual_role_power && (b26_usb_comm_capable || b25_dual_role_data); }
Best Regards!
Iris
Hi Iris,
This is somewhat expected. Initiate swap to sink will always attempt a power role swap when in the source role, and will complete if the far end supports the PR_swap.
The PD controller does not have a good way of knowing what type of device is connected on the far-end, and bases the role swap only off of the current power role.
You could potentially disable both "initiate swap to xxx" settings and let the far-end decide if it prefers one if setting initiate swap to sink. It is up to your MCU to determine when is a good time to stay as source or when to swap to sink. We can not provide too much guidance on when to swap power roles as it may be specific to your system.
Thanks and Regards,
Chris