List the names of the members in the structure

Assignment Help C/C++ Programming
Reference no: EM131044155

Assignment

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.

1. GPIO_InitTypeDef (L15)

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)

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)

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)

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

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)

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)

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)

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)

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)

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)

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?

Reference no: EM131044155

Questions Cloud

Riskier stock exceed the required return : Stock R has a beta of 1.9, Stock S has a beta of 0.35, the expected rate of return on an average stock is 9%, and the risk-free rate is 5%. By how much does the required return on the riskier stock exceed the required return on the riskier stock exce..
Identify strengths and weaknesses internal : Identify strengths and weaknesses internal to the organization. Using the information you gathered in step one, continue your case study analysis by examining and making a list of the value creation functions of the company. For example, the compa..
Chosen to develop for your training program : In Unit 2, you chose a topic around which to practice the steps in creating a training program. For this assignment, use the topic you chose to perform a training needs analysis in order to identify gaps in trainee knowledge and identify the objec..
Ethics code comparison : The assignment: The following is what is required for the ethics code comparison:
List the names of the members in the structure : Name the file and the line number, or the range of numbers, in that file where this structure type is defined. List the names of the members in the structure.
Identify the place of business : Consider your current employer or the employer of a friend or close family member and respond to these points in your initial post (question/answer format not essay. 1-3 sentences per question is just fine):
Write a hipaa-compliant release of information policy : Given what you've read in this article, write a HIPAA-compliant Release of Information Policy and Procedure for Faxing Protected Health Information. Also compose a memo to accompany your policy and procedure and addressed to your hospital administ..
Experienced some training during your life-some : You have most likely experienced some training during your life-some of it good and to the point, and some of it maybe not so good.For example:
The effects of cfrp orientation on the strengthening : Prepare a literature review of given article. Article - The effects of CFRP orientation on the strengthening of reinforced concrete structures

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a recursive definition that reverses the elements

Write a recursive definition that reverses the elements in intArray between low and high.

  Write a c function called resistance which reads adc channel

Write a C function called sensor to read the status of all sensors and return a single byte (short int) whose value is 0 if no sensor is active, 1 if the ‘core placed' sensor is active, 2 if the ‘winder' sensor is active, or 3 if the ‘test point' ..

  Write a c++ code for how to learn oop

Write a C++ code for How to learn OOP (Object oriented programming) by CPP(C Plus Plus) - general-purpose programming language

  Write in c++ another overloaded operator

Write in C++ another overloaded operator to go in the program that has Treasury. Overload the forward slash /  so that in the main program, you can declare sale to be of type Treasury, and commission to be of type Treasury, and commispctage to be of ..

  Write a test program that prompts the user to enter an index

Rewrite the fib method in Listing 18.2 using iterations. Hint: To compute fib(n) without recursion, you need to obtain fib(n - 2) and fib(n - 1) first. Let f0 and f1 denote the two previous Fibonacci numbers. The current Fibonacci number would the..

  Dynamicword.h contains a class definition

Consider the following main function.  Assume that DynamicWord.h contains a class definition for a class called DynamicWord that holds a pointer to a dynamic array as a private data member, but the assignment operator (=) has not been overloaded for ..

  Describe the purpose of the hierarchical nature of

q1. explain the purpose of the hierarchical nature of traditional structured design.q2. describe what kinds of systems

  Write a simple guessing game

In this lab, you will write a simple guessing game. The computer will generate a random integer within a valid specified range, inclusive (min, max) read in from a text file

  Cashregister class that can be used with the retailitem clas

Write a CashRegister class that can be used with the RetailItem class that you wrote in Part 1. The CashRegister class should simulate the sale of a retail item. It should have a constructor that accepts a RetailItem object as an argument.

  Write c program that outputs success positive float values

Look for the float.h include file on the system that hosts the C compiler that you use. What is the value for FLT_MANT_DIG, the number of significant digits that a float variable can have? Write a C program that outputs successively smaller positi..

  Prepare a test plan for the test of option code field

If the customer did not make any room reservation options, the front desk clerks should enter "none"; the field should not be blank. The valid option codes are four-character alphabetic codes and should be matched against a list of valid codes. Pr..

  Mechanism to achieve secure key exchange

In 1976 Diffie and Hellman have suggested their famous protocol for key exchange based on number theory. More recently (around 2002) I. Kanter, W. Kinzel and E. Kanter [1] proposed to use neural networks synchronization by mutual learning as the m..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd