This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TM4C123GH6PM: Timer Interupt and SSI interupt not working

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: EK-TM4C123GXL

Tool/software: Code Composer Studio

I am using timer interrupt .sending and receiving data through SPI and also using SSI interrupt but its not working

her is my code 

#include <stdint.h>
#include <stdbool.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
//#include "inc/tm4c123gh6pm.h"

#include "inc/hw_memmap.h"
#include "inc/hw_ssi.h"
#include "inc/hw_ints.h"
#include "inc/hw_types.h"
#include "driverlib/ssi.h"
#include "driverlib/gpio.h"
#include "driverlib/pin_map.h"
#include "driverlib/interrupt.h"
#include "driverlib/sysctl.h"
#include "driverlib/timer.h"

SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ);


SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);
SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI1);

GPIOPinTypeGPIOOutput(GPIO_PORTB_BASE,GPIO_PIN_1);
GPIOPadConfigSet(GPIO_PORTB_BASE,GPIO_PIN_1,GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);


GPIOPinConfigure(GPIO_PA2_SSI0CLK);
GPIOPinConfigure(GPIO_PA3_SSI0FSS);
GPIOPinConfigure(GPIO_PA5_SSI0TX);
GPIOPinConfigure(GPIO_PA4_SSI0RX);
GPIOPinTypeSSI(GPIO_PORTA_BASE,GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|GPIO_PIN_2);
// Wait for the SSI0 module to be ready.
//

//
// Configure the SSI.
//
SSIConfigSetExpClk(SSI0_BASE, SysCtlClockGet(), SSI_FRF_MOTO_MODE_0, SSI_MODE_MASTER, 100000, 16);
//
//
// Enable the SSI module.
//
SSIEnable(SSI0_BASE);
// Enable the SSI module.

GPIOPinConfigure(GPIO_PD0_SSI1CLK);
GPIOPinConfigure(GPIO_PD1_SSI1FSS);
GPIOPinConfigure(GPIO_PD2_SSI1RX);
GPIOPinConfigure(GPIO_PD3_SSI1TX);
GPIOPinTypeSSI(GPIO_PORTD_BASE,GPIO_PIN_3|GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0);
// Wait for the SSI0 module to be ready.
//

//
// Configure the SSI.
//
SSIConfigSetExpClk(SSI1_BASE, SysCtlClockGet(), SSI_FRF_MOTO_MODE_0, SSI_MODE_SLAVE, 100000, 16);
//
SSIEnable(SSI1_BASE);
//_________________Enable Timer_________________
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC);

ui32Period = (SysCtlClockGet() / 10) / 2;
TimerLoadSet(TIMER0_BASE, TIMER_A, ui32Period -1);


IntEnable(INT_TIMER0A);
TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
IntMasterEnable();
TimerEnable(TIMER0_BASE, TIMER_A);

SSIIntEnable(SSI1_BASE, SSI_RXFF);

IntEnable(INT_SSI1);

while(1)

{

while(flag==0){};

flag=0;

uint32_t value;
value=0x00000000;

//send msg
SSIDataPut(SSI0_BASE,value);

while(SSIBusy(SSI0_BASE))
{
}

}

void Timer0IntHandler(void)
{

TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);

