Midterm 1

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Assume oldStatus and updatedStatus are two integers. Which code segment sets bit 4 to one, toggles bit 5 and resets bit 6 to zero? (Bit 0 is the Least Significant Bit) Hint: << represents logical shift. 1<<1 creates 0x2.

#define bit4_mask (1<<4) #define bit5_mask (1<<5) #define bit6_mask (1<<6) updatedStatus = oldStatus | bit4_mask; updatedStatus = updatedStatus & ~(bit6_mask); updatedStatus = updatedStatus ^ bit5_mask;

Which expression could be untrue if the nth bit of the integer a is 0?

((a>>n) == 0)

Which one is bit 23 mask or BIT23?

(1<<23)

A single-bit bitmask is a bitstring where all the bits are 0 except for a single bit, which is 1. If that single bit is located at index i, we call the bitmask BITi. For example, BIT0 is equal to 1 and BIT1 is equal to 2 and BIT2 is equal to 4, and so on. If we intend to reset bits 10 and 20 of an integer, and we like to create a macro mask, what should go in the blank space below? #define NEW_MASK ....x = x & ~NEW_MASK;

(BIT10 | BIT20)

A C expression to compute a * 19 (a times 19) is: (Recall that one time shift to left doubles an integer. )

(a << 4) + (a << 1) + a;

Assume that we wish to configure a button to the MSP432 digital i/o. The button works such that when it is not pressed it gives logic 1 and when it is pressed, it is in high impedance mode. What are the minimum lines of code to program this digital i/o? Assume the button is going to be connected to Pin 2 of Port 3. Also, assume all the register addresses are correct based on the datasheet in all four options below.

*P3DIR_address &= ~(1<<2);*P3REN_address |= (1<<2);*P3OUT_address &= ~(1<<2);

Which statement is true?

- MSP432 is on the Launchpad. - Launchpad is on the MSP432. - XDS110 is on the MSP432. - MSP432 is on the XDS110.

Which file types are mostly or entirely in machine language binary and unintelligible to humans?

- Object File - Executable File

Which one of the following is not part of MSP432 MCU?

- Simple peripherals such as buttons and LEDs - Blocks that are in charge of reset, clock and power - Several timers - Different types of memory including ROM, SRAM and flash - Analog interface including ADC (Analog to Digital Converter) - Digital interface including UART SPI, I2C, I/O ports - CPU

Which statement is correct?

- Two gates cannot share a certain wire as their output as it may cause a short in the circuit. - Two gates cannot share a certain wire as their input as it may cause a short in the circuit. - Two gates cannot share a certain wire as their input as it can slow down the circuit. - Two gates cannot share a certain wire as their output as it can slow down the circuit.

What is the lowest number that can be stored in a signed short? (Hint: A C short is two bytes.)

-2^15

Which one of the following numbers can fit in a 2's complement 16-bit register?

-2^15

A UART module shares a clock with the processor core that is 4MHz. The Baudrate is set at 10,000 baud/sec. What is the length of time the UART has to wait between sampling two consecutive bits?

0.1 ms

Consider a communication scheme where the bitrate is 1 Mbit/sec. The bits are packaged as packets of 20 bits, where 4 bits are used to specify the start and stop of the package and other protocol-related information. The rest of the bits are data bit. What is the data rate (in bits per second)?

0.8M

End your debugging session using the red square (stop) button. Add the following lines to the end of the code before the while(1) loop, at about line 90: unsigned long long M[2] = {0x1122334455667788, 0xaabbccddeeff0011};unsigned long long *Mptr = M+1; long long is an integer form that takes 8 bytes of space. If the array M is located at address 0x2000FFA8, what do you think the value of Mptr should be? Make a guess, but do not answer. Debug the code and see if you were right. Answer the correct answer below.

0x2000FFB0

What is the clock frequency of a processor whose clock period is 1ms?

1 KHz

