AnsweredAssumed Answered

A question about UART on imx257 PDK board

Question asked by b wq on Jul 26, 2013
Branched to a new discussion



I'm trying to sending some data from UART1 on imx257 PDK board. The purpose is just sending some data, no interrupt, no receive, very simple.


The register setting is as below. But I have found a very strange behavior:



// UART1 Init
UCR2_1_bit.SRST = 0; //reset
UCR1_1_bit.UARTEN = 1; //enable UART
UFCR_1_bit.RFDIV = 5; // Divide input clock by 1


//ONEMS_1 =  HCLK /((PCDR3_bit.PERDIV15+1) + 1000);
UBIR_1 = 1152-1;
UBMR_1 = 41562-1;
//USR1_1 = 0xFFFFFFFF;  // clear pending interrupts
//USR2_1 = 0xFFFFFFFF;  // clear pending interrupts




UCR2_1_bit.IRTS = 1; //ignore RTS pin
UCR2_1_bit.WS = 1; //8 bit
//UCR2_1_bit.PREN = 1; //prity En
UCR2_1_bit.TXEN = 1;  //enable Tx
UCR3_1_bit.RXDMUXSEL = 1; //enable RXD
UTXD_1 = 0x000000AA;  //set data



After writing data to UTXD:

1. The TXFE (Transmit Buffer FIFO Empty) : 1-->0 and keeping at 0

2. The TXDC (Transmitter Complete) : 1-->0 and keeping at 0

3. The TXEMPTY (TxFIFO Empty): 1-->0 and keeping at 0


There is no any data output on TXD pin at first. But when I push reset on IAR debugger, the data shows up on the TXD.

Can any body tell me is there any setting should be done for UART Tx function?


(Clock for UART has been enabled, IOMUX use default value)


Thank you!

Original Attachment has been moved to: