Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Message 648

2004-01-24 by bobbruce000

--- In lpc2100@yahoogroups.com, Bogdan Marinescu  
<a_bogdan_marinescu@y...> wrote:  
>     Are you sure you're using the right r10? r10 is shadowed in 
> FIQ mode; this means that it doesn't have the same value as in 
> user/system/supervisor mode. Try to set it explicitly in the FIQ  
> interrupt or at system init.  
  
Yes, I am sure the value in R10 is correct.  It is set during  
system init while in FIQ mode.  To double check, I wrote a  
routine to send the value out the serial port, and I checked  
it before and after the interrupt to make sure it wasn't getting  
corrupted.  
  
Here is the reset routine that sets R10:  
  
> .L_StackTop:  .word      0x4000ffe0  // RAM top minus 32 b for IAP     
> .L_T0IR:      .word      0xE0004000  // Timer 0 IR port address     
> .L_VVA:       .word      0xfffff030  // VIC Vect Addr port address     
> .L_IOCLR:     .word      0xE002800C  // IOCLR address     
>      
> reset:     
>       ldr      r0,.L_StackTop   // r0 = top of stack     
>       msr      cpsr,#0xd1       // switch to FIQ mode   
>       sub      sp,r0,#0x00      // Set FIQ stack pointer     
>       ldr      r10,.L_T0IR      // R10 = timer0_ir address  
  
	-bob

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.