AnsweredAssumed Answered

trouble reading uart

Question asked by Joseph Gundel on Jul 8, 2015
Latest reply on Jul 10, 2015 by Iva Dorazinova

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!!!

Outcomes