Contiki-NG
Toggle main menu visibility
Loading...
Searching...
No Matches
oscillators.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015, Texas Instruments Incorporated - http://www.ti.com/
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
* 1. Redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer.
10
* 2. Redistributions in binary form must reproduce the above copyright
11
* notice, this list of conditions and the following disclaimer in the
12
* documentation and/or other materials provided with the distribution.
13
* 3. Neither the name of the copyright holder nor the names of its
14
* contributors may be used to endorse or promote products derived
15
* from this software without specific prior written permission.
16
*
17
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
20
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
28
* OF THE POSSIBILITY OF SUCH DAMAGE.
29
*/
30
/*---------------------------------------------------------------------------*/
31
/**
32
* \addtogroup cc26xx
33
* @{
34
*
35
* \defgroup cc26xx-oscillators CC13xx/CC26xx oscillator control
36
*
37
* Wrapper around CC26xxware/CC13xxware OSC functions that we need in Contiki.
38
*
39
* All CC26xxware OSC control requires access to the semaphore module within
40
* AUX. Thus, in addition to enabling the oscillator interface, we need to
41
* start the clock to SMPH and restore it to its previous state when we are
42
* done.
43
* @{
44
*
45
* \file
46
* Header file for the CC13xx/CC26xx oscillator control
47
*/
48
/*---------------------------------------------------------------------------*/
49
#ifndef OSCILLATORS_H_
50
#define OSCILLATORS_H_
51
/*---------------------------------------------------------------------------*/
52
/**
53
* \brief Set the LF clock source to be the LF XOSC
54
*
55
* This function is only called once as soon as the system starts.
56
*
57
* Do not switch the LF clock source to the RC OSC for normal system operation
58
* See CC26xx Errata (swrz058)
59
*/
60
void
oscillators_select_lf_xosc
(
void
);
61
62
/**
63
* \brief Set the LF clock source to be the LF RCOSC
64
*
65
* This function is only called once, when the systen transitions to a full
66
* shutdown
67
*
68
* Do not switch the LF clock source to the RC OSC for normal system operation
69
* See CC26xx Errata (swrz058)
70
*/
71
void
oscillators_select_lf_rcosc
(
void
);
72
73
/**
74
* \brief Requests the HF XOSC as the source for the HF clock, but does not
75
* perform the actual switch.
76
*
77
* This triggers the startup sequence of the HF XOSC and returns so the CPU
78
* can perform other tasks while the XOSC is starting.
79
*
80
* The XOSC is requested as the source for the HF as well as the MF clock.
81
*/
82
void
oscillators_request_hf_xosc
(
void
);
83
84
/**
85
* \brief Performs the switch to the XOSC
86
*
87
* This function must be preceded by a call to oscillators_request_hf_xosc()
88
*/
89
void
oscillators_switch_to_hf_xosc
(
void
);
90
91
/**
92
* \brief Switches MF and HF clock source to be the HF RC OSC
93
*/
94
void
oscillators_switch_to_hf_rc
(
void
);
95
/*---------------------------------------------------------------------------*/
96
#endif
/* OSCILLATORS_H_ */
97
/*---------------------------------------------------------------------------*/
98
/**
99
* @}
100
* @}
101
*/
oscillators_switch_to_hf_xosc
void oscillators_switch_to_hf_xosc(void)
Performs the switch to the XOSC.
Definition
oscillators.c:116
oscillators_request_hf_xosc
void oscillators_request_hf_xosc(void)
Requests the HF XOSC as the source for the HF clock, but does not perform the actual switch.
Definition
oscillators.c:94
oscillators_select_lf_rcosc
void oscillators_select_lf_rcosc(void)
Set the LF clock source to be the LF RCOSC.
Definition
oscillators.c:73
oscillators_switch_to_hf_rc
void oscillators_switch_to_hf_rc(void)
Switches MF and HF clock source to be the HF RC OSC.
Definition
oscillators.c:134
oscillators_select_lf_xosc
void oscillators_select_lf_xosc(void)
Set the LF clock source to be the LF XOSC.
Definition
oscillators.c:45
arch
cpu
cc26x0-cc13x0
dev
oscillators.h
Generated on
for Contiki-NG by
1.17.0