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

Peripheral Drivers(Non Autosar)

FlexCAN Peripheral Software Stack Explanation using NXP S32K144 MCU

Overview and motive Objective is to: To get to know what is FlexCAN driver and its features. To Understand How to use FlexCAN Driver(software environment setup and chronology in software configuration)). FlexCAN Driver GUI explanation for configuring FlexCAN Peripheral. Relation of functions of FlexCAN Driver functions via FlexCAN peripheral features. In Depth Understanding of FlexCAN driver functions/data types, with questions like What and why? Chronology of APIs for using basic features of FlexCAN Peripheral for doing CAN communication(How and When?) By basic features we mean the CAN transmission and reception via Mailbox and FiFo mechanism using polling&Interrupt method. What is FlexCAN Driver FlexCAN Driver are set of libraries which are used for using FlexCAN peripheral to do CAN communication via NXP S32K1xx Microcontrollers. Here by library, we mean a set of .h and .c files written in c language. These set of FlexCAN libraries are: Library of FlexCAN Peripheral Hardware registers. Library for FlexCAN Peripheral Interrupt Handlers. Library for FlexCAN peripheral API’s. Miscellaneous files for FlexCAN. Now in FlexCAN Driver there are 3 sets: FlexCAN_Ip.h/.c FlexCAN_Ip_Hw_Access.h/.c FlexCAN IP_Irq.h/.c 3 extra header files: FlexCAN_Ip_DeviceReg.h/FlexCAN_Ip_Types.h/FlexCAN_Ip_Wrapper.h: The first one contains the function and data types through which different features of FlexCAN peripheral are used. Features like of sending data, receiving data, configuring message id filter table and etc. It contains functions like: FlexCAN_IP_Send(). FlexCAN_IP_receive, FlexCAN_IP_RXFIFO and etc. The Second one also contains the functions and data types through which FlexCAN Peripheral registers. Are accessed. Kind of like Bare Metal codes of FlexCAN peripheral are written in this files. And the Functions of this file are used by FlexCAN_Ip.h/.c files. Third one contains the function definition and data types for for IRQ handler of FlexCAN Peripheral And the last one contains the misceeleneours Data types and macros for using flexCAN peripheral. In our application code, we are just going to add FlexCAN_Ip.h header file to access the FlexCAN Driver in our code. And these files are located in the root directory of S32 DS where software installtion of RTD package takes place. FlexCAN Driver and Code Configuration tool relation. Now for using the FlexCAN peripheral, there is a feature of code configuration tool in S32DS via which we can configure the FlexCAN Driver in Gui base. That is instead of writing code, we can confiure how to use FlexCAN Module by GUI presentation. The code configuration tool in S32 Design Studio, generates the set of .c/.h files for FlexCAN peripheral. These are different from library files which I have explained above.  In these generated files it defines and initializes some of the variables. These variables are then used by FlexCAN APIs in the application code. This support of code configuration tool makes it easy for configuring FlexCAN module in easy way via GUI presentation and variables which are generated by code configuration tool are used as parameters in FlexCAN APIs to use them in application code. So, in short to say, code configuration tool generates the values of some of the parameters that has to be send in FlexCAN Driver API. Closure of FlexCAN Driver: There are number of files, functions and data types but for now we are going to concentrate on those which will be required for using FlexCAN in Standard CAN, in normal mode for transmitting and receiving via mailbox and FiFo mechanism. In FlexCAN library there are number of functions and data types through which all the features of FlexCAN peripheral can be used. But we are not going to dwell into all functions and data types. We are just going to cover the functions and data types through which we can send and transmit can data via mailbox/rxfifo mechanisms. As this is the scope of this course and module, for other functions and features you can explore our Advance CAN Courses or can reach out to us privately, Software to install to use FlexCAN Peripheral Driver To use FlexCAN Peripheral Driver, we need to install following things in your Host Desktop/PC: S32 Design Studio IDE 3.4 or 3.5 (any will work though here, we are going to use S32 Design Studio 3.4) S32K1 Real Time Drivers Version 1.0.0 S32 Design Studio 3.4 S32K1 Real Time Drivers Version 1.0.0 S32K1 RTD V1.0.0 is Software Stack for using NXP S32K1xx microcontrollers. It Contains Peripheral Driver library files for using the S32K1xx microcontroller peripherals. It supports all peripherals of S32K1xx MCU’s.  This Software Stack contains 2 packages: Autosaur MCAL layer complaint and standard based peripheral driver files for S32K1xx MCU’s. It is Autosar 4.4.0 complaint. Non-Autosar based peripheral driver files for S32K1xx MCU’s.  It is a collection of peripheral drivers designed to simplify and accelerate application development on NXP microcontrollers. From Learning point of view and long-term skill development, having handson with Autosaur MCAL layer based peripheral driver file would be a good starting point. But as a fresher it might be more challenging to start with autosar standard. So In this blog, we are going to explore Non-Autosar based peripheral driver for FlexCAN module.  Further once having basic Handson with Non-Autosar, will explore Autosar MCAL layer based peripheral driver. Refer to this blog/video to get to know how to install S32 Design Studio 3.4 and Install S32K1 Real Time Drivers v1.0.0. Also it is recommended to explore Code Configuration Tool and Project Creation Modules of S32 Design Studio IDE, so as to get understanding how to use S32 Design Studio throughout the learning cycle. How to use FlexCAN Peripheral Driver FlexCAN Driver can be used via S32 Design Studio Code Configuration tool which provides Graphical User Interface manner in S32 Design Studio IDE, through which we can generate the FlexCAN driver libraries and code automatically in our project. This thing makes it easy to develop applications fast and easy way. The Code Configuration tool generates 2 things: Library Files to use FlexCAN Peripheral. Configured parameters in the form of Data Types (structures, macros, arrays and etc.), which are used as input parameters in different functions of library files. Chronology to follow

Stay Updated With Us

Error: Contact form not found.