/Blinking-LED

Utalizing the peripherals of ARM Cortex v4 Architechture and tm4c123 (Tiva C) Microcontroller to build a Runtime Configurable Blinking LEDs Mcal/HAL and App layers

Primary LanguageCMIT LicenseMIT

Blinking-LED

Utalizing the peripherals of ARM Cortex v4 Architechture and tm4c123 (Tiva C) Microcontroller to build a Runtime Configurable Blinking LEDs Mcal/HAL and App layers


Runtime Configurable LEDs using ARM Cortex v4 Architecture and tm4c123 Microcontroller



Disclaimer : This project is part of "Advanced Embedded Systems" Nanodegree attended at Udacity and FWD program.

Project Requirements:

1) Building Mcal/Hal layers for the microcontrollers including :


◇ Implementing "Mcu_HW.h" file used for microcontroller hardware abstraction, includes Macros for Registers in the MCU peripheral
◇ Implementing the GPIO driver, the driver provides APIs for Initializing_GPIO_Port to work with some functionality using either AHB/APB, Read/Write/Toggle_DIO Pins, implementing the driver API , Driver_DataTypes and user configuration .c/.h files

◇ Implementing SysTic_Timer Driver, the driver provides APIs for Intializing_Systic_Timer with the required functionalities including Configure_Tick_Period - Enable/Disable_Systic_Interrupt - Start/Stop_Timer, implementing the driver API , Driver_DataTypes and user configuration .c/.h files

◇ Implementing Interrupt NVIC Driver, the driver provides APIs for Intializing_Interrupt at Core-Level NVIC-Level Peripheral-Level and the required Group/Subgroup Priority, implementing the driver API , Driver_DataTypes and user configuration .c/.h files


2) Building Application Layer for the program :

◇ Implementing ISRs
◇ Callback Function
◇ main.c includes Drivers Initialization
◇ User_Configs.h file for user configurations

3) Project testing :

Testing the project operation using Keil Debugging Session and ensure ensure sucessful configurations for the Registers and variables

Project Idea of Operation:

⇒ Main Operation

> SysTic Timer intialized to generate periodic interrupt every 1sec
> User specify the ON/OFF Time as function of SysTic Timer Tics (example 3secs is 3 SysTics)
> Toggle Algorithms runs every Tic to take the decision of toggle or not

⇒ Toggle Algorithm :

> Algorithm counts the Tics and compare the current tick with the pre-specified On/OFF Time to toggle at the end of each and reset the counter, algorithm runs at the callback function get called at SysTic Interrupt

⇒ Configuring ON/OFF Time During Runtime
> On/OFF time is set using static variables
> 3 GPIO Pins are configuredto generate interrupts
→ Interrupt1 used to increment Time
→ Interrupt2 used to decrement Time
→ Interrupt3 used to specify Increment/Decrement Operation is for ON or OFF Time according to the interrupting edge (Raising edge for ON / faling edge for decrement)