SlideShare una empresa de Scribd logo
1 de 9
EECE237 Spring 2016
Homework #3 due on 5/1 (Sun)
LCE_Hello .c controls multiple I/O ports, GPIOA & E being
two of them. Study the program carefully. We will get into each
of these I/O ports one by one for the rest of the semester. This
homework is to enhance the understanding on how the program
configures and controls GPIOE for the LED's and GPIOA for
the pushbutton, and on how the program configures and controls
I2C for the LCD panel display. Answer the questions below. L
stands for the line number in the program. Type your answers
and submit your work to BB Learner.
Hint:
a)
Place LED_Hello.c inside STM32F3_Base project. Run uVision.
b)
Following each question of the homework, right click on the
relevant system defined functions and the variables, and find
the answers. If necessary, multiple linking may be necessary.
c)
It is acceptable to copy and paste the answers from the program.
(Total 80 points)
1.
GPIO_InitTypeDef (L15)
(5 points)
a.
Name the file and the line number, or the range of numbers, in
that file where this structure type is defined.
b.
List the names of the members in the structure.
2.
GPIOE (L57)
(5 points)
a.
Name the file and the line number in that file where GPIOE is
defined.
b.
What is its offset address of ODR variable from
AHB3PERIPH_BASE in hex number?
c.
What is a variable type of GPIOE?
3.
GPIO_Init (
) (L102)
(5 points)
a.
Name the file and the line number in that file where this
function
is defined.
b.
Read the block comment in the file where the function is
defined.
What does this function do?
4.
RCC_AHBPeriphClockCmd
(RCC_AHBPeriph_GPIOE, ENABLE) (L93) (5 points)
a.
Name the file and the line number, or the range of numbers, in
that file where this function
is defined.
b. What is the hexadecimal number of RCC_AHBPeriph_GPIOE
and where to find it?
c.
What does this function perform? Read the block comment in
the file where the function is defined.
5.
Based on what you have observed, answer the following
questions (20 points)
a.
What is the C code(s) to set RCCAHBENR for GPIOE?
b.
What is the C code(s) to set MODER in GPIOA input for
pin[0]?
c.
What is the C code(s) to set MODER in GPIOE output for all
pins?
d.
What is the C code(s) to write a LED pattern of 0xff00 on
ODR?
1.
I2C_InitTypeDef (L140)
(5 points)
a.
Name the file and the line number, or the range of numbers, in
that file where this structure type is defined.
b.
List the names of the members in the structure.
2.
RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C2,
ENABLE);
(L144) (5 points)
a. Name the file and the line number, or the range of numbers,
in that file where this function
is defined.
b. What is the hexadecimal number of RCC_APB1Periph_I2C2
and where to find it?
c.
What does this function perform? Read the block comment
above the file where the function is defined.
3.
I2C_Cmd(I2C2, ENABLE); (L169) (5 points)
a.
Name the file and the line number, or the range of numbers, in
that file where this function
is defined.
b. What variable does it enable?
c.
What does this function perform? Read the block comment
above the file where the function is defined.
4.
I2C_Init(I2C2, &I2C_InitStructure);
(L168) (5 points)
a.
Name the file and the line number, or the range of numbers, in
that file where this function
is defined.
b.
What does this function perform? Read the block comment
above the file where the function is defined.
5.
I2C_TransferHandling(I2C2, 0x50 , 3, I2C_SoftEnd_Mode,
I2C_Generate_Start_Write); (L177) (5 points)
a.
Name the file and the line number, or the range of numbers, in
that file where this function
is defined.
b. What does
0x50 mean? What is it?
c.
What does this function perform? Read the block comment
above the file where the function is defined.
6.
I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) (L179) (5 points)
a.
Name the file and the line number, or the range of numbers, in
that file where this function
is defined.
b. What flag status does this function get?
c.
What does this function perform? Read the block comment
above the file where the function is defined.
7.
I2C_SendData(I2C2, 0xFE)
(L181) (5 points)
a.
Name the file and the line number, or the range of numbers, in
that file where this function
is defined.
b. To what register is 0xFE written?
c.
What does this function perform? Read the block comment
above the file where the function is defined.
8.
Based on what you have observed, What is the C code(s) to set
RCCAPB1ENR for I2C2?
(5 points)

