MotorWare f2806x Driver API Documentation

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

clk.h
Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
2 * Copyright (c) 2015, Texas Instruments Incorporated
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 * --/COPYRIGHT--*/
32 #ifndef _CLK_H_
33 #define _CLK_H_
34
40
41
42 // **************************************************************************
43 // the includes
44
45 #include "sw/modules/types/src/types.h"
46
47 #include "sw/drivers/cpu/src/32b/f28x/f2806x/cpu.h"
48
49 #include "sw/drivers/pwm/src/32b/f28x/f2806x/pwm.h"
50
51
56
57
58
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62
63
64 // **************************************************************************
65 // the defines
66
67
70 #define CLK_BASE_ADDR (0x00007010)
71
74 #define CLK_PCLKCR0_HRPWMENCLK_BITS (1 << 0)
75
78 #define CLK_PCLKCR0_LINAENCLK_BITS (1 << 1)
79
82 #define CLK_PCLKCR0_TBCLKSYNC_BITS (1 << 2)
83
86 #define CLK_PCLKCR0_ADCENCLK_BITS (1 << 3)
87
90 #define CLK_PCLKCR0_I2CAENCLK_BITS (1 << 4)
91
94 #define CLK_PCLKCR0_SPIAENCLK_BITS (1 << 8)
95
98 #define CLK_PCLKCR0_SPIBENCLK_BITS (1 << 9)
99
102 #define CLK_PCLKCR0_SCIAENCLK_BITS (1 << 10)
103
106 #define CLK_PCLKCR0_SCIBENCLK_BITS (1 << 11)
107
110 #define CLK_PCLKCR0_ECANAENCLK_BITS (1 << 14)
111
112
115 #define CLK_PCLKCR1_EPWM1ENCLK_BITS (1 << 0)
116
119 #define CLK_PCLKCR1_EPWM2ENCLK_BITS (1 << 1)
120
123 #define CLK_PCLKCR1_EPWM3ENCLK_BITS (1 << 2)
124
127 #define CLK_PCLKCR1_EPWM4ENCLK_BITS (1 << 3)
128
131 #define CLK_PCLKCR1_EPWM5ENCLK_BITS (1 << 4)
132
135 #define CLK_PCLKCR1_EPWM6ENCLK_BITS (1 << 5)
136
139 #define CLK_PCLKCR1_EPWM7ENCLK_BITS (1 << 6)
140
143 #define CLK_PCLKCR1_ECAP1ENCLK_BITS (1 << 8)
144
147 #define CLK_PCLKCR1_EQEP1ENCLK_BITS (1 << 14)
148
151 #define CLK_PCLKCR1_EQEP2ENCLK_BITS (1 << 15)
152
155 #define CLK_PCLKCR3_COMP1ENCLK_BITS (1 << 0)
156
159 #define CLK_PCLKCR3_COMP2ENCLK_BITS (1 << 1)
160
163 #define CLK_PCLKCR3_COMP3ENCLK_BITS (1 << 2)
164
167 #define CLK_PCLKCR3_CPUTIMER0ENCLK_BITS (1 << 8)
168
171 #define CLK_PCLKCR3_CPUTIMER1ENCLK_BITS (1 << 9)
172
175 #define CLK_PCLKCR3_CPUTIMER2ENCLK_BITS (1 << 10)
176
179 #define CLK_PCLKCR3_GPIOINENCLK_BITS (1 << 13)
180
183 #define CLK_PCLKCR3_CLA1ENCLK_BITS (1 << 14)
184
185
188 #define CLK_LOSPCP_LSPCLK_BITS (7 << 0)
189
190
193 #define CLK_XCLK_XCLKOUTDIV_BITS (3 << 0)
194
197 #define CLK_XCLK_XCLKINSEL_BITS (1 << 6)
198
199
202 #define CLK_CLKCTL_OSCCLKSRCSEL_BITS (1 << 0)
203
206 #define CLK_CLKCTL_OSCCLKSRC2SEL_BITS (1 << 1)
207
210 #define CLK_CLKCTL_WDCLKSRCSEL_BITS (1 << 2)
211
214 #define CLK_CLKCTL_TMR2CLKSRCSEL_BITS (3 << 3)
215
218 #define CLK_CLKCTL_TMR2CLKPRESCALE_BITS (7 << 5)
219
222 #define CLK_CLKCTL_INTOSC1OFF_BITS (1 << 8)
223
226 #define CLK_CLKCTL_INTOSC1HALTI_BITS (1 << 9)
227
230 #define CLK_CLKCTL_INTOSC2OFF_BITS (1 << 10)
231
234 #define CLK_CLKCTL_INTOSC2HALTI_BITS (1 << 11)
235
238 #define CLK_CLKCTL_WDHALTI_BITS (1 << 12)
239
242 #define CLK_CLKCTL_XCLKINOFF_BITS (1 << 13)
243
246 #define CLK_CLKCTL_XTALOSCOFF_BITS (1 << 14)
247
250 #define CLK_CLKCTL_NMIRESETSEL_BITS (1 << 15)
251
252
253 // **************************************************************************
254 // the typedefs
255
256
259 typedef enum
260 {
261 CLK_ClkOutPreScaler_SysClkOut_by_4=(0 << 0),
262 CLK_ClkOutPreScaler_SysClkOut_by_2=(1 << 0),
263 CLK_ClkOutPreScaler_SysClkOut_by_1=(2 << 0),
264 CLK_ClkOutPreScaler_Off
265 } CLK_ClkOutPreScaler_e;
266
267
270 typedef enum
271 {
272 CLK_CompNumber_1=(1 << 0),
273 CLK_CompNumber_2=(1 << 1),
274 CLK_CompNumber_3=(1 << 2)
275 } CLK_CompNumber_e;
276
277
280 typedef enum
281 {
282 CLK_CpuTimerNumber_0=(1 << 8),
283 CLK_CpuTimerNumber_1=(1 << 9),
284 CLK_CpuTimerNumber_2=(1 << 10)
285 } CLK_CpuTimerNumber_e;
286
287
290 typedef enum
291 {
292 CLK_LowSpdPreScaler_SysClkOut_by_1=(0 << 0),
293 CLK_LowSpdPreScaler_SysClkOut_by_2=(1 << 0),
294 CLK_LowSpdPreScaler_SysClkOut_by_4=(2 << 0),
295 CLK_LowSpdPreScaler_SysClkOut_by_6=(3 << 0),
296 CLK_LowSpdPreScaler_SysClkOut_by_8=(4 << 0),
297 CLK_LowSpdPreScaler_SysClkOut_by_10=(5 << 0),
298 CLK_LowSpdPreScaler_SysClkOut_by_12=(6 << 0),
299 CLK_LowSpdPreScaler_SysClkOut_by_14=(7 << 0)
300 } CLK_LowSpdPreScaler_e;
301
302
305 typedef enum
306 {
307 CLK_XClkInSrc_Gpio38=(0 << 6),
308 CLK_XClkInSrc_Gpio19=(1 << 6)
309 } CLK_XClkInSrc_e;
310
311
314 typedef enum
315 {
316 CLK_OscSrc_Internal=(0 << 0),
317 CLK_OscSrc_External=(1 << 0)
318 } CLK_OscSrc_e;
319
320
323 typedef enum
324 {
325 CLK_Osc2Src_Internal=(1 << 1),
326 CLK_Osc2Src_External=(0 << 1)
327 } CLK_Osc2Src_e;
328
329
332 typedef enum
333 {
334 CLK_Timer2PreScaler_by_1=(0 << 5),
335 CLK_Timer2PreScaler_by_2=(1 << 5),
336 CLK_Timer2PreScaler_by_4=(2 << 5),
337 CLK_Timer2PreScaler_by_8=(3 << 5),
338 CLK_Timer2PreScaler_by_16=(4 << 5)
339 } CLK_Timer2PreScaler_e;
340
341
344 typedef enum
345 {
346 CLK_Timer2Src_SysClk=(0 << 3),
347 CLK_Timer2Src_ExtOsc=(1 << 3),
348 CLK_Timer2Src_IntOsc1=(2 << 3),
349 CLK_Timer2Src_IntOsc2=(3 << 3)
350 } CLK_Timer2Src_e;
351
352
355 typedef enum
356 {
357 CLK_WdClkSrc_IntOsc1=(0 << 2),
358 CLK_WdClkSrc_ExtOscOrIntOsc2=(1 << 2)
359 } CLK_WdClkSrc_e;
360
361
364 typedef struct _CLK_Obj_
365 {
366 volatile uint16_t XCLK;
367 volatile uint16_t rsvd_1;
368 volatile uint16_t CLKCTL;
369 volatile uint16_t rsvd_2[8];
370 volatile uint16_t LOSPCP;
371 volatile uint16_t PCLKCR0;
372 volatile uint16_t PCLKCR1;
373 volatile uint16_t rsvd_3[2];
374 volatile uint16_t PCLKCR3;
375 } CLK_Obj;
376
377
380 typedef struct _CLK_Obj_ *CLK_Handle;
381
382
383 // **************************************************************************
384 // the globals
385
386
387 // **************************************************************************
388 // the function prototypes
389
390
393 extern void CLK_disableAdcClock(CLK_Handle clkHandle);
394
395
398 extern void CLK_disableClaClock(CLK_Handle clkHandle);
399
400
403 extern void CLK_disableClkIn(CLK_Handle clkHandle);
404
405
409 extern void CLK_disableCompClock(CLK_Handle clkHandle,const CLK_CompNumber_e compNumber);
410
411
415 extern void CLK_disableCpuTimerClock(CLK_Handle clkHandle,
416 const CLK_CpuTimerNumber_e cpuTimerNumber);
417
418
421 extern void CLK_disableCrystalOsc(CLK_Handle clkHandle);
422
423
426 extern void CLK_disableEcanaClock(CLK_Handle clkHandle);
427
428
431 extern void CLK_disableEcap1Clock(CLK_Handle clkHandle);
432
433
436 extern void CLK_disableEqep1Clock(CLK_Handle clkHandle);
437
440 extern void CLK_disableEqep2Clock(CLK_Handle clkHandle);
441
442
445 extern void CLK_disableGpioInputClock(CLK_Handle clkHandle);
446
447
450 extern void CLK_disableHrPwmClock(CLK_Handle clkHandle);
451
452
455 extern void CLK_disableI2cClock(CLK_Handle clkHandle);
456
457
460 extern void CLK_disableLinAClock(CLK_Handle clkHandle);
461
462
465 extern void CLK_disableOsc1(CLK_Handle clkHandle);
466
467
470 extern void CLK_disableOsc1HaltMode(CLK_Handle clkHandle);
471
472
475 extern void CLK_disableOsc2(CLK_Handle clkHandle);
476
477
480 extern void CLK_disableOsc2HaltMode(CLK_Handle clkHandle);
481
482
486 extern void CLK_disablePwmClock(CLK_Handle clkHandle,const PWM_Number_e pwmNumber);
487
488
491 extern void CLK_disableSciaClock(CLK_Handle clkHandle);
492
493
496 extern void CLK_disableScibClock(CLK_Handle clkHandle);
497
498
501 extern void CLK_disableSpiaClock(CLK_Handle clkHandle);
502
503
506 extern void CLK_disableSpibClock(CLK_Handle clkHandle);
507
508
511 extern void CLK_disableTbClockSync(CLK_Handle clkHandle);
512
513
516 extern void CLK_disableWatchDogHaltMode(CLK_Handle clkHandle);
517
518
521 extern void CLK_enableAdcClock(CLK_Handle clkHandle);
522
523
526 extern void CLK_enableClaClock(CLK_Handle clkHandle);
527
528
531 extern void CLK_enableClkIn(CLK_Handle clkHandle);
532
533
537 extern void CLK_enableCompClock(CLK_Handle clkHandle,const CLK_CompNumber_e compNumber);
538
539
543 extern void CLK_enableCpuTimerClock(CLK_Handle clkHandle,
544 const CLK_CpuTimerNumber_e cpuTimerNumber);
545
546
549 extern void CLK_enableCrystalOsc(CLK_Handle clkHandle);
550
551
554 extern void CLK_enableEcanaClock(CLK_Handle clkHandle);
555
556
559 extern void CLK_enableEcap1Clock(CLK_Handle clkHandle);
560
561
564 extern void CLK_enableEqep1Clock(CLK_Handle clkHandle);
565
568 extern void CLK_enableEqep2Clock(CLK_Handle clkHandle);
569
570
573 extern void CLK_enableGpioInputClock(CLK_Handle clkHandle);
574
575
578 extern void CLK_enableHrPwmClock(CLK_Handle clkHandle);
579
580
583 extern void CLK_enableI2cClock(CLK_Handle clkHandle);
584
585
588 extern void CLK_enableLinAClock(CLK_Handle clkHandle);
589
590
593 extern void CLK_enableOsc1(CLK_Handle clkHandle);
594
595
598 extern void CLK_enableOsc1HaltMode(CLK_Handle clkHandle);
599
600
603 extern void CLK_enableOsc2(CLK_Handle clkHandle);
604
605
608 extern void CLK_enableOsc2HaltMode(CLK_Handle clkHandle);
609
610
614 extern void CLK_enablePwmClock(CLK_Handle clkHandle,const PWM_Number_e pwmNumber);
615
616
619 extern void CLK_enableSciaClock(CLK_Handle clkHandle);
620
621
624 extern void CLK_enableScibClock(CLK_Handle clkHandle);
625
626
629 extern void CLK_enableSpiaClock(CLK_Handle clkHandle);
630
631
634 extern void CLK_enableSpibClock(CLK_Handle clkHandle);
635
636
639 extern void CLK_enableTbClockSync(CLK_Handle clkHandle);
640
641
644 extern void CLK_enableWatchDogHaltMode(CLK_Handle clkHandle);
645
646
651 extern CLK_Handle CLK_init(void *pMemory,const size_t numBytes);
652
653
657 extern void CLK_setClkOutPreScaler(CLK_Handle clkHandle,
658 const CLK_ClkOutPreScaler_e preScaler);
659
660
664 extern void CLK_setLowSpdPreScaler(CLK_Handle clkHandle,
665 const CLK_LowSpdPreScaler_e preScaler);
666
667
671 extern void CLK_setOscSrc(CLK_Handle clkHandle,const CLK_OscSrc_e src);
672
673
677 extern void CLK_setOsc2Src(CLK_Handle clkHandle,const CLK_Osc2Src_e src);
678
679
683 extern void CLK_setXClkInSrc(CLK_Handle clkHandle, const CLK_XClkInSrc_e src);
684
685
689 extern void CLK_setTimer2PreScaler(CLK_Handle clkHandle,
690 const CLK_Timer2PreScaler_e preScaler);
691
692
696 extern void CLK_setTimer2Src(CLK_Handle clkHandle,const CLK_Timer2Src_e src);
697
698
702 extern void CLK_setWatchDogSrc(CLK_Handle clkHandle,const CLK_WdClkSrc_e src);
703
704
705 #ifdef __cplusplus
706 }
707 #endif // extern "C"
708
710 #endif // end of _CLK_H_ definition
711
CLK_XClkInSrc_e
CLK_XClkInSrc_e
Enumeration to define the clock in source.
Definition: clk.h:305
CLK_disableCpuTimerClock
void CLK_disableCpuTimerClock(CLK_Handle clkHandle, const CLK_CpuTimerNumber_e cpuTimerNumber)
Disables the CPU timer clock.
Definition: clk.c:117
_CLK_Obj_::rsvd_2
volatile uint16_t rsvd_2[8]
Reserved.
Definition: clk.h:369
CLK_LowSpdPreScaler_SysClkOut_by_1
Denotes Low Speed Clock = SYSCLKOUT/1.
Definition: clk.h:292
CLK_disableAdcClock
void CLK_disableAdcClock(CLK_Handle clkHandle)
Disables the ADC clock.
Definition: clk.c:57
_CLK_Obj_
Defines the clock (CLK) object.
Definition: clk.h:364
CLK_enableSpiaClock
void CLK_enableSpiaClock(CLK_Handle clkHandle)
Enables the SPI-A clock.
Definition: clk.c:782
CLK_Osc2Src_e
CLK_Osc2Src_e
Enumeration to define the clock oscillator 2 source.
Definition: clk.h:323
pwm.h
Contains public interface to various functions related to the pulse width modulation (PWM) object...
CLK_WdClkSrc_IntOsc1
Denotes the watchdog clock source is internal oscillator 1.
Definition: clk.h:357
CLK_disableSpibClock
void CLK_disableSpibClock(CLK_Handle clkHandle)
Disables the SPI-B clock.
Definition: clk.c:404
CLK_setXClkInSrc
void CLK_setXClkInSrc(CLK_Handle clkHandle, const CLK_XClkInSrc_e src)
Sets the XCLKIN Clock Source.
Definition: clk.c:936
CLK_LowSpdPreScaler_SysClkOut_by_14
Denotes Low Speed Clock = SYSCLKOUT/14.
Definition: clk.h:299
CLK_disableTbClockSync
void CLK_disableTbClockSync(CLK_Handle clkHandle)
Disables the ePWM module time base clock sync signal.
Definition: clk.c:416
CLK_OscSrc_External
Denotes an external oscillator source.
Definition: clk.h:317
CLK_enableTbClockSync
void CLK_enableTbClockSync(CLK_Handle clkHandle)
Enables the ePWM module time base clock sync signal.
Definition: clk.c:814
CLK_disableEqep1Clock
void CLK_disableEqep1Clock(CLK_Handle clkHandle)
Disables the EQEP1 clock.
Definition: clk.c:181
CLK_setOscSrc
void CLK_setOscSrc(CLK_Handle clkHandle, const CLK_OscSrc_e src)
Sets the oscillator clock source.
Definition: clk.c:898
CLK_Timer2PreScaler_by_16
Denotes a CPU timer 2 clock pre-scaler value of divide by 16.
Definition: clk.h:338
CLK_setWatchDogSrc
void CLK_setWatchDogSrc(CLK_Handle clkHandle, const CLK_WdClkSrc_e src)
Sets the watchdog clock source.
Definition: clk.c:993
CLK_enableClkIn
void CLK_enableClkIn(CLK_Handle clkHandle)
Enables the XCLKIN oscillator input.
Definition: clk.c:590
CLK_Timer2Src_ExtOsc
Denotes the CPU timer 2 clock source is external oscillator.
Definition: clk.h:347
CLK_disableEcanaClock
void CLK_disableEcanaClock(CLK_Handle clkHandle)
Disables the ECANA clock.
Definition: clk.c:149
CLK_LowSpdPreScaler_SysClkOut_by_12
Denotes Low Speed Clock = SYSCLKOUT/12.
Definition: clk.h:298
CLK_enableSciaClock
void CLK_enableSciaClock(CLK_Handle clkHandle)
Enables the SCI-A clock.
Definition: clk.c:750
CLK_CompNumber_1
Denotes comparator number 1.
Definition: clk.h:272
CLK_Osc2Src_Internal
Denotes an internal oscillator 2 source.
Definition: clk.h:325
CLK_enableCpuTimerClock
void CLK_enableCpuTimerClock(CLK_Handle clkHandle, const CLK_CpuTimerNumber_e cpuTimerNumber)
Enables the CPU timer clock.
Definition: clk.c:496
CLK_enableWatchDogHaltMode
void CLK_enableWatchDogHaltMode(CLK_Handle clkHandle)
Enables the watchdog halt mode ignore.
Definition: clk.c:830
CLK_LowSpdPreScaler_e
CLK_LowSpdPreScaler_e
Enumeration to define the low speed clock prescaler, which sets the clock frequency.
Definition: clk.h:290
CLK_XClkInSrc_Gpio38
Definition: clk.h:307
CLK_setTimer2PreScaler
void CLK_setTimer2PreScaler(CLK_Handle clkHandle, const CLK_Timer2PreScaler_e preScaler)
Sets the timer 2 clock prescaler.
CLK_Obj
struct _CLK_Obj_ CLK_Obj
Defines the clock (CLK) object.
CLK_LowSpdPreScaler_SysClkOut_by_10
Denotes Low Speed Clock = SYSCLKOUT/10.
Definition: clk.h:297
CLK_XClkInSrc_Gpio19
Definition: clk.h:308
CLK_CpuTimerNumber_0
Denotes CPU timer number 0.
Definition: clk.h:282
CLK_Timer2Src_SysClk
Denotes the CPU timer 2 clock source is SYSCLKOUT.
Definition: clk.h:346
CLK_disableScibClock
void CLK_disableScibClock(CLK_Handle clkHandle)
Disables the SCI-B clock.
Definition: clk.c:372
CLK_enableCompClock
void CLK_enableCompClock(CLK_Handle clkHandle, const CLK_CompNumber_e compNumber)
Enables the comparator clock.
Definition: clk.c:480
CLK_Timer2PreScaler_by_4
Denotes a CPU timer 2 clock pre-scaler value of divide by 4.
Definition: clk.h:336
CLK_enableOsc2
void CLK_enableOsc2(CLK_Handle clkHandle)
Enables internal oscillator 2.
Definition: clk.c:702
CLK_disableClkIn
void CLK_disableClkIn(CLK_Handle clkHandle)
Disables the XCLKIN oscillator input.
Definition: clk.c:89
CLK_enableScibClock
void CLK_enableScibClock(CLK_Handle clkHandle)
Enables the SCI-B clock.
Definition: clk.c:766
CLK_init
CLK_Handle CLK_init(void *pMemory, const size_t numBytes)
Initializes the clock (CLK) object handle.
Definition: clk.c:846
_CLK_Obj_::rsvd_3
volatile uint16_t rsvd_3[2]
Reserved.
Definition: clk.h:373
CLK_LowSpdPreScaler_SysClkOut_by_6
Denotes Low Speed Clock = SYSCLKOUT/6.
Definition: clk.h:295
CLK_ClkOutPreScaler_SysClkOut_by_4
Denotes XCLKOUT = SYSCLKOUT/4.
Definition: clk.h:261
CLK_enableClaClock
void CLK_enableClaClock(CLK_Handle clkHandle)
Enables the CLA clock.
Definition: clk.c:464
CLK_setTimer2Src
void CLK_setTimer2Src(CLK_Handle clkHandle, const CLK_Timer2Src_e src)
Sets the timer 2 clock source.
Definition: clk.c:974
_CLK_Obj_::LOSPCP
volatile uint16_t LOSPCP
Low-Speed Peripheral Clock Pre-Scaler Register.
Definition: clk.h:370
CLK_setOsc2Src
void CLK_setOsc2Src(CLK_Handle clkHandle, const CLK_Osc2Src_e src)
Sets the oscillator 2 clock source.
Definition: clk.c:917
CLK_CompNumber_e
CLK_CompNumber_e
Enumeration to define the comparator numbers.
Definition: clk.h:270
CLK_Timer2PreScaler_by_2
Denotes a CPU timer 2 clock pre-scaler value of divide by 2.
Definition: clk.h:335
CLK_LowSpdPreScaler_SysClkOut_by_4
Denotes Low Speed Clock = SYSCLKOUT/4.
Definition: clk.h:294
CLK_ClkOutPreScaler_e
CLK_ClkOutPreScaler_e
Enumeration to define the external clock output frequency.
Definition: clk.h:259
CLK_Handle
struct _CLK_Obj_ * CLK_Handle
Defines the clock (CLK) handle.
Definition: clk.h:380
CLK_enableSpibClock
void CLK_enableSpibClock(CLK_Handle clkHandle)
Enables the SPI-B clock.
Definition: clk.c:798
CLK_enableGpioInputClock
void CLK_enableGpioInputClock(CLK_Handle clkHandle)
Enables the GPIO input clock.
Definition: clk.c:606
CLK_Timer2PreScaler_e
CLK_Timer2PreScaler_e
Enumeration to define the timer 2 prescaler, which sets the timer 2 frequency.
Definition: clk.h:332
CLK_enableEqep2Clock
void CLK_enableEqep2Clock(CLK_Handle clkHandle)
Enables the EQEP2 clock.
Definition: clk.c:559
CLK_OscSrc_Internal
Denotes an internal oscillator source.
Definition: clk.h:316
CLK_disableOsc2HaltMode
void CLK_disableOsc2HaltMode(CLK_Handle clkHandle)
Disables internal oscillator 2 halt mode ignore.
Definition: clk.c:324
CLK_disablePwmClock
void CLK_disablePwmClock(CLK_Handle clkHandle, const PWM_Number_e pwmNumber)
Disables the pwm clock.
Definition: clk.c:340
CLK_enableEqep1Clock
void CLK_enableEqep1Clock(CLK_Handle clkHandle)
Enables the EQEP1 clock.
Definition: clk.c:544
CLK_enableLinAClock
void CLK_enableLinAClock(CLK_Handle clkHandle)
Enables the LIN-A clock.
Definition: clk.c:654
CLK_CompNumber_3
Denotes comparator number 3.
Definition: clk.h:274
CLK_setLowSpdPreScaler
void CLK_setLowSpdPreScaler(CLK_Handle clkHandle, const CLK_LowSpdPreScaler_e preScaler)
Sets the low speed peripheral clock prescaler.
Definition: clk.c:881
CLK_disableI2cClock
void CLK_disableI2cClock(CLK_Handle clkHandle)
Disables the I2C clock.
Definition: clk.c:244
CLK_Timer2Src_e
CLK_Timer2Src_e
Enumeration to define the timer 2 source.
Definition: clk.h:344
_CLK_Obj_::XCLK
volatile uint16_t XCLK
XCLKOUT/XCLKIN Control.
Definition: clk.h:366
CLK_disableSpiaClock
void CLK_disableSpiaClock(CLK_Handle clkHandle)
Disables the SPI-A clock.
Definition: clk.c:388
CLK_enableOsc1
void CLK_enableOsc1(CLK_Handle clkHandle)
Enables internal oscillator 1.
Definition: clk.c:670
CLK_enableEcap1Clock
void CLK_enableEcap1Clock(CLK_Handle clkHandle)
Enables the ECAP1 clock.
Definition: clk.c:574
CLK_disableOsc1HaltMode
void CLK_disableOsc1HaltMode(CLK_Handle clkHandle)
Disables internal oscillator 1 halt mode ignore.
Definition: clk.c:292
CLK_ClkOutPreScaler_SysClkOut_by_2
Denotes XCLKOUT = SYSCLKOUT/2.
Definition: clk.h:262
CLK_LowSpdPreScaler_SysClkOut_by_8
Denotes Low Speed Clock = SYSCLKOUT/8.
Definition: clk.h:296
CLK_disableSciaClock
void CLK_disableSciaClock(CLK_Handle clkHandle)
Disables the SCI-A clock.
Definition: clk.c:356
cpu.h
Contains public interface to various functions related to the central processing unit (CPU) object...
CLK_enableEcanaClock
void CLK_enableEcanaClock(CLK_Handle clkHandle)
Enables the ECANA clock.
Definition: clk.c:528
CLK_disableEqep2Clock
void CLK_disableEqep2Clock(CLK_Handle clkHandle)
Disables the EQEP2 clock.
Definition: clk.c:196
_CLK_Obj_::PCLKCR1
volatile uint16_t PCLKCR1
Peripheral Clock Control Register 1.
Definition: clk.h:372
CLK_disableClaClock
void CLK_disableClaClock(CLK_Handle clkHandle)
Disables the CLA clock.
Definition: clk.c:73
CLK_ClkOutPreScaler_Off
Denotes XCLKOUT = Off.
Definition: clk.h:264
CLK_Timer2PreScaler_by_1
Denotes a CPU timer 2 clock pre-scaler value of divide by 1.
Definition: clk.h:334
CLK_WdClkSrc_ExtOscOrIntOsc2
Denotes the watchdog clock source is external oscillator or internal oscillator 2.
Definition: clk.h:358
CLK_Timer2Src_IntOsc1
Denotes the CPU timer 2 clock source is internal oscillator 1.
Definition: clk.h:348
CLK_WdClkSrc_e
CLK_WdClkSrc_e
Enumeration to define the watchdog clock source.
Definition: clk.h:355
CLK_disableEcap1Clock
void CLK_disableEcap1Clock(CLK_Handle clkHandle)
Disables the ECAP1 clock.
Definition: clk.c:165
CLK_Timer2Src_IntOsc2
Denotes the CPU timer 2 clock source is internal oscillator 2.
Definition: clk.h:349
CLK_enableI2cClock
void CLK_enableI2cClock(CLK_Handle clkHandle)
Enables the I2C clock.
Definition: clk.c:638
_CLK_Obj_::CLKCTL
volatile uint16_t CLKCTL
Clock Control Register.
Definition: clk.h:368
CLK_CpuTimerNumber_1
Denotes CPU timer number 1.
Definition: clk.h:283
CLK_enableOsc1HaltMode
void CLK_enableOsc1HaltMode(CLK_Handle clkHandle)
Enables internal oscillator 1 halt mode ignore.
Definition: clk.c:686
CLK_CpuTimerNumber_2
Denotes CPU timer number 2.
Definition: clk.h:284
CLK_enableCrystalOsc
void CLK_enableCrystalOsc(CLK_Handle clkHandle)
Enables the crystal oscillator.
Definition: clk.c:512
_CLK_Obj_::rsvd_1
volatile uint16_t rsvd_1
Reserved.
Definition: clk.h:367
CLK_CompNumber_2
Denotes comparator number 2.
Definition: clk.h:273
CLK_disableLinAClock
void CLK_disableLinAClock(CLK_Handle clkHandle)
Disables the LIN-A clock.
Definition: clk.c:260
CLK_disableGpioInputClock
void CLK_disableGpioInputClock(CLK_Handle clkHandle)
Disables the GPIO input clock.
Definition: clk.c:212
CLK_setClkOutPreScaler
void CLK_setClkOutPreScaler(CLK_Handle clkHandle, const CLK_ClkOutPreScaler_e preScaler)
Sets the external clock out prescaler.
Definition: clk.c:861
CLK_disableWatchDogHaltMode
void CLK_disableWatchDogHaltMode(CLK_Handle clkHandle)
Disables the watchdog halt mode ignore.
Definition: clk.c:432
_CLK_Obj_::PCLKCR3
volatile uint16_t PCLKCR3
Peripheral Clock Control Register 3.
Definition: clk.h:374
CLK_disableCompClock
void CLK_disableCompClock(CLK_Handle clkHandle, const CLK_CompNumber_e compNumber)
Disables the comparator clock.
Definition: clk.c:105
_CLK_Obj_::PCLKCR0
volatile uint16_t PCLKCR0
Peripheral Clock Control Register 0.
Definition: clk.h:371
CLK_enableOsc2HaltMode
void CLK_enableOsc2HaltMode(CLK_Handle clkHandle)
Enables internal oscillator 2 halt mode ignore.
Definition: clk.c:718
CLK_CpuTimerNumber_e
CLK_CpuTimerNumber_e
Enumeration to define the CPU timer numbers.
Definition: clk.h:280
CLK_enableAdcClock
void CLK_enableAdcClock(CLK_Handle clkHandle)
Enables the ADC clock.
Definition: clk.c:448
PWM_Number_e
PWM_Number_e
Enumeration to define the pulse width modulation (PWM) numbers.
Definition: pwm.h:715
CLK_disableOsc2
void CLK_disableOsc2(CLK_Handle clkHandle)
Disables internal oscillator 2.
Definition: clk.c:308
CLK_enablePwmClock
void CLK_enablePwmClock(CLK_Handle clkHandle, const PWM_Number_e pwmNumber)
Enables the pwm clock.
Definition: clk.c:734
CLK_disableHrPwmClock
void CLK_disableHrPwmClock(CLK_Handle clkHandle)
Disables the HRPWM clock.
Definition: clk.c:228
CLK_OscSrc_e
CLK_OscSrc_e
Enumeration to define the clock oscillator source.
Definition: clk.h:314
CLK_Osc2Src_External
Denotes an external oscillator 2 source.
Definition: clk.h:326
CLK_Timer2PreScaler_by_8
Denotes a CPU timer 2 clock pre-scaler value of divide by 8.
Definition: clk.h:337
CLK_disableCrystalOsc
void CLK_disableCrystalOsc(CLK_Handle clkHandle)
Disables the crystal oscillator.
Definition: clk.c:133
CLK_ClkOutPreScaler_SysClkOut_by_1
Denotes XCLKOUT = SYSCLKOUT/1.
Definition: clk.h:263
CLK_LowSpdPreScaler_SysClkOut_by_2
Denotes Low Speed Clock = SYSCLKOUT/2.
Definition: clk.h:293
CLK_enableHrPwmClock
void CLK_enableHrPwmClock(CLK_Handle clkHandle)
Enables the HRPWM clock.
Definition: clk.c:622
CLK_disableOsc1
void CLK_disableOsc1(CLK_Handle clkHandle)
Disables internal oscillator 1.
Definition: clk.c:276