Consider a Schmitt trigger with two thresholds at 1.4V and 1.6V. Also, assume the logic 0 is 0V, and logic 1 is 3V. 1. What is the output of the Schmitt trigger when the input is 0.2V? 2. What is the output of the Schmitt trigger when the input is 1.55V? 3. What is the output of the Schmitt trigger when the input is 2.33V?

1. 0V 2. We cannot tell. It depends. 3. 3V

Match the registers with their addresses. 1. P1IN 2. P2REN 3. P1SEL0 4. UCB2RXBUF

1. 0x40004C00 2. 0x40004C07 3. 0x40004C0A 4. 0x4000280C

On the Launchpad board, Button 2 is connected to Port __ , Pin ___ and the red LED is connected to Port ___ , Pin ___.

1. 1 2. 4 3. 2 4. 0

On the Launchpad board, Button 2 is connected to Port ___ , Pin ____ and the green LED2 is connected to Port ____, Pin ____.

1. 1 2. 4 3. 2 4. 1

A 16-bit periodic count-down timer uses a clock source of 2KHz and clock divider of 2, choose proper options for: 1. How much is the frequency of the clock that feeds the counter inside this timer? 2. What is the largest Load value for this timer? 3. Based on the answer to part 2, approximately, how long is the longest period for this periodic timer? 4. Assume the Load value is set at 999 and no rollover has happened between events, e1 and e2. If the counter reading (the value inside the counter) for the two events, c1 and c2, are 550 and 200, how long has elapsed between the two events? 5. Assume the load value is 9999. Once an event, e1, happens, the light should turn on and stay on for 3 seconds. If the counter value when e1 happens is 2000 and we immediately turn on the light, what should be the counter value when we have to turn off the light (after 3 seconds)?

1. 1 KHz 2. 2^16 - 1 3. 65.536 s 4. 350 ms 5. 9000

Order the below abstraction levels from low to high:

1. Atoms 2. Transistors 3. Gates 4. Digital Circuits 5. Architectural units such as cash, register file, FIFO, ALU 6. System components such as CPU, UART, RAM

For each of the below components, choose if they are located on the BoosterPack (B), the Launchpad (L), or the MSP432 chip (M). (Note: We know MSP432 is on the Launchpad and anything on the MSP432 chip is on the Launchpad as well. We also know that BoosterPack is connected to and sits on top of Launchpad and therefore, in a way anything on BoosterPack, it is on the Launchpad as well. For the purpose of this question, if a component is on MSP432 or the BoosterPack, choose these two rather than the Launchpad. Choose Launchpad only if the component is sitting directly on Launchpad.) 1. The tri-color LED that can be driven by PWM 2. The tri-color LED that cannot be driven by PWM 3. Joystick 4. ADC (Analog-to-Digital Converter) 5. Large round S1 and S2 buttons 6. Timer_A 7. Timer32 8. UART 9. micro-USB port 10. Debugger chip

1. B 2. L 3. B 4. M 5. B 6. M 7. M 8. M 9. L 10. L

1. The tool that translates high-level language to assembly is called: 2. The tool that combines object files to create one executable is called: 3. The tool that translates assembly to machine code is called:

1. Compiler 2. Linker 3. Assembler

Consider the below snippet of code. void increaseCounter_Local(); void increaseCounter_static(); void increaseCounter_pointer(int *counter_p); int = 0; int main(void){ int counter = 0 while (n < 5){ increaseCounter_Local(); increaseCounter_static(); increaseCounter_pointer(&counter_p); n++; } char *str; str = (char *) malloc(15); strcopy(str, "Class example"); } void increaseCounter_Local(){ int localCounter = 0; localCounter++; } void increaseCounter_static(){ static int staticCounter = 0; staticCounter++; } void increaseCounter_pointer(int *counter_p){ *counter_p += 1; } Choose where each of the below entities resides in what part of the memory layout. T stands for Text, D for Data, H for Heap, and S for Stack. 1. n 2. local Counter 3. staticCounter 4. the code for increasCounter_static() function 5. str (the pointer itself) 6. content of str (where "Class Example" is stored.) 7. counter 8. the code for main()

1. D 2. S 3. D 4. T 5. S 6. H 7. S 8. T

Pick True/False 1. A computer is a device that has a keyboard and a monitor and can run arithmetic and logical operations. 2. All computer systems are embedded systems. 3. All embedded systems are computer systems. 4. Embedded systems always use low-end microcontrollers rather than high-end microprocessors. 5. When modern computer systems were first invented, most computers were general purpose. However, in today's world, more than 98% of computer systems are embedded systems.

1. F 2. F 3. T 4. F 5. T

Pick T/F 1. One single port has multiple memory addresses that are associated with different pins. 2. One single port has multiple memory addresses that are associated with different functionalities. 3. One single port has one single memory address. 4. One single pin has one single memory address.

1. F 2. T 3. F 4. F

Choose T/F for True and False. 1. A static in C is a variable that is constant and does not change. 2. A static variable is stored on the stack. 3. A static variable defined within function Func1 can be accessed from outside Func1 by other functions. 4. A static variable defined within function Func1 holds its value after Func1 finishes. The next time Func1 starts the old value of the static variable is still available.

1. False 2. False 3. False 4. True

Choose T/F. 1. A programmer is not able to change the functionality of a digital I/O after the chip is manufactured with a certain configuration. 2. A programmer is not able to change the functionality of a digital I/O after the chip is placed on a PCB board with certain peripherals and a specific configuration. 3. A programmer is able to change the configuration of a digital I/O at any time.

1. False 2. False 3. True

1. In memory-mapped i/o, peripherals and memory certainly share an address bus. 2. In memory-mapped i/o, peripherals and memory certainly share a data bus. 3. In memory-mapped i/o, peripherals and memory certainly share the same address space. 4. In memory-mapped i/o, memory and the peripherals can share address bus and data bus. 5. In memory-mapped i/o, the processor uses the same instruction for reading from memory and reading from an i/o.

1. False 2. False 3. True 4. True 5. True

1. In UART, sender, and transmitter share a clock signal. 2. In UART, baud rate is equal to bit rate. 3. In UART, bit rate is equal to data rate.

1. False 2. True 3. False

Choose T/F from the drop-down menu: 1. API is a special form of HAL. 2. HAL is a special form of API. 3. HAL functions can be found in the driverlib manual. 4. We can use driverlib functions to develop (implement or write the code for) HAL. 5. HAL stands for Hardware Abstraction Level. 6. Driverlib is a form of API. 7. Driverlib is a form of HAL.

1. False 2. True 3. False 4. True 5. False 6. True 7. False

Choose T/F. 1. In MSP432, a digital I/O cannot be used for any other purpose such as an analog input. 2. In MSP432, any digital I/O pin can be configured to be a digital input. 3. In MSP432, any digital I/O pin can be configured to be a digital output. 4. In MSP432, a digital input can use any of these three options: 1) attached pull-up resistor, 2) attached pull-down resistor, 3) no attached resistor.

1. False 2. True 3. True 4. True

SPI is ______, I2C is ______ , and UART is______.

1. Full-Duplex 2. Half-Duplex 3. Full-Duplex

_____ selects a certain input among multiple inputs, _____ is able to cut off a path in the circuit and _____ can act as a basic analog to digital converter.

1. Multiplexer 2. Tri-state buffer 3. Schmitt Trigger

In an MSP432 digital I/O module, there are ___Schmitt triggers, ___ 2-input logic gates, ___ multiplexers, and ___ switches. Note: tri-state buffers are counted toward switches.

1. One 2. Two 3. Three 4. Two

SPI is ______, I2C is ______, and UART is ______.

1. Serial 2. Serial 3. Serial

Consider the two below setups for a pushbutton. In order for them to work properly which statement should be correct?

1. Setup A needs a pull-up resistor. . 2. Setup B needs a pull-down resistor. .

SPI is ______, I2C is ______, and UART is ______.

1. Synchronous 2. Synchronous 3. Asynchronous

