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.

PowerLan additional SBData commands

Other Parts Discussed in Thread: BQWIZARD, BQ78PL116, BQ78PL114

My application is an autonomous electric vehicle with an embedded host processor.  I need to read/write SBD commands directly to the chip (bq78PL116), no bqWizard, no API. 
The SBData Command values listed in Chapter 5 of the tech reference (sluu481) do not cover all parameters that are available from the chip.
The PowerLan tech manual (slua591) provides two specific SMB commands for such accesses (commands 0x80 and 0x81). However these commands do not work (with access tries from the bqWizard utilities).
If I monitor the SMBus communications between bqWizard and the bq78PL116, I can see that the wizard is using block write and block read commands to communicate with the chip using SMB commands 0x3C to 0x3F which are dedicated to voltage cells reading.

So what is the trick to operate with SMB commands 0x80 and 0x81 ?

Note : I don't use PEC in SMBus messages

Thanks, Philippe

  • Hi Philippe,

    The additional parameters are contained in the extended SMBus Functions (TRM Chapter 5.2).  You can also get additional parameters from: http://focus.ti.com/lit/an/slua591/slua591.pdf 

    To ensure that the SMB Commands 0x80 and 0x81 work, please ensure that your dat files are created with the latest version of the bqWizard.

    Let me know if you still experience issues.

    Regards,

    Ben

  • Hi Benjamin,

    The bqWizard version is 3.1.0 (which is the up to date version)

    My bq78PL116EVM works fine with the bqWizard (I did not change the passwords and the access level)

    I join 2 scope pictures which show that the bq78LP116 replies to a 0x3C SMB command but it sends an error to a 0x80 SMB command 

     

      Thanks,

    Philippe

  • Hi Philippe,

    Understood. We are releasing a Revision 3.2 that fixes the issue of  enabling 0x80 and 0x81 as the SMbus Commands for read/ write.

    You will have to create a new .dat File with this version of bqWizard and load to your battery pack.

    You should then be able to communicate as described in the TRM and other documents.

    Attached is also the bqWizard (3.2) that we are in process of releasing to web.

    0827.bqWizard Setup Version 3.2.zip

  • Hi Benjamin,

    Thank you for this new version of bqWizard (3.2) : it works fine !!!

    I got replies to 0x80 and 0x81 SMB commands.

    But I notice that I have a bad MMI behaviour with Windows 7 in the following functions :

    - File / Configure access level / password define : i got a script error message !

    - PackConfigurationUtility / SBD data mapping : the system and cell config files are not properly loaded .

    Thanks again for your help !!!

    Philippe

  • Hi Philipe,

    bqWizard does not work on Windows7 as yet. This might be the couse of your issues.

    Regards,

    Ben

  • Hello Benjamin ,

    before we use the BQ20Z95 communicate with MCU, can  read use command  0x16,

    but now we use the BQ78PL116 can not read use command 0x16. and no ack flag.  As the tech reference the communicate  is smbus and address  is 0x16. Would you help give some advice? Thanks Very much

  • Hi

    Please refer to the document: http://www.ti.com/lit/an/slua591/slua591.pdf

    It provides all the addresses and commands to acces the SMBus data using an MCU.

    Also refer to the above comments in this post  where MCU access questions are discussed.

    Let me know if you are still encountering problems.

     

  • Hi

    I am trying to put a bq78pl116 into ship mode using the 0x80/0x81 interface described in slua591, but I have two problems:

    (1)

    Contrary to what the title of section 3.16 implies, writing0x2010 to 0x80 appears to perform a TOGGLE of the "ship mode bit", not a SET of that bit.  This would not be a problem if I could READ the state of the ship mode bit - but I have not seen any instructions about how that might be done using the 0x80/0x81 interface.  The problem that I have is that if the system is just rebooted after toggling the bit (rather than being powered off), then power is not removed from the I2C bus and the ship bit remains set - so the software cannot tell what state the ship mode bit is in when it starts, and has no way of knowing whether it needs to be toggled to set it!

    So - it there a way to tell what state the ship mode bit is currently in?  I believe that there is, because it seems that bqWizard can tell (I believe this uses a different mechanism to the 0x80/0x81 interface - and one that is not documented for end-user use?)

    (2)

    One of the battery packs that I have does not respond to the 0x80/0x81 interface at all (I just get an error trying to read 0x80), whereas another works fine.  Now, these packs were originally set up by someone else and they may have done "something funny", but I thought I should be able to fix this by using bqWizard to perform a "Save Configuration to File... (.dat Only)" using the pack that works, and a "Load Configuration from File..." on the pack that doesn't.  But this doesn't fix the problem, even with bqWizard 5.2 as posted above.  So what am I missing?

    Thanks for your help!

     

  • Hi Bill,

    You are correct; writing0x2010 to 0x80 does perform a toggle of the SHip mode bit.

    On your first issue, there is a work around to enable you to read the status of the SHIP MODE Bit.

    You will need to map the Internal Flags2 Parameter to the SBdata  Parameters. The SHIP MODE Bit is BIT0

    To access the Internal Flags2 Parameter, you have to go through: Utilities ->Addons->PackConfiguration->Sdata Mapping ->bq78Pl116 -> System.

    On Question 2:

    If you can still Read/Write with  0x50 and 0x51 then you need to change you tmap.

    Recreate the tmap file with the bqWizard3.2 and load this to the pack. The addressing information is contained in the configuration.

    Regards,

    Ben

  • Thanks Ben - mapping the "Internal Flags 2" register and reading the LSB worked fine.  And I fixed the battery that would not respond to 0x80/0x81 by simply reloading the 6000/719 firmware.

    Now I have been asked to set the battery pack into "unwired" mode whilst it is installed in our system (unusual, I know).  So according to the technical reference manual, I have to reset bit (3) of the "Algorithm Enable" register.  But that document also unhelpfully states that "The Algorithm Enable Register can only be edited by the bqWizard or bq78PL11x API".

    There is no mention of either the "wired" bit or the "Algorithm Enable" register in slua591, so does this mean I cannot use the 0x80/0x81 interface for this?

    I had a look at the pack configuration XML, and I believe I have located the the "Algorithm Enable" register at offset 146 in file id 09.  So I think I could probably control the "wired" bit by loading file id 09 using the "Data Flash Programming Protocol" - is this the way I should be doing it?

    Thanks again,

    Bill.

  • Hi Bill,

    Your request to set the part to "unwired" is interesting (what are you trying to achieve?).

    Your location of the wired bit is correct in the Algorithm Enable register. Your approach as you suggest will work. However, you will not be able to put the part back to wire status as the unwired disables your ability to write to the flash.

    Writing without the wired bit is only allowed when reloading the flash, so this will overwrite all the historical data already loaded into the flash.

    Hope this helps,

    Ben

     

  • Hi jp vergne, have you had any luck with your embedded controller?. I know this is an old post, but I just started interfacing one and I've been using the block-type that is implemented by bqWizard (i.e. 0x16 0x3F ..). Actually monitoring the bq78L11X API Demo was very handy.

    This is what I got when read CMD 0x80, which is "Ready". I still have ways to go, just curious if you found any major issues.

    Thanks

    Jaime

  • Hi Jaime,

    My project using the bq78L116 is working well ; the bq78L116 is connected to an ARM3 CORTEX by the SMBus. I use the standard SBD commands to read current data and the Extended set of SBD cmd (0x80 + 0x81) to access to specific registers.

    This works fine if you respect one condition : set the SBD register ManufacturerAccess (0x00) to 0x00 just after openning the SMB bus ; this is not detailed by TI in documentation and this register is modified by the bqWizard; so if the register content is not 0x00, you will never get a Ready from the read CMD 0x80 .

    If you switch the SMB bus between bqWizard and the host during your tests, you may have a SMB bus hangup generated by the bq78L166 (if you abort the SMbus during a bqWizard communication); to get back a fully operational SMB bus you shall send some "bitbang" sequences on SDA and SCK signals to close the communication sequence in the bq78L116.

    I still have a problem : I did not find the SBD address of the "Algorithm Enable Register"; so if you get it, please let me know ...

    Good luck in your design

    Jean-Philippe

     

     

  • Hi Jean-Philippe,

    Attached is how to access the Algorithm Enable Register.

    Hope this helps.

    Regards,

    Ben1050.Setting Algorithm_enable_HW_cogig_sys_ctrl_registers.pdf

     

  • Hi Jean-Philippe,

    I'm also using an ARM3 (LPC1768) and for testing I'm using an MBED.

    I'm glad things are working for you. Like I said before I started using the bq78L11X API Demo.exe program and it has a window on the bottom with all the i2C data (both ways).2450.api_test_0.pdf

    I can read all the voltages, temps, etc.. this way. It was much easier than trying to understand the TRM (SLUU481) and the SBData Command.. (SLUA591)

    I need to spend more time reading those manuals.

    Have you ever looked at the API demo program?.

    Thanks again.

    Jaime


  • Hi Ben

    I've been comunicating with the bq78PL116 using the commands that are sent by the bq78L11X API Demo.exe program (bottom of screen). Are those commands documented somewhere? On your last replay about system control and configuration registers, is that explained on SLUA591, SPLUU481, ..?.

    I have not made the connection between what I see and what I read (bq78L11X API Demo.exe vs SLUA591/SPLUU481). What am I missing?

    Thanks in advance

    Jaime

  • Hi Jean-Philippe,

    I noticed that Ben answered your question regarding the "Algorithm Enable Register"

    This file includes all the commands sent back and forth between bq78PL11XAPI.exe and the bq78L116 when you click "Connect". I don't know if this register is in there nor not.

    I will look in this data to see if I can find if the ManufacturerAccess is set to 0x00 as you suggested.

    Thanks again.

    Jaime

    8473.Connect_2.pdf

  • Hi Jaime,

    Thanks for the messages log. This message sequence is generated by bqWizard or by bq78PL11XAPI.exe (I never try it); This protocol is very different from the one which is detailed in the TI documentation (SMD standard and extended messages).

    The ManufacturerAccess reg. is used to select the SMBus protocol : this is why you have to reset this reg. if you want to use the SMD standard and extended messages.

    The bqWizard protocol is based on block transfer which is faster; but it is not documented if you want to code it in your Host (as far as I know).

    Good luck.

    Jean-Philippe

     

  • Hi Jean-Phillippe

    Yes, you are right, that protocol is no documented. I'm going to spend some time using the standard/extended SBD commands and see if it has everything I need. I'm assuming that you have acces to the individual cell voltages, RSOC, temp, etc.

    It does not make much sense that TI have two  different ways to access the data, and much less  that is not documented. Probably someone from TI tecnical support can help use here.

    Thanks

    Jaime

  • Hi Jaime,

    The API is documented here in the Application NOTE:

    SLUU414A

    Also, as you have stated, the SBData  Commands are documented in SLUU481 and SLUA591.

    If you need Additional Documentation on the PL114 / PL116 please refer to the following link:

    power.ti.com (then type in the device name: bq78PL114 or bq78PL116) There is a technical document tab that will link you to all relevant documents.

    Ben

  • Hi Ben,

    Thanks for the links, I looked at it but still the low level calls are not documented.

    For example, the attached document shows the I2C traffic when the CellParameterReadAll() function is called. But depending on what set of values are needed they change some arguments (which is understandable), The question is where is all that information documented.

    The API functions are great but for embedded applications is nice to have the low level set of commands.

    Thanks again

    Jaime

    6786.CellParameterReadAll.pdf

  • Hi Ben,

    After spending more time studying the document you posted for Jean-Philippe regarding accessing the different registers (algorithm enable, system and HW) , things start to make more sense now.

    You mentioned a few  times file 0x09 and chunk 0xxxxx. Is there a document out there where that is described?

    thanks in advance

    Jaime