Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

EE 2 4 2 Laboratory Manual Session 8 : General Purpose Input - Output ( GPIO ) and Interrupt Yeditepe University Spring 2 0 2

EE242 Laboratory Manual
Session 8: General Purpose Input-Output
(GPIO) and Interrupt
Yeditepe University
Spring 2024
Assignment
Assume that the green LED is initially off. Design such a system that by using an interrupt and calling
ISR_callback function (you can define any function), toggle the green LED on the Nucleo L073RZ
board contimuously. The interrupt code in Listing 1 should simply define that the CPU waits in an
infinite loop. When the user presses the button, this loop is interrupted. The CPU executes the function
that you define. Afterward, it turns back and waits in the infinite loop for another interrupt.
a) Fill in the empty blocks in the below C code (in Listing 1) to perform the required
operations.
b) Write also another program using the GPIO method that performs the same tasks as the
Interrupt code snippet given in Listing 1. You should use Mbed Studio.
#undef_ARM_FP
#include "mbed. h"
// Port and interrupt settings
// execute the function ISR_callback, as the button is pressed, turn on or off(toggle) the LED
int main()
{
// LED will be off initially
// generate the interrupt and call the ISR_callback function which is defined by the user
// let the CPU waits in an infinite loop
}
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

Define the goals of persuasive speaking

Answered: 1 week ago