Más contenido relacionado

Similar a EECE237 Spring 2016Homework #3 due on 51 (Sun)LCE_Hello .c .docx

Gsp 215 Enhance teaching-snaptutorial.com
Gsp 215 Enhance teaching-snaptutorial.comGsp 215 Enhance teaching-snaptutorial.com
Gsp 215 Enhance teaching-snaptutorial.comrobertleew18
 
COMP 2213X2 Assignment #2 Parts A and BDue February 3 in cla.docx
COMP 2213X2 Assignment #2 Parts A and BDue February 3 in cla.docxCOMP 2213X2 Assignment #2 Parts A and BDue February 3 in cla.docx
COMP 2213X2 Assignment #2 Parts A and BDue February 3 in cla.docxdonnajames55
 
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12chinthala Vijaya Kumar
 
Devry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsDevry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsjody zoll
 
Class 12 computer sample paper with answers
Class 12 computer sample paper with answersClass 12 computer sample paper with answers
Class 12 computer sample paper with answersdebarghyamukherjee60
 
Bca1020 programming in c
Bca1020  programming in cBca1020  programming in c
Bca1020 programming in csmumbahelp
 
GSP 215 Technology levels--snaptutorial.com
GSP 215 Technology levels--snaptutorial.comGSP 215 Technology levels--snaptutorial.com
GSP 215 Technology levels--snaptutorial.comsholingarjosh136
 
Gsp 215 Massive Success / snaptutorial.com
Gsp 215  Massive Success / snaptutorial.comGsp 215  Massive Success / snaptutorial.com
Gsp 215 Massive Success / snaptutorial.comNorrisMistryzo
 
Gsp 215 Enthusiastic Study / snaptutorial.com
Gsp 215 Enthusiastic Study / snaptutorial.comGsp 215 Enthusiastic Study / snaptutorial.com
Gsp 215 Enthusiastic Study / snaptutorial.comStephenson101
 
5_2018_08_07!07_51_31_AM.pdf
5_2018_08_07!07_51_31_AM.pdf5_2018_08_07!07_51_31_AM.pdf
5_2018_08_07!07_51_31_AM.pdfBizuayehuDesalegn
 
GSP 215 Education Organization - snaptutorial.com
GSP 215  Education Organization - snaptutorial.comGSP 215  Education Organization - snaptutorial.com
GSP 215 Education Organization - snaptutorial.comdonaldzs192
 
Gsp 215 Effective Communication / snaptutorial.com
Gsp 215  Effective Communication / snaptutorial.comGsp 215  Effective Communication / snaptutorial.com
Gsp 215 Effective Communication / snaptutorial.comHarrisGeorg21
 
C programming languag for cse students
C programming languag for cse studentsC programming languag for cse students
C programming languag for cse studentsAbdur Rahim
 

Similar a EECE237 Spring 2016Homework #3 due on 51 (Sun)LCE_Hello .c .docx (20)

Gsp 215 Enhance teaching-snaptutorial.com
Gsp 215 Enhance teaching-snaptutorial.comGsp 215 Enhance teaching-snaptutorial.com
Gsp 215 Enhance teaching-snaptutorial.com
 
Higher Homework
Higher HomeworkHigher Homework
Higher Homework
 
COMP 2213X2 Assignment #2 Parts A and BDue February 3 in cla.docx
COMP 2213X2 Assignment #2 Parts A and BDue February 3 in cla.docxCOMP 2213X2 Assignment #2 Parts A and BDue February 3 in cla.docx
COMP 2213X2 Assignment #2 Parts A and BDue February 3 in cla.docx
 
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
 
C++ Constructs.pptx
C++ Constructs.pptxC++ Constructs.pptx
C++ Constructs.pptx
 
Devry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsDevry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and strings
 
Class 12 computer sample paper with answers
Class 12 computer sample paper with answersClass 12 computer sample paper with answers
Class 12 computer sample paper with answers
 
C tutorials
C tutorialsC tutorials
C tutorials
 
Bca1020 programming in c
Bca1020  programming in cBca1020  programming in c
Bca1020 programming in c
 
