logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

In this homework, you are expected to implement some functions with Assembly using interrupts and GPIO.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

 

1 Introduction

In this homework, you are expected to implement some functions with Assembly using interrupts and GPIO.

 

2 Part 1-Pooling

In convolutional neural networks, an input image is fed into the network and the features of that image are learnt through the network. During learning phase, convolutional and pooling layers are used to extract features of the image. Pool- ing layers reduces the dimensions and decrease the number of computations and computation time significantly. There are two types of pooling, maximum pool- ing and average pooling, respectively. In maximum pooling, the input matrix is checked through filters and the maximum element in that filter is written to the output matrix. In average pooling, the average of the elements in the filter is computed and written to the output matrix.

 

 

 

Figure 1: Max Pooling with 2x2 filter.

 

In this homework, you are expected to implement the given pooling mechanisms. You are given 4 arrays with 10 elements which are representing the rows of the matrix respectively. Your filter size is 2x2 and your stride is (2,2) meaning that after you applied pooling to a section, you must go 2 rows forward similar to Figure-1.  You should use SysTick as timer and your filtering operation must occur during the SysTick interrupt. After reading the arrays and activating the

 

 

 

 

 

SysTick timer, you pass your filter through the arrays, determine the maximum element in the filter and write your determined value to the memory. At the end of the operation, you should obtain a 2x5 matrix with the maximum values obtained from the filters.

The process for the average pooling is similar to the maximum pooling. But this time, the average of the elements must be computed and written to the memory. Be careful that all filtering processes must be done in interrupt. In your main code, you can only write your interrupt outputs to the memory.

The activation of the SysTick timer in Startup file is given below. You basi- cally need to comment the default handler and enter the name of your SysTick interrupt service routine. Do not forget to export your interrupt service routine so that your interrupt can be handled without any issues.

 

 

 

Figure 2: SysTick configuration in Startup file.

 

IMPORTANT NOTE: The registers for SysTick timer are given be- low. You must configure these registers first.

 

 

 

Figure 3: SysTick registers.

 

 

 

 

3 Part 2-Blinking LED

IMPORTANT NOTE: For this part, you need to use MKL25Z4 in- stead of ARM Cortex M0.

 

In this part, you need to write an Assembly code to blink LED on the KL25Z board. The period of LED must be 1 second initially and if the switch is pressed once, the period becomes 2 seconds. If the switch is pressed for the second time, the period becomes 4 seconds and if the switch is pressed for the third time, the period must be reset. The registers of the GPIO in KL25Z board is provided in your lecture notes.

 

While implementing your program, you must consider the debouncing case for the GPIO. Debouncing is called for the case where the input  from  GPIO  is pulled high (or low) quickly at very short interval due to mechanical reasons. Although, you run your programs in a simulator, this is an important problem for GPIOs and you must solve this issue in your programs.

(5/5)
Attachments:

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

784 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

551 Answers

Hire Me
expert
Husnain SaeedComputer science

505 Answers

Hire Me
expert
Atharva PatilComputer science

778 Answers

Hire Me