Skip to main content
gflasza
Associate II
November 21, 2007
Question

vector.s for Anglia IDEaliST

  • November 21, 2007
  • 14 replies
  • 2697 views
Posted on November 21, 2007 at 13:57

vector.s for Anglia IDEaliST

This topic has been closed for replies.

14 replies

mehdi239955
Visitor II
May 17, 2011
Posted on May 17, 2011 at 09:41

hi all,

i've done the portage of IRQ project to anglia IDE. :-]

keep me informed about any issue.

regards.

MBS 8-)

[ This message was edited by: MBS on 13-04-2007 17:38 ]

jaroslaw2
Associate III
May 17, 2011
Posted on May 17, 2011 at 09:41

Can somebody explain IDISABLE and IENABLE macros. In my project when I leave interrupt with IDISABLE macro at the end my program stops.

I still have problem with this VIC0 and VIC1 problem, can somebody overcome this problem finally.

I need a sample code for Anglia Compiler with two interrupts with form different VIC's,

Please help because my boss will kill me :)

best regards,

J.O.

mehdi239955
Visitor II
May 17, 2011
Posted on May 17, 2011 at 09:41

hi GrzesiekFl,

Sorry, i've tried this example with IAR and RIDE and it works fine but i've just compile with ANGLIA .(no flash link)

Quote:

I think the problem is in section

#define IENABLE asm('' MRS LR, SPSR''); /* Copy SPSR_irq to LR */

asm(''STMFD SP!, {LR} ''); /* Save SPSR_irq */

asm(''MSR CPSR_c, #0x1F ''); /* Enable IRQ (Sys Mode) */

asm(''STMFD SP!, {LR} '') ; /* Save LR */

#define IDISABLE asm(''LDMFD SP!, {LR}'') ; /* Restore LR */

asm(''MSR CPSR_c, #0x92'') ; /* Disable IRQ (IRQ Mode) */

asm(''LDMFD SP!, {LR}'') ; /* Restore SPSR_irq to LR */

asm(''MSR SPSR_cxsf, LR'') ; /* Copy LR to SPSR_irq */

try the attached project, i've just deleted these functions and replace them by their code in the different interrupt functions. 8-)

Best regards

MBS

gflasza
gflaszaAuthor
Associate II
May 17, 2011
Posted on May 17, 2011 at 09:41

Hi MBS

Sorry, but this program doesn't work.

It compiles correct, but the interrupts stop program

If I switch off interrupts

//VIC_ITCmd(TIM0_ITLine, ENABLE);

//VIC_ITCmd(RTC_ITLine, ENABLE);

program works correctly

I think the problem is in section

#define IENABLE asm('' MRS LR, SPSR''); /* Copy SPSR_irq to LR */

asm(''STMFD SP!, {LR} ''); /* Save SPSR_irq */

asm(''MSR CPSR_c, #0x1F ''); /* Enable IRQ (Sys Mode) */

asm(''STMFD SP!, {LR} '') ; /* Save LR */

#define IDISABLE asm(''LDMFD SP!, {LR}'') ; /* Restore LR */

asm(''MSR CPSR_c, #0x92'') ; /* Disable IRQ (IRQ Mode) */

asm(''LDMFD SP!, {LR}'') ; /* Restore SPSR_irq to LR */

asm(''MSR SPSR_cxsf, LR'') ; /* Copy LR to SPSR_irq */

I just added delay() function and port GPIO7 (diodes), I use MCB-STR9 starter kit

Regards, Greg