Answered step by step
Verified Expert Solution
Question
1 Approved Answer
// 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started