ana sanchez

mcf5282 uart help

Discussion created by ana sanchez on Feb 13, 2007
Latest reply on Feb 16, 2007 by ana sanchez
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

Outcomes