Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Here is the link for the manual: http://www.st.com/content/ccc/resource/technical/document/reference_manual/02/35/09/0c/4f/f7/40/03/DM00083560.pdf/files/DM00083560.pdf/jcr:content/translations/en.DM00083560.pdf Here is the link to the manual: http://www.st.com/content/ccc/resource/technical/document/reference_manual/02/35/09/0c/4f/f7/40/03/DM00083560.pdf/files/DM00083560.pdf/jcr:content/translations/en.DM00083560.pdf 1. Find Table 1 in the STM321476GT6 Reference manual.
Here is the link for the manual: http://www.st.com/content/ccc/resource/technical/document/reference_manual/02/35/09/0c/4f/f7/40/03/DM00083560.pdf/files/DM00083560.pdf/jcr:content/translations/en.DM00083560.pdf
Here is the link to the manual:
http://www.st.com/content/ccc/resource/technical/document/reference_manual/02/35/09/0c/4f/f7/40/03/DM00083560.pdf/files/DM00083560.pdf/jcr:content/translations/en.DM00083560.pdf
1. Find Table 1 in the STM321476GT6 Reference manual. What is the base address SYSCFG set of registers? 2. Find the offset address of the RCC APB2ENR register (Section 8.4.21 in the STM321476 Reference manual) and record it here: 3. Write C code that enables the clock of SYSCFG, GPIOA and GPIOB ports Enable corresponding GPIOA pin 0 for input (the joystick center pushbutton) and GPIOB pin 2 for output, push-pull (red LED) 4. 5. Find Table 34 in section 10.2.11 that shows info about the SYSCRG register group. Write C instructions to configure the SYSCFG external interrupt configuration register (SYSCFG EXTICR) to map the GPIOA pin 0 to the external interrupt input line 0 6. Write C instructions to select a signal change that will trigger EXTI 0. The signal can be a rising edge, a falling edge or both. This is configured by the EXTI rising edge trigger selection register (EXTIRTSRI or EXTIRTSR2) and the Falling edge trigger selection register (EXTIFTSR? or EXTI FTSR2) 7. Write C instructions to set the o bit in EXTI interrupt mask register (EXTI IMRI or EXTI IMR2) and EXTI event mask register (EXTI EMR1 or EXTI EMR2) to enable the EXTI interrupt and event for input line 0 8. Write C instructions to configure the enable and mask bit that controls the NVIC interrupt channel mapping to EXTIo 9. Write an interrupt handler for EXTI 0 that turns the red LED on. The EXTI pending register (EXTI PR1 or EXTI PR2) records the source of the interrupt. The function name of the interrupt handler is given by the startup assembly file startup som 321476xx s For example, the handler for EXTI 0 is called EXTIO IRQHandlerO 1. Find Table 1 in the STM321476GT6 Reference manual. What is the base address SYSCFG set of registers? 2. Find the offset address of the RCC APB2ENR register (Section 8.4.21 in the STM321476 Reference manual) and record it here: 3. Write C code that enables the clock of SYSCFG, GPIOA and GPIOB ports Enable corresponding GPIOA pin 0 for input (the joystick center pushbutton) and GPIOB pin 2 for output, push-pull (red LED) 4. 5. Find Table 34 in section 10.2.11 that shows info about the SYSCRG register group. Write C instructions to configure the SYSCFG external interrupt configuration register (SYSCFG EXTICR) to map the GPIOA pin 0 to the external interrupt input line 0 6. Write C instructions to select a signal change that will trigger EXTI 0. The signal can be a rising edge, a falling edge or both. This is configured by the EXTI rising edge trigger selection register (EXTIRTSRI or EXTIRTSR2) and the Falling edge trigger selection register (EXTIFTSR? or EXTI FTSR2) 7. Write C instructions to set the o bit in EXTI interrupt mask register (EXTI IMRI or EXTI IMR2) and EXTI event mask register (EXTI EMR1 or EXTI EMR2) to enable the EXTI interrupt and event for input line 0 8. Write C instructions to configure the enable and mask bit that controls the NVIC interrupt channel mapping to EXTIo 9. Write an interrupt handler for EXTI 0 that turns the red LED on. The EXTI pending register (EXTI PR1 or EXTI PR2) records the source of the interrupt. The function name of the interrupt handler is given by the startup assembly file startup som 321476xx s For example, the handler for EXTI 0 is called EXTIO IRQHandlerOStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started