Uart output

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Uart output

1,040件の閲覧回数
shunpinglin
Contributor III

hello,

  Now, I write uart assemble code during the boot of ls1021atwr.  But the uart don't ouput anything, I don't know any? do anyone have idea?

The following assemble code:

UART_LCR=0x21C0503
        UART_DLB=0x21C0500
        UART_DMB=0x21C0501
        UART_SND=0x21c0500
        UART_IER=0x21c0501
        UART_MCR=0x21c0504
        UART_FCR=0x21c0502
   
    LOOP1:
        ldr r3, =0x21c0505
        ldr r4, [r3]
        tst r4, #0x40
        bne LOOP1
            
        ldr r0, =(UART_IER)
        ldr r1, =0x00
        str r1, [r0]
            
        ldr r0, =(UART_MCR)
        ldr r1, =0x03
        str r1, [r0]

        ldr r0, =(UART_FCR)
        ldr r1, =0x07
        str r1, [r0]
        /*  
         * setting line control register and
         * setting serial baud,including DLB and DMB   
        */
        ldr r0, =(UART_LCR)
        ldr r1, =0X83
        str r1, [r0]

        ldr r0, =0XA3
        ldr r1, =(UART_DLB)
        str r0, [r1]

        ldr r0, =0X00
        ldr r1, =(UART_DMB)
        str r0, [r1]

        ldr r0, =(UART_LCR)
        ldr r1, =0X03
        str r1, [r0]
        /*
         * send data to send buffer
        */

        mov r0, #0x24
        ldr r1, =(UART_SND)
        str r0, [r1]

        mov r3, #100
    LOOP2:
        sub r3, r3, #1
        cmp r3, #0
        bne LOOP2

ラベル(1)
タグ(4)
0 件の賞賛
返信
1 返信

880件の閲覧回数
shunpinglin
Contributor III

one byte register,using ‘strb’ instruction

0 件の賞賛
返信