Select True/False (https://sites.google.com/vt.edu/introduction-to-embeddedsystem/digital-io/basics-digital-io) 1. A port is a combination of pins. 2. MSP432 has 1 port, but many pins. 3. A port is used as output and a pin as input. 4. Port and pin are two names of the same thing.

1. True 2. False 3. False 4. False

Assume we are transmitting single bytes with a parity bit. Choose T/F. 1. When sending ASCII of 'L', the odd parity is 0. 2. When sending 0x23, the even parity is 0. 3. When sending the decimal 0, the odd parity is 1.

1. True 2. False 3. True

Choose true/false. 1. UART is asynchronous. 2. UART is always half-duplex. 3. UART has two data lines between sender and transmitter.

1. True 2. False 3. True

For a UART module with (8N1) format (which means 8 data bits, No parity and 1 stop bit), and Baudrate of 1000 Baud-per-second. Assume the channel is used at its full capacity. choose all the true statements: 1. The bitrate is 1000 bit/sec. 2. The data rate is 1000 bit/sec. 3. The data rate is 800 bit/sec. 4. The bitrate is 2000 bit/sec.

1. True 2. False 3. True 4. False

For each of the below lines of C code decide whether test is true or false after that line is executed. For all these examples assume x is 3 before this line of code. 1. test = (x <= 5) ; 2. test = (x = 5) ; 3. test = (x - 5) ; 4. test = (x - 3) ; 5. test = 0x10 & 0x1; 6. test = x & BIT1; // test is true if x's bit at index 1 is 1. 7. test = (x & BIT0) || (x & BIT2); // test is true if x's bit at index 0 or 2 is 1. 8. test = !(x &BIT2); //test is true if the bit at index 2 is 0.

1. True 2. False 3. True 4. False 5. False 6. True 7. True 8. True

Consider the below code snippet, choose the true and false statements. typedef struct {int x1, y1, x2, y2; //(x1,y1) is the top left and (x2, y2) is the right bottom corners of the rectangle} rectangle_t; 1. It is possible to declare a rectangle as below: rectangle_t myRec = {1, 1, 3, 4}; 2. In the below snippet, myRec_p is the pointer pointing to myRec: rectangle_t myRec = {1, 1, 3, 4};rectangle_t *myRec_p = *myRec; 3. The below snippet does NOT have any syntax error: rectangle_t someRec;rectangle_t *myRec_p = &someRec; myRec_p->x1 = 5; 4. The below snippet of code does NOT have any syntax error: rectangle_t myRec;myRec->x1 = 5; 5. It is OK to declare a function as below (The function gets 4 integers and builds a rectangle type and returns it as the output of the function): rectangle_t GetRectangle(int x1, int x2, int y1, int y2)

1. True 2. False 3. True 4. False 5. True

Pick T/F. 1. In MSP432, the configuration of a single digital I/O pin depends on the values of several registers. 2. In MSP432, one register can affect the configuration of multiple digital I/O pins. 3. In MSP432, each digital I/O pin has a dedicated register that controls its configuration.

1. True 2. True 3. False

Choose if the below statements on the subject of debouncing buttons (switches) are true or false. 1. Switch debouncing is some form of signal filtering. 2. When we press a button, the two metals of the button do not create instant contact, instead, they connect and disconnect several times until they settle in the pressed state and remain connected. 3. There is only one method to debounce a button. 4. Switch debouncing is some form of signal amplification. 5. Switch debouncing creates the illusion of a perfect switch to the user. 6. In an FSM, it is possible that some inputs are Don't Care for some of the transition arcs. 7/ It is possible to use analog components such as resistors and capacitances to debounce a switch.

1. True 2. True 3. False 4. False 5. True 6. True 7. True

Choose True or False: 1. A struct in the C programming language is a composite data type (or record) declaration that defines a physically grouped list of variables to be placed under one name in a block of memory, allowing the different variables to be accessed via a single pointer. 2. In C, a struct can be returned value of a function. 3. In C, it is possible to pass a struct to a function by its pointer and get it modified by the function.

1. True 2. True 3. True

The compiler indicates a warning on line 83 of the pointer_example_main.c that we studied in class. For each of the below statements, decide if they are true or false. 1. The text of the warning is "Description Resource Path Location Type #145-D a value of type "unsigned int *" cannot be used to initialize an entity of type "unsigned char *" pointer_example_main.c /programming_pointers line 83 C/C++ Problem" 2. The reason for this warning is that N is defined as an unsigned integer, but Nptr is defined as an unsigned char pointer. 3. Typecasting the &N (address of N) which is a pointer to an unsigned integer to a pointer to an unsigned char removes the warning. It is done as follows: unsigned char *Nptr = (unsigned char *)&N;

1. True 2. True 3. True

What can you say about FSM? Choose between T/F. 1. FSM stands for Finite State Machine. 2. FSM is a mathematical model of computation. 3. FSM is an abstract machine. 4. FSM is the C code that implements a certain algorithm. 5. FSM is a mechanical machine that is capable of doing calculations. 6. FSM is a machine that can go into an infinite number of states. 7. FSM is defined by a list of states, an initial state, and conditions for transitions between the states. 8. An FSM is weaker than the combinational logic model. 9. Some examples of the behavior of an FSM are traffic lights, vending machines, and elevators. 10. An FSM is more powerful than the Turing machine.

1. True 2. True 3. True 4. False 5. False 6. False 7. True 8. False 9. True 10. False

Consider typical 32-bit and 16-bit microcontrollers (Links to an external site.) and choose which of the below statements are true or false. 1. The datapath of a 32-bit microcontroller is twice as wide as a 16-bit microcontroller. 2. The address bus of a 32-bit microcontroller is twice as wide as a 16-bit microcontroller. 3. The Registers of a 32-bit microcontroller have twice as many bits as a 16-bit microcontroller. 4. The ALU of a 32-bit microcontroller is capable of handling operands that are twice as wide as a 16-bit microcontroller. 5. The address space of a 32-bit microcontroller is twice as big of a 16-bit microcontroller.

1. True 2. True 3. True 4. True 5. False

Choose if any of the below computer systems is working under real-time constraints or not? 1. A small microcontroller implementing the anti-lock brake system of a car. 2. A massive supercomputer which is performing DNA sequencing. 3. The MCU inside a joystick that handles the joystick operations. 4. A laptop zipping up a large folder while the human user is anxiously waiting.

1. Yes 2. No 3. Yes 4. No

What is the reason to use HAL? Choose "yes" for all that applies. 1. It makes the code more readable. 2. It makes the code easier to port from one processor to another. 3. It reduces the size of the machine code binary after compilation. 4. It improves the efficiency of the program (e.g. it becomes faster or uses fewer resources.)

1. Yes 2. Yes 3. No 4. No

Timer32 is a new peripheral such as digital i/o that we have studied so far. Select Y (Yes) if any of the following resources can be used for learning about Timer32: 1. Dirverlib guide 2. MSP432 user guide 3. Launchpad user guide 4. timer32.h

1. Yes 2. Yes 3. No 4. Yes

Which one of the below components is part of a UART module on MSP432? Choose between "Yes" and "No" 1. Transmit State Machine 2. Transmit shift register 3. Receive shift register 4. Baud rate generator 5. The error flag generator 6. Transmit and Receive buffers

1. Yes 2. Yes 3. Yes 4. Yes 5. Yes 6. Yes

XDS110 is _____ whereas MSP432 is ______.

1. is the emulator on the launchpad board that helps program/debug the main microcontroller 2. the main microcontroller on the Launchpad board

When writing the main function (or a high-level function) for a processor to work with its a peripheral, we are considering three different approaches: 1. Using memory-mapped registers: Directly reading from or writing to memory-mapped registers of that peripheral. (similar to noHAL_noDriverlib example) 2. Using the driver library: Calling the library of functions written by the vendor or others for that peripheral. For our case, this would be DriverLib from TI. (similar to noHAL_Driverlib example) 3. Using HAL: Calling HAL functions that we have developed without the use of the Driver library. (similar to HAL_noDriverlib example) For each of the above programming methods, choose whether the high-level code can be easily ported from one processor, such as MSP432, to another processor, such as PIC32. 1. noHAL_noDriverlib: 2. noHAL_Driverlib: 3. HAL_noDriverlib:

1. not portable 2. not portable 3. portable

What are the number of bits in a UART packet of data with the default number of start bits, 8 data bits, 2 stop bits, and no parity bits?

11

A UART uses Baudrate of 100 K Baud/sec. The counter inside the UART uses a 1MHz clock as its input, how long after the beginning of the start bit (the falling edge moment), we should sample the first data bit?

15 us

In the below figure, how many PCB boards you can see?

2

In terms of seconds, how long is 2 million cycles of a processor with a clock frequency of 1MHz?

2 s

Assume the system clock driving Timer32 is 48MHz. Also, assume the following lines are used to initialize a Timer32. Timer32_initModule(TIMER32_0_BASE, TIMER32_PRESCALER_16, TIMER32_32BIT, TIMER32_PERIODIC_MODE); Assume the following lines are used to start the timer in the one-shot mode. Timer32_setCount(TIMER32_0_BASE, 6000000); Timer32_startTimer(TIMER32_0_BASE, true); How long does it take for the timer to expire after it is started?

2000 ms

What is the highest number that can be stored in an unsigned long? (Hint: A C long is four bytes.)

2^32-1

Which one is bit 4 mask or BIT4?

2^4

For a processor with a clock frequency of 1 GHz, how many cycles exist in 3 seconds?

3,000,000,000

How many bits in an integer?

32

Consider a periodic timer in count-down mode where the Load value is 11,999. The counter value at the time of e1 (first event) and e2 (second event) is 5000 and 2000 respectively and three rollovers have happened between the two events. How many counter cycles has it elapsed between the two events?

39000

You need to study one or more of the technical documents we discussed in class to answer this question. Which port is not used by any of the BoosterPack buttons or LEDs?

4

In a UART where the BRCLK's frequency (BRCLK is the input clock of the UART counter) is 500KHz and Baudrate is 115200, what are the integer part and the fractional part of the division factor (the potential load value of the counter)?

4 and 0.34

In a UART where the BRCLK's frequency (BRCLK is the input clock of the UART) is 500KHz and Baudrate is 115200, what are the integer part and the fractional part of the division factor?

4 and 0.34

Debug programming_pointers project from line 80 to 90. It is best that you create a breakpoint on line 82 (by double-clicking on the narrow sidebar on line 82)and use the play button. Then, step over one by one until you reach line 90. Which one is the output?

44 44 33 22 11

Consider a communication scheme where each symbol (baud) represents two bits. If the bitrate in this communication is 10 Kbit/sec, what is the baudrate?

5K

How many bits in a signed character?

8

Consider a periodic counter in the count-up mode. The counter value at the time of events, e1 and e2 were c1, and c2 respectively. What can we say about e1, e2, c1 and c2?

C1 is can be either more than or less than C2 if e1 happens before e2.

The compiler that is used inside CCS (Code Composer Studio) for compiling C code to be executed on MPS432 chip is a native compiler.

False

When is the ideal time for sampling the data of a bit?

In the middle of the data bit.

Consider an 8-bit number A is equal to 11001100. What can we say about value of A in decimal?

It can be either -52 or 204.

You need to study one or more of the technical documents we discussed in class to answer this question. The red LED on the booster is connected to which BoosterPack pin?

J4.39

In the below figure, how many chips (also known as microchips, or ICs) you can see?

More than 4

You need to study one or more of the technical documents we discussed in class to answer this question. The green LED on the booster board is NOT connected to which entity?

Port 2 Pin 6 of MSP432

What is the difference between these two snippets? Snippet1: if (answer == 1)foo(); Snippet2: #define YES 1if (answer == YES) foo();

Snippet 2 is more readable but it is neither faster nor slower, nor is different in binary size.

Assume the system clock of Timer32 is 3MHz. Alos, assume the following lines are used to initialize a Timer32. Timer32_initModule(TIMER32_0_BASE, UNKOWN, TIMER32_32BIT,TIMER32_PERIODIC_MODE); Assume the following lines are used to start the timer in the one-shot mode. Timer32_setCount(TIMER32_0_BASE, 12000); Timer32_startTimer(TIMER32_0_BASE, true); If we wish for the timer to expire after about 1s, what should be used for the UNKOWN value in the init function?

TIMER32_PRESCALER_256

MCU (Microcontroller unit) consists of a CPU (Central Processing Unit), memory and some other peripherals.

True

Does adding 0x0fffefee and 0x0efffffff result in an overflow?

We do not have sufficient information to answer this question with yes or no.

typedef struct { int x, y, z; char c; } bunch_t; void WorkwithBunch (bunch_t *inputBunch_p) { bunch_t myBunch = {1, 2, 3, '7'}; } Consider the above snippet. What option is the correct way to call the WorkwithBunch function? 1. WorkwithBunch(bunchPtr); 2. WorkwithBunch(*bunchPtr); 3. WorkwithBunch(&bunchPtr);

WorkwithBunch(&bunchPtr);

typedef struct { int x, y, z; char c; } bunch_t; void WorkwithBunch (bunch_t inputBunch_p) { bunch_t myBunch = {1, 2, 3, '7'}; bunch_t *bunchPtr = &myBunch; } Consider the above snippet. What option is the correct way to call the WorkwithBunch function? 1. WorkwithBunch(bunchPtr); 2. WorkwithBunch(*bunchPtr); 3. WorkwithBunch(&bunchPtr);

WorkwithBunch(*bunchPtr);

typedef struct { int x, y, z; char c; } bunch_t; void WorkwithBunch (bunch_t *inputBunch_p) { bunch_t myBunch = {1, 2, 3, '7'}; bunch_t *bunchPtr = &myBunch; } Consider the above snippet. What option is the correct way to call the WorkwithBunch function? 1. WorkwithBunch(bunchPtr); 2. WorkwithBunch(*bunchPtr); 3. WorkwithBunch(&bunchPtr);

WorkwithBunch(bunchPtr);

typedef struct { int x, y, z; char c; } bunch_t; void WorkwithBunch (bunch_t inputBunch_p) { bunch_t myBunch = {1, 2, 3, '7'}; } Consider the above snippet. What option is the correct way to call the WorkwithBunch function? 1. WorkwithBunch(bunchPtr); 2. WorkwithBunch(*bunchPtr); 3. WorkwithBunch(&bunchPtr);

WorkwithBunch(bunchPtr);

You need to study a certain technical document (you need to figure out which document) to answer this question. We did NOT discuss a similar question in class. When programming the buttons on the boosterPack, the buttons ...

do not need pull-up or pull-down resistors from within MSP432's GPIO. In other words, PxREN should be equal 0.

Read here about endianness: https://en.wikipedia.org/wiki/Endianness (Links to an external site.) In a nutshell, think of an integer stored as 4 bytes in the memory. If the first address the integer resides is A, it is going to take up A, A+1, A+2, and A+3 in the memory. If the least significant byte is stored at address A, followed by the next least significant byte at A+1 and so on, it is called little-endian (because the little one leads?) and if the most significant byte is at address A, followed by the next significant byte at address A+1 and so on, it is called big-endian. Based on the behavior of the code we just debugged, which one is MSP432?

little-endian


संबंधित स्टडी सेट्स

Comprehension for History Chapter 5

View Set

APUSH-14 - The Civil War, 1861-1865

View Set

International Business Law: Chapter 13

View Set

Punctuation/Mechanics: Non-English words; numbers

View Set

Chapter 21 Certification Style Exam Quiz

View Set