unit 5-ERTS.pptx
unit 5-ERTS.pptxunit 5-ERTS.pptx
unit 5-ERTS.pptx
 
GSP 215 Technology levels--snaptutorial.com
GSP 215 Technology levels--snaptutorial.comGSP 215 Technology levels--snaptutorial.com
GSP 215 Technology levels--snaptutorial.com
 
Gsp 215 Massive Success / snaptutorial.com
Gsp 215  Massive Success / snaptutorial.comGsp 215  Massive Success / snaptutorial.com
Gsp 215 Massive Success / snaptutorial.com
 
Gsp 215 Enthusiastic Study / snaptutorial.com
Gsp 215 Enthusiastic Study / snaptutorial.comGsp 215 Enthusiastic Study / snaptutorial.com
Gsp 215 Enthusiastic Study / snaptutorial.com
 
5_2018_08_07!07_51_31_AM.pdf
5_2018_08_07!07_51_31_AM.pdf5_2018_08_07!07_51_31_AM.pdf
5_2018_08_07!07_51_31_AM.pdf
 
GSP 215 Education Organization - snaptutorial.com
GSP 215  Education Organization - snaptutorial.comGSP 215  Education Organization - snaptutorial.com
GSP 215 Education Organization - snaptutorial.com
 
Java Programming.pdf
Java Programming.pdfJava Programming.pdf
Java Programming.pdf
 
Express 070 536
Express 070 536Express 070 536
Express 070 536
 
Embedded C.pptx
Embedded C.pptxEmbedded C.pptx
Embedded C.pptx
 
Gsp 215 Effective Communication / snaptutorial.com
Gsp 215  Effective Communication / snaptutorial.comGsp 215  Effective Communication / snaptutorial.com
Gsp 215 Effective Communication / snaptutorial.com
 
C programming languag for cse students
C programming languag for cse studentsC programming languag for cse students
C programming languag for cse students
 

Más de jenkinsmandie

Running Head W2 Case StudiesW2 Case Studies2.docx
Running Head W2 Case StudiesW2 Case Studies2.docxRunning Head W2 Case StudiesW2 Case Studies2.docx
Running Head W2 Case StudiesW2 Case Studies2.docxjenkinsmandie
 
Running head VENICE FAMILY CLINIC 1VENICE FAMILY CLINIC.docx
Running head VENICE FAMILY CLINIC 1VENICE FAMILY CLINIC.docxRunning head VENICE FAMILY CLINIC 1VENICE FAMILY CLINIC.docx
Running head VENICE FAMILY CLINIC 1VENICE FAMILY CLINIC.docxjenkinsmandie
 
Running head VIGNETTE ONEVIGNETTE ONE 2VIGNETTE ONE .docx
Running head VIGNETTE ONEVIGNETTE ONE 2VIGNETTE ONE .docxRunning head VIGNETTE ONEVIGNETTE ONE 2VIGNETTE ONE .docx
Running head VIGNETTE ONEVIGNETTE ONE 2VIGNETTE ONE .docxjenkinsmandie
 
Running Head VIGNETTE ONE2VIGNETTE ONE ANALYSIS.docx
Running Head VIGNETTE ONE2VIGNETTE ONE ANALYSIS.docxRunning Head VIGNETTE ONE2VIGNETTE ONE ANALYSIS.docx
Running Head VIGNETTE ONE2VIGNETTE ONE ANALYSIS.docxjenkinsmandie
 
Running head UNIT 6 ANNOTATED BIBLIOGRAPHY ASSIGNMENT 1 U.docx
Running head UNIT 6 ANNOTATED BIBLIOGRAPHY ASSIGNMENT 1 U.docxRunning head UNIT 6 ANNOTATED BIBLIOGRAPHY ASSIGNMENT 1 U.docx
Running head UNIT 6 ANNOTATED BIBLIOGRAPHY ASSIGNMENT 1 U.docxjenkinsmandie
 
Running head VULNARABE POPULATION 1VULNARABLE POPULATION .docx
Running head VULNARABE POPULATION  1VULNARABLE POPULATION .docxRunning head VULNARABE POPULATION  1VULNARABLE POPULATION .docx
Running head VULNARABE POPULATION 1VULNARABLE POPULATION .docxjenkinsmandie
 
