SlideShare a Scribd company logo
1 of 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)

More Related Content

Similar to 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 to 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
 

More from 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
 

More from 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
 

Recently uploaded

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 

Recently uploaded (20)

Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 

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?