diff --git a/arch/cpu/cc26xx-cc13xx/Makefile.cc26xx-cc13xx b/arch/cpu/cc26xx-cc13xx/Makefile.cc26xx-cc13xx index 3d4af557c..f54a8d72d 100644 --- a/arch/cpu/cc26xx-cc13xx/Makefile.cc26xx-cc13xx +++ b/arch/cpu/cc26xx-cc13xx/Makefile.cc26xx-cc13xx @@ -1,6 +1,12 @@ CPU_ABS_PATH = arch/cpu/cc26xx-cc13xx TI_XXWARE = $(CONTIKI_CPU)/$(TI_XXWARE_PATH) +ifeq (,$(wildcard $(TI_XXWARE))) + $(warning $(TI_XXWARE) does not exist.) + $(warning Did you run 'git submodule update --init' ?) + $(error "") +endif + ### cc26xxware / cc26x0r2fware sources under driverlib will be added to the ### MODULES list TI_XXWARE_SRC = $(CPU_ABS_PATH)/$(TI_XXWARE_PATH)/driverlib diff --git a/arch/cpu/cc26xx-cc13xx/dev/gpio-hal-arch.c b/arch/cpu/cc26xx-cc13xx/dev/gpio-hal-arch.c index 293fc1cce..6516c22cd 100644 --- a/arch/cpu/cc26xx-cc13xx/dev/gpio-hal-arch.c +++ b/arch/cpu/cc26xx-cc13xx/dev/gpio-hal-arch.c @@ -99,9 +99,9 @@ gpio_hal_arch_pin_cfg_get(gpio_hal_pin_t pin) cfg = 0; #ifdef ThisLibraryIsFor_CC26x0R2_HaltIfViolated - config = ti_lib_ioc_port_configure_get(pin); + config = ti_lib_ioc_port_configure_get(pin); #else - config = ti_lib_rom_ioc_port_configure_get(pin); + config = ti_lib_rom_ioc_port_configure_get(pin); #endif /* Pull */ diff --git a/arch/cpu/cc26xx-cc13xx/dev/gpio-hal-arch.h b/arch/cpu/cc26xx-cc13xx/dev/gpio-hal-arch.h index ff13dacf7..ce757eb50 100644 --- a/arch/cpu/cc26xx-cc13xx/dev/gpio-hal-arch.h +++ b/arch/cpu/cc26xx-cc13xx/dev/gpio-hal-arch.h @@ -57,11 +57,11 @@ #define gpio_hal_arch_interrupt_disable(p) ti_lib_rom_ioc_int_disable(p) #ifdef ThisLibraryIsFor_CC26x0R2_HaltIfViolated - #define gpio_hal_arch_pin_set_input(p) ti_lib_ioc_pin_type_gpio_input(p) - #define gpio_hal_arch_pin_set_output(p) ti_lib_ioc_pin_type_gpio_output(p) +#define gpio_hal_arch_pin_set_input(p) ti_lib_ioc_pin_type_gpio_input(p) +#define gpio_hal_arch_pin_set_output(p) ti_lib_ioc_pin_type_gpio_output(p) #else - #define gpio_hal_arch_pin_set_input(p) ti_lib_rom_ioc_pin_type_gpio_input(p) - #define gpio_hal_arch_pin_set_output(p) ti_lib_rom_ioc_pin_type_gpio_output(p) +#define gpio_hal_arch_pin_set_input(p) ti_lib_rom_ioc_pin_type_gpio_input(p) +#define gpio_hal_arch_pin_set_output(p) ti_lib_rom_ioc_pin_type_gpio_output(p) #endif #define gpio_hal_arch_set_pin(p) ti_lib_gpio_set_dio(p) #define gpio_hal_arch_clear_pin(p) ti_lib_gpio_clear_dio(p) diff --git a/arch/cpu/cc26xx-cc13xx/lpm.c b/arch/cpu/cc26xx-cc13xx/lpm.c index d5da32686..4c8e0256b 100644 --- a/arch/cpu/cc26xx-cc13xx/lpm.c +++ b/arch/cpu/cc26xx-cc13xx/lpm.c @@ -193,8 +193,12 @@ wake_up(void) ti_lib_sys_ctrl_aon_sync(); /* Adjust recharge settings */ +#ifdef ThisLibraryIsFor_CC26x0R2_HaltIfViolated // May need to change to XOSC_IN_LOW_POWER_MODE ti_lib_sys_ctrl_adjust_recharge_after_power_down(XOSC_IN_HIGH_POWER_MODE); +#else + ti_lib_sys_ctrl_adjust_recharge_after_power_down(); +#endif /* * Release the request to the uLDO diff --git a/arch/cpu/cc26xx-cc13xx/rf-core/rf-core.c b/arch/cpu/cc26xx-cc13xx/rf-core/rf-core.c index ccc014b54..4c3db599f 100644 --- a/arch/cpu/cc26xx-cc13xx/rf-core/rf-core.c +++ b/arch/cpu/cc26xx-cc13xx/rf-core/rf-core.c @@ -400,8 +400,8 @@ rf_core_set_modesel() HWREG(PRCM_BASE + PRCM_O_RFCMODESEL) = PRCM_RFCMODESEL_CURR_MODE5; rv = RF_CORE_CMD_OK; } else if (chip_type == CHIP_TYPE_CC2640R2) { - HWREG(PRCM_BASE + PRCM_O_RFCMODESEL) = PRCM_RFCMODESEL_CURR_MODE1; - rv = RF_CORE_CMD_OK; + HWREG(PRCM_BASE + PRCM_O_RFCMODESEL) = PRCM_RFCMODESEL_CURR_MODE1; + rv = RF_CORE_CMD_OK; } return rv; diff --git a/arch/cpu/cc26xx-cc13xx/ti-lib-rom.h b/arch/cpu/cc26xx-cc13xx/ti-lib-rom.h index 062b5103a..e9fe50111 100644 --- a/arch/cpu/cc26xx-cc13xx/ti-lib-rom.h +++ b/arch/cpu/cc26xx-cc13xx/ti-lib-rom.h @@ -91,25 +91,25 @@ /* IOC API */ #define ti_lib_rom_ioc_port_configure_set ROM_IOCPortConfigureSet #if !defined(ThisLibraryIsFor_CC26x0R2_HaltIfViolated) - #define ti_lib_rom_ioc_port_configure_get ROM_IOCPortConfigureGet - #define ti_lib_rom_ioc_io_shutdown_set ROM_IOCIOShutdownSet - #define ti_lib_rom_ioc_io_mode_set ROM_IOCIOModeSet - #define ti_lib_rom_ioc_io_int_set ROM_IOCIOIntSet - #define ti_lib_rom_ioc_io_port_pull_set ROM_IOCIOPortPullSet - #define ti_lib_rom_ioc_io_hyst_set ROM_IOCIOHystSet - #define ti_lib_rom_ioc_io_input_set ROM_IOCIOInputSet - #define ti_lib_rom_ioc_io_slew_ctrl_set ROM_IOCIOSlewCtrlSet - #define ti_lib_rom_ioc_io_drv_strength_set ROM_IOCIODrvStrengthSet - #define ti_lib_rom_ioc_io_port_id_set ROM_IOCIOPortIdSet - #define ti_lib_rom_ioc_int_enable ROM_IOCIntEnable - #define ti_lib_rom_ioc_int_disable ROM_IOCIntDisable - #define ti_lib_rom_ioc_pin_type_gpio_input ROM_IOCPinTypeGpioInput - #define ti_lib_rom_ioc_pin_type_gpio_output ROM_IOCPinTypeGpioOutput - #define ti_lib_rom_ioc_pin_type_uart ROM_IOCPinTypeUart - #define ti_lib_rom_ioc_pin_type_ssi_master ROM_IOCPinTypeSsiMaster - #define ti_lib_rom_ioc_pin_type_ssi_slave ROM_IOCPinTypeSsiSlave - #define ti_lib_rom_ioc_pin_type_i2c ROM_IOCPinTypeI2c - #define ti_lib_rom_ioc_pin_type_aux ROM_IOCPinTypeAux +#define ti_lib_rom_ioc_port_configure_get ROM_IOCPortConfigureGet +#define ti_lib_rom_ioc_io_shutdown_set ROM_IOCIOShutdownSet +#define ti_lib_rom_ioc_io_mode_set ROM_IOCIOModeSet +#define ti_lib_rom_ioc_io_int_set ROM_IOCIOIntSet +#define ti_lib_rom_ioc_io_port_pull_set ROM_IOCIOPortPullSet +#define ti_lib_rom_ioc_io_hyst_set ROM_IOCIOHystSet +#define ti_lib_rom_ioc_io_input_set ROM_IOCIOInputSet +#define ti_lib_rom_ioc_io_slew_ctrl_set ROM_IOCIOSlewCtrlSet +#define ti_lib_rom_ioc_io_drv_strength_set ROM_IOCIODrvStrengthSet +#define ti_lib_rom_ioc_io_port_id_set ROM_IOCIOPortIdSet +#define ti_lib_rom_ioc_int_enable ROM_IOCIntEnable +#define ti_lib_rom_ioc_int_disable ROM_IOCIntDisable +#define ti_lib_rom_ioc_pin_type_gpio_input ROM_IOCPinTypeGpioInput +#define ti_lib_rom_ioc_pin_type_gpio_output ROM_IOCPinTypeGpioOutput +#define ti_lib_rom_ioc_pin_type_uart ROM_IOCPinTypeUart +#define ti_lib_rom_ioc_pin_type_ssi_master ROM_IOCPinTypeSsiMaster +#define ti_lib_rom_ioc_pin_type_ssi_slave ROM_IOCPinTypeSsiSlave +#define ti_lib_rom_ioc_pin_type_i2c ROM_IOCPinTypeI2c +#define ti_lib_rom_ioc_pin_type_aux ROM_IOCPinTypeAux #endif /* PRCM API */ diff --git a/arch/cpu/cc26xx-cc13xx/ti-lib.h b/arch/cpu/cc26xx-cc13xx/ti-lib.h index 6a8fae405..6e6d78afb 100644 --- a/arch/cpu/cc26xx-cc13xx/ti-lib.h +++ b/arch/cpu/cc26xx-cc13xx/ti-lib.h @@ -200,7 +200,7 @@ #define ti_lib_chipinfo_get_device_id_hw_rev_code(...) ChipInfo_GetDeviceIdHwRevCode(__VA_ARGS__) #define ti_lib_chipinfo_get_chip_type(...) ChipInfo_GetChipType(__VA_ARGS__) #define ti_lib_chipinfo_get_chip_family(...) ChipInfo_GetChipFamily(__VA_ARGS__) -#ifdef ThisLibraryIsFor_CC26x0R2_HaltIfViolated +#ifdef ThisLibraryIsFor_CC26x0R2_HaltIfViolated #define ti_lib_chipinfo_chip_family_is_cc26xx(...) ChipInfo_ChipFamilyIs_CC26x0(__VA_ARGS__) #define ti_lib_chipinfo_chip_family_is_cc13xx(...) ChipInfo_ChipFamilyIs_CC13x0(__VA_ARGS__) #define ti_lib_chipinfo_chip_family_is_cc26x0r2(...) ChipInfo_ChipFamilyIs_CC26x0R2(__VA_ARGS__) diff --git a/arch/platform/srf06-cc26xx/launchpad/cc2640r2/board.h b/arch/platform/srf06-cc26xx/launchpad/cc2640r2/board.h index 4d352041a..66ba6d78c 100644 --- a/arch/platform/srf06-cc26xx/launchpad/cc2640r2/board.h +++ b/arch/platform/srf06-cc26xx/launchpad/cc2640r2/board.h @@ -31,9 +31,9 @@ /** \addtogroup launchpad-peripherals * @{ * - * \defgroup launchpad-cc26xx-specific CC2650 LaunchPad Peripherals + * \defgroup launchpad-cc2640r2-specific CC2640R2 LaunchPad Peripherals * - * Defines related to the CC2650 LaunchPad + * Defines related to the CC2640R2 LaunchPad * * This file provides connectivity information on LEDs, Buttons, UART and * other peripherals @@ -43,7 +43,7 @@ * * \file * Header file with definitions related to the I/O connections on the TI - * CC2650 LaunchPad + * CC2640R2 LaunchPad * * \note Do not include this file directly. It gets included by contiki-conf * after all relevant directives have been set.