1 /****************************************************************************** 2 * Filename: setup.h 3 * 4 * Description: Prototypes and defines for the setup API. 5 * 6 * Copyright (c) 2015 - 2022, Texas Instruments Incorporated 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * 1) Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * 15 * 2) Redistributions in binary form must reproduce the above copyright notice, 16 * this list of conditions and the following disclaimer in the documentation 17 * and/or other materials provided with the distribution. 18 * 19 * 3) Neither the name of the ORGANIZATION nor the names of its contributors may 20 * be used to endorse or promote products derived from this software without 21 * specific prior written permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 * POSSIBILITY OF SUCH DAMAGE. 34 * 35 ******************************************************************************/ 36 37 //***************************************************************************** 38 // 39 //! \addtogroup system_control_group 40 //! @{ 41 //! \addtogroup setup_api 42 //! @{ 43 // 44 //***************************************************************************** 45 46 #ifndef __SETUP_H__ 47 #define __SETUP_H__ 48 49 //***************************************************************************** 50 // 51 // If building with a C++ compiler, make all of the definitions in this header 52 // have a C binding. 53 // 54 //***************************************************************************** 55 #ifdef __cplusplus 56 extern "C" 57 { 58 #endif 59 60 // Hardware headers 61 #include "../inc/hw_types.h" 62 // Driverlib headers 63 // - None needed 64 65 //***************************************************************************** 66 // 67 // Support for DriverLib in ROM: 68 // This section renames all functions that are not "static inline", so that 69 // calling these functions will default to implementation in flash. At the end 70 // of this file a second renaming will change the defaults to implementation in 71 // ROM for available functions. 72 // 73 // To force use of the implementation in flash, e.g. for debugging: 74 // - Globally: Define DRIVERLIB_NOROM at project level 75 // - Per function: Use prefix "NOROM_" when calling the function 76 // 77 //***************************************************************************** 78 #if !defined(DOXYGEN) 79 #define SetupTrimDevice NOROM_SetupTrimDevice 80 #endif 81 82 //***************************************************************************** 83 // 84 //! \brief Performs the necessary trim of the device which is not done in ROM boot code. 85 //! 86 //! This function should only execute coming from ROM boot. 87 //! 88 //! The following is handled by this function: 89 //! - Checks if the driverlib variant used by the application is supported by the 90 //! device. Execution is halted in case of unsupported driverlib variant. 91 //! - Configures VIMS cache mode based on setting in CCFG. 92 //! - Configures functionalities like DCDC and XOSC dependent on startup modes like 93 //! cold reset, wakeup from shutdown and wakeup from from powerdown. 94 //! - Configures VIMS power domain control. 95 //! - Configures optimal wait time for flash FSM in cases where flash pump wakes up from sleep. 96 //! 97 //! \note The current implementation does not take soft reset into account. However, 98 //! it does no damage to execute it again. It only consumes time. 99 //! 100 //! \note This function is called by the compiler specific device startup codes 101 //! that are integrated in the SimpleLink SDKs for CC13xx/CC26XX devices. 102 //! 103 //! \return None 104 // 105 //***************************************************************************** 106 extern void SetupTrimDevice( void ); 107 108 //***************************************************************************** 109 // 110 // Support for DriverLib in ROM: 111 // Redirect to implementation in ROM when available. 112 // 113 //***************************************************************************** 114 #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN) 115 #include "../driverlib/rom.h" 116 #ifdef ROM_SetupTrimDevice 117 #undef SetupTrimDevice 118 #define SetupTrimDevice ROM_SetupTrimDevice 119 #endif 120 #endif 121 122 //***************************************************************************** 123 // 124 // Mark the end of the C bindings section for C++ compilers. 125 // 126 //***************************************************************************** 127 #ifdef __cplusplus 128 } 129 #endif 130 131 #endif // __SETUP_H__ 132 133 //***************************************************************************** 134 // 135 //! Close the Doxygen group. 136 //! @} 137 //! @} 138 // 139 //***************************************************************************** 140