Running head UNDERSTANDING THE TARGET MARKETS .docx
Running head UNDERSTANDING THE TARGET MARKETS                .docxRunning head UNDERSTANDING THE TARGET MARKETS                .docx
Running head UNDERSTANDING THE TARGET MARKETS .docxjenkinsmandie
 
Running head VETERANS PTSD CAUSES, TREATMENTS, AND SUPPORT SYSTEM.docx
Running head VETERANS PTSD CAUSES, TREATMENTS, AND SUPPORT SYSTEM.docxRunning head VETERANS PTSD CAUSES, TREATMENTS, AND SUPPORT SYSTEM.docx
Running head VETERANS PTSD CAUSES, TREATMENTS, AND SUPPORT SYSTEM.docxjenkinsmandie
 
Running head UNITED STATES COAST GUARD1UNITED STATES COAST G.docx
Running head UNITED STATES COAST GUARD1UNITED STATES COAST G.docxRunning head UNITED STATES COAST GUARD1UNITED STATES COAST G.docx
Running head UNITED STATES COAST GUARD1UNITED STATES COAST G.docxjenkinsmandie
 
Running head VALUES AND NORMS INSIDE A TATTOO PARLORVALUES AND .docx
Running head VALUES AND NORMS INSIDE A TATTOO PARLORVALUES AND .docxRunning head VALUES AND NORMS INSIDE A TATTOO PARLORVALUES AND .docx
Running head VALUES AND NORMS INSIDE A TATTOO PARLORVALUES AND .docxjenkinsmandie
 
Running Head VIGNETTE ONE5VIGNETTE ONE ANALYSIS.docx
Running Head VIGNETTE ONE5VIGNETTE ONE ANALYSIS.docxRunning Head VIGNETTE ONE5VIGNETTE ONE ANALYSIS.docx
Running Head VIGNETTE ONE5VIGNETTE ONE ANALYSIS.docxjenkinsmandie
 
Running head USING IT TO MODEL BEHAVIOR FOR POLICY MAKING .docx
Running head USING IT TO MODEL BEHAVIOR FOR POLICY MAKING        .docxRunning head USING IT TO MODEL BEHAVIOR FOR POLICY MAKING        .docx
Running head USING IT TO MODEL BEHAVIOR FOR POLICY MAKING .docxjenkinsmandie
 
Running head USING BENTONITE TO EXTRACT CU2+1USING BENTONITE.docx
Running head USING BENTONITE TO EXTRACT CU2+1USING BENTONITE.docxRunning head USING BENTONITE TO EXTRACT CU2+1USING BENTONITE.docx
Running head USING BENTONITE TO EXTRACT CU2+1USING BENTONITE.docxjenkinsmandie
 
Running Head UNIT 6 ASSIGNMENT 1 .docx
Running Head UNIT 6 ASSIGNMENT 1                                 .docxRunning Head UNIT 6 ASSIGNMENT 1                                 .docx
Running Head UNIT 6 ASSIGNMENT 1 .docxjenkinsmandie
 
Running head UNIT 2 ASSIGNMENT 1 Unit 2 Assignment St.docx
Running head UNIT 2 ASSIGNMENT 1 Unit 2 Assignment St.docxRunning head UNIT 2 ASSIGNMENT 1 Unit 2 Assignment St.docx
Running head UNIT 2 ASSIGNMENT 1 Unit 2 Assignment St.docxjenkinsmandie
 
Running head Uber Case Study2Uber Case Study.docx
Running head Uber Case Study2Uber Case Study.docxRunning head Uber Case Study2Uber Case Study.docx
Running head Uber Case Study2Uber Case Study.docxjenkinsmandie
 
Running Head Unit I1Running Head Unit IUnit I.docx
Running Head Unit I1Running Head Unit IUnit I.docxRunning Head Unit I1Running Head Unit IUnit I.docx
Running Head Unit I1Running Head Unit IUnit I.docxjenkinsmandie
 
