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] [August 2009 Threads] Interrupt with avr32 portPosted 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) { portENTER_SWITCHING_ISR1(); volatile struct avr32_pio_t *pioa = &AVR32_PIOA; int status;
status = pioa->pdsr; status = pioa->isr; if(status & 0x00000400) {
controlLED(1, LED_ON); } else { controlLED(1, LED_OFF); }
portEXIT_SWITCHING_ISR1(); }
I activate interrupts with:
INTC_register_interrupt( &isr_test, AVR32_PIOA_IRQ, AVR32_INTC_INT1); gpio_set(&AVR32_PIOA, 10, GPIO_INTERRUPT, GPIO_ON); gpio_set(&AVR32_PIOA, 11, GPIO_INTERRUPT, GPIO_ON);
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 portPosted 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?
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|