Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

IRQ interupt causing PrefetchAbort exception

Posted 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 exception

Posted 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 it

Posted by bones23 on December 20, 2007
Your right, the vParTestToggleLED() was entering a critical section. Thanks for the help.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists