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.

TPS65987EVM: Switching (fast) between DFP and UFP and vice versa in dependence of ext. power supply

Part Number: TPS65987EVM

Hi,

I want to use the  TPS65987EVM to test a USB PD configuration that is needed in our HW development.

 

The EVM is connected (permanent mechanical connection) via USB-C to a USB PD DRP Data Host.

The EVM must be allways a Data Device.

Now I want to switch the EVM (as fast as possible) between DFP and UFP and vice versa.

This transition should be triggered either over a GPIO (H -> DFP, L -> UFP) of the TPS6598 ore the presence of the 20V ext. power supply of the EVM (ext. PS presence -> DFP; ext. PS not presence -> UFP)

For my use case it is very important that especially the transition between  DFP to UFP is as fast as possible.

 

I'm using the Application Customization Tool, so either you can give me a ready configured project for the EVM.

Or it would be great if you can give me the knowledge do configure the EVM to perform the wanted behavior.

Thanks in advance Klaus

  • Hi Klaus,

    Let me check if we have a way of switching data roles with a GPIO input event and get back to you.

    Alternatively, if you have an MCU or EC in your system design, you could have it write to register 0x29 Port Configuration (using I2C) to change the port role on the fly. However, doing this will trigger a disconnect and reconnect in the TPS65987.

    Best,

    Alex

  • Hi Alex,

    thank you for your reply.

    Can you specify witch bit I have  to change in register 0x29? I'm using the Application Customization Tool in Debug Mode to  configure my TPS65987EVM but up to now I haven'T found a way to switch role in 0x29.

    What I have found is in 0x28 [0:1] the Port Configuration Field. If I toggle between DFP (Value 0x1) and UFP (Value 0x0) I can force a role switch.

    But is this really the correct way? And is this the fastest way to switch roles?? And if not how can i configure a fast role switch.

    Also the best way for me would be to switch role via a GPI0.

    BR Klaus

  • Hi Klaus,

    I mentioned the wrong register number. I meant register 0x28 Port Configuration. You cannot set data role using 0x29 Port Control register. If you force a role switch via the 0x28 register, the port will disconnect and reconnect.

    We do not have a dedicated input GPIO event to control data role between DFP and UFP. We also do not support changing data role based on 20V ext power supply connection. 

    The recommended way to swap data roles is to use the SWDF and SWUF 4CC commands. These commands are sent via I2C from a MCU or EC to the PD controller. These commands will trigger a DR_Swap which will not cause the port to disconnect and reconnect. This would be the fastest implementation of a data role swap on the fly that can be supported. The DR_Swap is a PD operation via PD messages, these messages are sent by the PD controller automatically. The documentation for these 4CC commands can be found on the technical reference manual available on ti.com.

    Best,

    Alex

  • Hi Alex, 

    thanks for the info, I will try the SWDF and SWUF commands in a minute.

    Regarding the GPIO solution.

    I found this App Note: TPS65987D GPIO Events. -> In Chapter 4 the Barrel Jack Connect Event ist explained. It seems to be exactly what I need. I tried to configure my EVM regarding the explanation but  it seems not to work. 

    Can you please read trough the App Note and give me hints were I miss settings. 

    One of the things that may be missing is: In the App not the basic setting is made up by selecting the following projekt: Project→TPS65987DDH→Advanced→Dual Role Port (DRP), prefers data host→None (DisplayPort Only)

    The one thing I'm missing is that in the Applicatin Customization Tool I can not select the last step (marked in red).

    Wenn configuring the projekt i only can select Project→TPS65987DDH→Advanced→Dual Role Port (DRP), prefers data host.

    Mayby I'm missing some settings to get the GPIO event Barrel Jack connect working.

    Used ACT Version: 

    TPS65981_2_7_8 Application Customization Tool

    GUI Version : 6.1.4

    Date of release : March 29, 2023

    BarrelJack_Projekt.pjt

    Thanks Klaus

  • Hallo Alex,

    I tried the  SWDF and SWUF and also the SWSk and SWSr Commands in Debug mode in the Application Customaization Tool but all of them do not work.

    I get the message: REJECT_CMD.

    Communication is working (onnected with EVM) and the ACT is in polling mode.

    Can you tell me what I'm making wrong??

    Thanks Klaus

  • What is the Frimware Base Image that must be used? At the moment I'm using TPS65987_88_10_10.bin

  • Sorry TPS65987_88_F707_10_10.bin

  • I just read you are allways talking about Data Role swap.

    That is not the thing I want.

    I want to have the data role of the EVM to be always Data Device.

    But I want to switch beween SINK and SOURCE with a GPIO (like mentioned in the  TPS65987D GPIO Events. -> In Chapter 4 the Barrel Jack Connect Event.

    And also it would be great to get faster help than only one reply per day.

    Thanks Klaus

  • Hi Klaus,

    I think there was some confusion in terminology. When you said you wanted to switch between DFP and UFP, I took that to mean data role swap. I believe you are trying to swap between source and sink.

    If you are trying to do power role swap between source and sink, yes we can do this using the barrel jack input GPIO event. This event was originally meant for dead battery mode operation, but should be able to be used outside of dead battery mode as well. On rising edge of the input GPIO, the PD will swap to sink if it is currently a source. On falling edge of the input GPIO, the PD will swap to source if it is currently a sink. I will take a look at your project configuration file. Most likely it is some setting that needs to be adjusted there and it will work.

    The firmware base image version you are using is correct. It is the latest release.

    I will do my best to respond quickly but please understand that I have to balance the time I give to the many issues I am working on. I will get you an update once I have checked your configuration.

    Best,

    Alex

  • Hi Klaus,

    I did some testing of the barrel jack input event and it was not working for me either. I am trying to work with my team to get the proper configuration that works. I will let you know when I have an update.

    The barrel jack event would be the correct way to switch power roles using a GPIO.

    Best,

    Alex

  • Hello Alex, 

    thank you for your help. I'm glad there is a good solution to switch power with a GPIO event.

    I hope you find the propper configuration to get the barrel jack event working.

    Thanks Klaus

  • Hi Klaus,

    Can you try with this exact project on TPS65987D EVM? This configuration worked when I tested on my EVM. I tested by simply plugging/unplugging the barrel jack input. There is on board circuitry mapping barrel jack input to GPIO21.

    TPS65987D_BarrelJack_Event.pjt

    If this does not work, we will have to debug more on a few different paths that would be:

    1.) How are you checking whether the power role swapped? Are you checking TPS65987D registers or are you using a PD analyzer? We would need to see if this is a GPIO event issue or power role swap issue.

    2.) If the TPS65987D is initiating the power role swap, is the far-end connected device accepting the swap? Or is it rejecting.

    3.) Are your jumper configurations correct on the EVM? J5 should have pins 2 and 3 jumped together. J4 should have pins 1 and 2 jumped together. J6 should be empty.

    Best,

    Alex

  • Hello Alex,

     I tested  your project on my EMV but it did not work for me. I also test with plugging/unplugging the barrel jack input.

    What is strange for me is that in debut mode I never see a change in Debug Registers - GPIO Status Register - GPIO21 Data. There is always 0x0. No change if I plug/unplug the barrel jack input.

    I measured directly at the pin 55 (GPIO55) of the IC with the oscilloscope and I see a HIGH/LOW transition when unplugging the jack and a LOW/HIGH transition when plugging the Jack. But no change in the GPIO21 DATA in Debug Register. The GPIO21 Direction is 0x0 - Input so this should be all right.

    I allso can see that the GPIO Event in Debug Mode - Configuration Register - I/O Config - GPIO#21 is correct set to Barrel Jack Event.

     

    Jumpers on the board are as described J5 - 2-3  and J4 - 1-2 and J6 empty.

    DipSwitch S4 are all off, except Switch 4 is on (BT_WaitFor3V§_internal)

    I'm sorry i do not have a PD analyzer, what I do is I check the TPS6598D Registers in DebugMode to see changes.

     

    For the testing device I use (different) power banks and (different) smartphones that all should handle the role switch.

    Where I can see a role switch an between sink and source is when in Debug Mode - Configuration Register - Port Configuration 0x28 Bit Pos [0:1] I'm changing between UFP and DFP and vice versa. Here I can see a change between charging and discharging at my connected power bank or smartphone.

    What else can I try to get the Barrel Jack Event working?

    Thanks for your help

    Klaus

  • I will order an CY4500 PD Analysator to get better knowledge of the PD Com Data between my devices.

  • Hi Klaus, 

    If the signal is asserting high and low at pin 55 for GPIO 21, the circuitry for the barrel jack event should be ok.

    The reason I ask about the PD analyzer is that we are not sure if the GPIO event is not working or if the event is working and sending power role swap but the far-end is rejecting it. This would not be reflected in the registers.

    You can test sending a SWSr swap to source or SWSk swap to sink command to the far-end and see if this successfully swaps the power role. If it is rejected, please let me know the return code. One more thing you could do is collect a debug log after entering debug mode using the GUI tool. The debug log may provide insight into if a power role swap is being sent to the far-end.

    It is great that you are ordering a PD analyzer. It will be very helpful in debug.

    I will be out of office all of next week for Thanksgiving holiday. Please expect a delayed response as much of the team is on holiday.

    Best,
    Alex

  • Hi Alex

    The asserting high and low at pin 55 at GPIO 21 is ok, and the circuuitry for the barrel jack event is ok - I agree with you.

    What I don't understand is that I do not see in debut mode I never see a change in Debug Registers - GPIO Status Register - GPIO21 Data. There is always 0x0. No change if I plug/unplug the barrel jack input.

    So for me the TPS65987 IC does not recognise the barrel jack event in the GPIO Register.

    Also I now have a PD Analysor and I do not see any message on the PD Data with the Analysor that indicate a barrel jack event. No sink/source switch message on the bus while plugging and unplugging the barrel jack.

    So for me there is still a problem in the configuration of the EVM.

    Please can you double check your projekt you send me. 

    Thanks in advance Klaus

  • Hi Klaus,

    The project configuration I sent you is the exact configuration I tested with my EVM when it was working. I am not sure why it is not working on your EVM.

    Could I have you run a test with the exact steps I used below, using the project configuration I sent? Please see the following:

    1. Connect the PD analyzer to the type C cable and attach the type C cable to the far-end device. Do not attach the cable to the EVM yet.
    2. Start collecting data with your PD analyzer.
    3. Power up the far-end device and attach the type C cable with PD analyzer to the port on the EVM. The far-end device should now power the TPS65987D EVM through VBUS. The TPS65987D will boot up in dead battery mode. In GUI debug mode, the Boot Flags register (a debug register) should show the Dead Battery Flag field as 1.
    4. At this stage, the PD is in dead battery mode since no barrel jack supply is connected to supply VIN_3V3. The PD will be in a sink power role.
    5. Plug in the power supply to the barrel jack connector of the EVM. This should trigger the GPIO input event. You should see the Dead Battery Flag field of the Boot Flags register change to 0. A power role swap to source should also be sent as a PD message.
    6. Upon unplugging the barrel jack supply, the PD should return to dead battery mode and swap back to a sink power role.
    7. At this point, you can stop collecting data with your PD analyzer.

    The above steps is what I tested with my EVM and the project file I sent you. 

    Please send me the PD log from your analyzer after performing the test. 

    Best,

    Alex

  • Hallo Alex, 

    I followed exactly the test procedure in your last replay.

    This is the collected data form the PD analyzer.

    First I did the test with a powerbank

    PowerBank_BarrelJackTest.csvPowerBank_BarrelJackTest.zip

    In Line 18 I do the Barrel Jack connect.

    In Line 28 I do the Barrel Jack disconnect-> There is no visible response at the PD Analyzer.

    What I see is at the Application Customatisation Tool in Debug Mode the Dead Battery Flag is changing from TRUE (No Barrel Jack connected -beginning of data collect) to FALSE (Barrel Jack connected Line 18) to TRUE (Barrel Jack disconnected Line 28)

    The EVM is always in SINK mode, and the powerbank is always in SOURCE mode, no role switch is taking place. 

    Then I did the test with a Samsung smartphone

    SmartPhone_BarrelJackTest.csvSmartPhone_BarrelJackTest.zip

     

    In Line 21 I do the Barrel Jack connect.

    In Line 42 I do the Barrel Jack disconnect-> There is no visible response at the PD Analyzer.

    Also no charging of the smartphone is taking place, smartphone allways in SOURCE mode. EVM allways in SINK mode. No role change

    Hopefully you can find a reason for this behavior.

     

    Thanks Klaus

  • Hi Klaus,

    From the PD logs, it looks like the TPS65987 is hard resetting, possibly when the barrel jack event occurs. The hard reset is a message from the far-end to the TPS65987.

    Since you see the dead battery flag changing from True to False, this means the barrel jack event is triggering. However, no PR_Swap is sent, possibly because the hard reset occurs. I will look into why the barrel jack event can trigger but the PR_Swap request is not sent. In the meantime, can you change the S4 dip switch setting to BP_NoWait? You can do this by having switch 6 only in the on position, all other switches off. The dead battery configuration set by ADCIN could be influencing barrel jack event behavior.

    Please test with the BP_NoWait configuration and let me know of the result.

    Best,

    Alex

  • Hallo Alex,

    as requested I tried the BP_NoWait - S4 switch setting with the above test scenario.

    It behaves different but not the way I was hoping. Also no role switch between sink and source with Barrel Jack plug / unplug.

    What worrys me is that EMV behaves different every time even when I do the same test scenaro.

    So with exact the same test set up and the same test scenario the EMV behaves different.

    Here are the 3 most commen ones:

    Powerbank_BP_NoWait_2.csvPowerbank_BP_NoWait_1.csvPowerbank_BP_NoWait_3.csv

    For me this is really strange. 

    That also makes testing very difficult if you can not trust the outcome.

    BR Klaus

  • Hi Klaus,

    The behavior difference in the three logs you sent look like they could be caused by the far-end sending a hard_reset to the TPS65987. I broke down the behavior I see below:

    In logs 1 and 2, the TPS65987EVM starts as the Sink and UFP. It detects the barrel jack connection event and sends a PR_Swap request to the far-end. However, in each of these two cases, the far-end responds with a "Not Supported" message. Meaning the far-end device does not support power role swaps to a sink power role. The TPS65987 works as expected here.

    In log 3, at the beginning we see some hard_reset messages that may be altering the behavior. The TPS65987EVM once again starts as the Sink and UFP. This time, no PR_Swap is sent following barrel_jack connection. Is anything at all different between the tests in case 1 and 2, and case 3? Was the same far-end device used? 

    In neither case 1 or 2 do I see the TPS65987D doing anything incorrectly. Each time, it detects a barrel jack connection event and sends PR_Swap to the far-end to swap itself to a Source power role. The far-end does not support power role swaps in this case. Please note that even though the far-end is a DRP and can be a Source and Sink role, this does not always mean it supports swaps to different roles with a PR_Swap request. In case 3, it seems like the hard reset is altering the behavior of the TPS65987.

    I recommend testing with another far-end device that supports power role swaps to see successful results in cases 1 and 2. Also, can you do a few more iterations of the test with the same setup, process, and far-end device? I would like to see what the rate of the case 3 failure is. I cannot reproduce the issue here. I will also take the case 3 log and see if anyone on my team has input on what is going on there. 

    Best,

    Alex

  • I Alex,

    I think I found a test set up that works for my wanted scenario :-)

    I'm using the EVM with SW Projekt TPS65987DDH -> Standard -> DRP, prefers power source.

    In this SW Porjekt I have configured the Port Settings -> I/O Config -> GPIO#21 for Barrel Jack Detect Event.

    This SW Projekt is than flashed onto the EVM.

    As Far-End I'm using a old Samsung A520 mobilephone.

    This is how the PD analyzer trace looks like.

    Standard_Source+GPIO21_BarrelJack_Working.csv

    Line 1: Connection to Far-End side to EVM (without Barrel Jack connected)

    Line 13: Barrel Jack connected to EVM

    Line 57: Barrel Jack disconnected from EVM

    Line 71: Barrel Jack connected to EMV

    So for me it looks good so far. The EVM is switching between SINK and SOURCE as wanted in dependance of the Barrel Jack.

    Please have a look at the trace if you can see any problems.

    Sometimes when connecting the EVM (no Barrel Jack connected) to the Far-End I have the problem that the VBus is switched of after 1 sec.

    NoWorking.csvWorking.csv

    In Working the everithing behaves as wanted, in NoWorking the VBus is switched of.

    It seems in the NoWorking case the EVM accepts a PR_SWAP without having the chance to supply the Far-End because no Barrel Jack connected.

    But why das it accept the PR_SWAP?

    BR Klaus

  • Hi Klaus,

    I checked the Standard_Source+GPIO21_BarrelJack_Working.csv log where you indicated you saw the power role changing as expected. I did not see any power role swap messages in the log. Can you confirm that you see the PD power role change when reading the registers in debug mode? Please send me the .ccgx3 version of the log if possible.

    For the second point you mentioned, since the TPS65987D was set to BP_NoWait setting, the application configuration was loaded as soon as VBUS is supplied, leading to the PD accepting a PR_Swap before barrel jack is present. Please try using the working standard application configuration you mentioned above with the BP_WaitForVIN3V3_Internal (switch 4 on only) setting. This should resolve the issue.

    Please confirm the first log sent is the correct log, and that the PD is switching roles when reading the register back.

    Best,

    Alex

  • Hi Alex,

    First of all, here the Projekt I'm working with in the moment:

    Standard_Source+GPIO21_BarrelJack_Working.pjt

    I repeat the test from yesterday with the same positiv result:

    If I plug the EVM (NO Barrel Jack connected) the the far-end the EVM is in dead battery mode and has SINK- Role

    When I then plug the Barrel Jack into the EVM the EVM switches to SOURCE- Role and the far-end is beeing charged.

    Here again the PD analyzer log:

    Standard_Source+GPIO21_BarrelJack_Working.zip

    The Barrel Jack is plugged in in Line 13.

    I olso did a Debug Register snap shot:

    Snap Shot EVM in SINK Mode no Barrel Jack connected:

    Sink_no_BarrelJack.csv

    Snap Shot EVM in Source Mode Barrel Jack connected:

    Source_BarrelJack.csv

    Seen from just the function in this test set up it does exactly what I want: The far-end supplys the EVM when no Barrel Jack is connected and the EVM supplys the far-end whenn the Barrel Jack is connecte.

    But I don't know If the mechanism behind it is correct or if it just works by chance in this specific set up.

    Switching to BP_WaitForVIN3V3_Internal (switch 4 on only) solved the problem with the not correct starting EVM when plugging to the far-end side

    BR Klaus

  • Hi Klaus,

    I took a look at the logs and it looks like there are multiple hard resets happening. How many times are you plugging and unplugging the barrel jack in the Standard_Source+GPIO21_BarrelJack_Working log? If there is a spike in voltage from the barrel jack connection, a hard reset will occur. The correct behavior that should be seen is a PR_Swap request being sent to the far-end, which is not occurring. Can you try a different barrel jack supply? Or try connecting the barrel jack plug to the EVM first, before connecting the supply to the AC outlet?

    Also, to send the debug register snapshots, please enter debug mode and click on "snapshot" under the debug tab. The file you sent was a debug log, not a register snapshot. We can use these to verify the power role of the TPS65987, before and after plugging in the barrel jack supply. Currently, the mechanism seems to be working incorrectly.

    Best,

    Alex

  • Hallo Alex,

    in the Standard_Source+GPIO21_BarrelJack_working log I do the following plugging:

    Line 1: Connection to Far-End side to EVM (without Barrel Jack connected)

    Line 13: Barrel Jack connected to EVM

    No more plugging or unplugging is taking part.

    I will do further tests on Monday.

    Maybe it would be a good idea to have a (webex ..) meeting next week, to show you the behavour in live.

    Regrads Klaus

  • Hi Klaus,

    I have asked Simon Forstner, part of our field team, to setup a call next week. I think we are at a better place with more understanding of the issue now to make a call productive. Please contact Simon about setting up a call if you do not hear from him.

    Best,

    Alex

  • Hello Alex,

    as discussed the two logs.

    EVM_Projekt_Data.zip

    BR Klaus

  • Hi Klaus,

    Thanks. I will provide the far-end EVM project soon.

    Best,

    Alex

  • Hi Klaus,

    Here is the project configuration file for the 987D EVM as the far-end device. This would be for the second 987D EVM you acquire for testing. It does not have barrel jack event enabled but it will accept swaps between source/sink and vice versa, so it should be used on the EVM acting as the far-end device.

    987DDH_Far_End_EVM.pjt

    Best,

    Alex. 

  • Thank you Alex, I will test the setup as soon as I get hold of my secont 987EVM. I will then reply and give you information about the outcome.

    Thanks in advance. Klaus

  • Hello Alex, I finaly received the the second EVM.

    My test set up is now on the one EVM the 987DDH_Far_End_EVM.pjt and on the other side the EVM the BarrelJack_Projet.pjt. 

    I'm tracing the data with the CY4500 protokoll analysor.

    Here is the actuell data:

    Test_EVM-FarEndSide_to_EVM-BarrelJack-detekt_working.zip

    For me it looks good, the PR_swap is communicated between the boards und is working very good with a very fast switching between sink and source.

    No reset is happening.

    There is one question from my side: Is it possible on your side to update/extend the projekts so that the source/sink capabillitys are 5V, 9V, 15V, and 20V.

    At the moment the capabillitys are only 5V.

    It would be great to get the updated projects from your side.

    Thanks in andvane

    Klaus

  • Hi Klaus,

    Please see the updated projects attached.

    BarrelJack_Projekt_5_to_20V.pjt

    987DDH_Far_End_EVM_5_to_20V.pjt

    The PD logs look ok to me as well. Looks like the barrel jack and PR_Swap is working.

    Best,

    Alex

  • Hallo Alex,

    first of all, happy new year for you and your family.

    Back from my Christmas break I tried your new projects.

    Did you try them on your EVMs?

    Because for me they are not working as expected.

    Especially when the BarrelJack side is not supplied with power it seems that it is requesting a role switch to source but has no power from the barrel jack.

    The result is a constant cycle.

    constant_cycle.zip

    And also when the Barrel Jack side is supplied with power, sometimes the BarrelJack side is source and sometimes the FarEnd Side is the source.

    So for me the roles are not really correct configured.

     

    Can you please help me to sort this problem out. 

    Thanks Klaus

  • plugging_unplugging_USB_C-connector.zip

    Here is another protocol with both EVMs connected to power.

    When connecting the USB-C connector somtimes the BarrelJack side is source and somtetimes the FarEnd side is source. For my opinion only the BarrelJack side should be source.

  • Hi Klaus,

    Happy new year to you as well!

    It does look like the BarrelJack side is requesting a PR_Swap upon connection when no barrel jack power is present. I checked the EVM schematic and found that this is due to the system side of the PP_HV1 internal sink path being jumped to SYS_PWR for sinking, since SYS_PWR is used for the barrel jack detection circuit. When sinking 20V, which is the case with the new project configurations, SYS_PWR also sees 20V, causing the barrel jack detect circuit to turn on. This does not occur with the previous 5V. 

    Let me do more testing and get back to you with a working solution. I did not test the two latest projects I sent since I did not have the hardware available to me when working from home during the holidays.

    As for when both sides have external power connected, there will be variation in which side starts as source since both sides are dual role power DRP ports. Both sides will DRP toggle the CC lines and a connection is made when one side presents Rp for source and the other presents Rd for sink. The best we can do (given both sides are DRP), and you want one side to always start as source, is to have the barrel jack side initiate a swap to source whenever it boots up AND is not in dead battery mode. This can be done by setting the "Initiate Swap to Source" bit in the Port Control register in the barrel jack project.

    Best,

    Alex

  • Hi Klaus,

    I confirmed on my side that I do see the PR_Swap being requested by the barrel jack device when no external power is available. This is indeed due to the barrel jack circuitry sharing the SYS_PWR signal with the PP_HV1 system side sink path. 

    The setup still works for PD contracts of up to 12V. I have attached a project config with these new sink capabilities. Please note this only affects the barrel jack device side, not the far end side since the far end does not have the barrel jack event.

    BarrelJack_Projekt_5_9_12V.pjt

    Best,

    Alex

  • Hi Alex,

    When i use your first projects 

    3225.987DDH_Far_End_EVM.pjt7848.TPS65987D_BarrelJack_Event.pjt

    that only works on 5V the Power swap is takeing place in under 100ms from sink tor source on both sides.

    This is very good because we need that fast switching.

    When I update the TPS65987D_BarrelJack_event.pjt to be capable of 5V and 9V as in

    TPS65987D_BarrelJack_Event_5V_9V.pjt

    I get an unwanted soft reset after power swap:

    NotWanted_SoftReset.zip

    See lines 25 to 33.

    Why is it like this??

    By the way this also happens with your projekt with higer voltage.

    This behavour is very bad because it means a very long power loss für the system.

    Thanks for your help

    Klaus

  • Hi Klaus,

    The soft reset you highlighted is a soft reset to the cable. All SOP Prime messages are cable PD messages. All SOP messages are regular PD messages. This soft reset is issued by the PD to the cable after the PD swaps to source in order to learn the cable's capabilities (power and data). This does not cause the VBUS drop seen.

    What I am concerned at is the VBUS drop seen after the hard reset (the drop you have circled). This should not be happening, and is not happening in my setup with two EVMs. When you see this VBUS drop issue, are you still testing with an EVM as the far-end device or did you test with something else?

    Best,

    Alex

  • Yes, for my tests I'm using always two EVM's for my tests.

    The problem is I see very long PR swap times also with your projekts.

    LongPRswapTime.zip

    Only with the projekts

    3225.987DDH_Far_End_EVM.pjt

    7848.TPS65987D_BarrelJack_Event.pjt

    the PR switching times are in both direktions under 100ms.

    In all other porjekts (with higer voltages) the witching times are way above 100ms especialy in the for me important switch wenn the EVM BarrelJack is loosing its BarrelJack power and must be supplyed very fast from the FarEnd side..

    BR Klaus

  • Hi Klaus,

    The long duration is because the swap from source back to sink is not a PR_Swap, but a re-boot and re-connect. When barrel jack power is applied to barrel jack device EVM, the EVM will request a PR_Swap, so the swap will be fast. When barrel jack power is removed from the barrel jack device EVM, the EVM will lose power momentarily, resulting in a reboot and reconnect. This is because the barrel jack detect circuit for the GPIO event is tied to SYS_PWR from the barrel jack receptacle. When system power is lost, and the barrel jack device EVM is in the source role, the PD will reboot.

    If barrel jack detect circuit for the GPIO event is not directly tied to the SYS_PWR from barrel jack, then this can be avoided. The input barrel jack GPIO event must see a falling edge signal before system power is lost. This does not occur on EVM due to hardware design limitations. If the falling edge signal is seen at the configured GPIO before system power is lost, then the PD will request a PR_Swap back to sink, and the issue can be avoided. This is unfortunately not possible to demonstrate without modifying the EVM.

    Best,

    Alex

  • The funny thing is that it perfect works with the two 5V project mentioned above.

    I just had a look at the schematic of the EVM.

    Can you give me some advice what could be modified to overcome this problem?

    I'm quite good in modifying boards, so it should be possible to change the EVM in a way that the fast swap works with all projects.

    This would be very important for me to have a prove of concept.

    Thanks in advance 

    BR Klaus

  • Hi Alex, I did kind of a prove on concept.

    I used the 

    5531.BarrelJack_Projekt_5_9_12V.pjt

    and the

    8255.987DDH_Far_End_EVM_5_to_20V.pjt

    Both connected to the barrel jack.

    To initiate the swap i did apply GND to the point between R118 and R121 at the Barrel Jack Detection part.

    The swap was initiated wie only very short switching times under 100 ms.

    ProveOfConcept.zip

    But still it would be great if you can think about a working permanent soluion with BarrelJack connect and disconnect.

    BR Klaus

  • Hi Klaus,

    The reason the PD is rebooting upon barrel jack removal is because VIN_3V3 is removed before the barrel jack event can be detected on the GPIO. Once VIN_3V3 is removed and the PD is in normal operation mode (non dead battery), the PD will shut down. When you triggered the barrel jack event falling edge on the GPIO before removing the barrel jack power, this configures the PD to get power from VBUS instead of VIN_3V3 and swap to sink, which allows things to work.

    There are two hardware workarounds I can see for a permanent solution without an microcontroller or embedded controller in your design.

    • One is to add a large capacitor at VIN_3V3 to hold the charge and provide power to the PD for a moment after barrel jack is removed. This would allow the PD to stay booted up for a moment, and allow the barrel jack event falling edge to trigger in time.
    • One other method is to make a modification to bias the barrel jack comparator circuitry to a higher threshold voltage. This would allow the event falling edge to trigger faster, allowing the PD to catch the barrel jack removal event before it boots down from VIN_3V3 loss. Neither are guaranteed solutions, but it may be worth a try.

    Best,

    Alex