FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [December 2007 Threads] IRQ interupt causing PrefetchAbort exceptionPosted by bones23 on December 20, 2007 I am working on a str912 arm9. I have been fiddling with the joystick interrupt and have found that it randomly causes the PrefetchAbort exception to throw. Has anybody noticed this problem? I have tried setting a breakpoint right at the end of the IRQ handler and stepping through the program but the exception never occurs when i do this. My code is below.
//code for setting up the interrupt static void prvSetupInterupts( void ){ WIU_InitTypeDef WIU_InitStructure; GPIO_InitTypeDef GPIO_InitStructure; SCU_APBPeriphClockConfig(__GPIO7, ENABLE); /*KEY_INT on eval, unused on ADX*/ SCU_APBPeriphClockConfig(__WIU, ENABLE); WIU_DeInit(); GPIO_DeInit(GPIO7); GPIO_StructInit(&GPIO_InitStructure); GPIO_InitStructure.GPIO_Direction = GPIO_PinInput; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4; GPIO_InitStructure.GPIO_IPConnected = GPIO_IPConnected_Disable; GPIO_InitStructure.GPIO_Type = GPIO_Type_PushPull ; GPIO_Init (GPIO7, &GPIO_InitStructure);
/*V_INIT*/ //GPIO_DeInit(GPIO7); GPIO_StructInit(&GPIO_InitStructure); GPIO_InitStructure.GPIO_Direction = GPIO_PinInput; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0; GPIO_InitStructure.GPIO_IPConnected = GPIO_IPConnected_Disable; GPIO_InitStructure.GPIO_Type = GPIO_Type_PushPull ; GPIO_Init (GPIO7, &GPIO_InitStructure); /* Enable the WIU & Clear the WIU line 28 pending bit */ WIU_Cmd(ENABLE); WIU_ClearITPendingBit(WIU_Line28); WIU_InitStructure.WIU_Line = WIU_Line28 ; WIU_InitStructure.WIU_TriggerEdge = WIU_FallingEdge ; WIU_Init(&WIU_InitStructure); /* Select WIU line 28 as VIC1.13 interrupt source */ SCU_WakeUpLineConfig(28); //VIC_DeInit(); /* Configure the External interrupt group 3 priority */ VIC_Config(EXTIT3_ITLine, VIC_IRQ, 11); /* Enable the External interrupt group 3 */ VIC_ITCmd(EXTIT3_ITLine, ENABLE); //VIC_SWITCmd(EXTIT3_ITLine, ENABLE); }
//irq handler void EXTIT3_IRQHandler(void) { int i; portDISABLE_INTERRUPTS(); { WIU_ClearITPendingBit(WIU_Line28); vParTestToggleLED( 3 ); } portENABLE_INTERRUPTS(); }
RE: IRQ interupt causing PrefetchAbort exceptionPosted by Dave on December 20, 2007 Best not to disable and enable interrupts in the ISR, it should not be needed. Also ensure that vParTestToggleLED() does not enter and exit critical sections, you could test the ISR by just toggling the LED directly without using a function call.
that fixed itPosted by bones23 on December 20, 2007 Your right, the vParTestToggleLED() was entering a critical section. Thanks for the help.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|