Hi ,
I had declared the interrupt handler in ccs file yet i m not able to capture the interrupt never come .
is there anything i miss in the code . plz find the code below
#define TARGET_IS_BLIZZARD_RB1
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "driverlib/timer.h"
#include "inc/hw_memmap.h"
#include "driverlib/rom.h"
#include "driverlib/rom_map.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "inc/hw_gpio.h"
#include "driverlib/pin_map.h"
#include "inc/hw_ssi.h"
#include "driverlib/ssi.h"
#include "inc/tm4c123bh6pge.h"
#include "inc/hw_types.h"
#define LED_ON GPIO_PIN_1
#define LED_OFF ~(GPIO_PIN_1)
void Timer5ISR(void )
{
int i;
ROM_TimerIntClear(TIMER5_BASE,TIMER_CAPB_MATCH);
for(i = 0; i < 100000000; i++)
{
ROM_GPIOPinWrite(GPIO_PORTP_BASE, GPIO_PIN_1, LED_ON );
ROM_SysCtlDelay(100);
ROM_GPIOPinWrite(GPIO_PORTP_BASE, GPIO_PIN_1, LED_OFF );
}
ROM_TimerEnable(TIMER5_BASE,TIMER_B);
}
int main(void) {
//
//System Clock used is 20 MHz with single divisor and main oscillator with 20 MHz frequency
//
ROM_SysCtlClockSet(SYSCTL_SYSDIV_1|SYSCTL_USE_OSC|SYSCTL_OSC_MAIN|SYSCTL_XTAL_20MHZ);
//
// Enable Timer 5 and Port P
//
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER5);
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOP);
ROM_GPIOPinTypeGPIOOutput(GPIO_PORTP_BASE,GPIO_PIN_1);
//
//Timer pin configuration and Timer function muxing
//
ROM_GPIOPinTypeTimer(GPIO_PORTP_BASE,GPIO_PIN_2);
ROM_GPIOPinConfigure(GPIO_PP2_T5CCP0);
//
//Configuration Settings for Pin with weak pull up
//
ROM_GPIOPadConfigSet(GPIO_PORTP_BASE, GPIO_PIN_1,GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
ROM_GPIOPadConfigSet(GPIO_PORTP_BASE, GPIO_PIN_2,GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
//
//Timer Settings
//
// Timer Configuration of B as a half width timer in a counting mode
ROM_TimerConfigure(TIMER5_BASE,TIMER_CFG_SPLIT_PAIR|TIMER_CFG_B_CAP_COUNT);
//Associate an event as the capture of positive edge of pulse
ROM_TimerControlEvent(TIMER5_BASE,TIMER_B,TIMER_EVENT_POS_EDGE);
//First Position of counter
ROM_TimerLoadSet(TIMER5_BASE,TIMER_B,1000);
//Final Matching position of counter
ROM_TimerMatchSet(TIMER5_BASE,TIMER_B,0);
//
//Timer Interrupt
//
ROM_IntMasterEnable();
// Enable the Interrupt on Matching
ROM_IntEnable(INT_TIMER5B);
ROM_TimerIntEnable(TIMER5_BASE,TIMER_CAPB_MATCH );
// Timer Enable
ROM_TimerEnable(TIMER5_BASE,TIMER_B);
while(1)
{
}
return 0;
}