Running Head TYPOLOGY 1 TYPOLOGY 5 Typology The s.docx
Running Head TYPOLOGY 1 TYPOLOGY 5 Typology The s.docxRunning Head TYPOLOGY 1 TYPOLOGY 5 Typology The s.docx
Running Head TYPOLOGY 1 TYPOLOGY 5 Typology The s.docxjenkinsmandie
 
Running head U.S. HEALTHCARE EXECUTIVES 1U.S. HEALTHCARE EX.docx
Running head U.S. HEALTHCARE EXECUTIVES 1U.S. HEALTHCARE EX.docxRunning head U.S. HEALTHCARE EXECUTIVES 1U.S. HEALTHCARE EX.docx
Running head U.S. HEALTHCARE EXECUTIVES 1U.S. HEALTHCARE EX.docxjenkinsmandie
 
Running head TYPE THE TITLE OF YOUR PAPER HERE1TYPE THE T.docx
Running head TYPE THE TITLE OF YOUR PAPER HERE1TYPE THE T.docxRunning head TYPE THE TITLE OF YOUR PAPER HERE1TYPE THE T.docx
Running head TYPE THE TITLE OF YOUR PAPER HERE1TYPE THE T.docxjenkinsmandie
 

Más de jenkinsmandie (20)

Running Head W2 Case StudiesW2 Case Studies2.docx
Running Head W2 Case StudiesW2 Case Studies2.docxRunning Head W2 Case StudiesW2 Case Studies2.docx
Running Head W2 Case StudiesW2 Case Studies2.docx
 
Running head VENICE FAMILY CLINIC 1VENICE FAMILY CLINIC.docx
Running head VENICE FAMILY CLINIC 1VENICE FAMILY CLINIC.docxRunning head VENICE FAMILY CLINIC 1VENICE FAMILY CLINIC.docx
Running head VENICE FAMILY CLINIC 1VENICE FAMILY CLINIC.docx
 
Running head VIGNETTE ONEVIGNETTE ONE 2VIGNETTE ONE .docx
Running head VIGNETTE ONEVIGNETTE ONE 2VIGNETTE ONE .docxRunning head VIGNETTE ONEVIGNETTE ONE 2VIGNETTE ONE .docx
Running head VIGNETTE ONEVIGNETTE ONE 2VIGNETTE ONE .docx
 
Running Head VIGNETTE ONE2VIGNETTE ONE ANALYSIS.docx
Running Head VIGNETTE ONE2VIGNETTE ONE ANALYSIS.docxRunning Head VIGNETTE ONE2VIGNETTE ONE ANALYSIS.docx
Running Head VIGNETTE ONE2VIGNETTE ONE ANALYSIS.docx
 
Running head UNIT 6 ANNOTATED BIBLIOGRAPHY ASSIGNMENT 1 U.docx
Running head UNIT 6 ANNOTATED BIBLIOGRAPHY ASSIGNMENT 1 U.docxRunning head UNIT 6 ANNOTATED BIBLIOGRAPHY ASSIGNMENT 1 U.docx
Running head UNIT 6 ANNOTATED BIBLIOGRAPHY ASSIGNMENT 1 U.docx
 
Running head VULNARABE POPULATION 1VULNARABLE POPULATION .docx
Running head VULNARABE POPULATION  1VULNARABLE POPULATION .docxRunning head VULNARABE POPULATION  1VULNARABLE POPULATION .docx
Running head VULNARABE POPULATION 1VULNARABLE POPULATION .docx
 
Running head UNDERSTANDING THE TARGET MARKETS .docx
Running head UNDERSTANDING THE TARGET MARKETS                .docxRunning head UNDERSTANDING THE TARGET MARKETS                .docx
Running head UNDERSTANDING THE TARGET MARKETS .docx
 
Running head VETERANS PTSD CAUSES, TREATMENTS, AND SUPPORT SYSTEM.docx
Running head VETERANS PTSD CAUSES, TREATMENTS, AND SUPPORT SYSTEM.docxRunning head VETERANS PTSD CAUSES, TREATMENTS, AND SUPPORT SYSTEM.docx
Running head VETERANS PTSD CAUSES, TREATMENTS, AND SUPPORT SYSTEM.docx
 
