The BMS measurement/balance boards with the MC33771 chip (FRDM33771BTPLEVB or in-house equivalent) are used in conjunction with the MCU (S32K144EVB-Q100 or in-house equivalent) and the transceiver board (FRDM33664BEVB or in-house equivalent) as described elsewhere. The MC33771 boards are powered by the battery cells that are attached to them. To get the MCU to reinitialize one or more of them I find that it is necessary to unplug ALL of the MC33771 boards from their associated battery cells and plug them ALL back in again (power-on-reset, POR). If that is not done, there are communication problems. This is not good because if I need to replace only one of the MC33771 boards, performing POR on all of them is inconvenient, adds unnecessary wear on connectors, and adds unnecessary exposure to high voltages.
Is there a way to force a re-initialization of the system without performing POR on ALL of the MC33771 boards?
I have tried software resets of the MC33771 boards with registry writes from Simulink code and have succeeded in messing up communication between the MCU and the MC33771 boards, but the system does not re-initialize when I power-cycle the MCU.
已解决! 转到解答。
Hello @ranulf,
I am sorry for my delayed answer. I wonder if recalling the initialization function solves your issue and reinitializes the system without reconnecting the battery modules. Unfortunately, there is no block for that, so you have to insert the following line of code using custom code blocks from Simulink (Simulink Outputs block from the Simulink Coder -> Custom code).
MBDT_BCC_Init();
This will force to call again the initialization process performed when the S32KMCU boot up. Before executing the algorithm it will initialize its peripherals and then send commands via SPI over the TPL network to all of the MC33771Bs. By calling again this line, the initialization commands will be sent again.
Let's give this a try.
Regards,
Marius
@mariuslucianandThank you. I assume that I will have make sure that the custom code block is called only once at the beginning and not every time step. Do you think this block should be run before or after the configuration blocks or would it matter?
Hello @ranulf,
I am sorry for my delayed answer. I wonder if recalling the initialization function solves your issue and reinitializes the system without reconnecting the battery modules. Unfortunately, there is no block for that, so you have to insert the following line of code using custom code blocks from Simulink (Simulink Outputs block from the Simulink Coder -> Custom code).
MBDT_BCC_Init();
This will force to call again the initialization process performed when the S32KMCU boot up. Before executing the algorithm it will initialize its peripherals and then send commands via SPI over the TPL network to all of the MC33771Bs. By calling again this line, the initialization commands will be sent again.
Let's give this a try.
Regards,
Marius
I tried this approach and it seems to work. In the System Outputs block I added
"MBDT_BCC_Init()" to the field "System Outputs Function Execution Code". I also wrapped the System Outputs block in an enabled subsystem that only executed on the first time step in case this block is normally run every time step. This may not be necessary. The code worked either way.