43 #include <ti/devices/DeviceFamily.h> 44 #include DeviceFamily_constructPath(driverlib/ioc.h) 45 #include DeviceFamily_constructPath(driverlib/cpu.h) 47 #include <ti/drivers/rf/RF.h> 48 #include <ti/drivers/pin/PINCC26XX.h> 50 #include <ti/drivers/Board.h> 58 void CC1350_LAUNCHXL_sendExtFlashByte(PIN_Handle pinHandle, uint8_t byte)
63 PIN_setOutputValue(pinHandle, IOID_20, 0);
65 for (i = 0; i < 8; i++) {
66 PIN_setOutputValue(pinHandle, IOID_10, 0);
69 PIN_setOutputValue(pinHandle, IOID_9, (byte >> (7 - i)) & 0x01);
70 PIN_setOutputValue(pinHandle, IOID_10, 1);
80 PIN_setOutputValue(pinHandle, IOID_10, 0);
81 PIN_setOutputValue(pinHandle, IOID_20, 1);
95 PIN_Config extFlashPinTable[] = {
97 IOID_20 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL |
98 PIN_INPUT_DIS | PIN_DRVSTR_MED,
101 PIN_State extFlashPinState;
102 PIN_Handle extFlashPinHandle = PIN_open(&extFlashPinState, extFlashPinTable);
110 PIN_setOutputValue(extFlashPinHandle, IOID_20, 0);
113 PIN_setOutputValue(extFlashPinHandle, IOID_20, 1);
117 PIN_close(extFlashPinHandle);
131 PIN_Config extFlashPinTable[] = {
133 IOID_20 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL |
134 PIN_INPUT_DIS | PIN_DRVSTR_MED,
136 IOID_10 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL |
137 PIN_INPUT_DIS | PIN_DRVSTR_MED,
139 IOID_9 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL |
140 PIN_INPUT_DIS | PIN_DRVSTR_MED,
142 IOID_8 | PIN_INPUT_EN | PIN_PULLDOWN,
145 PIN_State extFlashPinState;
146 PIN_Handle extFlashPinHandle = PIN_open(&extFlashPinState, extFlashPinTable);
148 uint8_t extFlashShutdown = 0xB9;
150 CC1350_LAUNCHXL_sendExtFlashByte(extFlashPinHandle, extFlashShutdown);
152 PIN_close(extFlashPinHandle);
159 void Board_initHook()
169 #if defined(Board_RF_SUB1GHZ) 176 void rfDriverCallback(RF_Handle client, RF_GlobalEvent events,
void *arg)
180 RF_RadioSetup* setupCommand = (RF_RadioSetup*)arg;
183 bool sub1GHz =
false;
184 uint8_t loDivider = 0;
186 if (events & RF_GlobalEventRadioSetup) {
188 PINCC26XX_setOutputValue(Board_RF_POWER, 1);
192 switch (setupCommand->common.commandNo) {
193 case (CMD_RADIO_SETUP):
194 case (CMD_BLE5_RADIO_SETUP):
195 loDivider = RF_LODIVIDER_MASK & setupCommand->common.loDivider;
198 if ((loDivider != 0) && (loDivider != 2)) {
202 case (CMD_PROP_RADIO_DIV_SETUP):
203 loDivider = RF_LODIVIDER_MASK & setupCommand->prop_div.loDivider;
206 if ((loDivider != 0) && (loDivider != 2)) {
215 PINCC26XX_setOutputValue(Board_RF_SUB1GHZ, 1);
218 PINCC26XX_setOutputValue(Board_RF_SUB1GHZ, 0);
221 else if (events & RF_GlobalEventRadioPowerDown) {
223 PINCC26XX_setOutputValue(Board_RF_POWER, 0);
224 PINCC26XX_setOutputValue(Board_RF_SUB1GHZ, 0);
void CC1350_LAUNCHXL_shutDownExtFlash(void)
Turn off the external flash on LaunchPads.
void CC1350_LAUNCHXL_wakeUpExtFlash(void)
Wake up the external flash present on the board files.