Question: // Name: // Date: // Goal: Use Timer interrupts // Requirements: // 1. a)Calculate PRESCALAR and Auto-reload register values for Timer 6 // Timer 6
// Name: // Date: // Goal: Use Timer interrupts // Requirements: // 1. a)Calculate PRESCALAR and Auto-reload register values for Timer 6 // Timer 6 should interrupt Every 1 second. // b) Initialize GPIOs and Timer 6. // c) Complete Appropriate Interrupt Service Routine. // Complete Timer 6 interrupt requirement before starting Timer 7 // 2. Calculate PRESCALAR and Auto-reload register values for Timer 7 // Timer 7 should interrupt Every 5 seconds. #include "stm32f4xx.h" // Device header //============================================================================= // LEDs and Switches in the Board //============================================================================= //USER LEDs are in PortD #define LED_ORANGE 13 #define LED_GREEN 12 #define LED_RED 14 #define LED_BLUE 15 #define SWITCH 0 //PortA Pin0 -- default pull-down resistor //============================================================================= // main function //============================================================================= // add your code below.. int main(void) { //enable clocks for timer and GPIO LED ports //========================================== //set LEDs as output //================== // Open Chapter 20 - Basic Timers (TIM6&TIM7) // Set up all TIMER 6 registers to meet the 1 second goal //======================================================= Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
