Question: 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
}
 EE242 Laboratory Manual Session 8: General Purpose Input-Output (GPIO) and Interrupt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!