Hi,
i edited ethernet to serial project. i made it 4 client connection. so my code was listening port 23,24,25,and 26 port. so
every Client i want to make seperate UART for receive and transmit. can you guide how to make further UART port.
if you give one example code related to this one. i will make 4-uart my self.
just give one example. i am using KDS 2.0 IDE and KSDK 1.0.0 mqx Ethernet to serial project. i cant use SDA serial to all Client connection.
regards,
Thiva
i am waiting for code. otherwise just guide following code... inside main task i am doing this things
void main_task ( uint32_t initial_data )
{
char buf[6]="TEST";
PORT_HAL_SetMuxMode(PORTC_BASE,14u,kPortMuxAlt3); //initializing uart-4
PORT_HAL_SetMuxMode(PORTC_BASE,15u,kPortMuxAlt3);
CLOCK_SYS_EnableUartClock(4);
// UART clock source is either system or bus clock depending on instance
uartSourceClock = CLOCK_SYS_GetUartFreq(4);
// Initialize UART baud rate, bit count, parity and stop bit.
UART_HAL_SetBaudRate(baseAddr, uartSourceClock, BOARD_DEBUG_UART_BAUD);//115200
UART_HAL_SetBitCountPerChar(baseAddr, kUart8BitsPerChar);
UART_HAL_SetParityMode(baseAddr, kUartParityDisabled);
#if FSL_FEATURE_UART_HAS_STOP_BIT_CONFIG_SUPPORT
UART_HAL_SetStopBitCount(baseAddr, kUartOneStopBit);
UART_HAL_EnableTransmitter(baseAddr);
UART_HAL_EnableReceiver(baseAddr);
while(1)
{
UART_DRV_SendDataBlocking(4, buf, sizeof(buf), 0);
_time_delay(3000);
}
}
but its not transmit any data on serial what problem here......
Please review other post for example code to do this.
Re: Re: HOW TO MAKE TWO SERIAL(UART) PORT IN FRDMK64F120
Regards,
David