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

Sign up
Appearance settings

Commit a815b9e

Browse files
committed
chore(wl3): timer support
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent d221bc6 commit a815b9e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎libraries/SrcWrapper/src/HardwareTimer.cpp‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,16 +281,20 @@ uint32_t HardwareTimer::getLLChannel(uint32_t channel)
281281
case 1:
282282
ll_channel = LL_TIM_CHANNEL_CH1N;
283283
break;
284+
#if defined(TIM_CCER_CC2NE)
284285
#if defined(LL_TIM_CHANNEL_CH2N)
285286
case 2:
286287
ll_channel = LL_TIM_CHANNEL_CH2N;
287288
break;
288289
#endif
290+
#endif
291+
#if defined(TIM_CCER_CC3NE)
289292
#if defined(LL_TIM_CHANNEL_CH3N)
290293
case 3:
291294
ll_channel = LL_TIM_CHANNEL_CH3N;
292295
break;
293296
#endif
297+
#endif
294298
#if defined(LL_TIM_CHANNEL_CH4N)
295299
case 4:
296300
ll_channel = LL_TIM_CHANNEL_CH4N;
@@ -1347,7 +1351,7 @@ uint32_t HardwareTimer::getTimerClkFreq()
13471351
uint8_t timerClkSrc = getTimerClkSrc(_timerObj.handle.Instance);
13481352
uint64_t clkSelection = timerClkSrc == 1 ? RCC_PERIPHCLK_TIMG1 : RCC_PERIPHCLK_TIMG2;
13491353
return HAL_RCCEx_GetPeriphCLKFreq(clkSelection);
1350-
#elif defined(STM32WB0x)
1354+
#elif defined(STM32WB0x) || defined(STM32WL3x)
13511355
return SystemCoreClock;
13521356
#else
13531357
RCC_ClkInitTypeDef clkconfig = {};

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /