BMS & MBDT - MC33771B/MC33772B TPL communication with S32K

Showing results for 
Search instead for 
Did you mean: 

BMS & MBDT - MC33771B/MC33772B TPL communication with S32K

BMS & MBDT - MC33771B/MC33772B TPL communication with S32K

1.    Introduction

In the previous article, we have learned how to connect the S32K with the MC33771B/MC33772B via the classic SPI protocol. This allows our application to manage a battery pack up to 14 cells.

This article details the TPL communication setup between S32K1xx boards and MC3377xBTPL Battery Cell Controllers.  It covers both hardware and software setup for the Battery Management System models designed using Model-Based Design Toolbox for battery packs of more than 14 cells in series.  At the end of this article, the user will be able to set up the Battery Cell Controller hardware and to design a Simulink model that reads the cell and pack voltages, current, temperatures, and faults status. The measured values will be displayed on the host PC using FreeMaster. 

2.    Hardware

For controlling larger battery backs consisting of more than 14 cells, we have to ‘divide’ the battery packs in modules of 6 or 14 cells (the maximum numbers that an NXP Cell Controller can connect) and to monitor each module. The main MCU must communicate with all the controllers in order to get or set the information needed. To accomplish this communication we connect all the cell controllers in a daisy chain topology and we use a transceiver to connect the Main MCU to the TPL network.



This setup consists of the following parts:
  1. S32K144 EVB
  2. FRDM33664BEVB
  3. 1 up to 15 FRDM33771BTPLEVB or FRDM33772BTPLEVB
  4. For each Cell Controller a BATT-6EMULATOR or BATT-14EMULATOR
  5. USB cable for the S32K144EVB, for each emulator a 12V power supply


  1. Connect the MC33664 transceiver to the S32K board. This can be achieved in two ways. Using a translation board (see UM1114 chapter 2.4.3 FRDM33664BEVB configuration (TPL communication mode)), or directly using wires. This is the approach I have used int eh picture above but used a perf board instead of wires following the Table 6 description in the UM11143 [1].
  1. Connect up to 15 Battery Cell Controllers between them, using twisted-pair cables ( OUT+ to IN+ and OUT- to IN-).
  2. Power up each EMULATOR board

3. Software

The software approach is very similar to the SPI. The model needs to have an MBD_S32K1xx_Config_Information Block and a FreeMaster_Config for FreeMaster communication.

3.1 Battery Cell Controller Configuration Blocks



Unlike the previous article, when we used only one SPI instance for communication with one BCC device, now the TPL requires two SPI Instances, one configured as Slave and one as Master. The user must add two LPSPI configuration blocks to the model and select the Hardware Instances used.



For the Battery Cell Controller Configuration, we need to add the same MC3377xB_Config block. Here, the mode has to be set on TPL and the Device Number set according to the BCC devices number: in our case, 2.



In the next tab, SPI, we have to choose the Instances number for Master and Slave and the Chip select connected to the TPL transceiver. For the Master SPI instance, the user can also use a regular GPIO as a Chip Select pin in case the hardware designer assigned other pins than a hardware SPI.

3.2 Measurements



For reading the values, we use the same blocks as for SPI, just that now we have to specify the CID of the Battery Cell Controller from which we want to read the values.

 As you can see in the picture above, our application uses two MC33772BTPL devices. We added two MC3377xB_Get_Values blocks, one for the device with CID 1, the second for the device CID 2. The total Pack Voltage will be the sum of each measured Module Stack Voltage. Since all the cells are connected in series we will measure the Pack current only for the device with CID1.

4. Examples and Validation

This article comes with the examples described above. Running the models on your setup could be a good starting point for your project. Once the code has been successfully generated and deployed on the target, the FreeMaster can be connected to the board via UART and the values can be monitored on the Host PC, just like in the application below.


5. Resources

5.1.  UM 11143

5.2. FRDM33664BEVB 



5.5. S32K144 EVB 

Version history
Revision #:
2 of 2
Last update:
2 weeks ago
Updated by: