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

Blog

Port Driver of Autosaur MCAL layer (S32K1xx MCU)

Motive:

  1. To get understanding of what Port Driver in Autosaur MCAL Layer stack do: Done: What is Port Driver in Autosaur?
  2. To get understanding of Different Functions and Data Types in Port Driver Module: Their description, their description with respect to parameters that are send to them, and how are those paramters configured via tool.
  3. How to configure different pins in autosar, using Port Driver Module.
  4. To get familiarity with Usecases and how to use different Port Driver Module APIs in what chronology.

Autosar Documentation blogs:

  1. Understanding AUTOSAR and its Applications in the Automotive Industry (einfochips.com)
  2. AUTOSAR_SWS_BSWGeneral.pdf : This document explains the BSW layer configurtaion

What is Port Driver in Autosar?

Port Driver is Part of MCAL Layer in BSW layer of Autosar Stack. Port Driver is responsible for initializing and configuration of microcontroller pins and corresponding ports of those pins. Only Initilization part and configuration part. It initializes and configures pins and ports for various functionalities like: ADC, SPI, I2C, Ethernet, PWM and etc. According to alternate function pin mapping configurations of microcontroller.

The Pins and ports which are configured by Port Driver Module, are used by the DIO (Digital Input/Output) Driver module. Only the pins and ports which are configured by Port Driver will be used by DIO Driver Module.

Port Driver Module Provide following important functional specifications:

  1. Direction setting of Microcontroller pins (Input/Output).
  2. Initial value setting of microcontroller pin.
  3. Activation of Internal Pull-ups for microcontroller pin.
  4. Slew Rate control for microcontroller pins.

Microcontroller Alternate function/GPIO registers are used by this layer.

Important Data Types in Port Driver:

  1. Port_ConfigType:
  2. Port_PinType:
  3. Port_PinDirectionType:
  4. Port_PinModeType: 
  5.  

Important Functions in Port Driver:

  1. Port_Init :
  2. Port_SetPinDirection: 
  3. Port_RefreshPortDirection:
  4. Port_SetPinMode

Documents to refer for Port Driver.

  1. AUTOSAR_SWS_PortDriver.pdf : This specification specifies the functionality, API and the configuration of the
    AUTOSAR Basic Software module PORT Driver.
  2.  

Important points of Port Driver?

  1. This PORT driver module completes the overall configuration and initialization of the port structure which is used in the DIO driver module. Therefore, the DIO driver works on pins and ports which are configured by the PORT driver.
  2.  

Important Data Types in Port Driver:

  1. Port_ConfigType:
  2. Port_PinType:
  3. Port_PinDirectionType:
  4. Port_PinModeType: 
  5. Port_PinConfigType:
  6. Port_UnUsedPinConfigType:
  7. Port_Ci_Port_Ip_DigitalFilterConfigType:
  8. Port_Ci_Port_Ip_PinSettingsConfig:

Author

Kunal Gupta

Leave a comment

Stay Updated With Us

Error: Contact form not found.

      Blog