Part Number:LAUNCHXL-CC26X2R1
Tool/software: Code Composer Studio
This is a follow up to my previous post:
I was able to get the LAUNCHXL-CC26X2R1 working on battery power through project_zero on both IAR 8.32.3 and CCS9 (with both 2.4 and 3.1 SDK). When I took my code to my own business (hardware PCB) implementation, I started having issues booting up from the battery. I am using 2xAA Alkaline batteries on VBAT and able to “boost” a running Debug/Release build by connecting VBAT during Debug mode and unplugging the cJTAG and UART connectors. I still have Project Zero functionality with BLE. However, unplugging the power and reconnecting it will not work anymore. I need to reconnect the cJTAG, flash the image with Uniflash/IAR/CCS9 to restore functionality.
We modeled our schematic to be as close to the CC26X2 Launchpad as possible. The only major differences are pin mappings:
/* Analog Capable DIOs */ #define CC26X2R1_LAUNCHXL_DIO23_ANALOG PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_DIO24_ANALOG PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_DIO25_ANALOG PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_DIO26_ANALOG PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_DIO27_ANALOG PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_DIO28_ANALOG PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_DIO29_ANALOG PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_DIO30_ANALOG PIN_UNASSIGNED /* Digital IOs */ #define CC26X2R1_LAUNCHXL_DIO0 PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_DIO1_RFSW PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_DIO12 PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_DIO15 PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_DIO16_TDO PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_DIO17_TDI PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_DIO21 PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_DIO22 PIN_UNASSIGNED /* Discrete Inputs */ #define CC26X2R1_LAUNCHXL_PIN_BTN1 IOID_13 #define CC26X2R1_LAUNCHXL_PIN_BTN2 PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_PIN_EH IOID_23 /* GPIO */ #define CC26X2R1_LAUNCHXL_GPIO_LED_ON 1 #define CC26X2R1_LAUNCHXL_GPIO_LED_OFF 0 /* I2C */ #define CC26X2R1_LAUNCHXL_I2C0_SCL0 IOID_6 #define CC26X2R1_LAUNCHXL_I2C0_SDA0 IOID_7 #define CC26X2R1_LAUNCHXL_I2C1_SCL IOID_3 #define CC26X2R1_LAUNCHXL_I2C1_SDA IOID_2 #define CC26X2R1_LAUNCHXL_I2C2_SCL IOID_1 #define CC26X2R1_LAUNCHXL_I2C2_SDA IOID_0 /* I2S */ #define CC26X2R1_LAUNCHXL_I2S_ADO PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_I2S_ADI PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_I2S_BCLK PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_I2S_MCLK PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_I2S_WCLK PIN_UNASSIGNED /* LEDs */ #define CC26X2R1_LAUNCHXL_PIN_LED_ON 1 #define CC26X2R1_LAUNCHXL_PIN_LED_OFF 0 #define CC26X2R1_LAUNCHXL_PIN_RLED IOID_5 #define CC26X2R1_LAUNCHXL_PIN_GLED PIN_UNASSIGNED /* PWM Outputs */ #define CC26X2R1_LAUNCHXL_PWMPIN0 CC26X2R1_LAUNCHXL_PIN_RLED #define CC26X2R1_LAUNCHXL_PWMPIN1 CC26X2R1_LAUNCHXL_PIN_GLED #define CC26X2R1_LAUNCHXL_PWMPIN2 PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_PWMPIN3 PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_PWMPIN4 PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_PWMPIN5 PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_PWMPIN6 PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_PWMPIN7 PIN_UNASSIGNED /* Power Control */ #define SENSOR_GPIO_TEMP_PWR_ IOID_15 #define SENSOR_GPIO_LIGHT_PWR_ IOID_29 #define SENSOR_GPIO_PWR_ON 0 #define SENSOR_GPIO_PWR_OFF 1 /* SPI */ #define CC26X2R1_LAUNCHXL_SPI_FLASH_CS PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_FLASH_CS_ON 0 #define CC26X2R1_LAUNCHXL_FLASH_CS_OFF 1 /* SPI Board */ #define CC26X2R1_LAUNCHXL_SPI0_MISO PIN_UNASSIGNED /* RF1.20 */ #define CC26X2R1_LAUNCHXL_SPI0_MOSI PIN_UNASSIGNED /* RF1.18 */ #define CC26X2R1_LAUNCHXL_SPI0_CLK PIN_UNASSIGNED /* RF1.16 */ #define CC26X2R1_LAUNCHXL_SPI0_CSN PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_SPI1_MISO PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_SPI1_MOSI PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_SPI1_CLK PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_SPI1_CSN PIN_UNASSIGNED /* UART Board */ #define CC26X2R1_LAUNCHXL_UART0_RX IOID_18 /* MAIN RXD */ #define CC26X2R1_LAUNCHXL_UART0_TX IOID_19 /* MAIN TXD */ #define CC26X2R1_LAUNCHXL_UART0_CTS PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_UART0_RTS PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_UART1_RX PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_UART1_TX PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_UART1_CTS PIN_UNASSIGNED #define CC26X2R1_LAUNCHXL_UART1_RTS PIN_UNASSIGNED
Furthermore, when I remap the following:
CC26X2R1_LAUNCHXL_PIN_RLED IOID_5
Project zero happily uses the new pin and I have LED control with the SimpleLink app. But now when I try to GPIO.toggle() or GPIO.write() to any of my assigned pins, the hardware does not respond. I can “read” the pin state, but no LED is working on the hardware. So I can only control the pins that ProjectZero is mapped to, and I can't “toggle” GPIO pins in my actual program code.
Could my pin mapping of the CC2652 be crashing the app on battery power bootup?
Also, simple_broadcaster and ti-rtos based projects like i2ctmp116 DO work off battery power. Any help is greatly appreciated.