Blog

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Blog

Yongbing_Nan
NXP Employee
NXP Employee

Introduction

This is a brief introduction explaining the powertrain domain controller reference design integrated the BMS and VCU in one ECU based on S32K376 MCU. BMS system monitors battery voltage, temperature and fault status, among other parameters of the vehicle. VCU sample simulates pedal position, gear, sensors, among other functions of the vehicle. Software is developed based on Real-Time Drivers (RTD). The reference design is intended to provide a mechanism for easy customer evaluation of the Arm Cortex-M7@320MHz four cores MCU, and to facilitate BMS and VCU hardware and software development. OTA and bootloader function are also integrated into this reference design which make program upgrade feasible. Fig1 shows the s32k376 system block diagram.

Yongbing_Nan_0-1706686417238.png

Fig.1: S32K37x system block diagram

Solution overview

The Figure 2 shows the system block diagram. Analog front-end(AFE) MC33774 is used to monitor battery status. Gateway MC33665 is used to transfer SPI signal to transport protocol link(TPL3). SBC FS2633 supply power for S32K376 and external devices. High-side device(HSD), low-side device(LSD) and Multiple Switch Detection Interface(MSDI) are used for vehicle control unit(VCU) function. CAN, LIN, UART are used to communicate with other ECUs. Real-Time clock(RTC) is used to read real time for BMS state of charge(SoC) calculation.

Yongbing_Nan_0-1706783936004.png

Fig.2: system block diagram

The Figure 3 shows the whole hardware battery monitor unit(BMU) board and lists each type of device. The detailed connector interface can be found in the schematic.

Yongbing_Nan_0-1706689281233.png

Fig.3: hardware BMU board 

Hardware design

Please refer the doc AN747202-S32K39_37 MCUs Hardware Design Guidelines(0.2).pdf and S32K376 BMU and VCU Integration User Manual.pdf for the detailed hardware design.

MC33774: 18 Channel Li-Ion Battery Cell Controller IC ASIL D

MC33665: General Purpose BMS Communication TPL Transceiver and CAN FD Gateway

Software design

S32K376 BMS&VCU software is based on AUTOSAR drivers, including SW32K3 RTD, MC33774 BCC, MC33665 TPL PHY and SBC. It provides a series of AUTOSAR specific API to facilitate the BMS application designer to implemented the BMS application.

The Figure 4 shows the S32k376 BMS&VCU solution software block diagram. BMS function run on function core CM7_0, VCU function runs on lockstep core CM7_2, and monitor another two cores through IPCF. OTA and reserved OBC function run on the function core CM7_1. Bootloader and hardware OTA update application firmware. GUI display BMS and VCU information. All driver are based on AUTOSAR RTD.

Yongbing_Nan_0-1706767914149.png

Fig.4: BMS and VCU software block diagram

  • Startup process and project structure

BMS, VCU and OTA run on different cores. The core0 is startup core, it starts up first than core1 and core2. The core0 initial all of system and peripheral clock and setup GPIO status. Using the CM7-x-ENABLE field of IVT boot configuration word(BCW) to disable core1 and core2 for avoiding core1 and core2 to execute any uninitialized peripheral. The core1 and core2 start up after core0 writes the correct address to the MC_ME module and enables clock.

The three cores projects are completely independent. Each core has by itself a startup file, linker file and memory layout. After compiling, three core's elf file will be generated. One elf file with three cores project is feasible, but we don't implement it here.

  • Multi core communication

Inter-Platform Communication Framework (IPCF) is a subsystem which enables applications, running on multiple homogenous or heterogenous processing cores, located on the same chip or different chips, running on different operating systems (AUTOSAR, Linux, FreeRTOS, Zephyr, etc.), to communicate over various transport interfaces (Shared Memory etc.)

IPCF is designed for NXP embedded systems and features low-latency and tiny-footprint. It exposes a zero-copy API that can be directly used by customers for maximum performance, minimum overhead and low CPU load. The driver ensures freedom from interference between local and remote shared memory by executing all writing operations only in the local memory domain. CPU to CPU and directed interrupts are used to implement this function. BMS and VCU run in different cores, we use IPCF to send their framing data through CAN.

  • Basic workflow of project

Figure 5 shows the project program work flow and lists the schedule time of each task.

Yongbing_Nan_0-1706772758179.png

Fig.5 Project programming flow diagram

  • SAF function

The S32K396 Safety Software Framework (S32K396 SAF) is a software product which contains software components establishing the safety foundation for customer’s safety applications compliance with ISO 26262 functional safety. S32K396 SAF is a framework that implements the device safety concept system solution. Due to the SAF is not free for customer, for detailed information please refer S32K396_SAF_Safety_Manual.pdf and package S32K396_SAF_0.8.0. Figure 6 lists each component of SAF.

Yongbing_Nan_1-1706773286725.png

Fig.6 SAF component

  • BMS safety library function

