Other Parts Discussed in Thread: CONTROLSUITE
Tool/software: Code Composer Studio
I am trying to toggle the on board LEDs. There is no error when I build the project, when i enter the debug mode and press the switch configured for the interrupt (GPIO12) the following error comes
error:
Can't find a source file at "C:/cs30_controlsuite_submodules/cs30_f2802x_f2802x0/f2802xX_common/source/F2802xX_DefaultIsr.c"
Below is my code
//#############################################################################
// $TI Release: f2802x Support Library v200 $
// $Release Date: Tue Jul 24 10:01:39 CDT 2012 $
//#############################################################################
#include "DSP28x_Project.h" // Device Headerfile and Examples Include File
#include "f2802x_common/include/clk.h"
#include "f2802x_common/include/flash.h"
#include "f2802x_common/include/gpio.h"
#include "f2802x_common/include/pie.h"
#include "f2802x_common/include/pll.h"
#include "f2802x_common/include/pwr.h"
#include "f2802x_common/include/wdog.h"
// Prototype statements for functions found within this file.
interrupt void xint1_isr(void);
void LED();
void InitGPIO();
void Initint();
CLK_Handle myClk;
FLASH_Handle myFlash;
GPIO_Handle myGpio;
PIE_Handle myPie;
// Global variables for this example
volatile uint32_t Xint1Count;
uint32_t LoopCount;
#define DELAY (CPU_RATE/1000*6*510) //Qual period at 6 samples
void main(void)
{
CPU_Handle myCpu;
PLL_Handle myPll;
WDOG_Handle myWDog;
// Initialize all the handles needed for this application
myClk = CLK_init((void *)CLK_BASE_ADDR, sizeof(CLK_Obj));
myCpu = CPU_init((void *)NULL, sizeof(CPU_Obj));
myFlash = FLASH_init((void *)FLASH_BASE_ADDR, sizeof(FLASH_Obj));
myGpio = GPIO_init((void *)GPIO_BASE_ADDR, sizeof(GPIO_Obj));
myPie = PIE_init((void *)PIE_BASE_ADDR, sizeof(PIE_Obj));
myPll = PLL_init((void *)PLL_BASE_ADDR, sizeof(PLL_Obj));
myWDog = WDOG_init((void *)WDOG_BASE_ADDR, sizeof(WDOG_Obj));
// Perform basic system initialization
WDOG_disable(myWDog);
CLK_enableAdcClock(myClk);
(*Device_cal)();
//Select the internal oscillator 1 as the clock source
CLK_setOscSrc(myClk, CLK_OscSrc_Internal);
// Setup the PLL for x10 /2 which will yield 50Mhz = 10Mhz * 10 / 2
PLL_setup(myPll, PLL_Multiplier_10, PLL_DivideSelect_ClkIn_by_2);
// Disable the PIE and all interrupts
PIE_disable(myPie);
PIE_disableAllInts(myPie);
CPU_disableGlobalInts(myCpu);
CPU_clearIntFlags(myCpu);
// If running from flash copy RAM only functions to RAM
#ifdef _FLASH
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
#endif
InitGPIO();
Initint();
// Setup a debug vector table and enable the PIE
PIE_setDebugIntVectorTable(myPie);
PIE_enable(myPie);
CPU_enableInt(myCpu, CPU_IntNumber_1);
CPU_enableGlobalInts(myCpu);
for(;;) {
asm(" NOP");
}
}
interrupt void xint1_isr(void){
LED();
// Acknowledge this interrupt to get more from group 1
PIE_clearInt(myPie, PIE_GroupNumber_1);
}
void Initint()
{
// Register interrupt handlers in the PIE vector table
PIE_registerPieIntHandler(myPie, PIE_GroupNumber_1, PIE_SubGroupNumber_4, (intVec_t)&xint1_isr);
// Clear the counters
Xint1Count = 0; // Count XINT1 interrupts
LoopCount = 0; // Count times through idle loop
// Enable XINT1 Group 1 interrupt 4
PIE_enableInt(myPie, PIE_GroupNumber_1, PIE_InterruptSource_XINT_1);
// Enable Global Interrupts
// GPIO12 is input
GPIO_setMode(myGpio, GPIO_Number_12, GPIO_12_Mode_GeneralPurpose);
GPIO_setDirection(myGpio, GPIO_Number_12, GPIO_Direction_Input);
GPIO_setQualification(myGpio, GPIO_Number_12, GPIO_Qual_ASync);
GPIO_setPullUp(myGpio, GPIO_Number_12, GPIO_PullUp_Disable);
// GPIO0 is XINT1
GPIO_setExtInt(myGpio, GPIO_Number_12, CPU_ExtIntNumber_1);
// Configure XINT1
PIE_setExtIntPolarity(myPie, CPU_ExtIntNumber_1, PIE_ExtIntPolarity_RisingAndFallingEdge);
// Enable XINT1
PIE_enableExtInt(myPie, CPU_ExtIntNumber_1);
}
void InitGPIO()
{
// Configure GPIO 0,1,2,3as outputs
GPIO_setMode(myGpio, GPIO_Number_0, GPIO_0_Mode_GeneralPurpose);
GPIO_setMode(myGpio, GPIO_Number_1, GPIO_1_Mode_GeneralPurpose);
GPIO_setMode(myGpio, GPIO_Number_2, GPIO_2_Mode_GeneralPurpose);
GPIO_setMode(myGpio, GPIO_Number_3, GPIO_3_Mode_GeneralPurpose);
GPIO_setDirection(myGpio, GPIO_Number_0, GPIO_Direction_Output);
GPIO_setDirection(myGpio, GPIO_Number_1, GPIO_Direction_Output);
GPIO_setDirection(myGpio, GPIO_Number_2, GPIO_Direction_Output);
GPIO_setDirection(myGpio, GPIO_Number_3, GPIO_Direction_Output);
GPIO_setLow(myGpio, GPIO_Number_0);
GPIO_setLow(myGpio, GPIO_Number_1);
GPIO_setLow(myGpio, GPIO_Number_2);
GPIO_setLow(myGpio, GPIO_Number_3);
}
void LED()
{
GPIO_toggle(myGpio, GPIO_Number_0);
GPIO_toggle(myGpio, GPIO_Number_1);
GPIO_toggle(myGpio, GPIO_Number_2);
GPIO_toggle(myGpio, GPIO_Number_3);
}
//===========================================================================
// No more.
//===========================================================================