Over 10 years we help companies reach their financial and branding goals. Engitech is a values-driven technology agency dedicated.

Gallery

Contacts

411 University St, Seattle, USA

engitech@oceanthemes.net

+1 -800-456-478-23

Getting Started Getting Started with S32K3 MCU's

FreeMaster with S32 Design Studio(NXP Semiconductor)

https://youtu.be/N6w_xWoOH-Q Overview In this blog, we will get to know how to use FreeMaster Desktop Application Via S32 Design Studio. for NXP Semiconductors S32 automotive Microcontrollers. We Will be using ElecronicsV2 Development Board which has ARM Coretx M4 Processor based Automotive Microcontroller: S32K144 The objective of this blog series is to teach people on how to use FreeMaster Desktop application: which is a great tool for run time debugging, as it provides run time debug monitor(Oscilloscope, Watch Grid, sending 2-way commands) and data visualization (Creating animated GUI pages). The best part about this is that real time debugging and tracing can be done without any expensive or heavy debuggers (SWO/Jlink/JTAG/Lauterbach/PEMicro or etc) and that too on interesting GUI pages. One can Interface FreeMaster with our Target Development Board (ElecronicsV2/AutoboardV1), via UART, CAN, ProBug Jlink Debugger or even over TCP/IP network. To know more about FreeMaster: what is it, why it should be used and its features. Checkout This Blog: FreeMaster Debugging Tool – Get To Byte This is getting started blog to learn and teach how to use FreeMaster Desktop Application. Initially we will be using it via UART and ProBug Debugger. In later blogs and stages, we will be interfacing it via CAN, TCP/IP and exploiting many other features of FreeMaster. Subscribe yourself to get notified Blog will be out on 20th of June 2024. Right Now, blog is under development, so subscribe yourself from below button and tell us about your use-cases so that we can customise blogs according to your needs. Subscribe

NFC/RFID Sensor-Module Interfacing with S32K3 MCU's Sensor-Modules-interfacing Sensor/Module Interfacing Sensors and Modules SPI Modules

MFRC522 RFID module interfacing with Host MCU

