Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


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 ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS v10.2.1 is available for immediate download. MIT licensed, includes 64-bit RISC-V, NXP Cortex-M33 demo & Nuvoton Cortex-M23 demo.

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Cadence Tensilica Cortes

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers





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

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

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner