File tree Expand file tree Collapse file tree 10 files changed +40
-20
lines changed Expand file tree Collapse file tree 10 files changed +40
-20
lines changed Original file line number Diff line number Diff line change @@ -101,8 +101,6 @@ void lp_ticker_init(void)
101
101
/* By HAL spec, ticker_init allows the ticker to keep counting and disables the
102
102
* ticker interrupt. */
103
103
lp_ticker_disable_interrupt ();
104
- lp_ticker_clear_interrupt ();
105
- NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
106
104
return ;
107
105
}
108
106
ticker_inited = 1 ;
@@ -203,6 +201,10 @@ timestamp_t lp_ticker_read()
203
201
204
202
void lp_ticker_set_interrupt (timestamp_t timestamp )
205
203
{
204
+ /* Clear any previously pending interrupts */
205
+ lp_ticker_clear_interrupt ();
206
+ NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
207
+
206
208
/* In continuous mode, counter will be reset to zero with the following sequence:
207
209
* 1. Stop counting
208
210
* 2. Configure new CMP value
Original file line number Diff line number Diff line change @@ -75,8 +75,6 @@ void us_ticker_init(void)
75
75
/* By HAL spec, ticker_init allows the ticker to keep counting and disables the
76
76
* ticker interrupt. */
77
77
us_ticker_disable_interrupt ();
78
- us_ticker_clear_interrupt ();
79
- NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
80
78
return ;
81
79
}
82
80
ticker_inited = 1 ;
@@ -159,6 +157,10 @@ uint32_t us_ticker_read()
159
157
160
158
void us_ticker_set_interrupt (timestamp_t timestamp )
161
159
{
160
+ /* Clear any previously pending interrupts */
161
+ us_ticker_clear_interrupt ();
162
+ NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
163
+
162
164
/* In continuous mode, counter will be reset to zero with the following sequence:
163
165
* 1. Stop counting
164
166
* 2. Configure new CMP value
Original file line number Diff line number Diff line change @@ -76,8 +76,6 @@ void lp_ticker_init(void)
76
76
/* By HAL spec, ticker_init allows the ticker to keep counting and disables the
77
77
* ticker interrupt. */
78
78
lp_ticker_disable_interrupt ();
79
- lp_ticker_clear_interrupt ();
80
- NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
81
79
return ;
82
80
}
83
81
ticker_inited = 1 ;
@@ -166,6 +164,10 @@ timestamp_t lp_ticker_read()
166
164
167
165
void lp_ticker_set_interrupt (timestamp_t timestamp )
168
166
{
167
+ /* Clear any previously pending interrupts */
168
+ lp_ticker_clear_interrupt ();
169
+ NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
170
+
169
171
/* In continuous mode, counter will be reset to zero with the following sequence:
170
172
* 1. Stop counting
171
173
* 2. Configure new CMP value
Original file line number Diff line number Diff line change @@ -52,8 +52,6 @@ void us_ticker_init(void)
52
52
/* By HAL spec, ticker_init allows the ticker to keep counting and disables the
53
53
* ticker interrupt. */
54
54
us_ticker_disable_interrupt ();
55
- us_ticker_clear_interrupt ();
56
- NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
57
55
return ;
58
56
}
59
57
ticker_inited = 1 ;
@@ -124,6 +122,10 @@ uint32_t us_ticker_read()
124
122
125
123
void us_ticker_set_interrupt (timestamp_t timestamp )
126
124
{
125
+ /* Clear any previously pending interrupts */
126
+ us_ticker_clear_interrupt ();
127
+ NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
128
+
127
129
/* In continuous mode, counter will be reset to zero with the following sequence:
128
130
* 1. Stop counting
129
131
* 2. Configure new CMP value
Original file line number Diff line number Diff line change @@ -76,8 +76,6 @@ void lp_ticker_init(void)
76
76
/* By HAL spec, ticker_init allows the ticker to keep counting and disables the
77
77
* ticker interrupt. */
78
78
lp_ticker_disable_interrupt ();
79
- lp_ticker_clear_interrupt ();
80
- NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
81
79
return ;
82
80
}
83
81
ticker_inited = 1 ;
@@ -166,6 +164,10 @@ timestamp_t lp_ticker_read()
166
164
167
165
void lp_ticker_set_interrupt (timestamp_t timestamp )
168
166
{
167
+ /* Clear any previously pending interrupts */
168
+ lp_ticker_clear_interrupt ();
169
+ NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
170
+
169
171
/* In continuous mode, counter will be reset to zero with the following sequence:
170
172
* 1. Stop counting
171
173
* 2. Configure new CMP value
Original file line number Diff line number Diff line change @@ -52,8 +52,6 @@ void us_ticker_init(void)
52
52
/* By HAL spec, ticker_init allows the ticker to keep counting and disables the
53
53
* ticker interrupt. */
54
54
us_ticker_disable_interrupt ();
55
- us_ticker_clear_interrupt ();
56
- NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
57
55
return ;
58
56
}
59
57
ticker_inited = 1 ;
@@ -124,6 +122,10 @@ uint32_t us_ticker_read()
124
122
125
123
void us_ticker_set_interrupt (timestamp_t timestamp )
126
124
{
125
+ /* Clear any previously pending interrupts */
126
+ us_ticker_clear_interrupt ();
127
+ NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
128
+
127
129
/* In continuous mode, counter will be reset to zero with the following sequence:
128
130
* 1. Stop counting
129
131
* 2. Configure new CMP value
Original file line number Diff line number Diff line change @@ -78,8 +78,6 @@ void lp_ticker_init(void)
78
78
/* By HAL spec, ticker_init allows the ticker to keep counting and disables the
79
79
* ticker interrupt. */
80
80
lp_ticker_disable_interrupt ();
81
- lp_ticker_clear_interrupt ();
82
- NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
83
81
return ;
84
82
}
85
83
ticker_inited = 1 ;
@@ -170,6 +168,10 @@ timestamp_t lp_ticker_read()
170
168
171
169
void lp_ticker_set_interrupt (timestamp_t timestamp )
172
170
{
171
+ /* Clear any previously pending interrupts */
172
+ lp_ticker_clear_interrupt ();
173
+ NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
174
+
173
175
/* In continuous mode, counter will be reset to zero with the following sequence:
174
176
* 1. Stop counting
175
177
* 2. Configure new CMP value
Original file line number Diff line number Diff line change @@ -54,8 +54,6 @@ void us_ticker_init(void)
54
54
/* By HAL spec, ticker_init allows the ticker to keep counting and disables the
55
55
* ticker interrupt. */
56
56
us_ticker_disable_interrupt ();
57
- us_ticker_clear_interrupt ();
58
- NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
59
57
return ;
60
58
}
61
59
ticker_inited = 1 ;
@@ -126,6 +124,10 @@ uint32_t us_ticker_read()
126
124
127
125
void us_ticker_set_interrupt (timestamp_t timestamp )
128
126
{
127
+ /* Clear any previously pending interrupts */
128
+ us_ticker_clear_interrupt ();
129
+ NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
130
+
129
131
/* In continuous mode, counter will be reset to zero with the following sequence:
130
132
* 1. Stop counting
131
133
* 2. Configure new CMP value
Original file line number Diff line number Diff line change @@ -76,8 +76,6 @@ void lp_ticker_init(void)
76
76
/* By HAL spec, ticker_init allows the ticker to keep counting and disables the
77
77
* ticker interrupt. */
78
78
lp_ticker_disable_interrupt ();
79
- lp_ticker_clear_interrupt ();
80
- NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
81
79
return ;
82
80
}
83
81
ticker_inited = 1 ;
@@ -165,6 +163,10 @@ timestamp_t lp_ticker_read()
165
163
166
164
void lp_ticker_set_interrupt (timestamp_t timestamp )
167
165
{
166
+ /* Clear any previously pending interrupts */
167
+ lp_ticker_clear_interrupt ();
168
+ NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
169
+
168
170
/* In continuous mode, counter will be reset to zero with the following sequence:
169
171
* 1. Stop counting
170
172
* 2. Configure new CMP value
Original file line number Diff line number Diff line change @@ -52,8 +52,6 @@ void us_ticker_init(void)
52
52
/* By HAL spec, ticker_init allows the ticker to keep counting and disables the
53
53
* ticker interrupt. */
54
54
us_ticker_disable_interrupt ();
55
- us_ticker_clear_interrupt ();
56
- NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
57
55
return ;
58
56
}
59
57
ticker_inited = 1 ;
@@ -123,6 +121,10 @@ uint32_t us_ticker_read()
123
121
124
122
void us_ticker_set_interrupt (timestamp_t timestamp )
125
123
{
124
+ /* Clear any previously pending interrupts */
125
+ us_ticker_clear_interrupt ();
126
+ NVIC_ClearPendingIRQ (TIMER_MODINIT .irq_n );
127
+
126
128
/* In continuous mode, counter will be reset to zero with the following sequence:
127
129
* 1. Stop counting
128
130
* 2. Configure new CMP value
You can’t perform that action at this time.
0 commit comments