Table of Contents Many of you may be familiar with the RFID module MFRC522, but I’m willing to bet that most of you have only interfaced this module with an Arduino and the Arduino IDE environment. However, if you need to use the RFID module with other MCUs, you may find yourself at a loss for how to proceed. If this is the case, you’ve come to the right place. In this blog, I will show you how to create a device driver for the RFID Module MFRC522, allowing you to interface it with any Host MCU. If you’re not sure what we mean by interfacing with a Host MCU or why it’s necessary, be sure to check out our blog for more information. Continuing with the MFRC522 RFID reader interfacing to host MCU, Objective would be to interface this module with Host MCU’s like of NXP Semiconductors, STMicroelectronics or other vendors MCU’s. Will make the driver to interface the RFID Reader with any MCU, not unlike just with Arduino and Arduino IDE environment. You just need to change 2-3 low level API’s for running it on different MCU’s, would be telling about it in below sections. In this blog we are going to write the driver in c++ language. Before proceeding further would recommend viewers go through, the following set of blogs and videos to have a better understanding. Prerequite, better to have:  Viewers can refer to this blog to know about RFID technology in detail. or can watch this video which is in animated format to know about RFID technology. RFID Reader MFRC522: Overview and Datasheet Explanation( Highly recommended to go through at first) MIFRAME RFID Tags: Overview and Datasheet Explanation About Serial Communication Protocols To know about What are Microcontrollers and introduction on them Hardware Connection of MFRC522 Reader module MFRC522 Module has 8 pins exposed out, which can be categorised into 3 parts: Communication pins, Power Supply Pins and Additional Pins. As explained below Communication Pins Power Supply Pins Additional Pins Logic Analyzer Communication Pins 4 pins are communication pins, that would be connected to Host MCU either using SPI, I2C, or UART. MFRC522 Communication Pins We would be making the connection using the SPI peripheral. Here I am referencing out hardware connection with 2 microcontrollers: NXP Semiconductors S32K144 MCU and STMicroelectronics STM32F103 MCU. STMicroelectronics STM32F103 would be using SPI-1 Instance and S32K144 would be using LPSPI-0 Instance.  Power Supply Pins 2 pins are for Power Supply Connection, which would be used for powering the RFID reader. One can power the MFRC522 Reader via Host MCU. Connect the VCC and GND pins with the Host MCU Power pins. Make sure, you supply MFRC522 with 3.3 V, don’t power it with 5V. MFRC522 Power supply connections Additional Pins There are 2 additional pins on MFRC522: IRQ and RST pins. IRQ pin is an interrupt pin, that is used for alerting the HOST MCU  when an RFID tag is in the vicinity. Read about the IRQ pin and interrupts in MFRC522 from here. RST pin would be not used for this project. Logic Analyzer These connections are for debugging and understanding purposes. By connecting the logic analyzers, we would be able to see how literally SPI communication and what commands we are sending, and what responses we are getting in bit and byte levels. Would recommend doing this step, as it makes the understanding clear at the root level. It would hardly take a couple of minutes to setup this. For connecting the logic analyzer, connect the Channel1,3,5,7 of the logic analyzer with communication pins. I am using the Salae logic analyzer, which is readily available. viewers can refer to this video on Gettobyte Youtube channel on how to set up logic analyzer connections, hardware, and software. Logic Analyzer MFRC522 Functional Description API’s MFRC522 has a set of functional descriptions, on which the whole of the working of MFRC522 depends. To write the driver of MFRC522, it’s important to have an understanding of those functional blocks. Reading from the datasheet could be tiering, hence viewers can read and understand from here. MFRC522 Host Interfaces MFRC522 FIFO MFRC522 CRC MFRC522 Interrupts MFRC522 Time Unit MFRC522 Command Set MFRC522 Host Interfaces MFRC522 Host Interface API’s We are going to connect MFRC522 via the SPI interface to the host MCU. SPI configurations: MSB is sent first 8 Bits per transfer The clock is Low when inactive(CPOL=0) Data is valid on Clock Leading Edge(CPHA=0) Enable line is Active LOW SPI Address Byte These address bytes are of 6 bits. When sending the address byte, MSB should tell whether we have to perform a read/write operation on that address. LSB is always set to logic 0 when sending the address byte. Thus you would find in the below driver that MFRC522 registers which are defined in GB_MFRC522.h have been left shifted 1 bit so that the MSB bit can be configured whether to perform a Read or write operation on that register address. SPI Read Data To read the data, Host MCU will send the register address at the MOSI line with LSB as 1 and then in MISO, it would get the data. This would be performed via a low-level function, that is reading one single byte from the address GB_reg which is sent in its argument. uint8_t GB_MFRC522_ReadRegister(PCD_Register GB_reg); For e,g we have to read the version of the MFRC522, which can be done via VersionReg(ox37): uint8_t v = GB_MFRC522_ReadRegister(VersionReg); So it would be left shifted first: 0x37<<1 = 0x6E(So that can configure MSB for read and Write operation). And then as we want to perform a read operation at this register, so need to write MSB with 1. We will Or above value with 0x80( See definition of uint8_t GB_MFRC522_ReadRegister(PCD_Register GB_reg): 0x6E | 0x80 = 0xEE. As per the datasheet, reading this register would give either 0x92 or 0x91.(Refer the datasheet for in-depth-description of this register). In logic analyzer reading from the  MFRC522 would look like this: MFRC522 version

Embedded MCU's NXP Controllers S32 Automotive Platform S32K3

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, andTelematics. 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 Processor/Core Clocks Memory of MCU Basic peripherals Advance Peripherals Connectivity peripherals Packages and Pins Power ratings and power saving modes Debug and programming interface Processor/Core 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. Clocks 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

Stay Updated With Us

Error: Contact form not found.