Example #1
0
/*
 *  ======== EK_TM4C123GXL_initWiFi ========
 */
void EK_TM4C123GXL_initWiFi(void)
{
	/* Configure SSI2 */
	SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI2);
	GPIOPinConfigure(GPIO_PB4_SSI2CLK);
	GPIOPinConfigure(GPIO_PB6_SSI2RX);
	GPIOPinConfigure(GPIO_PB7_SSI2TX);
	GPIOPinTypeSSI(GPIO_PORTB_BASE, GPIO_PIN_4 | GPIO_PIN_6 | GPIO_PIN_7);

	/* Configure IRQ pin */
	GPIOPinTypeGPIOInput(GPIO_PORTB_BASE, GPIO_PIN_2);
	GPIOIntTypeSet(GPIO_PORTB_BASE, GPIO_PIN_2, GPIO_FALLING_EDGE);

	/* Configure EN pin */
	GPIOPinTypeGPIOOutput(GPIO_PORTB_BASE, GPIO_PIN_5);
	GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_5, 0);

	/* Configure CS pin */
	GPIOPinTypeGPIOOutput(GPIO_PORTE_BASE, GPIO_PIN_0);
	GPIOPinWrite(GPIO_PORTE_BASE, GPIO_PIN_0, 0);

	/* Call necessary SPI init functions */
	SPI_init();
	EK_TM4C123GXL_initDMA();

	/* Initialize WiFi driver */
	WiFi_init();
}
Example #2
0
/*
 *  ======== EK_TM4C123GXL_initWiFi ========
 */
void EK_TM4C123GXL_initWiFi(void)
{
	/* Configure EN & CS pins to disable CC3100 */
	GPIOPinTypeGPIOOutput(GPIO_PORTE_BASE, GPIO_PIN_0 | GPIO_PIN_4);
	GPIOPinWrite(GPIO_PORTE_BASE, GPIO_PIN_0, GPIO_PIN_0);
	GPIOPinWrite(GPIO_PORTE_BASE, GPIO_PIN_4, 0);

	/* Configure SSI2 for CC3100 */
	SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI2);
	GPIOPinConfigure(GPIO_PB4_SSI2CLK);
	GPIOPinConfigure(GPIO_PB6_SSI2RX);
	GPIOPinConfigure(GPIO_PB7_SSI2TX);
	GPIOPinTypeSSI(GPIO_PORTB_BASE, GPIO_PIN_4 | GPIO_PIN_6 | GPIO_PIN_7);

	/* Configure IRQ pin */
	GPIOPinTypeGPIOInput(GPIO_PORTB_BASE, GPIO_PIN_2);
	GPIOPadConfigSet(GPIO_PORTB_BASE, GPIO_PIN_2, GPIO_STRENGTH_2MA,
			GPIO_PIN_TYPE_STD_WPD);
	GPIOIntTypeSet(GPIO_PORTB_BASE, GPIO_PIN_2, GPIO_RISING_EDGE);

	SPI_init();
	EK_TM4C123GXL_initDMA();

	WiFi_init();
}
Example #3
0
/*
 *  ======== EK_TM4C123GXL_initSPI ========
 */
void EK_TM4C123GXL_initSPI(void)
{
  //INEEDMD_ADC_SPI
  //
  MAP_SysCtlPeripheralEnable(INEEDMD_ADC_SYSCTL_PRIPH_SSI);

  // Enable pin SSI CLK
  //
  MAP_GPIOPinConfigure(INEEDMD_ADC_GPIO_SSICLK);

  // Enable pin SSI TX
  //
  MAP_GPIOPinConfigure(INEEDMD_ADC_GPIO_SSITX);

  // Enable pin SSI RX
  //
  MAP_GPIOPinConfigure(INEEDMD_ADC_GPIO_SSIRX);

//  MAP_GPIOPinConfigure(GPIO_PA3_SSI0FSS);

  //Set the pins to type SSI
  //
  MAP_GPIOPinTypeSSI(INEEDMD_ADC_GPIO_PORT, (INEEDMD_ADC_SSICLK_PIN | INEEDMD_ADC_SSITX_PIN | INEEDMD_ADC_SSIRX_PIN ));//| GPIO_PIN_3));

  EK_TM4C123GXL_initDMA();
  SPI_init();
}
Example #4
0
/*
 *  ======== DK_TM4C123G_initUSBMSCHFatFs ========
 */
