Question: Need help with a coding assignement that needs to be completed in ARM Keil Uvision 5 . The board I am using is an STM
Need help with a coding assignement that needs to be completed in ARM Keil Uvision The board I am using is an STMf Discovery Board.
The Constants are given below. I have already initialized LED's, the button, Timer, and Interrupt. But please specify if you are going to change anything in the initializations.
RCC EQU x ;base address for RCC
AHBENR EQU x ;offset for this
APBENR EQU x ;APBENR offset Clock for timer
GPIOA EQU x ;base address for PA# stuff
GPIOD EQU xC ;base address for PD# stuff
MODER EQU x ;mode selection register offset its
IDR EQU x ;input data register offset from base
ODR EQU x ;output data register offset from base
;NVIC Registers
NVICISER EQU xEE ;Interrupt SetEnable
NVICICER EQU xEE ;Interrupt ClearEnable
NVICISPR EQU xEE ;Interrupt SetPending
NVICICPR EQU xEE ;Interrupt ClearPending
NVICIABR EQU xEE ;Interrupt Active Bit
NVICIPR EQU xEE ;Interrupt Priority
STIR EQU xEEF ;Software Tigger Interrupt
;System Configuration Registers
SYSCFG EQU x
EXTICR EQU x ;clock enables for GPIO ports
;External Interrupt Registers
EXTI EQU xC ;base address
IMR EQU x ;Interrupt Mask Register
EMR EQU x ;Event Mask Register
RTSR EQU x ;Rising Trigger Select
FTSR EQU xC ;Falling Trigger Select
SWIR EQU x ;Software Interrupt Event
PR EQU x ;Pending Register
TIMEN EQU x ;Timer enable bit
TIM EQU x ;Timer registers
CR EQU x ;Control register
DIER EQU xC ;DMAinterrupt enable register
SR EQU x ;Status register
PSC EQU x ;Prescaler offset
ARR EQU xC ;AutoReload Register
TIMOFF EQU ;Offset to ISERICERISPRICPRIABR x
;prescale and Auto Reload Register are discussed in class
;Hertz cyclessecond
;kHz MHz GHz
;frequency of interrupt in Hertz clock frequency in HertzARRPSC
PSCVal EQU
ARRVal EQU
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
