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.
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.
- Install Code Composer Studio (CCS): Ensure CCS is installed and configured for Tiva C.
- Download and Install TivaWare: Obtain the TivaWare software package and extract it to your working directory.
- Start a New Project: Open CCS and create a new project for the TM4C123GH6PM.
- Configure the Target: Set the correct microcontroller model and other relevant settings.
- Understand AUTOSAR Port Driver Requirements: Refer to the AUTOSAR specification for Port Driver (AUTOSAR_SWS_PortDriver).
- Define Port Driver API: Implement the required functions such as
Port_Init
,Port_SetPinDirection
,Port_RefreshPortDirection
,Port_GetVersionInfo
, andPort_SetPinMode
.