6410 LED 點燈測試 燒到Nand的0位址

2021-06-07 05:20:59 字數 1511 閱讀 8499

preserve8

area |c$$code|, code, readonly

global

start

start

b        reset

b        .                ; handlerundef    (0x00000004)

b        .                ; handlerswi        (0x00000008)

b        .                ; handlerpabort    (0x0000000c)

b        .                ; handlerdabort    (0x00000010)

b        .                ; handlerreserved    (0x00000014)

b        .                ; handlerirq        (0x00000018)

b        .                ; handlerfiq        (0x0000001c)

reset

mrsr0,cpsr

bicr0,r0,#0x1f

orrr0,r0,#0xd3

msr cpsr_cxsf,r0

ldr r0, =0x70000000;/* peri port setup */

orrr0, r0, #0x13

mcrp15,0,r0,c15,c2,4     ;  @ 256m(0x70000000-0x7fffffff)

ldrr0, =0x7f008800

;/* gpio k init */

ldr

r1, =(0x1111<<16) 

str

r1, [r0]

ldr

r0, =0x7f00880c

movr1, #0x0

str

r1, [r0]

b led1

led1

ldr

r0, =0x7f008808

ldr

r1, =(0xe<<4)

str

r1, [r0]

bled1

led2

ldr

r0, =0x7f008808

ldr

r1, =(0xd<<4)

str

r1, [r0]

bled2

led3

ldr

r0, =0x7f008808

ldr

r1, =(0x7<<4)

str

r1, [r0]

bled3

end

led點燈驅動

核心版本 linux 2.6.32.2 開發板 mini2440 include include include include include include include include include include include include define device name le...

6410之點燈驅動

寫乙個點led的驅動分為下面幾個步驟 1.框架 2.完善硬體的操作 a.看原理圖 b.看6410手冊 c.寫 檢視6410原理圖led sch如下 所以要操作的工作有 1.設定gpm0 gpm3為輸出引腳 2.點燈或者滅燈,對gpmdat 進行操作即可。3.使用ioremap和iounmap對實體地...

OK6410裸機程式 點亮LED

globl start start 硬體相關的設定 peri port setup ldr r0,0x70000000 orr r0,r0,0x13 mcr p15,0,r0,c15,c2,4 256m 0x70000000 0x7fffffff 關看門狗 往wtcon 0x7e004000 寫0 ...