Question

a) The rollback-to-zero event, Channels 1 and 2 share the vector A1. Who is responsible for...

a)

The rollback-to-zero event, Channels 1 and 2 share the vector A1. Who is responsible for clearing the interrupt flag?

b)

The Channel 0 has its own vector. Who is responsible for clearing the interrupt?

c)

Code #1 is running and interrupt occurs. Explain what happens regarding saving the status of the CPU.

d)

Low-power mode 3 is engaged and an interrupt occurs. Explain what happens regarding saving the status of the CPU.

e)

By default, are interrupts in MSP430 preemptable? Explain.

f)

How is the interrupt priority in MSP430 determined?

g)

What is the ‘reset vector’? Where is it located?

h)

A button is interfaced in the active low configuration using the built-in resistor. Should the resistor be pulled-up or pulled-down? What about the active high configuration?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a)

The user has to clear the interrupt flag after the interrupt. The second line of the code at the service vector A1 usually will be to clear the interrupt flag.( usually, the first would be to check which channel is the cause for the interrupt.)

b)

Here also a line of code must be written to clear the interrupt flag corresponding to that particular channel of the interrupt.

c)

It is given that channels 1 and 2 share the same service vector. When code1 is running, if code1 corresponds to the low priority interrupt and the new interrupt is high priority one, the execution passes to the new interrupt. Before passing the execution, the status register will be stored to the stack. If channel 1 is high priority interrupt and channel 2 is low priority interrupt, the second interrupt will not be triggered.

d) The status of the CPU is restored from the stack

e)

Yes, There are some default priorities for interrupts in the MSP.

f)  The interrupt priorities in MSP are based on the vector location in the Interrupt Vector Table. Each vector location has a priority and if you want to write a code for highest priority interrupt, make sure its vector location has the highest priority.

g) Reset vector is the address which will be present in the program counter just after the reset of the microcontroller. This is the address of the first instruction the microcontroller tries to execute. The first instruction must be located at the Reset vector for the microcontroller to execute the code. For MSP430, the Reset vector is 0FFFFh

h) The resistor must be pulled up. The microcontroller takes the button for pressed when it sees a low at the pin. so when the button is not pressed, there should be a high at the pin. So use a pull-up resistor between 5v and the pin (can be internal) which holds the pin at high when the button is not pressed.

for the circuit with active high configuration, the microcontroller takes the button press if it sees a high at the pin. So as long as the button is not pressed, the pin cannot be left unconnected as noise may cause the microcontroller pin to go high for a moment. So the pin must be connected to ground using a resistor. This is called the pull-down resistor.

Add a comment
Know the answer?
Add Answer to:
a) The rollback-to-zero event, Channels 1 and 2 share the vector A1. Who is responsible for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. Oral acetaminophen has been ordered for a young child who has a fever. A liquid...

    1. Oral acetaminophen has been ordered for a young child who has a fever. A liquid form has been obtained by the nurse to increase the chance of problem free administration. Prior to administration, the nurse is going through the rights of medication administration. When confirming the right dose, what term is the most appropriate? a. "160 mg" b. "one teaspoon" c. "one third of a tablespoon d. "SmL 2. A pregnant woman asks why she needs to take a...

  • 1. According to the paper, what does lactate dehydrogenase (LDH) do and what does it allow...

    1. According to the paper, what does lactate dehydrogenase (LDH) do and what does it allow to happen within the myofiber? (5 points) 2. According to the paper, what is the major disadvantage of relying on glycolysis during high-intensity exercise? (5 points) 3. Using Figure 1 in the paper, briefly describe the different sources of ATP production at 50% versus 90% AND explain whether you believe this depiction of ATP production applies to a Type IIX myofiber in a human....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT