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


Interrupt with avr32 port

Posted by Jesper Vestergaard on August 5, 2009
I'm using the avr32 port for ap7000 and have made a interrupt that turns a led on and off.
Here's the code:

void isr_test(void)

volatile struct avr32_pio_t *pioa = &AVR32_PIOA;
int status;

status = pioa->pdsr;
status = pioa->isr;

if(status & 0x00000400)

controlLED(1, LED_ON);
controlLED(1, LED_OFF);


I activate interrupts with:

INTC_register_interrupt( &isr_test, AVR32_PIOA_IRQ, AVR32_INTC_INT1);

The interrupt works fine and the led turns on and off. But if I press the buttons repeatedly the I suddenly get and unrecoverable exception. I have even tried that the watchdog expires and the debuger quits. Here's the output from gdb after a unrecoverable exception:

0x00013400 in _handle_Unrecoverable_Exception ()
(gdb) bt
#0 0x00013400 in _handle_Unrecoverable_Exception ()
#1 0x48c10230 in ?? ()
(gdb) regs
pc: 00013400 lr: 48c10230 sp: 00000044 r12: c0623002
r11: 3003a122 r10: 0230cfe3 r9: 489f0000 r8: 24007ff0
r7: 00000008 r6: 48ed48f0 r5: e3b00001 r4: d553fece
r3: fffa48df r2: 48d048e1 r1: 0230c062 r0: 48d2a505

Is there something wrong with my interrupt function or is there something else that could be causing the problem?

RE: Interrupt with avr32 port

Posted by Jesper Vestergaard on August 10, 2009
Can someone please comment on my use of portENTER_SWITCHING_ISR. Is it correct to use the macro in an interrupt?

[ 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