Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2252228

Browse filesBrowse files
authored
Merge pull request #54 from ABOSTM/NON_REG_TIM8_PIN
HardwareTimer: NonReg: Fix TIM8 Pin definition
2 parents cd5c82c + ee1f536 commit 2252228
Copy full SHA for 2252228

File tree

Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed

‎examples/NonReg/HardwareTimer/HardwareTimer_OutputInput_test/HardwareTimer_OutputInput_test.ino

Copy file name to clipboardExpand all lines: examples/NonReg/HardwareTimer/HardwareTimer_OutputInput_test/HardwareTimer_OutputInput_test.ino
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
Designed to work on Nucleo_L476RG
99
TIM1 ch1N and ch2 are used for output generation (TIM1_CH1N_PIN, and TIM1_CH2_PIN).
1010
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
1414
1515
Regular channel and complementary channel (TIM1_CH1N) are tested.
1616
@@ -49,19 +49,19 @@
4949
#define Output2_channel 2
5050

5151
// 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
5353
#define Freq1_channelRising 1
5454
#define Freq1_channelFalling 2
5555

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
5757
#define Freq2_channelRising 3
5858
#define Freq2_channelFalling 4
5959

6060
#define OUTPUT_FREQUENCY 10000 // Hz
6161
#define OUTPUT_DUTY1 20 // percentage
6262
#define OUTPUT_DUTY2 30 // percentage
6363

64-
#define TEMPO_BEFORE_MEASUREMENT 500 // milisecondes
64+
#define TEMPO_BEFORE_MEASUREMENT 500 // millisecondes
6565
#define TOLERANCE 10 // Percentage
6666
#define EXPECTED_INTERRUPT_COUNT ((TEMPO_BEFORE_MEASUREMENT * OUTPUT_FREQUENCY) / 1000)
6767

@@ -594,4 +594,4 @@ void loop()
594594
while (1)
595595
{
596596
};
597-
}
597+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.