Other Parts Discussed in Thread: MOTORWARE, , C2000WARE
Tool/software: TI C/C++ Compiler
Hi,
I would like to use userISR function in my code . By referring the Instaspin code( from Motorware) added the USERISR code . But its now working , i have attached the code what i have done. i feel i would have missed something when i am define the ISR function, but i couldnt find. please let me know i what i have to do make this code work .. One more thing i am loading my code in"CPU1_ RAM not in FLASH".
NOTE: Using C2000 LAUNCHPAD XL TMS320F28379D,VER2.0
thanks in advance.
MYCODE:
#include "F28x_Project.h"
#include "driverlib.h"
#include "device.h"
#ifdef FLASH
#pragma CODE_SECTION(mainISR,"ramfuncs");
#endif
void main(void)
{
Device_init();
Device_initGPIO();
GPIO_setPadConfig(DEVICE_GPIO_PIN_LED1, GPIO_PIN_TYPE_STD);
GPIO_setDirectionMode(DEVICE_GPIO_PIN_LED1, GPIO_DIR_MODE_OUT);
Interrupt_initModule();
Interrupt_initVectorTable();
EINT;
ERTM;
for(;;)
{
NOP;
}
}
interrupt void mainISR(void)
{
GPIO_writePin(DEVICE_GPIO_PIN_LED1, 0);
DEVICE_DELAY_US(500000);
GPIO_writePin(DEVICE_GPIO_PIN_LED1, 1);
DEVICE_DELAY_US(500000);
}
// End of File
