Thank you so much pgo. You are right. I didn't configure the clock for that module.
After configuring, It worked. Now the default handler is not coming and the port is properly configured.
I have one more doubt.
I am using KL05Z microcontroller. When I checked the kinetis_sysinit.c, I could see the interrupt vector table.
/* The Interrupt Vector Table */
void (* const InterruptVector[])() __attribute__ ((section(".vectortable"))) = {
/* Processor exceptions */
(void(*)(void)) &_estack,
__thumb_startup,
NMI_Handler,
HardFault_Handler,
0,
0,
0,
0,
0,
0,
0,
SVC_Handler,
0,
0,
PendSV_Handler,
SysTick_Handler,
/* Interrupts */
DMA0_IRQHandler, /* DMA Channel 0 Transfer Complete and Error */
DMA1_IRQHandler, /* DMA Channel 1 Transfer Complete and Error */
DMA2_IRQHandler, /* DMA Channel 2 Transfer Complete and Error */
DMA3_IRQHandler, /* DMA Channel 3 Transfer Complete and Error */
MCM_IRQHandler, /* Normal Interrupt */
FTFL_IRQHandler, /* FTFL Interrupt */
PMC_IRQHandler, /* PMC Interrupt */
LLW_IRQHandler, /* Low Leakage Wake-up */
I2C0_IRQHandler, /* I2C0 interrupt */
I2C1_IRQHandler, /* I2C1 interrupt */
SPI0_IRQHandler, /* SPI0 Interrupt */
SPI1_IRQHandler, /* SPI1 Interrupt */
UART0_IRQHandler, /* UART0 Status and Error interrupt */
UART1_IRQHandler, /* UART1 Status and Error interrupt */
UART2_IRQHandler, /* UART2 Status and Error interrupt */
ADC0_IRQHandler, /* ADC0 interrupt */
CMP0_IRQHandler, /* CMP0 interrupt */
FTM0_IRQHandler, /* FTM0 fault, overflow and channels interrupt */
FTM1_IRQHandler, /* FTM1 fault, overflow and channels interrupt */
FTM2_IRQHandler, /* FTM2 fault, overflow and channels interrupt */
RTC_Alarm_IRQHandler, /* RTC Alarm interrupt */
RTC_Seconds_IRQHandler, /* RTC Seconds interrupt */
PIT_IRQHandler, /* PIT timer all channels interrupt */
Default_Handler, /* Reserved interrupt 39/23 */
USBOTG_IRQHandler, /* USB interrupt */
DAC0_IRQHandler, /* DAC0 interrupt */
TSI0_IRQHandler, /* TSI0 Interrupt */
MCG_IRQHandler, /* MCG Interrupt */
LPTimer_IRQHandler, /* LPTimer interrupt */
Default_Handler, /* Reserved interrupt 45/29 */
PORTA_IRQHandler, /* Port A interrupt */
PORTD_IRQHandler /* Port D interrupt */
};
Why does this PORD_IRQHandler present here?? This microcontroller doesn't have a PORTD.
And what should I do If I have to create a PORTB_IRQHandler ???
Thanks and regards
Varun Rajarangan