35 #if defined(LESENSE_COUNT) && (LESENSE_COUNT > 0)
41 #if !defined(UINT32_MAX)
42 #define UINT32_MAX ((uint32_t)(0xFFFFFFFF))
63 #if defined(_LESENSE_ROUTE_MASK)
64 #define GENERIC_LESENSE_ROUTE LESENSE->ROUTE
66 #define GENERIC_LESENSE_ROUTE LESENSE->ROUTEPEN
69 #if defined(_SILICON_LABS_32B_SERIES_0)
71 #define DACOUT_SUPPORT 0xF00F
74 #define DACOUT_SUPPORT 0x34B0
118 void LESENSE_Init(
const LESENSE_Init_TypeDef * init,
bool reqReset)
121 EFM_ASSERT((uint32_t)init->timeCtrl.startDelay < 4U);
122 #if defined(_LESENSE_PERCTRL_DACPRESC_MASK)
123 EFM_ASSERT((uint32_t)init->perCtrl.dacPresc < 32U);
133 LESENSE_StartDelaySet((uint32_t)init->timeCtrl.startDelay);
134 #if defined(_LESENSE_TIMCTRL_AUXSTARTUP_MASK)
136 LESENSE->TIMCTRL = (LESENSE->TIMCTRL & (~_LESENSE_TIMCTRL_AUXSTARTUP_MASK))
137 | (init->timeCtrl.delayAuxStartup << _LESENSE_TIMCTRL_AUXSTARTUP_SHIFT);
148 ((uint32_t)init->coreCtrl.prsSel << _LESENSE_CTRL_PRSSEL_SHIFT)
149 | (uint32_t)init->coreCtrl.scanConfSel
150 | (uint32_t)init->coreCtrl.bufTrigLevel
151 | (uint32_t)init->coreCtrl.wakeupOnDMA
152 #
if defined(_LESENSE_CTRL_ACMP0INV_MASK)
153 | ((uint32_t)init->coreCtrl.invACMP0 << _LESENSE_CTRL_ACMP0INV_SHIFT)
154 | ((uint32_t)init->coreCtrl.invACMP1 << _LESENSE_CTRL_ACMP1INV_SHIFT)
156 | ((uint32_t)init->coreCtrl.dualSample << _LESENSE_CTRL_DUALSAMPLE_SHIFT)
157 | ((uint32_t)init->coreCtrl.storeScanRes << _LESENSE_CTRL_STRSCANRES_SHIFT)
158 | ((uint32_t)init->coreCtrl.bufOverWr << _LESENSE_CTRL_BUFOW_SHIFT)
159 | ((uint32_t)init->coreCtrl.debugRun << _LESENSE_CTRL_DEBUGRUN_SHIFT);
163 LESENSE_ScanModeSet((LESENSE_ScanMode_TypeDef)init->coreCtrl.scanStart,
false);
170 ((uint32_t)init->perCtrl.dacCh0Data << _LESENSE_PERCTRL_DACCH0DATA_SHIFT)
171 | ((uint32_t)init->perCtrl.dacCh1Data << _LESENSE_PERCTRL_DACCH1DATA_SHIFT)
172 #if defined(_LESENSE_PERCTRL_DACCH0CONV_MASK)
173 | ((uint32_t)init->perCtrl.dacCh0ConvMode << _LESENSE_PERCTRL_DACCH0CONV_SHIFT)
174 | ((uint32_t)init->perCtrl.dacCh0OutMode << _LESENSE_PERCTRL_DACCH0OUT_SHIFT)
175 | ((uint32_t)init->perCtrl.dacCh1ConvMode << _LESENSE_PERCTRL_DACCH1CONV_SHIFT)
176 | ((uint32_t)init->perCtrl.dacCh1OutMode << _LESENSE_PERCTRL_DACCH1OUT_SHIFT)
177 | ((uint32_t)init->perCtrl.dacPresc << _LESENSE_PERCTRL_DACPRESC_SHIFT)
178 | (uint32_t)init->perCtrl.dacRef
180 | ((uint32_t)init->perCtrl.acmp0Mode << _LESENSE_PERCTRL_ACMP0MODE_SHIFT)
181 | ((uint32_t)init->perCtrl.acmp1Mode << _LESENSE_PERCTRL_ACMP1MODE_SHIFT)
182 #
if defined(_LESENSE_PERCTRL_ACMP0INV_MASK)
183 | ((uint32_t)init->coreCtrl.invACMP0 << _LESENSE_PERCTRL_ACMP0INV_SHIFT)
184 | ((uint32_t)init->coreCtrl.invACMP1 << _LESENSE_PERCTRL_ACMP1INV_SHIFT)
186 #if defined(_LESENSE_PERCTRL_DACCONVTRIG_MASK)
187 | ((uint32_t)init->perCtrl.dacScan << _LESENSE_PERCTRL_DACCONVTRIG_SHIFT)
189 | (uint32_t)init->perCtrl.warmupMode;
200 (uint32_t)init->decCtrl.decInput
201 | ((uint32_t)init->decCtrl.prsChSel0 << _LESENSE_DECCTRL_PRSSEL0_SHIFT)
202 | ((uint32_t)init->decCtrl.prsChSel1 << _LESENSE_DECCTRL_PRSSEL1_SHIFT)
203 | ((uint32_t)init->decCtrl.prsChSel2 << _LESENSE_DECCTRL_PRSSEL2_SHIFT)
204 | ((uint32_t)init->decCtrl.prsChSel3 << _LESENSE_DECCTRL_PRSSEL3_SHIFT)
205 | ((uint32_t)init->decCtrl.chkState << _LESENSE_DECCTRL_ERRCHK_SHIFT)
206 | ((uint32_t)init->decCtrl.intMap << _LESENSE_DECCTRL_INTMAP_SHIFT)
207 | ((uint32_t)init->decCtrl.hystPRS0 << _LESENSE_DECCTRL_HYSTPRS0_SHIFT)
208 | ((uint32_t)init->decCtrl.hystPRS1 << _LESENSE_DECCTRL_HYSTPRS1_SHIFT)
209 | ((uint32_t)init->decCtrl.hystPRS2 << _LESENSE_DECCTRL_HYSTPRS2_SHIFT)
210 | ((uint32_t)init->decCtrl.hystIRQ << _LESENSE_DECCTRL_HYSTIRQ_SHIFT)
211 | ((uint32_t)init->decCtrl.prsCount << _LESENSE_DECCTRL_PRSCNT_SHIFT);
214 LESENSE_DecoderStateSet((uint32_t)init->decCtrl.initState);
217 LESENSE->BIASCTRL = (uint32_t)init->coreCtrl.biasMode;
247 uint32_t LESENSE_ScanFreqSet(uint32_t refFreq, uint32_t scanFreq)
250 uint32_t pcPresc = 0UL;
251 uint32_t clkDiv = 1UL;
252 uint32_t pcTop = 63UL;
253 uint32_t calcScanFreq;
266 EFM_ASSERT(refFreq < ((uint32_t)UINT32_MAX / 128UL));
269 EFM_ASSERT((scanFreq > 0U) && (scanFreq <= refFreq));
274 while ((refFreq / ((uint32_t)scanFreq * clkDiv) > (pcTop + 1UL))
275 && (pcPresc < lesenseClkDiv_128))
278 clkDiv = (uint32_t)1UL << pcPresc;
282 pcTop = ((uint32_t)refFreq / ((uint32_t)scanFreq * clkDiv)) - 1UL;
286 tmp = LESENSE->TIMCTRL & (~_LESENSE_TIMCTRL_PCPRESC_MASK
287 & ~_LESENSE_TIMCTRL_PCTOP_MASK);
290 tmp |= ((uint32_t)pcPresc << _LESENSE_TIMCTRL_PCPRESC_SHIFT)
291 | ((uint32_t)pcTop << _LESENSE_TIMCTRL_PCTOP_SHIFT);
294 LESENSE->TIMCTRL = tmp;
297 calcScanFreq = ((uint32_t)refFreq / ((uint32_t)(1UL + pcTop) * clkDiv));
329 void LESENSE_ScanModeSet(LESENSE_ScanMode_TypeDef scanMode,
337 tmp = LESENSE->CTRL & ~(_LESENSE_CTRL_SCANMODE_MASK);
340 tmp |= (uint32_t)scanMode;
371 void LESENSE_StartDelaySet(uint8_t startDelay)
377 EFM_ASSERT(startDelay < 4U);
381 tmp = LESENSE->TIMCTRL & ~(_LESENSE_TIMCTRL_STARTDLY_MASK);
383 tmp |= (uint32_t)startDelay << _LESENSE_TIMCTRL_STARTDLY_SHIFT;
386 LESENSE->TIMCTRL = tmp;
414 void LESENSE_ClkDivSet(LESENSE_ChClk_TypeDef clk,
415 LESENSE_ClkPresc_TypeDef clkDiv)
425 EFM_ASSERT((uint32_t)clkDiv <= lesenseClkDiv_8);
428 tmp = LESENSE->TIMCTRL & ~(_LESENSE_TIMCTRL_AUXPRESC_MASK);
431 tmp |= ((uint32_t)clkDiv << _LESENSE_TIMCTRL_AUXPRESC_SHIFT);
434 LESENSE->TIMCTRL = tmp;
439 tmp = LESENSE->TIMCTRL & ~(_LESENSE_TIMCTRL_LFPRESC_MASK);
442 tmp |= ((uint32_t)clkDiv << _LESENSE_TIMCTRL_LFPRESC_SHIFT);
445 LESENSE->TIMCTRL = tmp;
476 void LESENSE_ChannelAllConfig(
const LESENSE_ChAll_TypeDef * confChAll)
481 for (i = 0U; i < LESENSE_NUM_CHANNELS; ++i)
484 LESENSE_ChannelConfig(&confChAll->Ch[i], i);
511 void LESENSE_ChannelConfig(
const LESENSE_ChDesc_TypeDef * confCh,
518 EFM_ASSERT(chIdx < LESENSE_NUM_CHANNELS);
519 EFM_ASSERT(confCh->exTime <= (_LESENSE_CH_TIMING_EXTIME_MASK >> _LESENSE_CH_TIMING_EXTIME_SHIFT));
520 EFM_ASSERT(confCh->measDelay <= (_LESENSE_CH_TIMING_MEASUREDLY_MASK >> _LESENSE_CH_TIMING_MEASUREDLY_SHIFT));
521 #if defined(_SILICON_LABS_32B_SERIES_0)
523 EFM_ASSERT(confCh->sampleDelay <= (_LESENSE_CH_TIMING_SAMPLEDLY_MASK >> _LESENSE_CH_TIMING_SAMPLEDLY_SHIFT));
529 EFM_ASSERT(confCh->acmpThres < 4096U);
530 if (confCh->chPinExMode == lesenseChPinExDACOut)
532 EFM_ASSERT((0x1 << chIdx) & DACOUT_SUPPORT);
535 #if defined(_LESENSE_IDLECONF_CH0_DACCH0)
536 EFM_ASSERT(!(confCh->chPinIdleMode == lesenseChPinIdleDACCh1
540 && (chIdx != 15U))));
541 EFM_ASSERT(!(confCh->chPinIdleMode == lesenseChPinIdleDACCh0
551 tmp = (LESENSE->IDLECONF & ~((uint32_t)0x3UL << (chIdx * 2UL)));
552 tmp |= ((uint32_t)confCh->chPinIdleMode << (chIdx * 2UL));
553 LESENSE->IDLECONF = tmp;
557 LESENSE_ChannelTimingSet(chIdx,
565 LESENSE->CH[chIdx].INTERACT =
566 ((uint32_t)confCh->exClk << _LESENSE_CH_INTERACT_EXCLK_SHIFT)
567 | ((uint32_t)confCh->sampleClk << _LESENSE_CH_INTERACT_SAMPLECLK_SHIFT)
568 | (uint32_t)confCh->sampleMode
569 | (uint32_t)confCh->intMode
570 | (uint32_t)confCh->chPinExMode
571 | ((uint32_t)confCh->useAltEx << _LESENSE_CH_INTERACT_ALTEX_SHIFT);
576 LESENSE->CH[chIdx].EVAL =
577 (uint32_t)confCh->compMode
578 | ((uint32_t)confCh->shiftRes << _LESENSE_CH_EVAL_DECODE_SHIFT)
579 | ((uint32_t)confCh->storeCntRes << _LESENSE_CH_EVAL_STRSAMPLE_SHIFT)
580 | ((uint32_t)confCh->invRes << _LESENSE_CH_EVAL_SCANRESINV_SHIFT)
581 #
if defined(_LESENSE_CH_EVAL_MODE_MASK)
582 | ((uint32_t)confCh->evalMode << _LESENSE_CH_EVAL_MODE_SHIFT)
588 LESENSE_ChannelThresSet(chIdx,
620 void LESENSE_AltExConfig(
const LESENSE_ConfAltEx_TypeDef * confAltEx)
630 _LESENSE_CTRL_ALTEXMAP_SHIFT,
631 confAltEx->altExMap);
633 switch (confAltEx->altExMap)
635 case lesenseAltExMapALTEX:
637 for (i = 0U; i < 8U; ++i)
644 confAltEx->AltEx[i].enablePin);
649 tmp = (LESENSE->ALTEXCONF & ~((uint32_t)0x3UL << (i * 2UL)));
650 tmp |= ((uint32_t)confAltEx->AltEx[i].idleConf << (i * 2UL));
651 LESENSE->ALTEXCONF = tmp;
656 confAltEx->AltEx[i].alwaysEx);
660 #if defined(_LESENSE_CTRL_ALTEXMAP_ACMP)
661 case lesenseAltExMapACMP:
663 case lesenseAltExMapCH:
666 for (i = 0U; i < 16U; ++i)
673 confAltEx->AltEx[i].enablePin);
708 void LESENSE_ChannelEnable(uint8_t chIdx,
745 void LESENSE_ChannelEnableMask(uint16_t chMask, uint16_t pinMask)
748 LESENSE->CHEN = chMask;
750 GENERIC_LESENSE_ROUTE = pinMask;
782 void LESENSE_ChannelTimingSet(uint8_t chIdx,
788 EFM_ASSERT(exTime <= (_LESENSE_CH_TIMING_EXTIME_MASK >> _LESENSE_CH_TIMING_EXTIME_SHIFT));
789 EFM_ASSERT(measDelay <= (_LESENSE_CH_TIMING_MEASUREDLY_MASK >> _LESENSE_CH_TIMING_MEASUREDLY_SHIFT));
790 #if defined(_SILICON_LABS_32B_SERIES_0)
792 EFM_ASSERT(sampleDelay <= (_LESENSE_CH_TIMING_SAMPLEDLY_MASK >> _LESENSE_CH_TIMING_SAMPLEDLY_SHIFT));
797 LESENSE->CH[chIdx].TIMING =
798 ((uint32_t)exTime << _LESENSE_CH_TIMING_EXTIME_SHIFT)
799 | ((uint32_t)sampleDelay << _LESENSE_CH_TIMING_SAMPLEDLY_SHIFT)
800 | ((uint32_t)measDelay << _LESENSE_CH_TIMING_MEASUREDLY_SHIFT);
837 void LESENSE_ChannelThresSet(uint8_t chIdx,
845 EFM_ASSERT(acmpThres < 4096U);
847 EFM_ASSERT(chIdx < LESENSE_NUM_CHANNELS);
851 tmp = LESENSE->CH[chIdx].INTERACT & ~(0xFFF);
853 tmp |= (uint32_t)acmpThres;
855 LESENSE->CH[chIdx].INTERACT = tmp;
859 tmp = LESENSE->CH[chIdx].EVAL & ~(_LESENSE_CH_EVAL_COMPTHRES_MASK);
861 tmp |= (uint32_t)cntThres << _LESENSE_CH_EVAL_COMPTHRES_SHIFT;
863 LESENSE->CH[chIdx].EVAL = tmp;
866 #if defined(_LESENSE_CH_EVAL_MODE_MASK)
892 void LESENSE_ChannelSlidingWindow(uint8_t chIdx,
896 LESENSE_CH_TypeDef * ch = &LESENSE->CH[chIdx];
898 LESENSE_WindowSizeSet(windowSize);
899 ch->EVAL = (ch->EVAL & ~(_LESENSE_CH_EVAL_COMPTHRES_MASK | _LESENSE_CH_EVAL_MODE_MASK))
900 | (initValue << _LESENSE_CH_EVAL_COMPTHRES_SHIFT)
901 | LESENSE_CH_EVAL_MODE_SLIDINGWIN;
929 void LESENSE_ChannelStepDetection(uint8_t chIdx,
933 LESENSE_CH_TypeDef * ch = &LESENSE->CH[chIdx];
935 LESENSE_StepSizeSet(stepSize);
936 ch->EVAL = (ch->EVAL & ~(_LESENSE_CH_EVAL_COMPTHRES_MASK | _LESENSE_CH_EVAL_MODE_MASK))
937 | (initValue << _LESENSE_CH_EVAL_COMPTHRES_SHIFT)
938 | LESENSE_CH_EVAL_MODE_STEPDET;
958 void LESENSE_WindowSizeSet(uint32_t windowSize)
960 LESENSE->EVALCTRL = (LESENSE->EVALCTRL & ~_LESENSE_EVALCTRL_WINSIZE_MASK)
977 void LESENSE_StepSizeSet(uint32_t stepSize)
979 LESENSE_WindowSizeSet(stepSize);
999 void LESENSE_DecoderStateAllConfig(
const LESENSE_DecStAll_TypeDef * confDecStAll)
1004 for (i = 0U; i < LESENSE_NUM_DECODER_STATES; ++i)
1007 LESENSE_DecoderStateConfig(&confDecStAll->St[i], i);
1027 void LESENSE_DecoderStateConfig(
const LESENSE_DecStDesc_TypeDef * confDecSt,
1031 EFM_ASSERT(decSt < LESENSE_NUM_DECODER_STATES);
1032 EFM_ASSERT((uint32_t)confDecSt->confA.compMask < 16U);
1033 EFM_ASSERT((uint32_t)confDecSt->confA.compVal < 16U);
1034 EFM_ASSERT((uint32_t)confDecSt->confA.nextState < LESENSE_NUM_DECODER_STATES);
1035 EFM_ASSERT((uint32_t)confDecSt->confB.compMask < 16U);
1036 EFM_ASSERT((uint32_t)confDecSt->confB.compVal < 16U);
1037 EFM_ASSERT((uint32_t)confDecSt->confB.nextState < LESENSE_NUM_DECODER_STATES);
1043 LESENSE->ST[decSt].TCONFA =
1044 (uint32_t)confDecSt->confA.prsAct
1045 | ((uint32_t)confDecSt->confA.compMask << _LESENSE_ST_TCONFA_MASK_SHIFT)
1046 | ((uint32_t)confDecSt->confA.compVal << _LESENSE_ST_TCONFA_COMP_SHIFT)
1047 | ((uint32_t)confDecSt->confA.nextState << _LESENSE_ST_TCONFA_NEXTSTATE_SHIFT)
1048 | ((uint32_t)confDecSt->confA.setInt << _LESENSE_ST_TCONFA_SETIF_SHIFT)
1049 | ((uint32_t)confDecSt->chainDesc << _LESENSE_ST_TCONFA_CHAIN_SHIFT);
1054 LESENSE->ST[decSt].TCONFB =
1055 (uint32_t)confDecSt->confB.prsAct
1056 | ((uint32_t)confDecSt->confB.compMask << _LESENSE_ST_TCONFB_MASK_SHIFT)
1057 | ((uint32_t)confDecSt->confB.compVal << _LESENSE_ST_TCONFB_COMP_SHIFT)
1058 | ((uint32_t)confDecSt->confB.nextState << _LESENSE_ST_TCONFB_NEXTSTATE_SHIFT)
1059 | ((uint32_t)confDecSt->confB.setInt << _LESENSE_ST_TCONFB_SETIF_SHIFT);
1079 void LESENSE_DecoderStateSet(uint32_t decSt)
1081 EFM_ASSERT(decSt <= _LESENSE_DECSTATE_DECSTATE_MASK);
1083 LESENSE->DECSTATE = decSt & _LESENSE_DECSTATE_DECSTATE_MASK;
1095 uint32_t LESENSE_DecoderStateGet(
void)
1097 return LESENSE->DECSTATE & _LESENSE_DECSTATE_DECSTATE_MASK;
1100 #if defined(_LESENSE_PRSCTRL_MASK)
1115 void LESENSE_DecoderPrsOut(
bool enable, uint32_t decMask, uint32_t decVal)
1117 LESENSE->PRSCTRL = (enable << _LESENSE_PRSCTRL_DECCMPEN_SHIFT)
1118 | (decMask << _LESENSE_PRSCTRL_DECCMPMASK_SHIFT)
1119 | (decVal << _LESENSE_PRSCTRL_DECCMPVAL_SHIFT);
1136 void LESENSE_ScanStart(
void)
1140 while (LESENSE_SYNCBUSY_CMD & LESENSE->SYNCBUSY)
1144 LESENSE->CMD = LESENSE_CMD_START;
1148 while (LESENSE_SYNCBUSY_CMD & LESENSE->SYNCBUSY)
1169 void LESENSE_ScanStop(
void)
1173 while (LESENSE_SYNCBUSY_CMD & LESENSE->SYNCBUSY)
1177 LESENSE->CMD = LESENSE_CMD_STOP;
1181 while (LESENSE_SYNCBUSY_CMD & LESENSE->SYNCBUSY)
1199 void LESENSE_DecoderStart(
void)
1203 while (LESENSE_SYNCBUSY_CMD & LESENSE->SYNCBUSY)
1207 LESENSE->CMD = LESENSE_CMD_DECODE;
1211 while (LESENSE_SYNCBUSY_CMD & LESENSE->SYNCBUSY)
1229 void LESENSE_ResultBufferClear(
void)
1233 while (LESENSE_SYNCBUSY_CMD & LESENSE->SYNCBUSY)
1236 LESENSE->CMD = LESENSE_CMD_CLEARBUF;
1240 while (LESENSE_SYNCBUSY_CMD & LESENSE->SYNCBUSY)
1258 void LESENSE_Reset(
void)
1263 LESENSE->IEN = _LESENSE_IEN_RESETVALUE;
1266 LESENSE->IFC = _LESENSE_IFC_MASK;
1269 LESENSE->DECCTRL |= LESENSE_DECCTRL_DISABLE;
1273 while (LESENSE_SYNCBUSY_CMD & LESENSE->SYNCBUSY)
1277 LESENSE->CMD = (LESENSE_CMD_STOP | LESENSE_CMD_CLEARBUF);
1280 LESENSE->CTRL = _LESENSE_CTRL_RESETVALUE;
1281 LESENSE->PERCTRL = _LESENSE_PERCTRL_RESETVALUE;
1282 LESENSE->DECCTRL = _LESENSE_DECCTRL_RESETVALUE;
1283 LESENSE->BIASCTRL = _LESENSE_BIASCTRL_RESETVALUE;
1284 #if defined(_LESENSE_EVALCTRL_MASK)
1285 LESENSE->EVALCTRL = _LESENSE_EVALCTRL_RESETVALUE;
1286 LESENSE->PRSCTRL = _LESENSE_PRSCTRL_RESETVALUE;
1288 LESENSE->CHEN = _LESENSE_CHEN_RESETVALUE;
1289 LESENSE->IDLECONF = _LESENSE_IDLECONF_RESETVALUE;
1290 LESENSE->ALTEXCONF = _LESENSE_ALTEXCONF_RESETVALUE;
1293 #if defined(_LESENSE_ROUTE_MASK)
1294 LESENSE->ROUTE = _LESENSE_ROUTE_RESETVALUE;
1296 LESENSE->ROUTEPEN = _LESENSE_ROUTEPEN_RESETVALUE;
1300 for (i = 0U; i < LESENSE_NUM_CHANNELS; ++i)
1302 LESENSE->CH[i].TIMING = _LESENSE_CH_TIMING_RESETVALUE;
1303 LESENSE->CH[i].INTERACT = _LESENSE_CH_INTERACT_RESETVALUE;
1304 LESENSE->CH[i].EVAL = _LESENSE_CH_EVAL_RESETVALUE;
1308 for (i = 0U; i < LESENSE_NUM_DECODER_STATES; ++i)
1310 LESENSE->ST[i].TCONFA = _LESENSE_ST_TCONFA_RESETVALUE;
1311 LESENSE->ST[i].TCONFB = _LESENSE_ST_TCONFB_RESETVALUE;
1316 while (LESENSE_SYNCBUSY_CMD & LESENSE->SYNCBUSY)
Clock management unit (CMU) API.
Emlib peripheral API "assert" implementation.
RAM and peripheral bit-field set and clear API.
Low Energy Sensor (LESENSE) peripheral API.
__STATIC_INLINE void BUS_RegBitWrite(volatile uint32_t *addr, unsigned int bit, unsigned int val)
Perform a single-bit write operation on a peripheral register.
uint32_t CMU_ClockFreqGet(CMU_Clock_TypeDef clock)
Get clock frequency for a clock point.