Skip to content

Commit 064a14d

Browse files
committed
chore(wb0): timer support
Signed-off-by: Frederic Pillon <[email protected]>
1 parent acbe123 commit 064a14d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libraries/SrcWrapper/src/HardwareTimer.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,16 @@ uint32_t HardwareTimer::getLLChannel(uint32_t channel)
281281
case 1:
282282
ll_channel = LL_TIM_CHANNEL_CH1N;
283283
break;
284+
#if defined(LL_TIM_CHANNEL_CH2N)
284285
case 2:
285286
ll_channel = LL_TIM_CHANNEL_CH2N;
286287
break;
288+
#endif
289+
#if defined(LL_TIM_CHANNEL_CH3N)
287290
case 3:
288291
ll_channel = LL_TIM_CHANNEL_CH3N;
289292
break;
293+
#endif
290294
#if defined(LL_TIM_CHANNEL_CH4N)
291295
case 4:
292296
ll_channel = LL_TIM_CHANNEL_CH4N;
@@ -1343,6 +1347,8 @@ uint32_t HardwareTimer::getTimerClkFreq()
13431347
uint8_t timerClkSrc = getTimerClkSrc(_timerObj.handle.Instance);
13441348
uint64_t clkSelection = timerClkSrc == 1 ? RCC_PERIPHCLK_TIMG1 : RCC_PERIPHCLK_TIMG2;
13451349
return HAL_RCCEx_GetPeriphCLKFreq(clkSelection);
1350+
#elif defined(STM32WB0x)
1351+
return SystemCoreClock;
13461352
#else
13471353
RCC_ClkInitTypeDef clkconfig = {};
13481354
uint32_t pFLatency = 0U;

0 commit comments

Comments
 (0)