Hello
I am a new hand on imx257.
Now I want to make some simple UART test code on imx25 PDK startkit. What I want to do is just send out some data on UART_1. (no interrupt, no CTS, no RTS, very simple...)
The test code is as below:
// UART Init | ||
UCR2_1_bit.SRST = 0; //reset | ||
UCR1_1_bit.UARTEN = 1;//enable UART | ||
UFCR_1_bit.RFDIV = 5; | // Divide input clock by 1 |
UCR2_1_bit.IRTS = 1; //ignore RTS pin | |
UCR2_1_bit.WS = 1; //8 bit | |
UCR2_1_bit.TXEN = 1; | |
UCR3_1_bit.RXDMUXSEL = 1; | |
UTXD_1 = 0x000000AA; |
Currently, the FIFO empty flag became 0, but I can not catch any data by oscilloscope on UART1_TXD pin. Can anybody tell me is there any setting should I do for UART sending?
Dear Jimmchan
I'm sorry. I'm afraid I can't read your previous message.
Regards
Ben
在 2013-07-25 17:02:41,jimmychan <admin@community.freescale.com> 写道:
|
|
|
|
question about UART sending on imx257
reply from jimmychan in i.MX Community - View the full discussion
Reply to this message by replying to this email, or go to the message on Freescale Community |
Start a new discussion in i.MX Community by email or at Freescale Community |
Following question about UART sending on imx257 in these streams: Inbox |
|
|
How about the IOMUX setting?
In the reference manual, it said:
000: Select mux mode: ALT0 mux port: TXD_MUX of instance: uart1.
So I use default value (0x000) for IOMUXC_SW_MUX_CTL_PAD_UART1_TXD:MUX_MODE.
Is this correct?
在 2013-07-25 17:38:42,jimmychan <admin@community.freescale.com> 写道:
|
|
|
|
question about UART sending on imx257
reply from jimmychan in i.MX Community - View the full discussion
How about the IOMUX setting?
Reply to this message by replying to this email, or go to the message on Freescale Community |
Start a new discussion in i.MX Community by email or at Freescale Community |
Following question about UART sending on imx257 in these streams: Inbox |
|
|
Please enable the clock for UART. Please check the Clock Gating Control Register (CGCR) in the CCM module.
Hi Jimmychan
The clock for UART has been already enabled in function '__arm void low_level_init (void)'.
// configure peripheral enables for CGCR0
CGCR0 = 0x1FFFFFFF;
// configure peripheral enables for CGCR1
CGCR1 = 0xFFFFFFFF;
// configure peripheral enables for CGCR2
CGCR2 = 0x000FDFFF;
Is there any other register should I set?
Regards
在 2013-07-25 16:19:38,jimmychan <admin@community.freescale.com> 写道:
|
|
|
|
question about UART sending on imx257
reply from jimmychan in i.MX Community - View the full discussion
Please enable the clock for UART. Please check the Clock Gating Control Register (CGCR) in the CCM module.
Reply to this message by replying to this email, or go to the message on Freescale Community |
Start a new discussion in i.MX Community by email or at Freescale Community |
Following question about UART sending on imx257 in these streams: Inbox |
|
|