43 #include <ti/devices/DeviceFamily.h> 44 #include DeviceFamily_constructPath(driverlib/ioc.h) 45 #include DeviceFamily_constructPath(driverlib/cpu.h) 46 #include <ti/drivers/rf/RF.h> 47 #include <ti/drivers/pin/PINCC26XX.h> 54 void CC1352R1_LAUNCHXL_sendExtFlashByte(PIN_Handle pinHandle, uint8_t byte)
59 PIN_setOutputValue(pinHandle, IOID_20, 0);
61 for (i = 0; i < 8; i++) {
62 PIN_setOutputValue(pinHandle, IOID_10, 0);
65 PIN_setOutputValue(pinHandle, IOID_9, (byte >> (7 - i)) & 0x01);
66 PIN_setOutputValue(pinHandle, IOID_10, 1);
76 PIN_setOutputValue(pinHandle, IOID_10, 0);
77 PIN_setOutputValue(pinHandle, IOID_20, 1);
91 PIN_Config extFlashPinTable[] = {
93 IOID_20 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL |
94 PIN_INPUT_DIS | PIN_DRVSTR_MED,
97 PIN_State extFlashPinState;
98 PIN_Handle extFlashPinHandle = PIN_open(&extFlashPinState, extFlashPinTable);
106 PIN_setOutputValue(extFlashPinHandle, IOID_20, 0);
109 PIN_setOutputValue(extFlashPinHandle, IOID_20, 1);
113 PIN_close(extFlashPinHandle);
127 PIN_Config extFlashPinTable[] = {
129 IOID_20 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL |
130 PIN_INPUT_DIS | PIN_DRVSTR_MED,
132 IOID_10 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL |
133 PIN_INPUT_DIS | PIN_DRVSTR_MED,
135 IOID_9 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL |
136 PIN_INPUT_DIS | PIN_DRVSTR_MED,
138 IOID_8 | PIN_INPUT_EN | PIN_PULLDOWN,
141 PIN_State extFlashPinState;
142 PIN_Handle extFlashPinHandle = PIN_open(&extFlashPinState, extFlashPinTable);
144 uint8_t extFlashShutdown = 0xB9;
146 CC1352R1_LAUNCHXL_sendExtFlashByte(extFlashPinHandle, extFlashShutdown);
148 PIN_close(extFlashPinHandle);
155 void Board_initHook()
165 #if defined(Board_RF_SUB1GHZ) 171 #define LODIVIDER_MASK 0x7F 178 void rfDriverCallback(RF_Handle client, RF_GlobalEvent events,
void *arg)
182 RF_RadioSetup* setupCommand = (RF_RadioSetup*)arg;
185 bool sub1GHz =
false;
186 uint8_t loDivider = 0;
188 if (events & RF_GlobalEventRadioSetup) {
191 switch (setupCommand->common.commandNo) {
192 case (CMD_RADIO_SETUP):
193 case (CMD_BLE5_RADIO_SETUP):
194 loDivider = LODIVIDER_MASK & setupCommand->common.loDivider;
197 if (loDivider != 0) {
201 case (CMD_PROP_RADIO_DIV_SETUP):
202 loDivider = LODIVIDER_MASK & setupCommand->prop_div.loDivider;
205 if (loDivider != 0) {
214 PINCC26XX_setOutputValue(Board_RF_SUB1GHZ, 1);
217 PINCC26XX_setOutputValue(Board_RF_SUB1GHZ, 0);
220 else if (events & RF_GlobalEventRadioPowerDown) {
222 PINCC26XX_setOutputValue(Board_RF_SUB1GHZ, 0);
void CC1352R1_LAUNCHXL_shutDownExtFlash(void)
Shut down the external flash present on the board files.
void CC1352R1_LAUNCHXL_wakeUpExtFlash(void)
Wake up the external flash present on the board files.