C Code - Philips AN10369 Application Note

Uart/spi/i2c code examples
Table of Contents

Advertisement

Philips Semiconductors
FIQ_Handler
Startup Assembly code:
; ---------------------------------------------------------
;
; ---------------------------------------------------------
IMPORT __main
; in this section
; ---------------------------------------------------------
start
; Enable interrupts
; Set SP for Supervisor mode. Depending upon
; the available memory the application needs to set
; the SP accordingly
; Setting up SP for IRQ mode. Change mode to
; IRQ before setting SP_irq and then
; switch back to Supervisor mode

4.4.2 C code

#include"LPC210x.h"
void Initialize(void);
Application note
B
FIQ_Handler
END
Assembler Directives
AREA asm_code, CODE
CODE32
; main not defined
EXPORT start
MSR cpsr_c,#0x13
LDR SP,=0x4....
MRS R0, CPSR
BIC R1, R0,#0x1F
ORR R1, R1,#0x12
MSR cpsr_c, R1
LDR SP, =0x4....
MSR cpsr_c, R0
; Jump to C code
LDR lr, =__main
MOV pc, lr
END
Rev. 01 — 06 April 2005
Philips ARM LPC microcontroller family
; New Code section
; ARM code
; global symbol
; referenced in
; ivt.s
AN10369
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
11 of 17

Advertisement

Table of Contents
loading

Table of Contents