I even put it in internal loop-back. I see the idle line flag get asserted, but no data.
Hi Hamid Memar
Could you share your project to replicate your issue? what IDE are you using?
I have not made any changes to the generated code by Kenetis design studio. As I mentioned before, poking the same values in the UART1 registers makes it work. At this time I am only trying to get the loop back to work.
Is your port MUX for UART0_RX set correctly?
I believe I am setting it correct. But I can not get the loop back to work. Setting the pin MUX for UART 1 did not make a difference, therefore I thought I should not make a difference on UART0. I think if I get the loopback to work, the UARt will work.
I figured my problem out. Thanks for your response.
Consider posting your solution for the benefit of forum members.
What I was doing was to poke values into registers within the debugger.as it turned out for what ever reason, when I poked value in the UART data register, this value did not come back on the next read and the FIFO full flag was not raised (too fast of read). When the same worked fine for UART1.
I thought it may be timing on the part of JTAG reads of the registers. So I wrote a fairly simple tight loop to write to data register and wait for flag and then read the register. This showed that it was working fine.
Also I found a bug in the code I was working with that caused the status to always return FIFO empty.
Where your 'initial experiments' led you astray is that the ARM debug architecture doesn't have the concept of a 'protected read'. That is, the register-reads by the debugger to update the GUI contents are the SAME as 'code reads', and as such attempts to 'debug your way thru' flag and read-once registers (like RXFIFO!!!) means the 'register display' window will 'read and clear' data-available flags before you can even see them. I know, this makes debugging peripheral drivers 'more difficult'...
This problem happened again and I finally figured it out. Once the UART report and overrun, it no longer receives until you clear the overrun flag. That was the problem.
Retrieving data ...