Programming Examples - Analog Devices Blackfin ADSP-BF537 Hardware Reference Manual

Hide thumbs Also See for Blackfin ADSP-BF537:
Table of Contents

Advertisement

Programming Examples

The
bit enables the UART clocks. It also resets the state machine and
UCEN
control registers when cleared.
Note that the
UCEN
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,
intended for test purposes. They are useful for debugging software, espe-
cially in loopback mode.
Programming Examples
The subroutine in
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
*
*
*
*
Return values:
*************************************************************/
uart_init:
[--sp] = r7;
r7 = UCEN (z);
w[p0+UART0_GCTL-UART0_GCTL] = r7;
r7 = DLAB (z);
w[p0+UART0_LCR-UART0_GCTL] = r7;
13-32
bit was not present in previous UART implementa-
Listing 13-1
shows a typical UART initialization
written into
DLH:DLL registers.
p0 contains the UARTx_GCTL register address
none
/* First of all, enable UART clock */
ADSP-BF537 Blackfin Processor Hardware Reference
and
FPE
/* to set bit rate
/* set DLAB bit first */
, are
FFE
*/

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Blackfin ADSP-BF537 and is the answer not in the manual?

Table of Contents