42 #include <ti/devices/DeviceFamily.h> 43 #include DeviceFamily_constructPath(driverlib/ioc.h) 44 #include DeviceFamily_constructPath(driverlib/cpu.h) 45 #include <ti/drivers/pin/PINCC26XX.h> 52 void CC1312R1_LAUNCHXL_sendExtFlashByte(PIN_Handle pinHandle, uint8_t byte)
57 PIN_setOutputValue(pinHandle, IOID_20, 0);
59 for (i = 0; i < 8; i++) {
60 PIN_setOutputValue(pinHandle, IOID_10, 0);
63 PIN_setOutputValue(pinHandle, IOID_9, (byte >> (7 - i)) & 0x01);
64 PIN_setOutputValue(pinHandle, IOID_10, 1);
74 PIN_setOutputValue(pinHandle, IOID_10, 0);
75 PIN_setOutputValue(pinHandle, IOID_20, 1);
89 PIN_Config extFlashPinTable[] = {
91 IOID_20 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL |
92 PIN_INPUT_DIS | PIN_DRVSTR_MED,
95 PIN_State extFlashPinState;
96 PIN_Handle extFlashPinHandle = PIN_open(&extFlashPinState, extFlashPinTable);
104 PIN_setOutputValue(extFlashPinHandle, IOID_20, 0);
107 PIN_setOutputValue(extFlashPinHandle, IOID_20, 1);
111 PIN_close(extFlashPinHandle);
125 PIN_Config extFlashPinTable[] = {
127 IOID_20 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL |
128 PIN_INPUT_DIS | PIN_DRVSTR_MED,
130 IOID_10 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL |
131 PIN_INPUT_DIS | PIN_DRVSTR_MED,
133 IOID_9 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL |
134 PIN_INPUT_DIS | PIN_DRVSTR_MED,
136 IOID_8 | PIN_INPUT_EN | PIN_PULLDOWN,
139 PIN_State extFlashPinState;
140 PIN_Handle extFlashPinHandle = PIN_open(&extFlashPinState, extFlashPinTable);
142 uint8_t extFlashShutdown = 0xB9;
144 CC1312R1_LAUNCHXL_sendExtFlashByte(extFlashPinHandle, extFlashShutdown);
146 PIN_close(extFlashPinHandle);
153 void Board_initHook()
void CC1312R1_LAUNCHXL_shutDownExtFlash(void)
Turn off the external flash on LaunchPads.
void CC1312R1_LAUNCHXL_wakeUpExtFlash(void)
Wake up the external flash present on the board files.