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.

TPS65982: I_PP_EXT not readable if in SINK mode

Part Number: TPS65982
Other Parts Discussed in Thread: , HD3SS460

Despite what the datasheet says and the user's manual says I don't think that the I_PP_EXT is readable if the external path is set up for SINK sensing.

I have a board with the TPS65982 on it and an external 5mOhm sense resistor. I have the SENSEP line of the TPS connected to the VBUS side of the resistor and the SENSEN line connected to the PP_EXT side. I then made a connection to SINK 1.5A into a power supply/sink with a 20V contract with the TI-EVM board. My connections match Figure 29 below, except that I am using a 5mOhm R. I set the TI-EVM board to switches = 6  so that it could supply 3A/5A @ 20V. I connected a external 20V laptop supply so that it could supply the 1.5A.

When I make the connection and use the Aardvark and the TI-Utilitiy to read the I_PP_EXT ADC channel, I read 0.000A on my board.  If I connect the Aardvark to the TI-EVM board, I read anywhere from 1.35A - 1.65A (it isn't very accurate, but good enough to know the current is flowing, and I can take multiple readings and average them). The TI-EVM is connected as in the HVL117D schematic below:

R5 & R3 are loaded, so it is connected as a source, with the SenseP on the PP_EXT side. The ADC read works on the TI-EVM board. I read the STATUS register on both boards, and they both said that the PP_EXT path was being used, one as an input and one as an output.

So, I wondered if there was something wrong with the ADC trying to do a SINK reading and it was ok doing source reading, since that is what I found. I verified that HI-Utility said that the TI-EVM board was in source mode and my board was in sink mode when I moved the Aardvark between them and read the registers. So, I should have been able to read the same values as the TI-EVM board when I connected the Aardvark to my board, but all I get is 0.00000A.  I have my own application that alternatively reads the ADC through the I2C bus and the ADC channel 3 gives an ADC reading of 0 from my board when operating as sink. I did an experiment by changing the System Config register to pretend that my sense resistor was 10mOhms and the contract quit, since this would look like an overload. So I know that the TPS65982 could check the current limit in sink mode, even it I couldn't get an ADC reading. I changed the System register back. I also wondered if the ADC readings don't work in SINK mode with a 5mOhm resistor.

To check, I then changed my board and the EVM board. I soldered wires on my board to connect SENSEP to the PP_EXT side of the 5mOhm sense R and SENSEN to the VBUS side of the sense R, so it was in a source configuration. I then moved the R5 and R3 0ohm resistors on my TI-EVM board to R2 and R6, to connect it to read current when operating as SINK. I changed the contract on my board to be a source and set up the PP_EXT supply for 20V/3A. I changed the TI-EVM board to switch setting = 7, so that it would be a SINK.

After making the contract and verifying that it connected with my board as the PD source and the TI-EVM as the PD sink, I connected the Aardvark to each board and read the I_PP_EXT channel of the ADC (#3). The I_PP_EXT ADC reading from my board said that it was sourcing about 40mA (the TI-EVM board doesn't have a big load, just the LEDs) and it had made the 20V contract. So, even with the 5mOhm resistor, I was now able to get a I_PP_EXT reading on my board, but this was with the source connection. HOWEVER, the I_PP_EXT reading on the TI-EVM board was 0.00000A! This board has the 10mOhm resistor (at least that is what the schematic says and what the System Config register says). But it wouldn't read the 40mA of current despite multiple readings of the ADC, it always reads 0.00000A. Multiple readings of my board with the source connection, range from 0.011A - 0.050A (which again, I can average). I changed the contract and supply to 12V instead of 20V since the TI-EVM in sink mode always uses the PP_EXT path, but the readings on the TI-EVM I_PP_EXT path were still 0.0A.

I couldn't think of any more experiments and I don't have an explanation for this behavior, since it seems like the SENSEP would be higher than the SENSEN connected as in Fig20 or 29 in the datasheet when in the source/sink modes. It isn't the fact that I'm using a 5mOhm sense resistor, since the TI-EVM board has the same problem when re-wired and it has a 10mOhm resistor.

All I can figure is that the ADC doesn't work properly for the ADC reading of channel 3 when PP_EXT < VBUS and SENSEP > SENSEN, but that is just a guess.

In all my measurements above, I had both the external power supply and an in-line current meter showing the current flowing, as well as the TPS65982 at the source end giving good readings from its ADC.

Is there another register I need to set to make this work? I couldn't see anything in the System Config bits that would affect this.
Can you repeat the experiments with the TI-EVM board in sink mode and using R2/R6 and get a reading?

It looks like others have had this problem, see the discussion (TPS65982: TPS65982 Sink Current read from ADC).

Perhaps the I_PP_EXT ADC value is only available when connected as in Figure 20, as referenced in section 8.3.3.11 of the Datasheet.

Thanks for any answers,
WST

  • Hey WST,

    Thank you for doing all these tests!
    I have been able to reproduce this issue on a TPS65982-EVM here. I am working towards a fix and will update you as soon as possible.

    Thank you,
    Eric
  • I am seeing the same problem. Another odd thing about this is if the PD controller is powered by USB before VIN_3V3 turns on (perhaps booting the PD controller in the source state) then I get some readings from the device even if inaccurate. The readings change proportionally with the amount of current that is going through the sense resistor. So, it seems like there is some state machine issue in the controller as well as some scaling problem in the source mode. Should there be a voltage divider ratio for IPP_EXT?
  • Hi WST, Akash,

    The ADC does not measure negative voltage, it only reads from a range of 0 to 1.2V, referenced to ground, (and has a divider front end that can scale this by as much as 1:25 to read higher voltages)
    The datasheet specifies that the SENSEN and SENSEP are connected so that positive voltage occurs on the sense resistor when we are supplying current. This is in order to provide OCP when we are a source. OCP is implemented with a comparator and digital reference, but if we have a positive reference voltage, then the same directionality applies to the comparator as does the ADC.
    The user could reverse SENSEN and SENSEP and measure current in the other direction, but if they do, they will lose OCP whenever PP_EXT is a source.

    Assuming you did flip R3/R5 & R2/R6, you can try to pull some more current than 40mA. The ADC can measure up to 10A depending on sense resistor value. 40 mA is 1/250 of full scale.

    Thank you,
    Eric
  • Eric,

       I thought I was told earlier that the OCP worked in either direction. I have connected my board up to read the current with SENSE_p connected to the VBUS side of the resistor and SENSE_n connected to the PP_EXT side of the resistor. This way I read the current when the system is operating as a SINK of current from VBUS. I did do exactly what you said and as noted above I can read 1.5A from the TI-EVM board when it is operating as a source with the resistors in that configuration. But on my board with the resistors flipped and operating as a SINK I don't read the 1.5A. I also move the resistors on the TI-EVM board and on my board and went the other way, and could read the 1.5A on my board as a source, but NOT on the TI-EVM board as a sink. So I could never read the current in SINK mode, on either my board or on a changed TI-EVM board, and it was much more than the 40mA you say above.

    1) You are saying that you can read that SINK current?

    2) If you read the 8.3.3.15 External Current Limit section of the datasheet is says that current is limited in both directions because it uses the RSENSE magnitude. I was interpreting that as it worked in either direction. Am I incorrect? If so, this is disappointing since I asked this question months ago and didn't think I had to switch the sensing in my design to get current limit operation in both directions.

  • Eric,

    I've tried this with more than 1A. Can you post the adc read command that you used? It would be helpful if you could paste the entire i2c transaction.
  • Eric,
    I found out that there are multiple problems with the ADC / PP_EXT SINK / 5mOhm R system.
    Here is what I tried today...
    I use 3 boards, my board with the PP_EXT connector and the VBUS connection and a 5mOhm sense resistor and the SENSE_P/N setup to measure SINK current out the PP_EXT connector to a power supply that can sync current. I also used a TI-EVM board set to switch setting of #6 (5V/12V/20V source) and connected to the HP laptop supply at 20V.

    The 1st thing I tried was to set up a 5V/1A contract between my boards, using an external 5V/3A supply into the board set as a Provider 5V/1A contract and the other set up as a consumer 5V/1A. After establishing a successful contract I started increasing the sink current on my supply, starting at 0.5A, then 1.0A, then 1.2A, then 1.5A, 2.0A and finally 2.5A. Neither TPS65982 part (one on each board) broke the contract, even though I was over 2x the valid value. If I read the ADC value on either board using my debug port and the I2C lines and a Aardvark I2C/USB plugged into my board I read 0.0000A, no matter the current flowing. I looked at register 9 after the read and it is 0003 (the 03 being the channel - I_PP_EXT) and the 00 being the register value. I have the 5V contracts using the PP_EXT path on both boards.

    I then did the same thing, this time with each having a 20V/1A contract (2nd PDO) and connected a 20V/3A supply. Both established a valid 20V contract @ 1A, one the provider and one the consumer. I then proceeded again to ramp up the current on the consumer up to 2.0A and again neither broke the contract! They were both using the PP_EXT path through the FETs on my board.

    I then changed the source to the TI-EVM board, but to test the PP_EXT path I had to use the 20V since that is the only thing the PP_EXT path on the TI-EVM board can use. On the TI board it uses the SOURCE configuration for the resistors. I used switch setting #6 on the TI-EVM board, and through the I2C debugger, changed the source capability to 20V/1A instead of the 3A. I made the 20V contract, and upped the sink current up to 1.22A before it started issuing hard resets with the message from the TI-EVM board of HardReset… Unable to Source. So, it limits the current in the SOURCE mode correctly.

    Then I modified one of my boards to flip the sense connection, so that I had it like the SOURCE mode and then used that board as the provider I expected similar results to the TI-EVM board at 20V. However, when I read the ADC on my board with 1.0A flowing, it only read around 0.5A!! Sure enough, the ADC is giving incorrect values, about 1/2 of the real value. So the Host Interface utility is showing about 0.5A when the real current is 1.0A. I can see the real current through an inline current monitor and also on the display of the power supply which is doing the sinking. If I put back in the TI-EVM as the source and read the same ADC channel (I_PP_EXT) I read around 1.0A. I then put my source board back in and cranked up the sink current and it didn't open the connection until I reached over 1.8A, even though the contract is at 1.0A. Remember, the TI-EVM opened at around 1.2A. The ADC value at 1.8A was finally near the value you would read if it were not halved.
    I'm guessing that the problem is that I am using a 5mOhm sense resistor in my EXT path and the ADC doesn't work with that . YES, I did check the system config register, and it is indeed set up for the 5mOhm value, so that isn't the problem.

    So, summing up:
    The I_PP_EXT current CANNOT be read by the ADC when the SENSE_P/N connections are set up in SINK mode (current flowing from VBUS to PP_EXT) as shown in the datasheet. The path does not get shut off in this mode, even if 2.5x the current is flowing than the specified contract (I was using 1.0A). This was true at both 5V and 20V.
    The I_PP_EXT ADC value isn't accurate in SOURCE mode with a 5mOhm resistor, and therefore, much more current can flow before it shuts off.

    If you would like me to try something in more detail I can, and I can send you screenshots of the Utilities results. I even probed the I2C lines and observed the traffic. The values read matched what the Utilities software showed.

    Here is that traffic I read during a typical ADC read using the Utilities software:
    Read register Reg03 (do a mode read)
    Response 04 41 50 50 20 (APP ) [04 if the TI part responding with the length]
    Write Reg09 04 03 00 00 00 (4 bytes, ADC channel 3)
    Read register Reg03 again
    Response 04 41 50 50 20 (APP ) [Don't know why the mode keeps getting read, must be a default behavior of the Host Interface Utility app]
    Write Reg08 04 41 44 43 73 (This is the ADC read command)
    Read Register 03 again.
    Read Reg08 04 00 00 00 00 [Command is done]
    Read Register 03 again.
    Read Register 09, the results of the ADC read. In my case I read 40 03 98 00 on the bus.
    This is the size (64 bytes, followed by the channel (03) I_PP_EXT, and then 98, the hex value of the ADC)
    There is some other stuff that follows, a register 03 read, a register 28 read (system config - I'm guessing to read the RSENSE value) and then finally a couple more reads of register 03.

    But again, the RSENSE isn't being applied correctly in the Utility.
    It doesn't look like the path is shutting off correctly even though this is being read.

  • Answers needed:

    1) Do you have someone who can check to see if the limit works when connected in SINK mode (SenseP connected to VBUS, SenseN connected to PP_EXT). I tried with two TI-EVM boards even and can't get any reading from I_PP_EXT.

    2) I found that in source mode (I modified my board to flip the pickoff locations), that with a 5mOhm sense resistor, I don't get an overcurrent until almost 2X the current is flowing with a 1A contract. Can this be fixed by programming? I wanted to check the reading again, so here is what I did today...
    I connected my two boards together, one modified to read in SOURCE mode and connected to a 5V supply. Both are using the PP_EXT path and both have 5mOhms as Rsense.

    I made a 5V / 1000mA contract between them.

    I then read the ADC channel, I_PP_EXT 5 times.

    .539062 5C(92), .550781 5E(94), .539062, .544922 5D(93), .533203 5B(91). This is OFF, since I see 1.0A being drawn by my sink power supply and also displayed by an inline ammeter.

    I then wondered if I set the System Register on the provider/source board to pretend it had a 10mOhm resistor if the reading would change.

    I then read two more times:  .533203 5B(91), .544922 5D(93). So, even with the system register saying it was 10mOhm, it didn't change the reading. So the Rsense must not be used currently in the calculation, even though it probably should be, since the reading are around 1/2 of what they should be.

    Then increased the current with the circuit having a 5mOhm resistor, but the system register saying 10mOhm
    -1.5A : was reading about 0.8A, still had the connection

    -1.6A : 0.85-0.87A

    -1.7A : 0.91-0.92A (Hex 9B ADC)

    -1.8A : 0.96-0.97A (Hex A6)

    -1.9A : 1.00-1.01A (Hex AC)

    -2.0A : 1.06-1.07A (Hex B6)

    -2.2A : 1.17-1.19A (Hex CB)

    -2.3A : 1.22-1.23A (Hex D0).

    -2.4A : Overcurrent. This is what I found yesterday with the TI board and the 10mOhm resistor, it quits at about 1.2A with a contract = 1.0A. But note, I am sinking 2.4A.

     

    Changed back to 5mOhm resistor value and it climbed up in the same way but it quit instead at -1.9A and broke the connection.The readings at each current level were the same as with the 'fake 10mOhms' in the system register, even with the 5mOhm setting. I.E. and -1.8A, I was reading 0.96-0.97A from the ADC read.

    I get an overcurrent interrupt at 1.9A. Still way above the 1.0A of the contract.

     

    Again, what I've found is that with a 5mOhm resistor the ADC readings are ~1/2 of reality. I'm using the Rdg * 1.2 / 1024 * 5 formula in the firmware users guide. I don't see any note about the IHVEXT_ACC numbers being anything but 5 when using a 5mOhm Rsense resistor, but the spec only refers to 10mOhm values. Does this really mean I can't use a 5mOhm resistor? It is specified all throughout the other documentation and I just released my board, so if I can't use a 5mOhm resistor I need to know soon!
    I used the 5mOhm part fully confident that it would work, because it would burn less power at 5A loads. I didn't think the circuit wouldn't shut down correctly. But maybe it works better at higher currents than the 1A-2A that I was testing. I also thought it would work in SINK mode, but this doesn't seem to be true.

     

    The TPS65982 datasheet has PP_EXT current limit values depending on 'Settings' from 0 to 15, but it doesn't say how to enter those, and I thought it was just a matter of the contract value. If there is another way these are programmed, I would like to know, since this could solve my problem.
    But none of this will help if the SINK current can't be sensed to shut things down.

    Sincerely,

    WST

  • I did one other check. I connected both my boards together, one as a source, one as the sink. The contract was 5V/1A. They both have the Sense resistors in SINK mode. I was able to sink 4.0A with no issues. If the ADC read was working, the one set up as the consumer in the PD contract should have shut off, but it didn't. The ADC on both of the reads as 0.0000A. So, not only can't you read the ADC, the OCP doesn't work either.
  • This description matches my observations as well. 

    In sink mode, no matter how much current is going through the sense resistor, the device reads back 0A and the OCP does not work. 

  • Hi WST,

    Can you send me a picture of your EVM setup you used to do the I_PP_EXT readings through the ADCs command when configured as a sink? I would like to see the SENSEP/SENSEN resistors and the FTDI connected to the 82-EVM.

    Can you also confirm the Mode Register (0x3) reads back APP when you are doing your readings?

    Finally, can you confirm that you are using version 2.15 rc2 of the Application Customization Tool with FW Version 1.12.00 for the FW Base Image?

    Thank you,
    Eric

  • I could connect the two EVMs together and repeat the experiments but I'm using the TPS65982 on my own board and that is what I have connected together, one of my boards as a sink and one as a source. Both are using external FETs (the same ones that are on the EVM board) and they work fine in all other aspects. They both are using a 2.15 generated software image. It will take some time for me to set up with two EVMs and do what you ask. Both EVMs have the original software on them so that they will respond to the 4 switches. I haven't updated them to 2.15 images but could if it is necessary. I can connect to the SINK board with my Aardvark/FTDI and read the ADC as they are.

    Can you tell me what combination of EVMs you have that works to read the I_PP_EXT current in SINK mode? Maybe I could duplicate that setup.

    WST 

  • WST,

    We were told by TI that the IPP_EXT current cannot be read in SINK mode.
  • I reconnected the two EVM boards, one kludged with R2/R6 to read in sink mode and set it to switches = 7, and it does read 0.00000. At the same time, the other one in source mode, with switches set = 6, reads a small number. But it looks like Akash was told that I_PP_EXT doesn't work in SINK mode. So should I continue my experiments or do you have a way that it works?
    Thanks,
    Warren
  • Hi WST,

    The base EVM FW on the 82 is very old and is only really meant for a quick evaluation of the basic feature set of the device. Could you potentially put a 2.15 image on your EVM? For example, TPS65982_HD3SS460_DRP_Host_Full_2_15.tpl is a good starting point. Please confirm that PP_EXT is configured as an input in the System Configuration and ensure that R6 & R2 are placed and R5 & R3 are removed. Please flash that image onto your EVM using the FTDI.
    Once the flashing is complete, ensure you remove the barrel jack and also the FTDI. Since you have an Aardvark available, it would be good to just connect the I2C lines from the Aardvark to your EVM since that is all that is needed to read/write to the registers. Please refer to figure 23 of the app-customization tool user guide: www.ti.com/.../slvuar8a.pdf for the correct connection. Next, please open the TPS6598x utilities GUI. Connect a 5V source on VBUS and make sure that your TPS65982 EVM boots in dead battery mode. Ensure that the Configure tab is set to used the Aardvark and click "Test Configuration Settings" to ensure that the Mode Register is returning APP. Please ensure that you have no barrel jack connected to your TPS65982-EVM here. Next, apply a load onto J6 (PP_EXT_ENABLE jumper). An appropriate load should be just ~0.5A. In the TPS6598x Utilities GUI, go to the Command List and click on the ADCs command. Read back the voltage on VBUS (Should read ~5V). Next, read back the voltage on SENSEP (Should be just below VBUS voltage). Apply your load onto J6 and read back the I_PP_EXT channel using the ADCs command. You should read back your SINK current here.

    Thank you,
    Eric
  • Hi WST,

    I managed to get this feature working on my TPS65982-EVM here. Please refer to the Test Report I put together below:

    I_PP_EXT as a SINK.docx

    Thank you,

    Eric

  • First of all, thank you very much for that excellent write up and experiment. I went through the steps you outlined and created an image (after saving away the old EVM image) using the template you suggested. I had previously switched the R2/R6 with the R3/R5 on one of my EVMs and so I re-programmed that board. I then connected to a laptop supplying 5V on VBUS and that could put out 900mA. I did measure SENSEP < VBUS and set up an external sink to draw 0.5A from J6. I made all of the voltage measurements and had the following:

    VBUS = 5.025V and SENSEP = 5.011V. With my sink drawing 0.499A, I measured with the I_PP_EXT ADC reading a value that was around 0.45A, so it was successful!!

    BUT...

    This doesn't match the operation I want, it looks like this ONLY works in dead battery mode. To test this I disconnected the J6 jumper and reconnected my sink to just pin 2 of J6 and so it wasn't shorted to the 20V External power of pin 1. I then plugged in the power supply to the barrel jack so that the TPS65982 wasn't in dead battery mode. Using the utility tool I modified the image so that the EVM would connect in sink mode with the PD contract and made the connection.

    The changes were to change the System Config register so PortInfo was CONSUMER_CCPD_CCIPU and making sure that I didn't have any Source PDOs, only the 5V/900mA sink capabilitiy. After connection I verified that indeed it was in SINK mode and drawing current from the laptop. I measured the following:

    VBUS = 5.33V and SENSEP = 5.01V. However, with the sink still drawing 0.499A, I measured with the IPP_EXT ADC reading a value of 0.0000V.

    So, I want to be able to read the SINK current when the TPS65982 is powered by the VIN_3V3 pin and isn't in dead battery mode. Is doesn't look like this is possible, unless I can set some other values in the registers.

    Here are the pictures I took:

    1) ADC reading set up as you did

    PD status after making changes to have the board powered:

    Status register in powered mode:

    And finally the ADC reading in powered mode, always reads 0.0000A

  • Hi WST,

    It appears from your Status register (0x1a) that RCP is enabled on the External Power Path. The I_PP_EXT function will not work if you have RCP enabled on the external path. To prevent the RCP from being triggered. I followed your steps by removing the J6 jumper, I then booted the 82 in dead battery mode. I then plugged in the barrel jack and cleared the dead battery flag using the DBFg command. I then confirmed that RCP was not enabled on the PPHVE Switch. 

    Thank you,

    Eric

  • Eric,

    This is getting very confusing and I suspect I just can't do what I want, and that the datasheet and manuals of the TPS65982 don't describe the operation of the I_PP_EXT path very well (at least to me).

    1) You said: "The I_PP_EXT function will not work if you have RCP enabled on the external path."
    I can't find this anywhere in the Host Interface Tech reference manual, the Firmware Users guide or the TPS65982 datasheet. The closest thing I could find to this is note 4 on the IHV_ACC spec, but the IHVEXT_ACC spec doesn't refer to this RCP only operation and seems to indicate that it should work in these modes.

    2) Your process above is also not documented anywhere. I was able to repeat that with my modified EVM board, but it looks like this only works if I start in dead battery mode. The Host Interface Tech Ref Manual doesn't describe status register 1A this way. It says that bits 8-15 indicate the current state of the switches, not the RCP status. So when I see 'Disabled' I think the switch is turned off.
    Here is the entry in the manual:

    Since I can read the current when this is disabled, I REALLY don't know what is going on or what path is being used. I read this register using the READ command and get: 0x194000d. Bits 15:8 are all '0', so according to this manual, the switch should be opened.

    3) When I look just a little further down in the register 1A readout than you showed, I see that the TPS65982 is in some odd mode, not the operation that I desire:

    4) I have my board wired with the RPD_G1/G2 inputs tied to GND and the BUSPOWER_Z tied though 100k to VP3V3. Because of the first, my board therefore can't boot up in dead battery mode.

    Maybe I'm misunderstanding the manual/datasheet but I don't see a way to read the I_PP_EXT current when operating with a 'normal' PD handshake and while sinking current, even though SENSEP > PP_EXT. If that is true, please let me know. I can't operate my IC/board in an odd way just to get this function to work.
    It also seems true that the OCP will never work the way I have wired my sense connection as described in section 8.3.3.12 of the TPS65982 datasheet, since the ADC can't read the current correctly when connected this way. Is this section invalid?

    Sincerely,
    WST

  • Hi WST,

    I apologize for the delay in response. I am working with the FW team to create a fix for this issue and it should be resolved by the next release of the tool. Again, sorry for the delay.

    Thank you,
    Eric