mcf5282 uart help

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mcf5282 uart help

1,623 Views
illinavillim
Contributor I
Hello!

Im using mcf5282 in mcf5282evb.In my application I need to receive, via UART, text files
and process them in 16 bytes groups, so I need to implement some kind of flow
control in the receiver part.

I think Hardware flow control is the one that best fits my needs.

I need some help with the configuration. This is my init archive:

Code:
void mcf5282_uart1_init(void){            MCF5282_GPIO_PUAPAR |= 0x0C;        /*         * Reset TX and RX         */        MCF5282_UART1_UCR = MCF5282_UART_UCR_RESET_TX;        MCF5282_UART1_UCR = MCF5282_UART_UCR_RESET_RX;        /*      * Reset Mode Register      */        MCF5282_UART1_UCR = MCF5282_UART_UCR_RESET_MR;            /*         * No parity, 8-bits,         */        MCF5282_UART1_UMR = (0                | MCF5282_UART_UMR1_RXRTS                //Receiver Request To Send                |  MCF5282_UART_UMR1_PM_NONE                | MCF5282_UART_UMR1_BC_8 );        /*         *  1 stop bit, MCF5282_UART1_UMR2 = 0x07;      */        MCF5282_UART1_UMR = (0                | MCF5282_UART_UMR2_CM_NORMAL                | MCF5282_UART_UMR2_STOP_BITS_1);        /*         * Set Rx and Tx baud by timer, MCF5282_UART1_UCSR = 0xDD;      */        MCF5282_UART1_UCSR = (0                | MCF5282_UART_UCSR_RCS_SYS_CLK                | MCF5282_UART_UCSR_TCS_SYS_CLK);                /*        * No interrupts        */        MCF5282_UART1_UIMR = 0x00; //        /*         * Calculate baud settings      */        MCF5282_UART1_UBG1 = 0;        MCF5282_UART1_UBG2 = 208; //        /*      * Enable receiver and tx      */        MCF5282_UART1_UCR = (0                | MCF5282_UART_UCR_TX_ENABLED                | MCF5282_UART_UCR_RX_ENABLED                );}  

 


Is there something i am doing wrong? maybe the jumper or the GPIO port settings?

Please help!

Thank you
 
Alban: "SRC" code format

Message Edited by Alban on 2007-02-13 03:59 PM

Labels (1)
0 Kudos
2 Replies

451 Views
mccPaul
Contributor I
Hi
 
You don't say what the problem is that you are having, perhaps you could add that?
 
It may also be useful to see the code that you are using to poll the UART and to know something about the device that is transmitting to the UART (presumably it is configured to used HW flow control as well?)
 
Paul.
0 Kudos

451 Views
illinavillim
Contributor I
My problem is that the hardware control is not working properly.
I am transmitting to the hyperteminal which is configured for hardware flow control. I need
the hyperteminal to stop sending characters while I am processing data, and start sending again afterwards.

My question is, ¿how should the GPIO be configured? And what about the jumpers in the board?

Thanks in advance for your help
0 Kudos