MQX won't detect UART data present

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MQX won't detect UART data present

964 Views
snapcount
Contributor I

Greetings!

I'm using the _io_fstatus() function to wait for a byte to show up on ittyc: on a K11 part.  I checked the 'D' register and can see the byte is reaching the micro but for some reason the call to _io_fstatus() is never returning true.  I have tried this on other UARTs on the same part and it works great.  I was wondering if anyone has any ideas or a list of things to check in order for this method to work correctly.  This is MQX v4.01.

Thanks in advance!

Roy

0 Kudos
Reply
1 Reply

783 Views
snapcount
Contributor I

Sorry to reply to my own post but I have some new information and I thought it may help someone to help me.  I'm not sure this is an MQX issue anymore.  In the ISR it is checking for UART2_S1[RDRF] to be set.  This is not happening (based on register inspection).

From what I gather, the FIFO on UART2 of the K11 is 1 byte in depth.  I read the datasheet regarding RWFIFO[RXWATER] setting and how it affects RDRF.  I have RXWATER set to 0x01 but the datasheet says this value must be set *less than* the FIFO size for the UART and greater than zero.  This would be impossible for a FIFO 1 byte deep.  In any case any help is appreciated, I must be mistaken about something.

Roy

0 Kudos
Reply