Running head UNITED STATES COAST GUARD1UNITED STATES COAST G.docx
Running head UNITED STATES COAST GUARD1UNITED STATES COAST G.docxRunning head UNITED STATES COAST GUARD1UNITED STATES COAST G.docx
Running head UNITED STATES COAST GUARD1UNITED STATES COAST G.docx
 
Running head VALUES AND NORMS INSIDE A TATTOO PARLORVALUES AND .docx
Running head VALUES AND NORMS INSIDE A TATTOO PARLORVALUES AND .docxRunning head VALUES AND NORMS INSIDE A TATTOO PARLORVALUES AND .docx
Running head VALUES AND NORMS INSIDE A TATTOO PARLORVALUES AND .docx
 
Running Head VIGNETTE ONE5VIGNETTE ONE ANALYSIS.docx
Running Head VIGNETTE ONE5VIGNETTE ONE ANALYSIS.docxRunning Head VIGNETTE ONE5VIGNETTE ONE ANALYSIS.docx
Running Head VIGNETTE ONE5VIGNETTE ONE ANALYSIS.docx
 
Running head USING IT TO MODEL BEHAVIOR FOR POLICY MAKING .docx
Running head USING IT TO MODEL BEHAVIOR FOR POLICY MAKING        .docxRunning head USING IT TO MODEL BEHAVIOR FOR POLICY MAKING        .docx
Running head USING IT TO MODEL BEHAVIOR FOR POLICY MAKING .docx
 
Running head USING BENTONITE TO EXTRACT CU2+1USING BENTONITE.docx
Running head USING BENTONITE TO EXTRACT CU2+1USING BENTONITE.docxRunning head USING BENTONITE TO EXTRACT CU2+1USING BENTONITE.docx
Running head USING BENTONITE TO EXTRACT CU2+1USING BENTONITE.docx
 
Running Head UNIT 6 ASSIGNMENT 1 .docx
Running Head UNIT 6 ASSIGNMENT 1                                 .docxRunning Head UNIT 6 ASSIGNMENT 1                                 .docx
Running Head UNIT 6 ASSIGNMENT 1 .docx
 
Running head UNIT 2 ASSIGNMENT 1 Unit 2 Assignment St.docx
Running head UNIT 2 ASSIGNMENT 1 Unit 2 Assignment St.docxRunning head UNIT 2 ASSIGNMENT 1 Unit 2 Assignment St.docx
Running head UNIT 2 ASSIGNMENT 1 Unit 2 Assignment St.docx
 
Running head Uber Case Study2Uber Case Study.docx
Running head Uber Case Study2Uber Case Study.docxRunning head Uber Case Study2Uber Case Study.docx
Running head Uber Case Study2Uber Case Study.docx
 
Running Head Unit I1Running Head Unit IUnit I.docx
Running Head Unit I1Running Head Unit IUnit I.docxRunning Head Unit I1Running Head Unit IUnit I.docx
Running Head Unit I1Running Head Unit IUnit I.docx
 
Running Head TYPOLOGY 1 TYPOLOGY 5 Typology The s.docx
Running Head TYPOLOGY 1 TYPOLOGY 5 Typology The s.docxRunning Head TYPOLOGY 1 TYPOLOGY 5 Typology The s.docx
Running Head TYPOLOGY 1 TYPOLOGY 5 Typology The s.docx
 
Running head U.S. HEALTHCARE EXECUTIVES 1U.S. HEALTHCARE EX.docx
Running head U.S. HEALTHCARE EXECUTIVES 1U.S. HEALTHCARE EX.docxRunning head U.S. HEALTHCARE EXECUTIVES 1U.S. HEALTHCARE EX.docx
Running head U.S. HEALTHCARE EXECUTIVES 1U.S. HEALTHCARE EX.docx
 
Running head TYPE THE TITLE OF YOUR PAPER HERE1TYPE THE T.docx
Running head TYPE THE TITLE OF YOUR PAPER HERE1TYPE THE T.docxRunning head TYPE THE TITLE OF YOUR PAPER HERE1TYPE THE T.docx
Running head TYPE THE TITLE OF YOUR PAPER HERE1TYPE THE T.docx
 

Último

What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 

