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.

TMS570LC4357: Could "bq79718_sample_code_1.4.zip" be run in "TMS570LC4357" MCU without modifying code?

Part Number: TMS570LC4357
Other Parts Discussed in Thread: TMS570LS1224

Tool/software:

Hello, This is JJ

I've downloaded the "bq79718_sample_code_1.4" from secure resources.

Could this code be run in TMS570LC4357?

Some comments are saying that TMS570LS1224 MCU,,

And also, what happened to change this configuration?

it was setup by TMS570LS1224 default, not TMS570LC4357.

I've changed it to TMS570LC4357.

What happend to this change?

Best regards,

JJ

  • Hi, our expert for this topic is out of office and will return by 30th Dec, please expect a response early that week.

  • Hi JJ,

    What happend to this change?

    This might not work because the BMS example project was based on 144 pin PGE package device of TMS570LS1224 where as TMS570LC4357 will be available in only 337 pin ZWT package so these two devices not compatible in pin to pin wise.

    You can give a try, but this is my understanding.

    So, my suggestion would be better to understand the peripherals using in the project and so based on that you can use same application-level code except need to change the driver level code.

    --
    Thanks & regards,
    Jagadish.

  • Thank you for reply jagadish.

    I want to be more clarify about your suggestion

    Q1. Is this example code not compatible with TMS570LC4357?

    Q2. If the Q1 is right, Should the driver code be changed? your suggestion is saying that "you can use same application-level code except need to change the driver level code ". I am not fully understand what you mentioned.

    please let me know

    Best regards

  • Hi JJ,

    Q1. Is this example code not compatible with TMS570LC4357?

    I never tested in practical but as per my knowledge this code will not support on TMS570LC4357.

    As per my knowledge maybe we should need to change the driver level code because of the different variants.

    So please test it once, whether you are getting an output or not.

    --

    Thanks & regards,
    Jagadish.

  • Thank you jagadish

    In the CMU sample code, there is the read register function that gains the VCELL18_HI parameter.

    Q1. Is there any reason to get the cell voltage from 18th cell not from 1st cell?

    Q2. If we use the 16 cells, not 18 cells, Can I use the "VCELL16_HI" instead of "VCELL18_HI" parameter?



    Q3. What is the definition of 6 bytes headers? Which informations are included in that header? Where can I find it?

    Best regards,

  • Hi JJ,

    Q1. Is there any reason to get the cell voltage from 18th cell not from 1st cell?

    If you verify the addresses of the cells carefully, the highest cell address is at lower value and Cell_1 address is at higher values.

    That is the reason they are passing the highest cell (which have lower address) to this function and reading the all-cell values.

    Q2. If we use the 16 cells, not 18 cells, Can I use the "VCELL16_HI" instead of "VCELL18_HI" parameter?

    Yes, you can do that, 

    remember you should also need to change the BYTE count.

    Maybe you can do something as below:

    ReadReg(0, VCELL16_HI, response_frame, 16*2, 0, FRMWRT_STK_R);

    Q3. What is the definition of 6 bytes headers? Which informations are included in that header? Where can I find it?

    You can find it in datasheet of the BMS device itself.

    *BQ79616-Q1, BQ79616H-Q1, BQ79614-Q1, BQ79612-Q1Functional Safety-Compliant Automotive 16S/14S/12S Battery Monitor, Balancer and Integrated Hardware Protector datasheet (Rev. E)

    As you can see the data from the device looks in the below format.

    As you can see we are not only getting cell values along with them we are getting some other values also like Die temperature,  TSREF,  Bus bar and GPIO1.

    If you verify the cell voltages are starting at 4th byte offset right, so that is the reason in the code they are adding offset 4 to get the cell voltages.

    So here the header is nothing but

    1 byte of Die temperature, 2 spare values, 1-byte TSREF, 1 byte Bus bar and 1 byte of GPIO1. Total of 6 bytes.

    Anyway, all these values are not useful in this application. As you can see wea are not processing them anywhere in the code. But we are just reading because the data is in between the headers and in case if customers want, they can use these header data.

    --
    Thanks & regards,
    Jagadish.