Other Parts Discussed in Thread: TM4C123GH6PM
Tool/software: Code Composer Studio
Can anybody solve this for me. The problem is with the GPIOPinConfigure command. Is it necessary to use the command, because I have previously initialised the SSI 0 peripheral and also configured GPIO port A as SSI pins. Do I have to use the GPIOPinConfigure function again ? Isn't it redundant ? If not what is the correct way to ensure the operation ?
#include <stdint.h>
#include <stdbool.h>
#include "inc/tm4c123gh6pm.h"
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/sysctl.h"
#include "driverlib/interrupt.h"
#include "driverlib/gpio.h"
#include "driverlib/timer.h"
#include "driverlib/systick.h"
#include "driverlib/ssi.h"
#include "driverlib/fpu.h"
#include "driverlib/pin_map.h"
int main(void)
{
SysCtlClockSet(SYSCTL_SYSDIV_2_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
while(!SysCtlPeripheralReady(SYSCTL_PERIPH_GPIOA))
{
}
SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0);
SysCtlDelay(3);
GPIOPinTypeSSI(GPIO_PORTA_BASE, 0x3C);
GPIOPinConfigure(GPIO_PA2_SSI0Clk); ??
GPIOPinConfigure(GPIO_PA3_SSI0Fss); ??
GPIOPinConfigure(GPIO_PA4_SSI0Rx); ??
GPIOPinConfigure(GPIO_PA5_SSI0Tx); ??
//GPIOPinTypeGPIOInput(GPIO_PORTA_BASE, 0x10);
// SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0);
GPIOPinWrite(GPIO_PORTA_BASE,GPIO_PIN_3, 1);
SSIConfigSetExpClk(SSI0_BASE, SysCtlClockGet(), SSI_FRF_MOTO_MODE_0, SSI_MODE_MASTER, SysCtlClockGet()/4, 16);
SysCtlDelay(2);
GPIOPinWrite(GPIO_PORTA_BASE,GPIO_PIN_3, 0);
SysCtlDelay(2);
SSIDataPutNonBlocking(SSI0_BASE,0x3007);
// WriteData(0x3007);
SysCtlDelay(2);
GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_3, 1);
// return 0;
}
And the error message as displayed
"../main.c", line 31: error #20: identifier "GPIO_PA2_SSI0Clk" is undefined
"../main.c", line 32: error #20: identifier "GPIO_PA3_SSI0Fss" is undefined
"../main.c", line 33: error #20: identifier "GPIO_PA4_SSI0Rx" is undefined
"../main.c", line 34: error #20: identifier "GPIO_PA5_SSI0Tx" is undefined