RE: TPS25751: Seemingly firmware related issues when used with the BQ25798

Other Parts Discussed in Thread: USB2ANY, BQ25798, TIDA-050047, TPS25751

Hi,

I do not have access to the BQ I2C and USB2ANY tool to see what the status of the charger is.

However, what I can say, is that in sink mode, the STAT LED turns on (no flickering or blinking or anything), and in source mode, it doesn't. The STAT LED turns on whether the sink voltage is 20V and it doesn't actually work (drawing 0W) or the sink voltage is 12V, and it does work (drawing ~19W).

The battery is made of just standard 18650 Li-ions (2.5 - 4.2V/cell), so 11V = 3.67V/cell = about 60% SoC probably.

Yes, I am also suspecting it is an issue with the firmware configuration, and what commands the BQ is being sent potentially.

My firmware flashing sequence is as follows:

1. Generate the full flash binary

2. Convert it into a .c header file using xxd in Git Bash

3. Use an Arduino microcontroller to load the firmware onto the device, which provides output to the serial monitor when flashing is complete and double-checks whether it flashed correctly after each bit.

What I am wondering is whether I have an issue with my firmware flashing sequence, or the firmware generation has an issue itself. Let me know which other details you want me to provide so we can solve this problem.

One thing I did notice is that I'm trying to charge a battery at 4.5A up to 12.45V from a 20V power supply, which is beyond the graphs of the charging current vs efficiency vs input voltage figure in BQ25798 datasheet. Could it be hitting some sort of internal limit at these power levels, even though, as of the moment, 11V*4.5A = 49.5W (which is still way below the 60W budget)?

