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.

EMB1428Q: some questions of 1402EVM

Part Number: EMB1428Q
Other Parts Discussed in Thread: EM1402EVM

Hi,dear ti enginner:

I am debugging the active balance with 1402EVM. And i use my own MCU,not TMS570.

I refer to the TMS570 code to write my own code.And I used the BQ76PL455 ‘ GPIO to communicate with EMB1428 not real spi.

There are some questions,I hope to get your help.:

1.the D4 light is light up and turn off soon,and then repeats the process always. Is this the correct phenomenon by use TMS570 DEMO software?

   I find When GPIO5 is set to low voltage ,the D4 will light up,when the GPIO5 is set to high voltage ,the D4 will turn off. it is opposite of the  schematic named TIDA-00817?

2.The code in function     void EMB_SetCS(int nDev_ID, int CS)

nRead = ReadReg(nDev_ID, 120, &bTemp, 2, 0); // Read GPIO dir register

No.120 register is 1 blen,not 2 blen.

Does this affect the operation of the code?

3.I still can't implement the active balance function. Is there any reference material that can help me solve this problem?

Thanks for you help.

regards.

  • Hi Sheng Xu,

    For question #1, I'm looking into the 1402 EVM schematic to see what could be happening

    For question #2, is this a function from the code you developed or from the TMS570 demo software?

    For question #3, all the documentation for TIDA-00817 can be found at: www.ti.com/tool/TIDA-00817

    To implement active cell balancing function, the files that might be of interest to you are:
    * The example software (scroll all the way down to "Software" section, "TIDA-00817 EM1402EVM Example Code" pdf)
    * I also recommend looking at the datasheet for EMB1499 and EMB1428 devices to undestand how active cell balancing is performed using these devices

    Best regards,
    Leslie
  • Hi Leslie Marquez ,

    thanks for you answer.if you find some phenomenons,please tell me,thanks.

    And the function is from TM570 software.

    regards.

  • Hi Sheng Xu,

    Please see my answer below for the pending questions (1 and 2)

    For question #1, I reviewed the code and the schematic:

    • This is what the program is doing:
        • When you run the example code, GPIO5 (which is connected to the RST pin on the EMB1428) is configured as an input during the initialization of the EMB1428 (line 355 on sys_main.c on our example code) which sets the RST pin on EMB1428 to high.
        • Then when cell balancing is started (line 447 on sys_main.c on our example code), at the beginning before sending the SPI command, GPIO5 gets configured as output low (see line 166 on emb1428.c) which sets the RST pin on EMB1428 to low.
        • Then when cell balancing is stopped (line 449 on sys_main.c on our example code), GPIO5 get configured as input which sets the RST pin on EMB1428 to high.
    • Now, what is happening with you LED D4 is:
      • When GPIO5 is configured as input, the pin is pulled up to VIO voltage, turning on the FET Q46 and hence EN_ACB is 0V (connected directly to EN_12V). Since EN_12V is 0V, U21 will not turn on (U21 is a step down regulator that gives you 5V3 at the output) and hence your D4 LED will be off.
      • When GPIO5 is configured as output low, the pin is pulled to GND, turning off the FET Q46 and hence EN_ACB is pulled up to VIO. Since EN_ACB or EN_12V is high, U21 will turn on and step down the BAT voltage to 5.3V and hence your D4 LED will be on.

    For question #2, the ReadReg function you highlighted is there to read the GPIO direction register and then "OR" the data with the new data that you want to write. That way the previous settings for GPIO direction register (Register addr. 120) won't get overwritten and you only modify the specific bits you want to write to. Please implement your ReadReg function reading only byte 120 (bLen = 1), and not 2 bytes as shown in the example code. Thanks for highlighting this.

    Best regards,

    Leslie