flag=1;
}
void SSI1IntHandler(void)
{

SSIDataGet(SSI1_BASE, &g_data);
GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_1,g_data);
//
// Clear interrupts.
//
SSIIntClear(SSI1_BASE,SSI_RXFF);
}

  • What hardware are you using? Is it a EK-TM4C123G Launchpad? If so, have you successfully built, run and understood the example code: C:\ti\TivaWare_C_Series-2.1.4.178\examples\boards\ek-tm4c123gxl\timers ?

    Are you getting the timer interrupts but not the SSI1 (slave) interrupt? The SSI is operating in a full duplex mode. I expect your code is stuck in the "SSIDataPut" function because the master is waiting for the slave to have valid data before starting the transmission. I assume you have the two SSI connected together with wires. You need to load the slave with some dummy data "SSIDataPutNonBlocking(SSI1_BASE, 0u);" so the slave is ready to do the exchange (both devices transmit and receive at the same time). Take a look at line 112 in the example I gave in this post:
    e2e.ti.com/.../579880. This simple example is for 2-bit wide and does not use interrupts, but you can see the function call to load the slave TX buffer with dummy data.
  • That was stack size problem.i increased the stack size then it was running.

    now i am having problem with floating point unit.

    i add fpu.h library and declair FPUEnable and FPULAZYSTACKEnable by following the example lab 9 of tivaware workshop but its not working.

    this is my consol window

    **** Build of configuration Debug for project mypower ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../main.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -O4 --fp_mode=relaxed --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/include" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" -g --gcc --define=ccs="ccs" --define=PART_TM4C123GH6PM --diag_wrap=off --diag_warning=225 --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="main.d" "../main.c"

    >> Compilation failure
    subdir_rules.mk:7: recipe for target 'main.obj' failed
    "../main.c", line 32: warning #179-D: variable "Data" was declared but never referenced
    "../main.c", line 33: warning #179-D: variable "ui32Period" was declared but never referenced
    "../main.c", line 36: error #68: expected a "}"
    "../main.c", line 47: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 47: error #148: declaration is incompatible with "float aq" (declared at line 46)
    "../main.c", line 47: error #28: expression must have a constant value
    "../main.c", line 47: error #28: expression must have a constant value
    "../main.c", line 49: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 49: error #148: declaration is incompatible with "float bq" (declared at line 48)
    "../main.c", line 49: error #28: expression must have a constant value
    "../main.c", line 49: error #28: expression must have a constant value
    "../main.c", line 51: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 51: error #148: declaration is incompatible with "float abq" (declared at line 50)
    "../main.c", line 51: error #28: expression must have a constant value
    "../main.c", line 51: error #28: expression must have a constant value
    "../main.c", line 54: error #60: function call is not allowed in a constant expression
    "../main.c", line 56: error #148: declaration is incompatible with "volatile int flag" (declared at line 25)
    "../main.c", line 67: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 67: error #148: declaration is incompatible with "void FPUEnable(void)" (declared at line 94 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/fpu.h")
    "../main.c", line 68: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 68: error #148: declaration is incompatible with "void FPULazyStackingEnable(void)" (declared at line 97 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/fpu.h")
    "../main.c", line 71: error #80: expected a type specifier
    "../main.c", line 71: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 71: error #148: declaration is incompatible with "void SysCtlClockSet(uint32_t)" (declared at line 619 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/sysctl.h")
    "../main.c", line 76: error #80: expected a type specifier
    "../main.c", line 76: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 76: error #148: declaration is incompatible with "void SysCtlPeripheralEnable(uint32_t)" (declared at line 590 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/sysctl.h")
    "../main.c", line 77: error #80: expected a type specifier
    "../main.c", line 77: error #80: expected a type specifier
    "../main.c", line 77: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 77: error #148: declaration is incompatible with "void GPIOPinTypeGPIOOutput(uint32_t, uint8_t)" (declared at line 169 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/gpio.h")
    "../main.c", line 78: error #80: expected a type specifier
    "../main.c", line 78: error #80: expected a type specifier
    "../main.c", line 78: error #80: expected a type specifier
    "../main.c", line 78: error #80: expected a type specifier
    "../main.c", line 78: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 78: error #148: declaration is incompatible with "void GPIOPadConfigSet(uint32_t, uint8_t, uint32_t, uint32_t)" (declared at line 147 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/gpio.h")
    "../main.c", line 81: error #80: expected a type specifier
    "../main.c", line 81: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 82: error #80: expected a type specifier
    "../main.c", line 82: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 83: error #80: expected a type specifier
    "../main.c", line 83: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 84: error #80: expected a type specifier
    "../main.c", line 84: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 88: error #80: expected a type specifier
    "../main.c", line 88: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 89: error #80: expected a type specifier
    "../main.c", line 89: error #80: expected a type specifier
    "../main.c", line 89: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 89: error #148: declaration is incompatible with "void TimerConfigure(uint32_t, uint32_t)" (declared at line 245 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/timer.h")
    "../main.c", line 91: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 91: error #60: function call is not allowed in a constant expression
    "../main.c", line 92: error #80: expected a type specifier
    "../main.c", line 92: error #80: expected a type specifier
    "../main.c", line 92: error #760: variable "ui32Period" is not a type name
    "../main.c", line 92: error #18: expected a ")"
    "../main.c", line 92: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 92: error #148: declaration is incompatible with "void TimerLoadSet(uint32_t, uint32_t, uint32_t)" (declared at line 264 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/timer.h")
    "../main.c", line 94: error #80: expected a type specifier
    "../main.c", line 94: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 94: error #148: declaration is incompatible with "void IntEnable(uint32_t)" (declared at line 76 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/interrupt.h")
    "../main.c", line 95: error #80: expected a type specifier
    "../main.c", line 95: error #80: expected a type specifier
    "../main.c", line 95: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 95: error #148: declaration is incompatible with "void TimerIntEnable(uint32_t, uint32_t)" (declared at line 279 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/timer.h")
    "../main.c", line 96: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 96: error #148: declaration is incompatible with "bool IntMasterEnable(void)" (declared at line 67 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/interrupt.h")
    "../main.c", line 97: error #80: expected a type specifier
    "../main.c", line 97: error #80: expected a type specifier
    "../main.c", line 97: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 97: error #148: declaration is incompatible with "void TimerEnable(uint32_t, uint32_t)" (declared at line 243 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/timer.h")
    "../main.c", line 99: error #80: expected a type specifier
    "../main.c", line 99: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 99: error #148: declaration is incompatible with "void GPIOPinConfigure(uint32_t)" (declared at line 159 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/gpio.h")
    "../main.c", line 100: error #80: expected a type specifier
    "../main.c", line 100: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 101: error #80: expected a type specifier
    "../main.c", line 101: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 102: error #80: expected a type specifier
    "../main.c", line 102: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 103: error #80: expected a type specifier
    "../main.c", line 103: error #80: expected a type specifier
    "../main.c", line 103: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 103: error #148: declaration is incompatible with "void GPIOPinTypeSSI(uint32_t, uint8_t)" (declared at line 178 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/gpio.h")
    "../main.c", line 107: error #80: expected a type specifier
    "../main.c", line 107: error #760: function "SysCtlClockGet" is not a type name
    "../main.c", line 107: error #80: expected a type specifier
    "../main.c", line 107: error #80: expected a type specifier
    "../main.c", line 107: error #80: expected a type specifier
    "../main.c", line 107: error #80: expected a type specifier
    "../main.c", line 107: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 107: error #148: declaration is incompatible with "void SSIConfigSetExpClk(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)" (declared at line 119 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/ssi.h")
    "../main.c", line 110: error #80: expected a type specifier
    "../main.c", line 110: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 110: error #148: declaration is incompatible with "void SSIEnable(uint32_t)" (declared at line 129 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/ssi.h")
    "../main.c", line 111: error #80: expected a type specifier
    "../main.c", line 111: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 112: error #80: expected a type specifier
    "../main.c", line 112: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 113: error #80: expected a type specifier
    "../main.c", line 113: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 114: error #80: expected a type specifier
    "../main.c", line 114: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 115: error #80: expected a type specifier
    "../main.c", line 115: error #80: expected a type specifier
    "../main.c", line 115: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 119: error #80: expected a type specifier
    "../main.c", line 119: error #760: function "SysCtlClockGet" is not a type name
    "../main.c", line 119: error #80: expected a type specifier
    "../main.c", line 119: error #80: expected a type specifier
    "../main.c", line 119: error #80: expected a type specifier
    "../main.c", line 119: error #80: expected a type specifier
    "../main.c", line 119: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 121: error #80: expected a type specifier
    "../main.c", line 121: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 123: error #80: expected a type specifier
    "../main.c", line 123: error #80: expected a type specifier
    "../main.c", line 123: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 123: error #148: declaration is incompatible with "void SSIIntEnable(uint32_t, uint32_t)" (declared at line 132 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/ssi.h")
    "../main.c", line 124: error #80: expected a type specifier
    "../main.c", line 124: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 128: error #171: expected a declaration
    "../main.c", line 150: warning #12-D: parsing restarts here after previous syntax error
    "../main.c", line 152: error #28: expression must have a constant value
    "../main.c", line 154: error #171: expected a declaration
    "../main.c", line 162: warning #12-D: parsing restarts here after previous syntax error
    "../main.c", line 164: error #171: expected a declaration
    "../main.c", line 166: error #28: expression must have a constant value
    "../main.c", line 167: error #28: expression must have a constant value
    "../main.c", line 167: error #28: expression must have a constant value
    "../main.c", line 168: error #28: expression must have a constant value
    "../main.c", line 169: error #28: expression must have a constant value
    "../main.c", line 169: error #28: expression must have a constant value
    "../main.c", line 169: error #28: expression must have a constant value
    "../main.c", line 169: error #28: expression must have a constant value
    "../main.c", line 170: error #28: expression must have a constant value
    "../main.c", line 170: error #28: expression must have a constant value
    "../main.c", line 170: error #28: expression must have a constant value
    "../main.c", line 170: error #28: expression must have a constant value
    "../main.c", line 171: error #28: expression must have a constant value
    Error limit reached.
    100 errors detected in the compilation of "../main.c".
    Compilation terminated.
    gmake: *** [main.obj] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

  • Probably a syntax error in main.c. I suggest you start with the first error that was reported on line 36 and identify what caused that error. Often a simple single error like a missing '}' will cause the compiler to generate lots of error messages.
  • Post would have been shorter if "Non Errors" were listed... Also - a missing ";" often leads to such misfortune...
  • #include <stdint.h>
    #include <stdbool.h>
    #include <math.h>
    #include<stdlib.h>
    #include "inc/hw_memmap.h"
    #include "inc/hw_types.h"
    #include "driverlib/fpu.h"
    #include "driverlib/fpu.c"
    #include "driverlib/sysctl.h"
    #include "driverlib/rom.h"


    void inverse(float[6][6],int,float[6][6]);
    float determinant(float[6][6],int);
    void cofactor(float[6][6],int,float[6][6]);
    void transpose(float[6][6],float[6][6],int,float[6][6]);

    int main(void)
    {

    int i[4]={2,3,5,4}; // Defines the critical power system to-node
    int j[4]={1,2,2,2};
    float z[4]={0.003113,0.015709,6.951e-3,9.029e-3}; // Defines the critical power system from-node
    float v[5]={0.962,0.952,0.963,0.946,0.937}; // Defines the critical power system node voltage obtained from the main power flow code


    float Q=1.739; // Defines the agent reactive power obtained from the main power flow code
    float P=1.449; //Defines the agent active power obtained from the main power flow code
    float S=3.0; // Defines the agent maximum generation capacity
    float q1=9.0;
    //aq=S*S;
    float q2;
    q2=(P*P);
    float q3;
    q3=(q1-q2);
    float SF=7.0/93; // agent node senstivity factor
    float nqj=0.1/3; //The agent droop coefficent
    float Qmax=powf(q3,0.5); // Finding the maximum avilable reactive power generation
    float xo[6]={0}; // Initializing the unknowns
    // Initialize the flage the indicate a viloation if exist=1
    int priority=0; // Initialize the agent priority
    int DQ[4]={6,6,0,0}; // means that the change of reactive power flow between j(1) and i(1) is equal to x(6),
    //or between i(3) and j (3) is nothing the change is equal zero
    float a[6][6];
    float vio[5]={0};
    float x[6]={0};
    int loc;
    int n,c;


    FPUEnable();
    FPULazyStackingEnable();


    SysCtlClockSet(SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);


    //------------------------------- Checking for violation--------------------
    for( n=0;n<5;n++)
    {
    if (v[n]< 0.95)
    {
    vio[n]=0.96-v[n];
    flag=1;
    }
    else if( v[n]> 1.05)
    {
    vio[n]=1.04-v[n];
    flag=1;
    }
    }

    if(flag==1) // if True a violation exist
    {
    priority=priority+1;
    //selecting the bus with maximum violation
    int maximum = vio[0];
    for (c = 1; c < 5; c++)
    {
    if (vio[c] > maximum)
    {
    maximum = vio[c];
    loc = c;
    }
    }
    x[loc+1]=vio[loc]; // indicating the needed soluation for maximum violation node

    }
    int act,k,l,m,q;
    float b[6]={0, 0, 0 , 0, 0, vio[loc]};
    float b1[6]={xo[5],0,0,0,0,vio[loc]};
    float ff[6][6]={{1,0,0,0,0,-SF},
    {v[0]/v[1],-1,0,0,0,-z[0]/v[1]},
    {0,v[1]/v[2],-1,0,0,-z[1]/v[2]},
    {0,v[1]/v[4],0,0,-1,0},
    {0,v[1]/v[3],0,-1,0,0},
    {0,0,0,0,1,0}};
    float ff1[6][6]={{1,0,0,0,0,-nqj},
    {v[0]/v[1],-1,0,0,0,-z[0]/v[1]},
    {0,v[1]/v[2],-1,0,0,-z[1]/v[2]},
    {0,v[1]/v[4],0,0,-1,0},
    {0,v[1]/v[3],0,-1,0,0},
    {0,0,0,0,1,0}};
    float ff2[6][6]={{0,0,0,0,0,1},
    {v[0]/v[1],-1,0,0,0,-z[0]/v[1]},
    {0,v[1]/v[2],-1,0,0,-z[1]/v[2]},
    {0,v[1]/v[4],0,0,-1,0},
    {0,v[1]/v[3],0,-1,0,0},
    {0,0,0,0,1,0}};


    float bt[6][1];
    float b1t[6][1];

    for( act=0;act<3;act++)
    {
    float m_inverse[6][6];

    if(act==0)
    {
    inverse(ff,6,m_inverse);
    for( k=0;k < 6;k++)
    {
    x[k]=0;
    for(l=0;l<6;l++)
    {
    x[k]=x[k]+(m_inverse[k][l]*bt[l][0]);
    }
    }
    }
    if(act==1)
    {
    inverse(ff1,6,m_inverse);
    for( k=0;k < 6;k++)
    {
    x[k]=0;
    for(l=0;l<6;l++)
    {
    x[k]=x[k]+(m_inverse[k][l]*bt[l][0]);
    }
    }
    }
    if(act==2)
    {
    inverse(ff2,6,m_inverse);
    for( k=0;k < 6;k++)
    {
    x[k]=0;
    for(l=0;l<6;l++)
    {
    x[k]=x[k]+(m_inverse[k][l]*b1t[l][0]);
    }
    }
    }

    for( m=0;m<=5;m++)
    {
    a[m][2*act]=x[m]; //storing the x values of a certain action in a matrix a
    // checking for feasibilityof the founded solution for each action----
    }
    for(q=0;q<5;q++)
    {
    if((v[q]+x[q])<0.95)
    {
    a[q][2*act+1]=v[q]+x[q]-0.95;

    }
    else
    {
    if((v[q]+x[q])>1.05)
    {
    a[q][2*act+1]=v[q]+x[q]-1.05;
    }
    }

    if((Q+x[5])>Qmax)
    {
    a[5][2*act]=(Q+x[5])-Qmax;
    }
    }
    }

    float vstar;
    float sum1=0;
    float sum2=0;
    float sum3=0;
    int s;

    for(s=0;s<6;s++)
    {
    sum1=sum1+a[s][1];
    sum2=sum2+a[s][3];
    sum3=sum3+a[s][5];
    }

    // Enable the SSI module.
    //


    if(sum1<fabsf(0.001))
    {
    //send msg


    vstar=a[0][0]*(1+(nqj*a[5][0])/a[0][0]);
    }
    else if(sum2<fabsf(0.001))
    {
    //send msg


    vstar=a[0][2]*(1+(nqj*a[5][2])/a[0][2]);
    }

    else if(sum3<fabsf(0.001))
    {
    //send msg

    vstar=a[0][4]*(1+(nqj*a[5][4])/a[0][4]);
    }


    }


    void inverse(float matrix[6][6], int size,float m_inverse[6][6])
    {
    float d;
    int i,j;
    float matrix_cofactor[6][6];
    float m_transpose[6][6];

    d=determinant(matrix,size);

    cofactor(matrix,size,matrix_cofactor);


    transpose(matrix,matrix_cofactor,size,m_transpose);

    for (i=0;i<size;i++)
    {
    for (j=0;j<size;j++)
    {
    m_inverse[i][j]=m_transpose[i][j] / d;
    }
    }
    }

    /*For calculating Determinant of the Matrix . this function is recursive*/
    float determinant(float matrix[6][6],int size)
    {
    float s=1,det=0,m_minor[6][6];
    int i,j,m,n,c;
    if (size==1)
    {
    return (matrix[0][0]);
    }
    else
    {
    det=0;
    for (c=0;c<size;c++)
    {
    m=0;
    n=0;
    for (i=0;i<size;i++)
    {
    for (j=0;j<size;j++)
    {
    m_minor[i][j]=0;
    if (i != 0 && j != c)
    {
    m_minor[m][n]=matrix[i][j];
    if (n<(size-2))
    n++;
    else
    {
    n=0;
    m++;
    }
    }
    }
    }
    det=det + s * (matrix[0][c] * determinant(m_minor,size-1));
    s=-1 * s;
    }
    }

    return (det);
    }

    /*calculate cofactor of matrix*/
    void cofactor(float matrix[6][6],int size,float matrix_cofactor[6][6])
    {
    float m_cofactor[6][6];
    int p,q,m,n,i,j;
    for (q=0;q<size;q++)
    {
    for (p=0;p<size;p++)
    {
    m=0;
    n=0;
    for (i=0;i<size;i++)
    {
    for (j=0;j<size;j++)
    {
    if (i != q && j != p)
    {
    m_cofactor[m][n]=matrix[i][j];
    if (n<(size-2))
    n++;
    else
    {
    n=0;
    m++;
    }
    }
    }
    }
    matrix_cofactor[q][p]=pow(-1,q + p) * determinant(m_cofactor,size-1);
    }
    }

    }

    /*Finding transpose of cofactor of matrix*/
    void transpose(float matrix[6][6],float matrix_cofactor[6][6],int size,float m_transpose[6][6])
    {
    int i,j;


    for (i=0;i<size;i++)
    {
    for (j=0;j<size;j++)
    {
    m_transpose[i][j]=matrix_cofactor[j][i];
    }
    }

    }

    This is my code.following are the errors showing in console window

    /main.c", line 67: error #68: expected a "}"
    "../main.c", line 68: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 68: error #148: declaration is incompatible with "float q3" (declared at line 67)
    "../main.c", line 68: error #20: identifier "q1" is undefined
    "../main.c", line 68: error #20: identifier "q2" is undefined
    "../main.c", line 71: error #60: function call is not allowed in a constant expression
    "../main.c", line 84: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 84: error #148: declaration is incompatible with "void FPUEnable(void)" (declared at line 66 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/fpu.c")
    "../main.c", line 85: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 85: error #148: declaration is incompatible with "void FPULazyStackingEnable(void)" (declared at line 150 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/fpu.c")
    "../main.c", line 88: error #80: expected a type specifier
    "../main.c", line 88: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 88: error #148: declaration is incompatible with "void SysCtlClockSet(uint32_t)" (declared at line 619 of "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/sysctl.h")
    "../main.c", line 98: error #171: expected a declaration
    "../main.c", line 128: warning #12-D: parsing restarts here after previous syntax error
    "../main.c", line 129: error #28: expression must have a constant value
    "../main.c", line 130: error #28: expression must have a constant value
    "../main.c", line 130: error #28: expression must have a constant value
    "../main.c", line 131: error #28: expression must have a constant value
    "../main.c", line 132: error #20: identifier "v" is undefined
    "../main.c", line 132: error #20: identifier "z" is undefined
    "../main.c", line 137: error #28: expression must have a constant value
    "../main.c", line 154: error #171: expected a declaration
    "../main.c", line 222: warning #12-D: parsing restarts here after previous syntax error
    "../main.c", line 228: error #171: expected a declaration
    "../main.c", line 313: warning #12-D: parsing restarts here after previous syntax error
    "../main.c", line 314: error #171: expected a declaration
    "../main.c", line 316: error #171: expected a declaration
    "../main.c", line 324: warning #12-D: parsing restarts here after previous syntax error
    "../main.c", line 325: warning #78-D: this declaration has no storage class or type specifier
    "../main.c", line 325: error #28: expression must have a constant value
    "../main.c", line 326: error #171: expected a declaration
    "../main.c", line 329: warning #12-D: parsing restarts here after previous syntax error
    "../main.c", line 330: error #171: expected a declaration
    "../main.c", line 355: warning #12-D: parsing restarts here after previous syntax error
    "../main.c", line 356: error #171: expected a declaration
    "../main.c", line 360: warning #12-D: parsing restarts here after previous syntax error
    "../main.c", line 361: error #171: expected a declaration
    At end of source: warning #12-D: parsing restarts here after previous syntax error
    26 errors detected in the compilation of "../main.c".
    gmake: *** [main.obj] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

    I am not getting these errors.

    i am using TM4C123GH6PM..please guide me what i am missing.is there any specified library i have to include to use FPU.

    i followed the example given in tiva C workshop.