Programming Examples
13-32
ADSP-BF537 Blackfin Processor Hardware Reference
The
UCEN
bit enables the UART clocks. It also resets the state machine and
control registers when cleared.
Note that the
UCEN
bit was not present in previous UART implementa-
tions. It has been introduced to save power if the UART is not used.
When porting code, be sure to enable this bit.
The IrDA TX polarity change bit and the IrDA RX polarity change bit are
effective only in IrDA mode. The two force error bits,
FPE
and
FFE
, are
intended for test purposes. They are useful for debugging software, espe-
cially in loopback mode.
Programming Examples
The subroutine in
shows a typical UART initialization
sequence.
Listing 13-1. UART Initialization
/**************************************************************
* Configures UART in 8 data bits, no parity, 1 stop bit mode.
* Input parameters: r0 holds divisor latch value to be
* written into
* DLH:DLL registers.
* p0 contains the UARTx_GCTL register address
* Return values: none
*************************************************************/
uart_init:
[--sp] = r7;
r7 = UCEN (z); /* First of all, enable UART clock */
w[p0+UART0_GCTL-UART0_GCTL] = r7;
r7 = DLAB (z); /* to set bit rate */
w[p0+UART0_LCR-UART0_GCTL] = r7; /* set DLAB bit first */
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 ...