1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
33
34
35
36
45
46
47
48
49
50
51
52
57
60
61
66
73
74
79
86
87
92
99
100
105
112
113
118
121
122
127
130
131
136
139
140
145
149
150
155
156
157
162
169
170
175
191
192
197
200
201
204
205
/* ... */
#include "main.h"
#include "stm32f4xx_it.h"
/* ... */
/* ... */
Includes
extern TIM_HandleTypeDef TimInputCaptureHandle;
extern __IO uint32_t uwPeriodValue;
extern __IO uint32_t uwCaptureNumber;
extern __IO uint32_t uwMeasurementDone;
uint16_t tmpCC4[2] = {0, 0};
Private variables
/* ... */
void NMI_Handler(void)
{
}{ ... }
/* ... */
void HardFault_Handler(void)
{
while (1)
{
}while (1) { ... }
}{ ... }
/* ... */
void MemManage_Handler(void)
{
while (1)
{
}while (1) { ... }
}{ ... }
/* ... */
void BusFault_Handler(void)
{
while (1)
{
}while (1) { ... }
}{ ... }
/* ... */
void UsageFault_Handler(void)
{
while (1)
{
}while (1) { ... }
}{ ... }
/* ... */
void SVC_Handler(void)
{
}{ ... }
/* ... */
void DebugMon_Handler(void)
{
}{ ... }
/* ... */
void PendSV_Handler(void)
{
}{ ... }
/* ... */
void SysTick_Handler(void)
{
HAL_IncTick();
}{ ... }
...
...
/* ... */
void EXTI15_10_IRQHandler(void)
{
/* ... */
*(__IO uint32_t *) 0xA0001000 = 0xFF;
}{ ... }
/* ... */
void TIM5_IRQHandler(void)
{
HAL_TIM_IRQHandler(&TimInputCaptureHandle);
{
tmpCC4[uwCaptureNumber++] = HAL_TIM_ReadCapturedValue(&TimInputCaptureHandle, TIM_CHANNEL_4);
if (uwCaptureNumber >= 2)
{
uwPeriodValue = (uint16_t)(0xFFFF - tmpCC4[0] + tmpCC4[1] + 1);
uwMeasurementDone = 1;
uwCaptureNumber = 0;
}if (uwCaptureNumber >= 2) { ... }
...}
}{ ... }
/* ... */
/* ... */
/* ... */
/* ... */