Thank you.

  • Hello,

    One thing I did notice is that I'm trying to charge a battery at 4.5A up to 12.45V from a 20V power supply, which is beyond the graphs of the charging current vs efficiency vs input voltage figure in BQ25798 datasheet. Could it be hitting some sort of internal limit at these power levels, even though, as of the moment, 11V*4.5A = 49.5W (which is still way below the 60W budget)?

    I have directed this question to the BQ team.  In the mean time, can you attempt a lower current and experiment?

    Regards,
    Chris  

  • Hi Chris,

    Will do. I'll try 2.5A tomorrow.

    Thank you.

  • Hi Chris,

    Would reverting to v1.0.2 of the USB PD application customisation tool be a troubleshooting step I could try tomorrow if simply reducing the charging current doesn't work?

    Thank you.

  • HI Rain,

    Likely the charger die temp is reaching 120C and so the thermal regulation loop is limiting input current to prevent die temp from increasing further.  

    The charger's efficiency when switching at 1.5MHz isn't high enough to reach 4.5A for a 3S battery from 20V input but it should be able to reach at when switching at 750kHz as shown below:

    Even at fsw=750kHz the charger die temp and therefore package will get hot.  You will need to increase inductor from 1uH to 2.2uH if switching at 750kHz.

    Regards,
    Jeff

  • Hi Jeff,

    Thanks for the info... I just realised I was trying to make the BQ25798 system dissipate 4 watts of heat in sink mode and 1.5 watts of heat in source mode! No wonder they could've instantly heated past 120C! I'm reducing charging current to 1.5A and sourcing wattage to 18W (9V, 2A), in hopes that less than 1W of heat dissipation should work ok with my 4-layer design that uses 2oz of copper. I was overthinking things Sweat smile I'll let you know how it goes.

    Thank you.

  • Hi Jeff,

    On this note, in what circumstances can TIDA-050047 actually hit 66W sink and 45W source, even if you were to use a 2.2uH inductor and 750kHz switching frequency? Is TIDA-050047 capable of these things from a firmware perspective, but the user would need to make additional modifications to ensure sound heat dissipation?

    Thank you.

  • HI Rain,

    45W source is okay.  66W sink is not possible.  The charger IC package simply cannot not dissipate the heat.

    Regards,

    Jeff  

  • Hi Jeff and Chris,

    Great news, everything in sink mode works! I configured the battery to charge at 3A (32W) and nothing's getting especially hot, which is great. So, as for the 'sink' side of things, everything should be good.

    However, in OTG mode, there are still some really confusing issues. In practice, the system only works for devices drawing 5V, 0.5A or less. Otherwise, it'll cut out and keep attempting to draw power again as if some limit has been exceeded on either the device side or the sink side. In the case of my iPhone, it fails in source mode so it decides to start drawing power from the phone instead of supplying power to it. With devices that only act as sinks, it simply keeps resetting, to no avail.

    I did load tests with an electronic load (smart battery charger) powered by a USB-C sink, and 35W sinking at 15V works continuously, although it gets starts getting hot to the touch rapidly when approaching this power level (as expected). My iPhone draws 30W maximum at 15V, with the usual value being about 18 - 25W, and the other (sink-only) device I'm using to test it only draws 12W. So I don't understand what the difference is between my consumer electronic devices drawing 12 - 25W and my electronic load drawing 35W that's causing something in the loop to reset on the former.

    Should I make a different thread for this topic?

    Thank you.

  • Hello,

    Yes, please create a different topic. 

    I suspect that the 5V is dropping when you try to source more than 0.5A and the PD controller performs a hard reset when the UVLO threshold is reached and the reconnection results in the power role swap.

    Regards,

    Chris  

  • Hi Chris,

    Before I create a new topic, I'll just add some additional context here for you, in case that helps.

    I tested changing the 5V PDO to 0.5A a few days ago in hopes that the source device wouldn't try to draw excessive power and it still didn't work - I suspected the same thing. Additionally, in my load testing today, the output voltage dropped only 0.15V on the source side as measured by the PowerZ C240 from 0A to 1A at 5V, which doesn't seem abnormal to me. I also tested with a separate board unit swapping out the buck converter circuit for a commercial buck converter module that supports 3A, and it still didn't work. PP5V measures 5.00 - 5.01V with a multimeter in rest. Could it be bad routing or lack of capacitance? Why would these things work in load tests but not with actual devices?

    Thank you. I will create the new topic if there are additional troubleshooting steps to be made and not a simple change that you might recommend.

  • Hello,

    Could it be bad routing or lack of capacitance?

    Yes.  If the power path is too narrow (more inductive/resistive) and/or if there is not sufficient capacitance then you would see the voltage drop during a transient.  

    Why would these things work in load tests but not with actual devices?

    When using the PowerZ is it a manual transition from 0 to 1A in small steps or is it a single step from 0 to 1A?

    Regards,

    Chris

  • Hi Chris,

    When I was testing with the PowerZ, my smart charger gradually ramped up the power, it wasn't one quick step from 0W to 5W or even from 0 to 35W like I was testing before. It ramps up the power over the course of like a second or two. What I still don't understand is how the same thing was happening when I used a different buck converter though. As I was saying, I copied TIDA-050047 component for component, so maybe there's enough capacitance, but the way I routed it renders that amount of capacitance essentially useless.

    USB-C connector routing. Might I need any additional capacitors other than the 4x 0.1uF and 1x 4.7uF that are already there? Do my 10 0.3mm hole vias at the narrowest part of VBUS add too much inductance? Top and bottom layers have 2oz copper.

     

    PP5V buck converter routing... The capacitors are to the side of the main power path... Now I'm obviously a beginner in PCB design, but I'm pretty sure, looking back, that's probably not the right way to do it. I don't know to what extent the effects of this poor routing would have though. Couldn't a fast enough transient pretty much evade these capacitors which could be a reason why the voltage would drop?

    What would happen if I cut and put a bodge wire as illustrated?

    Thank you.

  • Hello,

    Might I need any additional capacitors other than the 4x 0.1uF and 1x 4.7uF that are already there?

    No.  You should not need additional capactiance.

    Do my 10 0.3mm hole vias at the narrowest part of VBUS add too much inductance?

    I am not sure what is the component connecting C_VB and VBUS, but on the VBUS side you are using plenty of vias so i would not expect an issue.

    Do you know the rating of the cable and connector?

    https://www.ti.com/lit/ug/slvucp9a/slvucp9a.pdf#page=39

    What would happen if I cut and put a bodge wire as illustrated?

    I do not think that is necessary.  You have used a fairly large piece of copper.  You could attempt to expose the copper on the top layer and place a capacitor closer to PP5V but again I do not believe that would help.  Similarly you could move the 4.7uF from the C_VB connector to the VBUS at the PD 

    - I would not risk cutting up your board.  Try and focus on the component between C_VB and VBUS and the connector/cable.  

    Regards,

    Chris

  • Hi Chris,

    My USB-C cables have been tested at 100W (20V, 5A of course). They include a wattage display, and despite being quite budget, have never failed me after years of usage on my own USB-C projects and on my consumer electronic devices. I just tested with the USB-C cable that comes with the iPhone 16 to try to charge my phone, as well as a 240W-rated cable, and neither work still. However, the connector I am using is G-Switch GT-USB-7010ASV, rated for 3A and 24V AC, I don't know why they are using AC here. This connector is very budget... goes for 8 cents a piece even at prototyping quantities.

    What do you mean by the component between C_VB and VBUS and the connector/cable? The ferrite between C_VB and VBUS I have already replaced with a bodge wire.

    Thank you so much for your support.

  • Hello,

    What do you mean by the component between C_VB and VBUS and the connector/cable? The ferrite between C_VB and VBUS I have already replaced with a bodge wire.

    I was not aware of the component or the modification.  Thank you for the clarification.

    Regards,

    Chris

  • Hi Chris,

    What values in the USBCPD Application Customisation tool control how much the source voltage can drop until resetting, or how quickly the current can change (dI/dt?) I feel like whichever values control these things, they are too sensitive. Could it be something in register 0x77? I would go messing around in these registers but I can't find any information online about what they do. Can this not be discussed in a public forum?

    Anyways, I did some more tests, and at 5V, 1A, VBUS only drops 50mV compared to 5V, 0A, which seems pretty normal. I've tested quite a few cables, and they all seem to drop the same at 5V, 1A, which is about 170mV.

    If we already established I have enough capacitance at the USB connector, and large copper planes to support it, with my very limited knowledge in this space... it leads me to suspect the firmware more than anything else at this stage.

    I need to get a YouTube video out by next week that will cover my experiences with this system and especially its advantages over commonly used systems in maker and robotics projects, ultimately leading more customers to begin prototyping with it, and getting source mode working would be great as it will showcase the full capabilities of TIDA-050047 that I have attempted to replicate in my own PCB.

    Again, I really appreciate your support, and any troubleshooting tips or ideas other than the ones I listed would be very much appreciated. Sorry for bombarding you with questions, but, if we get source mode working, does it automatically support PPS too, or do we have to add that in in the Advanced Configuration page?

    Thank you so much.

  • Hello,

    You can adjust the VBUS Sink UVP trip threshold in the Port Configuration Register:

    Could it be something in register 0x77?

    Register 0x77 is the source capabilities extended Data block.  This is defined in the USBC-PD standard and can be used by the sink to understand the capabilies of the source.  These do not in any way gate the capabilities.  The idea is that the sink is made aware of the capabilities (limitations) of the source through the capabilities and extended capabilities message.

    You can also try increasing the peak current in the PDO.

    but, if we get source mode working, does it automatically support PPS too, or do we have to add that in in the Advanced Configuration page

    You will need to add the PDOs in the advanced configuration page.  By default an SPR AVS PDO is added.  You would need to enter an SPR PPS manually.

    Regards,
    Chris

  • Hello,

    You can also attempt to set the PDO voltage slightly higher, 5.1V.

    Regards,
    Chris

  • Hi Chris,

    Thank you so much for this information. I am currently trying it and will let you know how it goes Slight smile

    Kind regards,

    Rain

  • Hi Chris,

    Neither of these solutions worked. However, what I did notice is that my ADCIN1 and ADCIN2 pins are set to 1.5V = 5 decoded value, meaning it's in 'AlwaysEnableSink' mode instead of 'SafeMode', the mode that's recommended when 'the PD controller manages the battery charger when present.'

    Could this explain why sourcing is working with 5V, <0.5A devices, and working at full power with a dumb 'sink-only' module in my load tests, but not with proper consumer electronic devices that will notice inconsistencies in these settings?

    Thank you so much.

  • Hi Chris,

    Have any others on these forums had similar issues as I'm describing? I'm starting to question my own PCB routing as well. Should I try to make a budget 'oscilloscope' to monitor VBUS, to see if voltage drop caused by improper capacitance or something similar is the issue, even though it's only dropping 50mV from 0 to 1A when sourcing?

    Thank you so much.

  • Hello,

    The AlwaysEnableSink and SafeMode are dead battery configurations meaning that the device is acting as a sink (in order to charge the dead battery/turn on the system).  This is how the device will behave before the configuration is loaded from EEPROM and powered by VBUS.  The current of the 5V implicit contract is determined by the source. 

    The sourcing is not influenced by the deadbattery configurations, other than you must clear the dead battery flag in order to transition to a source.

    The sourcing capability of the implicit contract is defined in the configuration: Type-C current.

    Regards,

    Chris

  • Hi Chris,

    So essentially, if I wanted to fix this, I would need to either set the ADCIN1/2 pins to SafeMode or use a host microcontroller / EC to clear the dead battery flag?

    Thank you.

  • Hello,

    Have any others on these forums had similar issues as I'm describing?

    I can find questions regarding the EVM.  

    Do you have this EVM?

    https://www.ti.com/tool/USB-PD-CHG-EVM-01

    Regards,

    Chris

  • Hi Chris,

    No, I do not have this EVM. I'm going to try USB PD version v1.0.2 later today and see how it goes.

    I guess what I'm trying to determine here is... what is it that makes my board malfunction, and this EVM work correctly, when they have the same schematic?

    To be honest, at this stage, I'm less interested in getting it to actually work within these next two days, and more interested in why the issue is happening, so that I can get future revisions of the board to work.

    Was the v1.1.0 of the firmware tested with this EVM to work with different consumer electronic devices? From what I understand, it's either issues on power-on which are causing it to enter dead battery mode (e.g. my BMS is turning on its FETs too slowly or something), which I have a solution for, some other hardware issue which might be related to improper routing or capacitance, or firmware.

    The curious thing about if the system was stuck in 'AlwaysEnableSink' mode though is that I was still able to use an electronic load to source 35W+ from this device continuously. This electronic load consisted of a cheap USB-C sink 'decoy' which is only smart enough to request voltages, and a battery charger connected to the DC voltage. I am still reiterating that I think it's a dI/dt, not even an overcurrent issue, because when I hot plugged the 15V source voltage into an idle battery charger with a resistance of 20kohms (so less than an amp), it reset, not on the sink side, which doesn't even have control over its power path, but on the TPS25751D side - the same issue that was happening with my consumer electronic devices. Clearly it can negotiate the source contracts. And clearly it can handle the power from a thermal standpoint. Wouldn't that suggest a lack of capacitance, too large of an inductance, or overly sensitive firmware?

    With this info, is it still feasible to assume an ADCIN1/IN2 or 'dead battery mode flag still being on' issue?

    This whole situation is super confusing for me, and I'm probably not doing a good job explaining my issues to you either, so please let me know what would be helpful for me to post here about the system (videos, oscilloscope readings, etc) as part of the troubleshooting process.

    Thank you so much.

  • Hello,

    I am still investigating this.  In the configuration file you set the charge voltage to 12.45V and 4.25A respectively.  On my battery simulator when the EVM is acting as a source I set the voltage to ~12.2V.  If i get to 12.4V on the battery voltage there is very little current draw because there is nothing to charge.  In the online example the voltage is 12 and the current is 3A.  

    As a source the system keeps faulting when i try to draw ~1A at 15V.  I am still looking into the different (hardware IO setting) to limit the current.

    Hopefully you can compare with your battery settings for the sink mode and I will continue to investigate the source side tomorrow.

    Chris

  • Hi Chris,

    In sink mode, everything 100% works for me. I have it set to 12.45V, 3A, and 0.32A termination current - works great.

    Your dev board is having source issues as well? Please let me know if you find which settings are responsible for making it work or which ones you could suspect it to be. Does this mean my suspicions were correct? I’ll be releasing the video in the next 36 hours. I wonder if it’s a register in the BQ25798 that I forgot to account for.

     Thank you so much.

  • Hi Chris,

    Weird question, but while I was scrolling through these forums, I saw someone who changed their VREG voltage and all of a sudden stuff started working. Could the fact that I'm trying to charge to 12.45V instead of the usual 12.6V be causing some sort of issue?

    Thanks.

  • Hello,

    I wonder if it’s a register in the BQ25798 that I forgot to account for.

    Are you writing to the BQ25798 in addition to or instead of the TPS25751?

    Could the fact that I'm trying to charge to 12.45V instead of the usual 12.6V be causing some sort of issue?

    I will ask Jeff to comment.

    Regards,

    Chris

  • Hi Chris,

    I only have access to the TPS25751D EEPROM. So that is all I am writing to as of the moment.

    Thank you for your support Slight smile

  • Hello,

    I am testing with a constant E-load of 1A and able to source 5V.  When I transition to 9 or 15V then the PD controller appears to open the power path.  I repeated and saw the same results with 0.75A and 0.5A.  With no load the transition works without issue.  Per the PD specification the sink is not supposed to draw any current during the transition beyond 500mA.  

    iSnkStdby  = 500mA

    tSnkStdby = 15ms

    What I think i am seeing is a system level issue between the PD and the BQ devices.  If I turn off the load before the transition and then turn the load back on after the transition, then there is no issues and I can source 15V at 1A.  Not sure if this makes sense and it would seem that I am diverging from how you are testing. 

    Regards,

    Chris 

  • Hi Chris,

    I am unsure if it is the exact same issue we are both experiencing, as I can draw up to 2.5A at 15V in source mode using my electronic load, however I am not drawing current during the transitions, and the dI/dt is probably quite slow compared to your system. It is a very budget test setup - a USB-C sink device is attached on the other end of the cable, which successfully requests and sinks a constant 15V before it is even plugged into the input of a smart battery charger that charges a battery at a certain current which I am using as the electronic load.

    Does your setup work when you plug it into a USB-C compatible consumer electronic device? With my iPhone 16, sourcing from the TPS + BQ system fails initially and then it role-swaps so that the phone sources power to charge the TPS + BQ system instead. Other sink-only PD-compatible devices (I don't have any devices which use proprietary charging protocols) simply keep ‘resetting’ after it appears power negotiation is successful.

    I was really confused about this because you would think that a budget electronic load setup would be less likely to work than the consumer electronic devices that TIDA-050047 was designed for, but I guess not in this scenario. I wonder what it is that is tripping the system up on the consumer electronic devices.

    Thank you.

  • Hello,

    I have a samsung phone and it performs the swap which sounds similar to what you may be seeing with the iphone.

    The initiate Swap to SInk is set in the configuration so it will always initiate a power role swap.  

    If i clear that setting 

    Regards,

    Chris

  • Hi Chris,

    Thank you so much! It 100% works now! Is it a bug or a feature that this setting is on by default? Out of curiosity, does it try to swap to a sink even with sink-only devices on the other side?

    Have a great weekend!

  • Hello,

    Is it a bug or a feature that this setting is on by default?

    This is a setting that comes from the questionnaire: do you prefer to be a source our sink.  This gets translated into the initiate and process swap (to source or sink).

    Out of curiosity, does it try to swap to a sink even with sink-only devices on the other side?

    Yes.  If the far end device is sink only then that device would(should) reject the request to swap (from a sink to a source).  Because the phone is a DRP it is accepting the role swap request.  I think it would be beneficial to have another layer of intelligence to interrogate the far end before initiating a power role swap.  This unfortunately also increases the solution cost.

    Regards,

    Chris

  • Hi Chris,

    Thanks for the info. I guess the devices I thought were ‘sink-only’ might’ve been advertising DRP while not being able to deliver it or something.

    By the way, I’ve seen heard of some Chinese single-chip DRP devices that will rapidly switch direction and cause electrical faults, etc, when plugged into another DRP device. Is this inherent to the PD protocol and thus would happen with your system too when it has ‘no preference’ or is that just poor chip design? I’ve tried plugging in my test setup into my laptop and it seems to randomly choose sinking (15W) or sourcing (36W) as expected - when thermal protections are hit in source mode it tends to swap to sink mode, which is nice Slight smile

    Anyways, I’ll stop wasting your time with these questions of curiosity now Sweat smile thanks so much for your support and awesome products!

    Here’s my YouTube video in case you’re interested:
    https://youtu.be/hIVcsL-rVuM

    Kind regards,

    Rain