FC3000

背光控制測試


main.s

  .global _start
  
  .equ GPIO_BASE, 0x01c20800 
  .equ PE_CFG0,   (GPIO_BASE + (4 * 0x24) + 0x00)
  .equ PE_DATA,   (GPIO_BASE + (4 * 0x24) + 0x10)
   
  .arm
  .text
_start:
  .long 0xea000016
  .byte 'e', 'G', 'O', 'N', '.', 'B', 'T', '0'
  .long 0, __spl_size
  .byte 'S', 'P', 'L', 2
  .long 0, 0
  .long 0, 0, 0, 0, 0, 0, 0, 0
  .long 0, 0, 0, 0, 0, 0, 0, 0
   
_vector:
  b reset
  b .
  b .
  b .
  b .
  b .
  b .
  b .
   
reset:
  ldr r0, =PE_CFG0
  ldr r1, =0x1000000
  str r1, [r0]
 
  ldr r0, =PE_DATA
0:
  ldr r2, =100000
1:
  subs r2, #1
  bne 1b
  eor r1, #(1 << 6)
  str r1, [r0]
  b 0b
  .end

完成




返回上一頁