void EK_TM4C123GXL_initUSBMSCHFatFs(void)
{
    /* Initialize the DMA control table */
    EK_TM4C123GXL_initDMA();

    /* Call the USB initialization function for the USB Reference modules */
    EK_TM4C123GXL_initUSB(EK_TM4C123GXL_USBDEVICE);
    USBMSCHFatFs_init();
}
Example #5
0
/*
 *  ======== EK_TM4C123GXL_initUART ========
 */
void EK_TM4C123GXL_initUART(void) {
	/* Enable and configure the peripherals used by the uart. */
	SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
	GPIOPinConfigure(GPIO_PA0_U0RX);
	GPIOPinConfigure(GPIO_PA1_U0TX);
	GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);

	/* Initialize the UART driver */
#if TI_DRIVERS_UART_DMA
	EK_TM4C123GXL_initDMA();
#endif
	UART_init();
}
Example #6
0
/*
 *  ======== EK_TM4C123GXL_initUSB ========
 *  This function just turns on the USB
 */
void EK_TM4C123GXL_initUSB(EK_TM4C123GXL_USBMode usbMode)
{
    /* Enable the USB peripheral and PLL */
    MAP_SysCtlPeripheralEnable(INEEDMD_USB_SYSCTL_PERIPH);
    MAP_SysCtlUSBPLLEnable();

    EK_TM4C123GXL_initDMA();

    /* Setup pins for USB operation */
    GPIOPinTypeUSBAnalog(INEEDMD_USB_GPIO_PORT, INEEDMD_USBDP_PIN | INEEDMD_USBDM_PIN);

    if (usbMode == EK_TM4C123GXL_USBHOST) {
        System_abort("USB host not supported\n");
    }
}
Example #7
0
/*
 *  ======== EK_TM4C123GXL_initSPI ========
 */
void EK_TM4C123GXL_initSPI(void)
{
    /* SPI0 */
    SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0);

    /* Need to unlock PF0 */
    GPIOPinConfigure(GPIO_PA2_SSI0CLK);
    GPIOPinConfigure(GPIO_PA3_SSI0FSS);
    GPIOPinConfigure(GPIO_PA4_SSI0RX);
    GPIOPinConfigure(GPIO_PA5_SSI0TX);

    GPIOPinTypeSSI(GPIO_PORTA_BASE, GPIO_PIN_2 | GPIO_PIN_3 |
                                    GPIO_PIN_4 | GPIO_PIN_5);

    /* SSI2 */
    SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI2);

    GPIOPinConfigure(GPIO_PB4_SSI2CLK);
    GPIOPinConfigure(GPIO_PB5_SSI2FSS);
    GPIOPinConfigure(GPIO_PB6_SSI2RX);
    GPIOPinConfigure(GPIO_PB7_SSI2TX);

    GPIOPinTypeSSI(GPIO_PORTB_BASE, GPIO_PIN_4 | GPIO_PIN_5 |
                                    GPIO_PIN_6 | GPIO_PIN_7);

    /* SSI3 */
    SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI3);

    GPIOPinConfigure(GPIO_PD0_SSI3CLK);
    GPIOPinConfigure(GPIO_PD1_SSI3FSS);
    GPIOPinConfigure(GPIO_PD2_SSI3RX);
    GPIOPinConfigure(GPIO_PD3_SSI3TX);

    GPIOPinTypeSSI(GPIO_PORTD_BASE, GPIO_PIN_0 | GPIO_PIN_1 |
                                    GPIO_PIN_2 | GPIO_PIN_3);

    EK_TM4C123GXL_initDMA();
    SPI_init();
}