Porting AUTOSAR Port Driver on Tiva C

This guide provides a step-by-step description of porting an AUTOSAR-compliant Port Driver onto the Tiva C microcontroller platform. The Port Driver is responsible for abstracting and controlling the microcontroller's General-Purpose Input/Output (GPIO) ports in compliance with the AUTOSAR standard.

Prerequisites

Before starting the porting process, ensure you have the following:

  • Tiva C Series Microcontroller: Specifically, the TM4C123GH6PM model is used for this guide.
  • Development Environment: Texas Instruments' Code Composer Studio (CCS) or any other compatible IDE.
  • AUTOSAR Port Driver Specification: To understand the standard requirements and interfaces.
  • Basic Knowledge of AUTOSAR: Understanding of the AUTOSAR architecture and the role of the Port Driver.

Steps for Porting

1. Setup Development Environment

  1. Install Code Composer Studio (CCS): Ensure CCS is installed and configured for Tiva C.
  2. Download and Install TivaWare: Obtain the TivaWare software package and extract it to your working directory.

2. Create Project in CCS

  1. Start a New Project: Open CCS and create a new project for the TM4C123GH6PM.
  2. Configure the Target: Set the correct microcontroller model and other relevant settings.

3. Implement AUTOSAR Port Driver Interface

  1. Understand AUTOSAR Port Driver Requirements: Refer to the AUTOSAR specification for Port Driver (AUTOSAR_SWS_PortDriver).
  2. Define Port Driver API: Implement the required functions such as Port_Init, Port_SetPinDirection, Port_RefreshPortDirection, Port_GetVersionInfo, and Port_SetPinMode.