ADSP-BF537 Blackfin Processor Hardware Reference
13-37
UART Port Controllers
[--sp] = rets;
[--sp] = r0;
uart_puts.loop:
r0 = b[p1++] (z);
CC = r0 == 0;
if CC jump uart_puts.exit;
call uart_putc;
jump uart_puts.loop;
uart_puts.exit:
r0 = [sp++];
rets = [sp++];
rts;
uart_puts.end:
Note that polling the
UART0_LSR
register for transmit purposes may clear
the receive error latch bits. It is, therefore, not recommended to poll
UART0_LSR
for transmission this way while data is received. In case, write a
polling loop that reads
UARTx_LSR
once and then evaluates all status bits of
interest, as shown in
.
Listing 13-6. UART Polling Loop
uart_loop:
r7 = w[p0+UART0_LSR-UART0_GCTL] (z);
CC = bittst(r7, bitpos(DR));
if !CC jump uart_loop.transmit;
r6 = w[p0+UART0_RBR-UART0_GCTL] (z);
r5 = BI | OE | FE | PE (z);
r5 = r5 & r7;
CC = r5 == 0;
if !CC jump uart_loop.error;
b[p1++] = r6; /* store byte */
uart_loop.transmit:
CC = bittst(r7, bitpos(THRE));
if !CC jump uart_loop;
Summary of Contents for Blackfin ADSP-BF537
Page 42: ...Contents xlii ADSP BF537 Blackfin Processor Hardware Reference ...
Page 90: ...Development Tools 1 32 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 138: ...Programming Examples 4 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 340: ...SDC Programming Examples 6 84 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 606: ...Programming Examples 9 94 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 660: ...Programming Examples 10 54 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 720: ...Electrical Specifications 11 60 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 840: ...Programming Examples 13 42 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 876: ...Programming Examples 14 36 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 938: ...Programming Examples 15 62 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 958: ...Programming Examples 17 12 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 986: ...Programming Examples 18 28 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1162: ...G 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1218: ...Index I 56 ADSP BF537 Blackfin Processor Hardware Reference ...