I have 2 UARTs I am using on the K02 Board I have.
One is set up for DEBUG and it works normal. I can Use Interrupts no problem.
When I configure the 2nd UART, UART1 I cannot read anything out of the port. I cannot use Interrupts as well.
Here is my configuration:
/*! User configuration structure 0 */
/*! fsl_uart1 configuration structure */
const uart_user_config_t fsl_uart1_InitConfig0 = {
.baudRate = 115228U,
.parityMode = kUartParityDisabled,
.stopBitCount = kUartOneStopBit,
.bitCountPerChar = kUart8BitsPerChar,
};
static uart_status_t uart1_init(void)
{
uart_status_t status = UART_DRV_Init(FSL_FSL_UART1, &uart1_state, &fsl_uart1_InitConfig0);
UART_HAL_SetIntMode(g_uartBaseAddr[FSL_FSL_UART1],kUartIntRxDataRegFull,true);
return status;
}
I have tried reading using blocking and also using an Interrupt and It never reads anything. I can transmit out no problem but I cannot read.
I know it is not a hardware issue because when i switch this port to the debug instance it works correctly. Something must be configuring it differrently when used as Debug.
Please Help!!!
Hello Joseph,
please, where do you have any array for received characters?
Can you attach whole project?
Best Regards,
Iva
I cannot post the whole project > I am trying to just read one character at a time or call the ISR. It does not do either
Hello Joseph,
never mind, please just send me part of the code where you work with uart.
I mean pin settings on UART, UART settings, interrupts...
Thank you.
Iva