Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Software Interrupt Call (swi) takes very long
PostPosted: Sat Sep 12, 2009 6:02 pm 
Offline

Joined: Thu Sep 03, 2009 11:07 pm
Posts: 1
Hi,

I am trying to use software interrupts for handling some special functions in supervisor mode. Even a call to an empty interrupt routine alone takes about 600 ms. The LED is blinking very slow. Normaly this procedure should take only a few cycles.

Code:
reset_vector:
   ldr      pc, =reset_handler      // Reset
[...]
swi_vector:
   ldr      pc, =swi_handler         // Software Interrupt
[...]
reset_handler:
   // Enable Main Oscillator, Set PLL to 96 MHz, Set MCK to 48 MHz, Set up default interrupt handler
   // Memory remap
   // Stack init
   // Copy data section
   // Clear bss section
   // branch to main
[...]
swi_handler:
   movs   pc, r14


Code:
int main(void) {
   while (1) {
      asm("swi #1");
      PIOA->PIO_CODR = LED_A;
      asm("swi #1");
      PIOA->PIO_SODR = LED_A;
   }
   return 0;
}


Has someone any idea what can cause this problem?
(I am using a Atmel AT91SAM7A3 on the AT91SAM7A3-DK)

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: