Programming Examples
The parent routine in
and
UART0
TIMER2
Listing 15-3. UART Autobaud Detection Parent Routine
p0.l = lo(PORTG_FER); /* function enable on UART0 pins PG12
and PG13 */
p0.h = hi(PORTG_FER); /* by default PORTG_MUX register is all
set */
r0 = PG12 | PG13 (z)
w[p0] = r0;
p0.l = lo(UART0_GCTL); /* select UART 0 */
p0.h = hi(UART0_GCTL);
p1.l = lo(TIMER2_CONFIG); /* select TIMER 2 */
p1.h = hi(TIMER2_CONFIG);
call uart_autobaud;
r0 >>= 7;
call uart_init;
...
The subroutine in
Listing 15-4. UART Character Transmission
/*******************************************************
* Transmit a single byte by polling the THRE bit.
* Input parameters: r0 holds the character to be transmitted
*
* Return values: none
*******************************************************/
uart_putc:
[--sp] = r7;
uart_putc.wait:
r7 = w[p0+UART0_LSR-UART0_GCTL] (z);
15-50
Listing 15-3
performs autobaud detection using
.
/* divide PERIOD value by (16 x 8) */
Listing 15-4
transmits a character by polling operation.
p0 contains UARTx_GCTL register address
ADSP-BF50x Blackfin Processor Hardware Reference
Need help?
Do you have a question about the ADSP-BF506F and is the answer not in the manual?