0
0
Embedded Cprogramming~10 mins

Interrupt vector table in Embedded C - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to declare the interrupt vector table array.

Embedded C
void (*interrupt_vector_table[])() = { [1] };
Drag options to blanks, or click blank then click option'
AReset_Handler, NMI_Handler, HardFault_Handler
Bint, void, char
Cmain, setup, loop
D0, 1, 2
Attempts:
3 left
💡 Hint
Common Mistakes
Using data types instead of function names.
Using numbers instead of handler names.
2fill in blank
medium

Complete the code to define the Reset_Handler function.

Embedded C
void [1]() {
    // Initialization code
}
Drag options to blanks, or click blank then click option'
AReset_Handler
BNMI_Handler
CHardFault_Handler
DDefault_Handler
Attempts:
3 left
💡 Hint
Common Mistakes
Naming the function incorrectly.
Using a handler meant for other interrupts.
3fill in blank
hard

Fix the error in the vector table declaration by completing the blank.

Embedded C
void (*vector_table[])() = { Reset_Handler, [1], HardFault_Handler };
Drag options to blanks, or click blank then click option'
Amain
Bloop
Csetup
DNMI_Handler
Attempts:
3 left
💡 Hint
Common Mistakes
Using main or setup functions instead of interrupt handlers.
Confusing the order of handlers.
4fill in blank
hard

Fill both blanks to complete the vector table with correct handlers.

Embedded C
void (*vector_table[])() = { [1], [2], HardFault_Handler };
Drag options to blanks, or click blank then click option'
AReset_Handler
BDefault_Handler
CNMI_Handler
Dmain
Attempts:
3 left
💡 Hint
Common Mistakes
Using main or Default_Handler in wrong positions.
Swapping the order of handlers.
5fill in blank
hard

Fill all three blanks to create a vector table with uppercase handler names and a default handler.

Embedded C
void (*vector_table[])() = { [1], [2], [3] };
Drag options to blanks, or click blank then click option'
ARESET_HANDLER
BDEFAULT_HANDLER
CNMI_HANDLER
DMAIN_HANDLER
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase handler names here.
Mixing up the order of handlers.