1 /*
2  * Copyright (c) 2019 Brett Witherspoon
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifdef CONFIG_CC13X2_CC26X2_BOOST_MODE
8 #define CCFG_FORCE_VDDR_HH 1
9 #endif
10 
11 #ifdef CONFIG_CC13X2_CC26X2_BOOTLOADER_ENABLE
12 #define SET_CCFG_BL_CONFIG_BOOTLOADER_ENABLE 0xC5
13 #else
14 #define SET_CCFG_BL_CONFIG_BOOTLOADER_ENABLE 0x00
15 #endif /* CONFIG_CC13X2_CC26X2_BOOTLOADER_ENABLE */
16 
17 #ifdef CONFIG_CC13X2_CC26X2_BOOTLOADER_BACKDOOR_ENABLE
18 #define SET_CCFG_BL_CONFIG_BL_ENABLE 0xC5
19 #define SET_CCFG_BL_CONFIG_BL_PIN_NUMBER CONFIG_CC13X2_CC26X2_BOOTLOADER_BACKDOOR_PIN
20 #define SET_CCFG_BL_CONFIG_BL_LEVEL CONFIG_CC13X2_CC26X2_BOOTLOADER_BACKDOOR_LEVEL
21 #else
22 #define SET_CCFG_BL_CONFIG_BL_ENABLE 0x00
23 #endif /* CONFIG_CC13X2_CC26X2_BOOTLOADER_BACKDOOR_ENABLE */
24 
25 #if defined(CONFIG_SOC_CC1352P) || defined(CONFIG_SOC_CC2652P)
26 /* Workaround required to be able to establish links between P and R devices,
27  * see SimpleLink(TM) cc13xx_cc26xx SDK 6.20+ Release Notes, Known Issues:
28  * https://software-dl.ti.com/simplelink/esd/simplelink_cc13xx_cc26xx_sdk/6.20.00.29/exports/release_notes_simplelink_cc13xx_cc26xx_sdk_6_20_00_29.html#known-issues
29  */
30 #define SET_CCFG_MODE_CONF_XOSC_CAP_MOD        0x0
31 #define SET_CCFG_MODE_CONF_XOSC_CAPARRAY_DELTA 0xD5
32 #endif
33 
34 /* TI recommends setting CCFG values and then including the TI provided ccfg.c */
35 #include <startup_files/ccfg.c>
36