NXP S32K344 Automotive MCU
Table of Contents
About NXP semiconductors
NXP Semiconductors is a global semiconductor company that designs and produces a broad range of semiconductor solutions providing hardware and software for them. It is a fabless company that designs the Microcontrollers, Microprocessor, ASICS’s and other discrete electronic components, targeting the industries like but not only limited to automotive, industrial automation, communication infrastructure, IoT, Robotics, Medical, Consumer Electronics, drones and Security Chips.
Apart from these chips and IC’s, NXP semiconductors also provide software to run these chips and demonstrating different applications where its products can be used. NXP semiconductor also works in AI/ML and edge computing.Making it not only giant hardware-based semiconductor company but software company too.
History of NXP Semiconductors roots back to 1950’s. It was founded in 1953 as part of the electronics giant Philips, at that time the company name is Philips Semiconductors. In 2006 it become independent company and its name changed to present name: NXP Semiconductors. After that it had acquired several companies and had done partnership deals with companies like Silicon labs, STMicroelectronics, Trident Microsystems, Conexant Systems and to expand its product lines and business revenue. In March 2015, merger agreement was announced through which NXP semiconductors acquired The Freescale semiconductors. After this merger NXP semiconductor become one of the largest semiconductor companies in the world. Both NXP and Freescale had deep roots stretching back to when they were part of Philips (NXP), and Motorola (Freescale). NXP primarily focusing on near field communication (NFC) and high-performance mixed signal (HPMS) hardware, and Freescale focusing on its microprocessor and microcontroller businesses. NXP semiconductor chips are used in almost every electronic gadget we see around us. To know more about NXP semiconductors, one can navigate to NXP website and Wiki page.
In this blog we are going to start with Automotive Industry. NXP semiconductors has a S32 Platform of microcontrollers and microprocessors specially targeting the Automotive industry. S32 platform has all the kind of MCU’s and MPU’s targeting different Domains of Automotive. There are broadly five domains in automotive: Power Train, Chassis, Body & Comfort, HMI, and
Telematics. These 5 domains cover all the devices embedded in Automotive.
NXP S32 Platform
S32 is a series of Microcontroller which are designed and manufactures by NXP Semiconductors, specially targeting for automotive applications but not only limited to them. Then with in S32, there are further categories as S32K, S32G, S32R, S32V.
Each of the category, can be used in one of the domains of automotive. Like say in powertrain one can use S32K for motor control applications and for telematics one can use S32R for radar processing, to get information about nearby objects. This is what something ADAS system is. Like when some car come nearby to a car, some sensor senses that distance (That is telematics zone) and after a certain threshold car speed automatically changes by controlling its motor RPM (that is part of powertrain).
NXP S32 Platform is being designed, providing end to end solutions for Automotive Industry. Not only MCU’s and MPU’s but NXP also provides large number of tools and software to build the applications for Automotive from S32 Platform. Dedicated IDE, Debugging tools and drivers, Real-time Drivers (RTD), RTOSes(FreeRTOS, Zephyr, NXP RTOS) and Autosar complaint SDK.
Almost every MCU of S32 family has support of Automotive protocols: CAN, LIN, FlexIO and etc. Ranging from ARM CortexM3(single core) to ARM Cortex A9(triple core). Having advance features to support automotive needs like : Hardware security modules(HSM) for safety and security, High Bandwidth Ethernet and USB support for connectivity and etc.
We are going to start with S32K312 MCU, which is part of S32K family. It is based on ARM Cortex M7 and has dedicated HSM-H that too upto EVITA specs and also ASIB/D complaint. Making it a perfect MCU to start for building general purpose Automotive applications.
Would get to know more about S32 platform along with tutorial series on S32K312 MCU.
About S32K312 MCU
S32K312 is a Microcontroller which is based on ARM Cortex M7 Processor. ARM Core is based on Armv7 and Thumb-ISA (Instruction Set Architecture). S32K312 is a single core microcontroller, i.e., only one ARM Cortex M7 processor is based.
Cortex M7 present in S32K312 provides the following features/Subsystems:
- Cortex M7 in S32K312 can run upto 120 Mhz.
- It has Integrated Digital signal Processing (DSP) subsystem, for doing complex signal processing operations.
- Configurable Nested Vector Interrupt Controller (NVIC) for handling the interrupts.
- Single precision Floating Point Unit (FPU) for doing complex Mathematical calculation.
- It has standrad ARM Debug Port that supports JTAG and SWD interfaces. It has subsystem, CoresSight Architecture for debugging and programming. Support of SWD and SWO for debugging and programming Microcontroller, in addition to that it has numerous trace units like FPB (Flash Patch and Breakpoints) ITM (instrumentation Trace Macrocell), HTM (Coresight AHB Trace Macrocell), ECT (Embedded Cross Trigger) and DWT (Debug Watchpoint and Trace). All of these subunits are part of coresight Architecture, which is subsystem in the Arm CortexM7.
- It is optimized for real time with Cortex M7 local memories ITCM and DTCM cacheable memories for faster execution and better efficiency.
- ARM Cortex M7 has AXIM, AHBP and PPB buses for its interconnects and interfaces. It follows AMBA protocol for communicating with various subsystems using these busses.
Apart from ARM Cortex M7, it has dedicated ARM Cortex M0 also which is used in its Hardware Security engine (HSE) for performing cryptographic operations.
S32K312 MCU has 5 clock interfaces in it.
- Fast External Oscillator (FXOSC): External oscillator of upto 8-40 MHZ can be connected to S32K312 MCU, at pins EXTAL and EXTAL which can be used as a source for PLL to configure system clock and also for peripherals like FlexCAN, QuadSPI and etc.
- 48 MHz Fast Internal RC oscillator (FIRC): This is the default system Clock. FIRC also has dividers 1,2,16 to configure its clock,
- 32 kHz Low Power Oscillator
- 32 kHz Slow External oscillator (SXOSC)
- System Phased Lock Loop (PLL): Phase locked loop is used to support frequency modulation.
S32K family of MCU has different ranges of memory in their chips. Upto 8 MB of flash memory with ECC, 512 KB of SRAM with ECC and QuadSPI support.
S32K312 MCU has following memory and memory interfaces
- It has SRAM, Flash Memory and Flash Memory Controller.
- It has Embedded Flash memory peripheral called as C40 IP. (Chapter 20 of S32K3RM).
- Flash memory controller peripheral, for configuration and control of flash memory
- PRAM controller for initializing and configuring RAM memory.
- 2 MB of Flash memory with ECC protection.
- 192 KB of SRAM with ECC protection
- ARM Cortex M7 core which is present in it has 32KB ITCM and 32KB DTCM cacheable memories too for faster execution by processor.
It has 512 KB of SRAM
Chip has Basic peripherals kuje:
- UART
- SPI
- I2C
- GPIO
- Signal Multiplexing
- Timers
- ADC
Advance peripherals like
- Safety peripherals according to standard ISO 26262. S32K312 is ASIL B level safety.
- Power Conversion and Motor control Peripheral to perform wide variety of real time tasks such as: Motor control, Power Conversion, Advance PWM generation and lighting control.
- Low Power Comparator and Logic Control Unit peripheral for generating different kind of analog and digital waveforms that can be used for electrification and power applications.
- Real time peripherals like Enhanced modulator and body cross triggering unit that can be used for processing, manipulation, generation of signals(digital/analog) in time constraints environments.
- Advance on board peripherals like Improved Inter-Integrated Circuit I3C and Synchronous Audio Interface(SAI)
- CAN
- LIN
- FlexIO
- LPUART/LPI2C/LPSPI
HDK of S32K312 MCU
NXP semiconductors provides official Development board based on S32K312 for fast prototyping and development. Evalution board is specifically targeted for automotive application.
S32K312EVB-Q172 is the name of Evalution board. The board has on-board debugger and number of modules to support it.
More about the board can be got to know from here and here. Also, in subsequent blogs as we do more hands on this board, would get to know about this board.
SDK for S32K312 MCU
SDK stands for Software Development Kit. Every MCU needs an SDK for programming and debugging it. NXP semiconductor provides end-to-end tools, IDE, Debuggers, and software packages for the S32 platform. There are some different software packages for different S32 MCUs, but tools are the same across the S32 Platform.
- S32 Design Studio(S32DS) is an Integrated Development Environment, which is used for programming and debugging S32 Platform. It is based on Eclipse IDE. It has in-built debugger support using GNU GDB and PeMicro debugger. It supports the GNU GCC compiler and has many advance features too like S32 Configuration Tool, and Fault analyzer, to analyze the memory and efficiency of the software written on it. It can be downloaded from the NXP website (Remember to sign-in/login to nxp website before downloading). We have to download plugins in S32DS to make it compatible for the MCU we are using.( See getting started section ) To know more about S32DS, one can get to know about it from here.
- S32 Flash Tool (Optional)
- Freemaster(Optional): Is runtime software debugging tool. FreeMASTER is a user-friendly real-time debug monitor and data visualization tool that enables runtime configuration and tuning of embedded software applications
- S32K312 RTD: Real Time Drivers is the Firmware to use the MCU peripherals. The Firmware consists of a number of APIs, which interacts with low-level hardware, and developers can directly start building applications on S32K312 MCU using these RTDs. These RTDs are there for every peripheral of the MCU. In upcoming blogs as we pick up different peripherals of this MCU, we would be going to understand corresponding RTD APIs in detail. We have to download the RTD in S32DS for the controller we are using. RTD’s for S32K312 can be downloaded from the S32K Standard Software. ( see getting started section for installation steps).
Mainly in the initial stages, we would be needing only S32DS and S32K312 RTD for using different peripherals of the S32K312 and building custom applications on it. In the next blog we would be exploring the GPIO peripheral of the S32K312 using S32K312-Eval Board. But before moving to that refer to the Below section to set up the environment for S32K312.
How to get started with S32K312 MCU
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
Author