Question: on STM32F4 by using a timer peripheral (TIM2). TIM2 has a 16 bit TIMx_PSC register, a 32 bit TIMx_ARR register, and a 32 bit TIMx_CNT

 on STM32F4 by using a timer peripheral (TIM2). TIM2 has a
16 bit TIMx_PSC register, a 32 bit TIMx_ARR register, and a 32
bit TIMx_CNT register. TIM2 is connected to the APB1 bus. The source

on STM32F4 by using a timer peripheral (TIM2). TIM2 has a 16 bit TIMx_PSC register, a 32 bit TIMx_ARR register, and a 32 bit TIMx_CNT register. TIM2 is connected to the APB1 bus. The source clock of the timer is clock of the bus. Assume that all required settings and variable declarations are done and the code will be executed after resetting. (i) APB1 bus has arranged to have a clock frequency of 50MHz. Analyze the below code and determine the values, those should be written to related registers. Show your calculations and justify your results. Determine the period of the timer and the time it takes to create an interrupt request. (ii) PA0 pin, which is connected to the push button, has been arranged to generate external interrupt requests. The interrupt handler stores current value of the TIMx_CNT register. Assume that the push button is pressed at the time shown below. What is value of variable " i "? (iii) Redesign the code such that the real time chronometer can count to 99 hours. on STM32F4 by using a timer peripheral (TIM2). TIM2 has a 16 bit TIMx_PSC register, a 32 bit TIMx_ARR register, and a 32 bit TIMx_CNT register. TIM2 is connected to the APB1 bus. The source clock of the timer is clock of the bus. Assume that all required settings and variable declarations are done and the code will be executed after resetting. (i) APB1 bus has arranged to have a clock frequency of 50MHz. Analyze the below code and determine the values, those should be written to related registers. Show your calculations and justify your results. Determine the period of the timer and the time it takes to create an interrupt request. (ii) PA0 pin, which is connected to the push button, has been arranged to generate external interrupt requests. The interrupt handler stores current value of the TIMx_CNT register. Assume that the push button is pressed at the time shown below. What is value of variable " i "? (iii) Redesign the code such that the real time chronometer can count to 99 hours

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!