EC200U-CN UART2 not working

Hi everyone,
I’m a new member, I’m starting with EC200U-CN but I can’t use UART2.
I don’t now why I try send AT comment over main UART but AT not response ,when I try send over Auxiliary UART then AT response OK.
my code:
config UART2:
ret = ql_pin_set_func(QUEC_PIN_UART2_TXD, 0x01); //pin 138
if(QL_GPIO_SUCCESS != ret) {
return err;
}
ret = ql_pin_set_func(QUEC_PIN_UART2_RXD, 0x01); //pin 137
if(QL_GPIO_SUCCESS != ret){
return err;
}
uart_cfg.baudrate = QL_UART_BAUD_115200;
uart_cfg.flow_ctrl = QL_FC_NONE;
uart_cfg.data_bit = QL_UART_DATABIT_8;
uart_cfg.stop_bit = QL_UART_STOP_1;
uart_cfg.parity_bit = QL_UART_PARITY_NONE;
ret = ql_uart_set_dcbconfig(QL_UART_PORT_2, &uart_cfg);
if(QL_UART_SUCCESS != ret) {
return 1;
}
ret = ql_uart_open(QL_UART_PORT_2);
if(QL_UART_SUCCESS != ret){
return 1;
}
try send data:
ql_uart_write(QL_UART_PORT_2,“hello world\n”, 12);

thank all!

1 Like

Hi @TRAN_HOANG

Please try to change
ql_pin_set_func(QUEC_PIN_UART2_TXD, 0x01) to 0x03
ql_pin_set_func(QUEC_PIN_UART2_RXD, 0x01) to 0x03

Thanks

Hi @Puck-Q Please tell me where the UART2 and UART3 of EC200U are Exactly Located.

Because I’m able to communicate with Main UART (UART 1) but I’m not able to communicate with UART 2 & 3.

Even though I short the GPIO Pins to the UART 1 as mentioned in the documents and to connect UART 2 with the COM (UART1). And for the UART 3, I’m using the debug port but still, I cant communicate with UART 2 & 3. I used the Set function in the program for the UART 2 & 3 Communication.

1 Like

Hi @TRAN_HOANG

Because the EVB board is compatible with multiple modules, some interfaces on the EVB board will not correspond to the currently used modules; The corresponding relationship can be found by viewing the circuit schematic diagram of the module and EVB board, as follows:

1、QL_ UART_ PORT_ 1. The sending and receiving pin numbers are 67 and 68, and the serial port information is output through COM (main) of EVB board;

1 Like

2、QL_ UART_ PORT_ 2. The sending and receiving pin numbers are 138 and 137; EVB board has no ready-made COM port to output serial port information; Serial port information can be transferred from USB to serial port and viewed through gpio36 and gpio37 pins of EVB board;

1 Like

QL_ UART_ PORT_ 3. The sending and receiving pin numbers are: 82, 81; EVB board has no ready-made interface to output serial port information; The serial port information can be transferred from USB to serial port and tested through the keyout4 and keyout5 leads of the module;


If you use ec200ucnaa / ec200ucnla, uart3 cannot be used because the internal GNSS occupies uart3

1 Like

Hi Taran ,

As your form you are able to work with uart main com.
could you please help me with this because i am unable to received anything ,i need to communicate using main com, currently i am using EC200U_CN SDK uard demo code

hi
i want to change uart2 to usb at port for debuging
what can i do?

we have independent debug uart, you can use it , and it defaults to USB output log, you also can use API ql_log_set_port(2) to set it.