Hi David,
I am workig with KDS 3.0 and KSDK1.2.0 and over MQX
I am working with UART1 and UART3 on a K64 device.
Both UART are configured in the same way but curiously UART3 sends data and UART1 doesn't. The fact is that when data must be sent through UART1, the interrupt is not triggered.
// Initialize variable uartState of type uart_state_t
uart_state_t uartState;
uart_state_t uartState1;
// Fill in uart config data
uart_user_config_t uartConfig = {
.bitCountPerChar = kUart8BitsPerChar,
.parityMode = kUartParityDisabled,
.stopBitCount = kUartOneStopBit,
.baudRate = 115200
};
uart_user_config_t uartConfig1 = {
.bitCountPerChar = kUart8BitsPerChar,
.parityMode = kUartParityDisabled,
.stopBitCount = kUartOneStopBit,
.baudRate = 115200
};
CLOCK_SYS_EnablePortClock(PORTA_IDX);
CLOCK_SYS_EnablePortClock(PORTB_IDX);
CLOCK_SYS_EnablePortClock(PORTC_IDX);
CLOCK_SYS_EnablePortClock(PORTD_IDX);
CLOCK_SYS_EnablePortClock(PORTE_IDX);
BOARD_ClockInit();
//UART3
GPIO_DRV_Init(eco_uart_input_pins, eco_uart_output_pins);
PORT_HAL_SetMuxMode(PORTC,16u,kPortMuxAlt3);
PORT_HAL_SetMuxMode(PORTC,17u,kPortMuxAlt3);
GPIO_DRV_SetPinOutput(PTC18); //RTS
GPIO_DRV_SetPinOutput(PTC19); //CTS
//UART1
GPIO_DRV_Init(eco_wifi_input_pins, eco_wifi_output_pins);
PORT_HAL_SetMuxMode(PORTE,0u,kPortMuxAlt3);
PORT_HAL_SetMuxMode(PORTE,1u,kPortMuxAlt3);
GPIO_DRV_SetPinOutput(PTE3); //RTS
GPIO_DRV_SetPinOutput(PTE2); //CTS
// Initialize the uart module with base address and config structure
UART_DRV_Init(BOARD_DEBUG_UART_INSTANCE, &uartState, &uartConfig); //Uart3
UART_DRV_Init(1, &uartState1, &uartConfig1); //Uart1
Now it is suposed that they are ready to send and receive data, but only UART3 works fine and only its interrupt is triggered.
Please, find attached the file for more datails.
Any help will be apreciated.
Thanks and regards