8
8
Designed to work on Nucleo_L476RG
9
9
TIM1 ch1N and ch2 are used for output generation (TIM1_CH1N_PIN, and TIM1_CH2_PIN).
10
10
It is important that both channel are on the same timer, in order to check influence on channel dependant API.
11
- Management of interruption is done with variable incrementation .
12
- TIM8 ch1/ch2 are used to measure frequence and duty cycle of TIM1_CH1N output generated signal
13
- TIM8 ch3/ch4 are used to measure frequence and duty cycle of TIM1_CH2 output generated signal
11
+ Management of interruption is done with variable increment .
12
+ TIM8 ch1/ch2 are used to measure frequency and duty cycle of TIM1_CH1N output generated signal
13
+ TIM8 ch3/ch4 are used to measure frequency and duty cycle of TIM1_CH2 output generated signal
14
14
15
15
Regular channel and complementary channel (TIM1_CH1N) are tested.
16
16
49
49
#define Output2_channel 2
50
50
51
51
// TIM input
52
- #define TIM8_CH1_PIN PC6 // CN10 pin 4 Use also channel2 for freq/duty measurement
52
+ #define TIM8_CH1_PIN PC_6_ALT1 // CN10 pin 4 Use also channel2 for freq/duty measurement
53
53
#define Freq1_channelRising 1
54
54
#define Freq1_channelFalling 2
55
55
56
- #define TIM8_CH3_PIN PC8 // CN10 pin 2 Use also channel4 for freq/duty measurement
56
+ #define TIM8_CH3_PIN PC_8_ALT1 // CN10 pin 2 Use also channel4 for freq/duty measurement
57
57
#define Freq2_channelRising 3
58
58
#define Freq2_channelFalling 4
59
59
60
60
#define OUTPUT_FREQUENCY 10000 // Hz
61
61
#define OUTPUT_DUTY1 20 // percentage
62
62
#define OUTPUT_DUTY2 30 // percentage
63
63
64
- #define TEMPO_BEFORE_MEASUREMENT 500 // milisecondes
64
+ #define TEMPO_BEFORE_MEASUREMENT 500 // millisecondes
65
65
#define TOLERANCE 10 // Percentage
66
66
#define EXPECTED_INTERRUPT_COUNT ((TEMPO_BEFORE_MEASUREMENT * OUTPUT_FREQUENCY) / 1000 )
67
67
@@ -594,4 +594,4 @@ void loop()
594
594
while (1 )
595
595
{
596
596
};
597
- }
597
+ }
0 commit comments