Último (20)

What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 

EECE237 Spring 2016Homework #3 due on 51 (Sun)LCE_Hello .c .docx

  • 1. EECE237 Spring 2016 Homework #3 due on 5/1 (Sun) LCE_Hello .c controls multiple I/O ports, GPIOA & E being two of them. Study the program carefully. We will get into each of these I/O ports one by one for the rest of the semester. This homework is to enhance the understanding on how the program configures and controls GPIOE for the LED's and GPIOA for the pushbutton, and on how the program configures and controls I2C for the LCD panel display. Answer the questions below. L stands for the line number in the program. Type your answers and submit your work to BB Learner. Hint: a) Place LED_Hello.c inside STM32F3_Base project. Run uVision. b) Following each question of the homework, right click on the relevant system defined functions and the variables, and find the answers. If necessary, multiple linking may be necessary. c) It is acceptable to copy and paste the answers from the program. (Total 80 points) 1. GPIO_InitTypeDef (L15) (5 points) a.
  • 2. Name the file and the line number, or the range of numbers, in that file where this structure type is defined. b. List the names of the members in the structure. 2. GPIOE (L57) (5 points) a. Name the file and the line number in that file where GPIOE is defined. b. What is its offset address of ODR variable from AHB3PERIPH_BASE in hex number? c. What is a variable type of GPIOE? 3. GPIO_Init (
  • 3. ) (L102) (5 points) a. Name the file and the line number in that file where this function is defined. b. Read the block comment in the file where the function is defined. What does this function do? 4. RCC_AHBPeriphClockCmd (RCC_AHBPeriph_GPIOE, ENABLE) (L93) (5 points) a. Name the file and the line number, or the range of numbers, in that file where this function is defined. b. What is the hexadecimal number of RCC_AHBPeriph_GPIOE and where to find it? c.
  • 4. What does this function perform? Read the block comment in the file where the function is defined. 5. Based on what you have observed, answer the following questions (20 points) a. What is the C code(s) to set RCCAHBENR for GPIOE? b. What is the C code(s) to set MODER in GPIOA input for pin[0]? c. What is the C code(s) to set MODER in GPIOE output for all pins? d. What is the C code(s) to write a LED pattern of 0xff00 on ODR? 1.
  • 5. I2C_InitTypeDef (L140) (5 points) a. Name the file and the line number, or the range of numbers, in that file where this structure type is defined. b. List the names of the members in the structure. 2. RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C2, ENABLE); (L144) (5 points) a. Name the file and the line number, or the range of numbers, in that file where this function is defined. b. What is the hexadecimal number of RCC_APB1Periph_I2C2 and where to find it? c. What does this function perform? Read the block comment above the file where the function is defined.
  • 6. 3. I2C_Cmd(I2C2, ENABLE); (L169) (5 points) a. Name the file and the line number, or the range of numbers, in that file where this function is defined. b. What variable does it enable? c. What does this function perform? Read the block comment above the file where the function is defined. 4. I2C_Init(I2C2, &I2C_InitStructure); (L168) (5 points) a. Name the file and the line number, or the range of numbers, in that file where this function is defined. b. What does this function perform? Read the block comment
  • 7. above the file where the function is defined. 5. I2C_TransferHandling(I2C2, 0x50 , 3, I2C_SoftEnd_Mode, I2C_Generate_Start_Write); (L177) (5 points) a. Name the file and the line number, or the range of numbers, in that file where this function is defined. b. What does 0x50 mean? What is it? c. What does this function perform? Read the block comment above the file where the function is defined. 6. I2C_GetFlagStatus(I2C2, I2C_ISR_TXIS) (L179) (5 points) a. Name the file and the line number, or the range of numbers, in that file where this function is defined.
  • 8. b. What flag status does this function get? c. What does this function perform? Read the block comment above the file where the function is defined. 7. I2C_SendData(I2C2, 0xFE) (L181) (5 points) a. Name the file and the line number, or the range of numbers, in that file where this function is defined. b. To what register is 0xFE written? c. What does this function perform? Read the block comment above the file where the function is defined. 8. Based on what you have observed, What is the C code(s) to set RCCAPB1ENR for I2C2?