QB CS42
QB CS42
What is result and NZCV status flag values when the following arithmetic operations are
done on APSR register. Justify your answer
a) 0x70000000 +0x70000000
b) 0x00001234 - 0x00001000
c) 0x80000000 +0x80000000
d) 0x90000000 + 0x90000000
Explain memory-remapping implementation with the boot loader and
SRAM for fast program accesses.
Discuss the interrupt features available with NVIC support.
Discuss the utility of all the Special Registers used in Cortex M0
With the help of block diagram elucidate what happens when a microcontroller starts
Discuss the different ways of structuring the embedded programs.
Write a program to extract bits 16 to 11 using logical shift instruction? And also Write an
assembly language program to realize the switch statement to allow a program to branch to
multiple possible address locations based on the input.
Illustrate the extraction and clearing of 8 bit data from 32 bit data.
With timing diagram Explain the nested vector features of interrupt with EXE RETURN
VALUES when the processor thread goes to A interrupt handler to B interrupt handler and
returns from B handler to A handler and then to the main program.
Discuss properties of the various parts of the Cortex M0 memory space
Examine special registers used to set priority for NVIC and SVC and PendSV exceptions
Discuss the Utility EXE RETURN register and its utility for interrupts
Discuss the attributes of various parts of the memory map of CORTEX M0 and its utility
Explain the stacking and unstacking process when interrupt is handled ? Explain the
importance EX _ RETURN value and where it is stored ?
How the following exceptions are handled? Explain.
i) NMI
ii) Hardfault
iii) Systick
iv) Interrupt
v) PendSv.
Write the code for enable and disable interrupt (all 3 types).
Write the differences between APB and AHB.
Write an Assembly level program to find the result of two 32 bit data and store the result as well as
its flags.
Embedded programs can be developed using different design methods. Justify.
Explain the components of program image for the Cortex-M0 microcontroller.
Illustrate with example various branch instructions of Cortex-M0 processor.
Explain conversion of data size and endian conversion of Cortex-M0 processor with example.
Demonstrate the use of memory access instructions with example.
Illustrate with example instructions for function call and also explain using push and pop of multiple
registers in functions.
Write the flowchart and assembly code for Simple unsigned integer square root function.
Explain with the help of diagrams the following registers and its relevance in data processing and
Mode Handling:
i) PRIMASK ii) CONTROL ii) xPSR.
Explain the Features supported by Nested Vectored Interrupt Controller
Explain what is standardized in CMSIS.
Differentiate between microcontroller and microprocessor.
Identify the type of the Addressing modes and explain the working for following instructions.
i. MOVS R0,R1
ii. MOVS R0, #45
iii. MOVS R0,[R1]
iv. MOVS R0,[0x12345678H]
v. MOVS R0, #12345678H.
Differentiate between microcontroller and microprocessor.
Identify the type of the Addressing modes and explain the working for following instructions.
i. MOVS R0,R1
ii. MOVS R0, #45
iii. MOVS R0,[R1]
iv. MOVS R0,[0x12345678H]
v. MOVS R0, #12345678H.
Write a Assembly Language program to create a function which executes 2x+4y+2 using stack.
Find the sum of Data in a data array called Data_In which has 10 elements. Use variable SUM to
save the result.
Write an assembly language program to realize the switch statement to allow a program to branch to
multiple possible address locations based on the input.
Write a program to:
i) Extract bits 17 to 12 using logical shift instruction
ii) Insert 80 from the bit 16 to 24 using bit masking concept.
Write a program to Illustrate with the following Instructions on data 0xAA558645 and give the
output for the same.
i) SXTH ii) SXTB iii) UXTB
iv) UXTH v) REV16 vi) REVSH
Write an optimized code to load from source address 256 bytes of data and store the same data to the
destination address with minimum number of iterations
Explain with example memory-remap implementation with the boot loader.
What are exceptions and interrupts? Explain different types of exceptions on Cortex-M0 processor.
Summarize configuration of an interrupt service in the Cortex-M0 processor.
Describe the memory access attributes for different memory regions of Cortex-M0 processor.
Discuss how late arrival method speeds up processing of higher priority exceptions in Cortex-M0.
Find the Result and status of ALU Flags for the below operations:
0x80000005-0x80000004
0xA0000000-0xA0000000
0x80000000+0x80000000
0x70000000+0x70000000
0xFFFFFFFF-0xFFFFFFFC.
Compare and contrast PSP and MSP.
Illustrate the working of Microcontroller.
Write a program to extract bits from 15 to 8. Given the content of register R0=0x87653425. Write a
program to clear bits between 7 to 4 give the register content of R0.
Explain memory barrier instructions with an example.
Explain the following:
i) Program Memory ii) Boot Loader.
Write an assembly code to set the priority level of interrupt#2 to 0xC0.
Write a note on Late Arrival with Exception sequences.
With example explain instruction STMIA,BIC,ARS,MRS and ROR of Cortex M0.
Write a program using assembly language to simulate the working of simple calculator.