This is the S32K3 BMS SL SDK DEMO AUTOSAR 4.4 Version 1.0.0 release for the S32K3 platform. The Bcc_775a_SL, Bcc_774a_SL, Bcc_772c_SL and Bms_TPL3_SL_E2E libraries included in this release have DEMO quality status in terms of testing and quality documentation. Demo libraries are not qualified and contain partial feature set. It is not intended to be used in production This Demo version of the Safety Library is delivered in binary format and it's intended for evaluation purposes only. Due to the BMS safety library(SL) is not free for customer, for detailed information please refer RTD_BCC_774A_SL_UM.pdf and package SW32K3_BMS_SL_SDK_4.4_1.0.0_DEMO.

S32k376 BMS&VCU solution enables external safety mechanisms1, 2 , 3, 5 to monitor battery status.  Customers cannot use it unless they purchase the BMS SL installation package. For detailed setup step, please refer to quick start guide document in NXP.com.

  • Project memory map

S32K376 has 6M flash space to store binary code that consist of three 2MB flash blocks. Bootloader is placed in the first flash block, and the three cores projects are divided into one flash block via link file and MPU. HSE is used for code switching in block 1 and block 2. A/B swap HSE firmware and secure boot assist flash(SBAF) is necessary to enable hardware OTA function.

Yongbing_Nan_0-1706773940160.png

Fig.7 s32k376 BMS and VCU project memory map

  • Hardware OTA

The project integrates OTA in Core1 and schedules it using FreeRTOS. The low level driver is based on Ethernet. For users of the S32K376 device with OTA enabled, the passive region can be read and written, and when an OTA update is performed, the new APP is always written to the passive region, but no program can execute in that region. The process of A/B swap is executed by hardware, no memory copy.

image.png

Fig.8: S32K376 hardware OTA update flow

  1. The OTA update agent-APP_V1 is first downloaded to the active block1(0x00600000) via the debugger and then starts running.
  2. When the OTA update is performed, the PC sends the new version of the OTA update agent-APP_V2, APP_V1 receives the binary file of APP_V2 and writes it to the block2(0x0800000) which is in passive.
  3. After partition swap and reset, the APP_V1 switchs to passive region, the new APP_V2 switchs to active region and runs.
  • Bootloader 

Bootloader is provided to update the application via CAN bus in case there are no tools to download the application directly. S32k396_Bootloader is a standalone project which will be flashed on the flash block0, shown in Figure 28. The IVT information appears on the low address, so the code always starts up from the block0. Application is downloaded on flash block1 by bootloader.

GUI

This GUI displays data transmitted from BMS and VCU system via CAN bus. Hands-on instructions are listed below. For a detailed introduction, please refer to S32K376 BMU and VCU Integration User Manual.pdf.

Yongbing_Nan_0-1706776849941.png

Fig.9: S32K376 BMS and VCU GUI

S32K376 BMS and VCU demo platform

The figure 10 shows the s32k376 BMS and VCU demo platform. To see the detailed set up guide, please refer S32K376 BMSVCU_QSG.pdf and Getting started page.

mmexport1687150733686-cut_allD_bms_only_modify.jpg

Fig.10: S32K376 BMS demo platform

More information can be found here:

S32K376 Battery Management System (BMS) and Vehicle Control Unit (VCU)

S32K39/37 Microcontrollers for Electrification Applications

More
0 0 635
rares_butilca
NXP Employee
NXP Employee

Whether you are participating at the NXP Cup competition or simply passionate about self-driving cars, try using MBDT to program a microcontroller to drive your car on a track. In this article you will find a model you can use as a starting point for your application.

Read more...

More
2 0 3,766
nxp-admin
NXP Employee
NXP Employee

Providing a low-cost and single-wire scheme, it comes as no surprise that LIN bus systems are increasingly used in the body domain of vehicles. Typical LIN applications, such as seat control, lighting, and steering wheel, are generating more requests for smaller bill of material and lower costs on system level. NXP’s latest smart QUAD LIN transceiver SJA1124 provides an innovative way to connect LIN bus to MCU for the electronic control units (ECUs) in the car to meet the aforementioned needs.

The number of LIN channels per application is increasing as the use of the LIN bus becomes widespread. Unlike the increasing number of LIN nodes, the space and bill of material for these applications are often shrinking to save cost. NXP’s SJA1124 is a QUAD LIN transceiver with integrated commander terminations, LIN controllers, and an SPI-to-LIN bridge. These features bring scalability and flexibility to the application network and MCU option, providing you with varied benefits.

Read more...

More
1 0 3,439
brendonslade
NXP TechSupport
NXP TechSupport

When running firmware v3.xxx onwards, MCU-Link uses WinUSB, so make sure your firmware matches a compatible MCUXpresso IDE version.

Read more...

More
2 0 3,804
BridgetteS
NXP Employee
NXP Employee

This launch introduces our Smart Card Trust Provisioning Solution, bringing customers a major new capability in protecting their Software Intellectual Property (IP) and guarding against over-production and cloning.

Read more...

More
1 0 2,419
brendonslade
NXP TechSupport
NXP TechSupport

The latest release of NXP's free UI design tool for LVGL is out now - GUI Guider 1.3.1 features major improvements in usability and optimization. 

Read more...

More
0 0 2,327
Eli_H
NXP Pro Support
NXP Pro Support

Hooking up to the external world usually means that our MCUs must learn to  “speak” analog.   A high-performance analog system was added to the LPC553x family to enable more integrated, lower external component count designs.

Read more...

More
1 0 2,922
brendonslade
NXP TechSupport
NXP TechSupport

NXP has now introduced MCU-Link Pro - the second incarnation of the MCU-Link debug probe architecture, adding several powerful capabilities and features to build on the entry level MCU-Link standalone model. This includes power/energy measurement, USB bridging and a J-Link firmware option.

MCU-Link-PRO_TOP_sm_crop.png

Read more...

More
2 0 2,153
CosminB05
NXP Employee
NXP Employee

An interactive tutorial on how to create your own MATLAB Simulink temperature sensor application by applying the model-based design approach, how to configure and use the i.MXRT1060 EVK using NXP MCUXpresso, a thermistor module and the IMXRT Toolbox.

Read more...

More
2 0 3,148
hansonhe
NXP Employee
NXP Employee

URL : https://community.nxp.com/community/general-purpose

mcus/k32lseriesmcus/blog/2019/12/05/k32-l3-mcus-energy-efficiency

with-advanced-security-and-physical-protection

最后更新:12-05-2019 更新:Omar Cruz

Read more...

More
0 0 1,660
mminar7
Contributor I

Hello Folks,

I have created project for managing I2C-bus low power LED drivers build at PCA9632 chip. (with possible modification for PCA9624,PCA9635PW,PCA9685,PCA9955B,PCA9956B).

You are able to manage chip from Raspberry. (It was tested at version 3 +). Github project contains documentation, sources and binaries. Who is interested in he is also welcome for testing of functionality and cooperative feed back.

Code is written at (python3 & adafruit library) as backend and free pascal as frontend.

Read more...

More
0 0 1,412
omar_cruz
NXP Employee
NXP Employee

The 5V KE MCU series has been designed to maintain high reliability and robustness in harsh electrical noise environments primarily targeting white goods and industrial applications, but now extending its success to consumer applications where touch sensing, safety and motor control capabilities have become a “must have” in the embedded design. 

Read more...

More
0 0 2,695
monicavelez
NXP Employee
NXP Employee

NXP understands that in addition to offering breakthrough innovations its ongoing investment and commitment to longevity is critical to being your trusted supplier. This paired with the continued demand and broad market use of NXP’s MCU portfolio makes it priority for us to extend the longevity1 on the following parts/families by an additional five years.

Read more...

More
0 2 3,431
omar_cruz
NXP Employee
NXP Employee

Building upon the market success and broad adoption of the Kinetis MCU portfolio, the K32 L3 MCU family leverages the combination of high-efficiency and low-power capabilities of the Arm® Cortex®-M4 while adding another Cortex-M0+ providing new enhancements such as low-leakage power-optimized peripherals, a DC-DC converter, numerous serial communication interfaces and up to 1.25MB flash and 384KB of SRAM memory.  

Read more...

More
0 0 1,392
omar_cruz
NXP Employee
NXP Employee

Focusing on low-power and fast wake up times, the K32 L2 MCU family – based on the Arm® Cortex®-M0+ - targets power-conscious end nodes and can enable a wide range of general purpose industrial and IoT applications. Today, the K32 L2 MCU family is being brought to market in a scalable set of packages, core performance and memory configurations, from 64KB to 512KB flash, and backed by unmatched enablement, led by NXP’s complementary suite of MCUXpresso software and tools with example projects utilizing IAR, Keil, and GCC based toolchains.

Read more...

More
0 0 1,231
monicavelez
NXP Employee
NXP Employee

Innovation means being first. And with more than 20 years of firsts, NXP’s MCU portfolio has grown into a powerhouse of more than 200 Arm®-based MCU families scaling from low-power Cortex®-M0+ to high performance Cortex®-M7 crossover MCUs.

Read more...

More
2 0 1,682
omar_cruz
NXP Employee
NXP Employee

Searching for a low-power, well-integrated but cost-sensitive MCU for your embedded designs? Look no further – the K32 L2 MCU family is for you!

Read more...

More
1 0 26K
techscale
Contributor II

Hi community

For some time now we have based our product developments on Kinetis devices and uTasker and are very pleased with the simplicity and reliability that results (as well as Mark's personal support).   One of our main product development requirements was to eliminate custom host USB drivers.  Having end users install drivers is a support headache and we wanted as much plug and play as possible  With utakser, we've been using the following: 

  • USB Flash driver, 
  • USB Keyboard interface and 
  • USB serial interface.
Read more...

More
0 0 1,515
sruthyuk
Contributor I

Dear friends,

 

I have been trying to test the can_ loop back_ node in KINETIS512_SC_100MHz.zip file by using flexcan1 in TWR-K60F120M module.I have used A47 & A48 primary elevator connections for flexcan1 as shown in freescale user guide. But i dont know how to test the CAN transmission by enabling loop back node

Read more...

More
0 0 1,526