2008-07-22 04:07:13 ISR in standalone application
Pranay Upadhyay (INDIA)
Message: 59178
Hello sir,
In standalone application for handling the interrupt I am using the following function for compiling using gcc, for generating elf file.
register_irqhandler(EVT_DMA2_0_IRQ,9,Sport0_RX_ISR);
int register_irqhandler(IRQchannel channel, int vector, IRQhandler isrp)
{
unsigned volatile long *sic_iar = &(pSICA_IAR0)[channel >> 3];
// volatile void **evt = &pEVT0[vector];
void *volatile *evt= &pEVT0[vector];
if (vector < 1 || vector > 15) {
printf("IRQ out of possible range\n");
return -1;
}
int shift = 4 * (channel % 8);
unsigned long val = *sic_iar;
val &= ~(0xff << shift);
val |= (vector - 7) << shift;
*sic_iar = val;
*evt = isrp;
return 0;
}
And I am using the ISR FUNCTION LIKE THIS
void Sport0_RX_ISR (void)
{
*pDMA2_0_IRQ_STATUS = 0x0001;
WaitFirstRx = 1;
for(datacount=0;datacount<512;datacount++)
{
iTxBuffer1[datacount] =iRxBuffer1[datacount]*16;//(datacount+1) * 512;//iRxBuffer1[datacount]<<4;iRxBuffer1[datacount];
}
}
But after compiling the code there is not coming in the ISR function, so data is not transmitting from codec.
I think for the
register_irqhandler(EVT_DMA2_0_IRQ,9,Sport0_RX_ISR); function we should use the asm or how gcc compiler handle the interrupt for standalone application.
-Regards
Pranay
QuoteReplyEditDelete
2008-07-22 04:18:19 Re: ISR in standalone application
Mike Frysinger (UNITED STATES)
Message: 59192
there are no functions currently to assist in programming the interrupt controller. if they were, it wouldnt be part of the gcc compiler, it would be a separate library (much like system services and vdsp).
if your interrupt handler isnt being called, then check the interrupt vectors to make sure they're registered correctly and check the interrupt status registers to make sure the things you expect to be latched are actually.