I have a K10 144 pin, 100Mhz design and I'm running into problems getting UART3 up and running properly
I have the clock gated to PORTE
SIM_SCGC5|= SIM_SCGC5_PORTE_MASK; // to get Port E Clock enabled
and I have the clock gated over to PORTE
SIM_SCGC4 |= SIM_SCGC4_UART3_MASK; // to get clock to the UART
And I have selected alternate function 3 for the RX and TX pins
PORTE_PCR24 = PORT_PCR_MUX(3);
PORTE_PCR25 = PORT_PCR_MUX(3);
I'm enabling UART3's IRQ (status vector)
enable_irq(51);
and I have the ISR function loaded into vector 67 in the vector table
I have UART 3 setup like this (I'm looking for 9600 baud, N,8,1)
UART3_C2=0x00;
UART3_BDH=0x00;
UART3_BDL=0x89;
UART3_C1=0x00;
UART3_S2=0x00;
UART3_C3=0x00;
UART3_C2=0x2C;
Just to double check things I have the UART RX and TX lines jumpered together on the output connector of my board so I should (in theory) see the data back on the receive buffer every time I transmit
But I'm never seeing any data on the TX pin and obviously not seeing the Receive Pin IRQ for getting any data back.
What am I missing?
Thanks for the help
Hi, Keith Kolmos
You can generate a project according to the "Block reception/transmission, with interrupt service" , the Typical Usage of Component Serial_LDD in CodeWarrior10.5 with PE.
Hope that help.
Best Regards
Binbin
Hi, Keith Kolmos
From your code, you do not send out any data from TX, so you cannot find waveform from TX line. For register setting in your code is correct.
I suggest you to have a look at Freescale sample project on www.freescale.com There are many UART function operation for your reference.
Hope my reply can help you.
Best Regards
Paul