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> 56 void CC1350_LAUNCHXL_sendExtFlashByte(PIN_Handle pinHandle, uint8_t byte)
61 PIN_setOutputValue(pinHandle, IOID_20, 0);
63 for (i = 0; i < 8; i++) {
64 PIN_setOutputValue(pinHandle, IOID_10, 0);
67 PIN_setOutputValue(pinHandle, IOID_9, (byte >> (7 - i)) & 0x01);
68 PIN_setOutputValue(pinHandle, IOID_10, 1);
78 PIN_setOutputValue(pinHandle, IOID_10, 0);
79 PIN_setOutputValue(pinHandle, IOID_20, 1);
93 PIN_Config extFlashPinTable[] = {
95 IOID_20 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL |
96 PIN_INPUT_DIS | PIN_DRVSTR_MED,
99 PIN_State extFlashPinState;
100 PIN_Handle extFlashPinHandle = PIN_open(&extFlashPinState, extFlashPinTable);
108 PIN_setOutputValue(extFlashPinHandle, IOID_20, 0);
111 PIN_setOutputValue(extFlashPinHandle, IOID_20, 1);
115 PIN_close(extFlashPinHandle);
129 PIN_Config extFlashPinTable[] = {
131 IOID_20 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL |
132 PIN_INPUT_DIS | PIN_DRVSTR_MED,
134 IOID_10 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL |
135 PIN_INPUT_DIS | PIN_DRVSTR_MED,
137 IOID_9 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL |
138 PIN_INPUT_DIS | PIN_DRVSTR_MED,
140 IOID_8 | PIN_INPUT_EN | PIN_PULLDOWN,
143 PIN_State extFlashPinState;
144 PIN_Handle extFlashPinHandle = PIN_open(&extFlashPinState, extFlashPinTable);
146 uint8_t extFlashShutdown = 0xB9;
148 CC1350_LAUNCHXL_sendExtFlashByte(extFlashPinHandle, extFlashShutdown);
150 PIN_close(extFlashPinHandle);
157 void Board_initHook()
167 #if defined(Board_RF_SUB1GHZ) 173 #define LODIVIDER_MASK 0x7F 180 void rfDriverCallback(RF_Handle client, RF_GlobalEvent events,
void *arg)
184 RF_RadioSetup* setupCommand = (RF_RadioSetup*)arg;
187 bool sub1GHz =
false;
188 uint8_t loDivider = 0;
190 if (events & RF_GlobalEventRadioSetup) {
192 PINCC26XX_setOutputValue(Board_RF_POWER, 1);
196 switch (setupCommand->common.commandNo) {
197 case (CMD_RADIO_SETUP):
198 case (CMD_BLE5_RADIO_SETUP):
199 loDivider = LODIVIDER_MASK & setupCommand->common.loDivider;
202 if ((loDivider != 0) && (loDivider != 2)) {
206 case (CMD_PROP_RADIO_DIV_SETUP):
207 loDivider = LODIVIDER_MASK & setupCommand->prop_div.loDivider;
210 if ((loDivider != 0) && (loDivider != 2)) {
219 PINCC26XX_setOutputValue(Board_RF_SUB1GHZ, 1);
222 PINCC26XX_setOutputValue(Board_RF_SUB1GHZ, 0);
225 else if (events & RF_GlobalEventRadioPowerDown) {
227 PINCC26XX_setOutputValue(Board_RF_POWER, 0);
228 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.