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.

CCS/EM1402EVM: EM1402EVM-TMS570LS3137 HDK

Part Number: EM1402EVM
Other Parts Discussed in Thread: TMS570LS3137, BQ76PL455A, BQ76PL455A-Q1

Tool/software: Code Composer Studio

Hi,

we are using TMS570LS3137 HDK with EM1402EVM for active cell balancing demo.

we are checking it for a particular cell and while running it for a discharging command, it is running fine and our cell got discharged.

but when we give command for charging it got struck in the following loop which i attached.

also, in discharging the g_ui32EMB1428Status value is 160(NO fault condition). but in charging g_ui32EMB1428Status value is 192.

we are not able to find out what is the issue.

please give solution for the same.

Regards,

Gargi Pancholi

  • Hi Gargi,

    Thank you for your question. Let me look into the code and I'll get back to you. I want to make sure I'm looking at the same code as you. Please confirm if you are using the "EM1402EVM Example Code" under the "Software" section located here: www.ti.com/.../em1402evm

    Best regards,
    Leslie
  • Hi Gargi,

    I checked the EM1402EVM Example code in the link I provided but it doesn't seem to match the code you are using. Can you please share the link to the example code you are using to be able to look into this?

    If the code you are using is your own code, I recommend looking at our example code.

    Regards,
    Leslie
  • hi leslie,

    Thanks for your response.

    i am using TMS570LS3137 HDK(having two UART-SCI,SCI2). while testing for active cell balancing discharging is working properly and charging is happening for only 3 seconds.

    i am attaching the zip file of the code what i am using. kindly go through it.

    21-2-spi.zip

    Thanks,

    Gargi

  • Hi Gargi,

    I'm not able to provide details on the fault code you are seeing on the code you shown above since this is not part of the TI example code (lines 349 to 356 you showed above), so I don't have the details of what you tried to implement on these lines. Can you please confirm if this is part of the code developed by you?

    However, here are a few things I noticed in your code that can help debug the issue you are seeing:

    * On sys_main.c file, I observed you changed the BQ76PL455A address to 0 on some function calls, but not all of them. On lines 386 and 391 (where you read the ADCs to measure cell voltages), you have the device address set to 1 instead of 0. I recommend fixing this and then putting a breakpoint on line 394 and monitor the variable "CellSample" to make sure you are reading the ADC voltages correctly, since these values are used to calculate the "maxCell" value used in the code in line 478 to determine when to break the do-while loop

    * On sys_main.c file, I noticed you hardcoded the cell to balance and the direction (charge or discharge) on lines 468 to 474, but the code still uses the "maxCell" value in line 478 to determine when to break the do-while loop, and this can create conflict since the "maxCell" value is calculated based on the maximum cell voltage, not just the one you are hardcoding

    * I noticed you modified the EMB_STOP and EMB_START_Command routines on emb1428.c file to not use the BQ76PL455A-Q1 to talk through SPI. If you fix the other things I mentioned above and still you are seeing the same issue, I recommend putting a breakpoint on these routines to make sure they return the expected value when you call them. You can also go back to using the BQ76PL455A to send the SPI commands through the GPIOs and see if this works correctly

    Best regards,
    Leslie
  • Hi Leslie,

    yes this part of code, we developed to extract cell voltage connected to the bq76pl455.

    line 386 and 391, device address I changed to 0 and cell sample we are reading  correctly by putting breakpoints.

    yes we hard coded the particular cell to be charged and discharged and that's how  we are checking the voltage of that particular cell through multi-meter. Is this the issue with the "maxcell" while charging if the voltage of the cell crosses the threshold limit that's why cell is charging only for few seconds not continuously.

    yes we are giving SPI commands not GPIO for balancing and with that we are able to discharge it continuously, only charging is creating issue which is happening foe 3 secs.

    Thanks,

    Gargi

  • Hi Gargi,

    Have you been able to resolve this by following Leslie's debugging steps above using breakpoints?

    Regards,

    Taylor