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.

BQ79600-Q1: BQ79600 SPI Communication

Part Number: BQ79600-Q1
Other Parts Discussed in Thread: LAUNCHXL2-TMS57012, BQ79616EVM-021, BQ79600EVM, HALCOGEN, USB2ANY

Hello,

I use a TI example project for spi communication between TMS570 and BQ79600.

And trying to read out the voltage values.

But the values whitch I get back are much to high and same fo every channel.

Could you please take a look into the project and help to solve the problem.

Thank you in advance

Harry

BMS_SPI.zip

  • Harry,

    Ensure that you have connected the SPI_RDY pin on the BQ79600 connected to J4-32 (GIO PORTA[1]) on the TMS570. Your code has the behavior you describe when this connection is missing but works fine when it is in place.

    Regards,

    Ben

  • Hello Ben,

    is there a description of that some where in the manuells. Is there ajumper or sumthing simillar?
    Sorry!

    Thank you

    Harry

  • Harry,

    The SPI_RDY pin is detailed in section 7.3.2.1.2.2 of the BQ79600 datasheet. It looks like you got the SPI drivers from the 718 sample code and I do not know if there are more details to be found about the pin there. You can find it throughout the code, however, such as here:

    Regards,

    Ben

  • Hello Ben,

    This loop is in the SpiReadReg(....) function to. And I use the SpiReadReg to read the values.

    So if gioPORTA[1] would be allways equal to 0 the function would end up in a endless loop and I wouldn't be able to see the wrong values?

    Maybe I have explained my set up wrong?

    I use LAUNCHXL2-TMS57012,  BQ79600EVM and BQ79616EVM-021. All devices are connected according TI explanation.

    Thank you

    Harry

  • Harry,

    The SPI_RDY pin is an output from the BQ79600 is equal to one when it is ready to deliver data. Writes and pings do not require the SPI_RDY pin and so you were able to wake the device and turn off the communication timeout without issue. However, during a read the BQ79600 will drive the SPI_RDY pin to be low while the stack is processing the request, and only once the BQ79600 drives the SPI_RDY pin high is it ready to transmit.

    If the GIO PORTA[1] is not connected it is set to always be high and the code assumed the BQ79600 was ready to transmit when it wasn't. The MCU sent the clock signals that would have indicated to the BQ79600 to send its data, but it wasn't ready to send the data and sent all ones instead. The code you had did not check for CRC errors and just assumed the data was valid and displayed the maximum possible voltage (~12 V) for each cell on the console. 

    Regards,

    Ben

  • Ben,

    please take a look at the pictures.

       1. PCB Layout shows the position of  J4-32 (GIO PORTA[1]) on Launchpad

       2. Photo of connected devices. (SPI_RDY is connected with J4-32)

    It is just not posible to make wrong.

    Maybe a have to activate something on HALCogen?

    Best Regards

    Harry

  • Harry,

    To connect the boards in the way you have shown you need to move certain resistors on BQ79600. You need to move the resistor on R7 to R8 and the resistor on R9 to R10. I can see in the image you sent that you have not done this.

    You can connect the boards without changing these resistors by connecting the MOSI and MISO pins on the TMS570 to pins 7 and 8 of J4 (where the USB2ANY is plugged in) on the BQ79600. Otherwise the the pin connections are the same.

    Regards,

    Ben

  • Thank you Ben!

    A picture is worth a thousand words.

    Is there a description of this connection in TI manuals?

    Can you please send me your picture in a better resolution?

    Which interface (SPI or UART) is recommended by TI if MCU and the bridge are on the same PCB?

    Thank you in advance

    Harry

  • Harry,

    I do not know of an official description of this SPI setup, but it is the connection names are still the same. Here is another image (with the SPI_RDY pin correctly attached to GIO PORTA[1]). Hopefully it is in a better resolution.

    We do not have any such recommendations between UART or SPI. It is up to the customer to determine which is a better fit for their system.

    Regards,

    Ben

  • Hello Ben,

    I've connected the boards according to your photo. (Please see attached)

    The program sill delivers 12.499491 for each channel

    Sorry

    Harry

  • Harry,

    When you run the program do you see the green LED on the BQ79600 light up? This indicates that it has received a WAKE ping and has woken up. If this is not happening then either the device is not correctly receiving a WAKE ping or the device is no receiving the correct amount of power. 

    Either way, you should attach a logic analyzer to the RX, TX, SPI_CLK, nCS, and SPI_RDY test points on the BQ79600 to see what the device is receiving. If you could share those logs I might be able to glean more information.

    Regards,

    Ben

  • Ben,

    I see the green LED on BQ79600. It seems to be ok.

    With the logic analyser I will test in the next week

    Best Regards

    Harry

  • Hello Ben,

    Meanwhile, I have received the logic analyzer. 

    So I was able to record the communication between  BQAutoEval and BQ79600-Eval board.
     
    Then I have connected Launch-Pad and BQ79600.
    After switch on of the Launch-Pad, The BQ79600 light up. (LED D2=green and D3=red)
    But it seems like the SPI Ready signal is not there. (see picture bellow) 
    (I have connected the SPI_RDY Pin of the BQ79600 and Launch Pad  Pin32 (J4)).
    So the Launch-Pad and BQ79600 are not connunicate.
    After exactly 2 min.  the BQ79600 state changes to off (D2 and D3 are off).
    After that the Launch-Pad start to deliver wrong values.
    Best Regards
    Harry
  • Harry,

    You need to provide the appropriate voltage to either the 12V or 5V pins on the BQ79600 for it to work properly. Refer to the Quick Start Guide in the EVM User's Guide (link).

    Regards,

    Ben

  • Ben,

    I have provided 5V and 0.7A to BQ79600. 

    Best Regards

    Harry

  • Harry,

    What commands are you sending to the BQ79600? It does not look like anything is happening in the second logic analyzer picture you sent. Could you send the whole log? You can insert a file into these replies using the "Insert" button below the text box.

    Regards,

    Ben

  • Ben,

    please find attached the record file + project.

    Best Regards

    Harry

    Records.zipBQ79600_SPI_Sample_Code.zip

  • Harry,

    Thanks for providing those files. I can find no faults in the code. However, the logic analyzer file is unusable. The BQ796xx series of devices communicate to the MCU using a standard SPI protocol that has a clock with a frequency of 2 MHz. The file you shared appears to have a maximum precision of 20 kHz.

    If you are suppling 5 V to the BQ79600, double check that jumpers J1 and J3 are configured correctly. 

    Regards,

    Ben

  • Hallo Ben,

    please find attached a photo of jumpers (1, 3) and a new file with 2MHz.

    Are 0.7A OK or should I use more current?

    Best Regard

    Harry

     Records_2.zip

  • Harry,

    The logic analyzer log is still not at a sufficient resolution to be useful. The resolution should be much greater than 2 MHz, ideally around 20 Mhz. 

    The behavior with SPI_RDY dropping low indicates that you are sending a read command as the first command after the WAKE ping and the behavior with SPI_RDY staying low indicates you are overflowing the buffer. I cannot see anything immediately wrong with the code you sent me, we need the logic analyzer log.

    Regards,

    Ben

  • Harry,

    Additionally, ensure you are not forcing 0.7 A into the device. The device should be allowed to draw a normal amount of current (on the order of 10 mA, but definitely less than 100 mA). 

    Regards,

    Ben 

  • Ben,

    I use PulseView so I can only choose between 16MHz and 24MHz.
    So I have created 1 file with 16MHz resolution.
    Pulse view has a limitation with amount of samples you can record. (1T sample).
    With 24MHz, I'm not able to record the whole procedure between the start of the MCU and the start of delivering of wrong values.
    So I have made 2 files. Beginning of the cycle and end of the cycle.

    Best Regards

    Harry

    16MHz.zip24MHz.zip   

  • Ben,

    I'm using a normal power adaptor. 5V 0.7A.
    I think 0.7A will be max. current witch this adaptor is able to provide.

    Best Regards
    Harry 

  • Harry,

    It seems like the device is driving SPI_RDY low whenever it receives a write command, which is incorrect behavior and is leading to your problem. This may be a legitimate issue with the device. Could you confirm whether the end application is ESS or automotive? This will help us determine the appropriate next steps.

    Regards,

    Ben

  • Hello Ben,

    sorry for the delay. I have not seen your response.

    In the first step, it will be an ESS application, but in the next step, we have the option to make an automotive application. We wanted to use experiences from the ESS application

    Best Regards

    Harry

  • Harry,

    You need to initiate a customer return. If you have a contact at your local TI office, you could ask them to do so. Otherwise, you can start that process at this link: Customer Returns

    Regards,

    Ben

  • Ben,

    does it mean I get replaced the device?

    Regards

    Harry

  • Ben,

    Which device do you mean, the launchpad or the bridge?

    Best Regards
    Harry

  • Hi Harry, 

    Nice to meet you. I will step in here to support this case. 

    • How many units have you seen fail? If is just a single EVM, it could have been damage at some point, so the first suggestion will be to get another IC and replace the IC on the EVM for evaluation. 
    • If you have seen a consistent mode of failure on your application, that you want want to start an RMA failure analysis, then you can go to the customer return portal and start the submission. They will be the point of contact moving forward and will assist you on that process. https://www.ti.com/productreturns/docs/createReturn.tsp 

    Regards, 

    Arelis G. Guerrero 

  • Hi Arelis,

    nice to meet you too.

    I have filled out the form and sent it to you.

    Best Regards
    Harry

  • Hello Arelis,

    TI has declined the form.
    Could you please look in to case No. CPR241099788 and suggest me what to do?

    Best Regards

    Harry

  • Hi Harry, 

    Can you elaborate more on the reason for the declined. I was not able to find this CPR case on my queue (maybe because it got declined by the TI team). I believe I asked this question before, but was this a single unit failure? TI will typically not go through a RMA process, unless is a systematic mode of failure. Have you tried to replaced the IC on the EVM with a newer IC? 

    Regards, 

    Arelis G. Guerrero 

  • Hello Arelis,

    here is the reason for declining copied from the CPR No. CPR241099788::

    failure analysis is not provided for EVMs

    These additional comments explain why TI declined the request:

    Dear Customer, TI has reviewed your EVM related request. Please negotiate your request together with E2E-Forum (e2e.ti.com/. When they approve your request, than please contact the customer support center via ticsc.service-now.com/csm Regards.

    I believe I asked this question before, but was this a single unit failure?

    We bought a set of development boards to develop. So we have just one board.

    Have you tried to replaced the IC on the EVM with a newer IC? 

    No.

    Best regards
    Harry

  • Hi Harry, 

    I responded to this on direct email as well, but based on above my suggestion is to order an IC from your supplier and replace on the EVM, and see if that solved the issues you were seeing. 

    Best regards, 

    Arelis G. Guerrero