OpenCores
no use no use 1/1 no use no use
Issue receiving data from ORPSoC through UART
by andresjk on Dec 1, 2012
andresjk
Posts: 5
Joined: Apr 6, 2012
Last seen: Jan 19, 2014
Hi everyone,

I�m facing a critical issue for a while now. I cannot receive anything from the UART of the ORPSoC.
So far, I have the toolchain, the bitstream of the ORPSoC synthesized for the ML501, which is the board I�m currently using. I have compiled some software including:

Linux, from git://git.openrisc.net/jonas/linux . I have 2 setups of the ml501.dts one with 50MHz and another one with 66666666Hz (the actual frequency). I did change the DTS before compiling the kernel.

Echo.or32, I removed the underscore before each global name in the .s file and I changed the frequency to 66MHz and 50 MHz too. ( http://opencores.org/forum,OpenRISC,0,4451)

Prime Numbers, from Sven�s 2.5 tutorial.

Helloworld, from the OR virtualbox

All the above software did run perfectly in the OR1Ksim but when I try it in the ORPSoC in the FPGA I don�t get any data in the serial console. It�s kind of weird because if it�s an issue regarding the frequency I should get some kind of ASCII character in the serial program but I get nothing.

As troubleshooting I have shorted Tx and Rx UART pins in the JTAG-to-USB and It does echo. I have checked the Tx (which is the Rx pin in the JTAG2USB) with an oscilloscope and it�s stable at 3.3v.

Thanks.
scr.png (348 kb)
RE: Issue receiving data from ORPSoC through UART
by rozpruwacz on Dec 3, 2012
rozpruwacz
Posts: 25
Joined: Feb 28, 2009
Last seen: Apr 4, 2021
just a suggestion where to start. You can use gdb to access uart registers. First check if You can read and write to them (to check if the ip exists at desired address), than You can try to configure them and check if you can send and receive. If that will work then the problem lies in software ...
RE: Issue receiving data from ORPSoC through UART
by andresjk on Dec 3, 2012
andresjk
Posts: 5
Joined: Apr 6, 2012
Last seen: Jan 19, 2014
Thanks rozpruwacz, I'm going to do that to solve my problem for on bare metal software.

I have solved the problem for linux. I actually posted yesterday but I think it never went through, so I'm going to repost it maybe it can help another newbie like me.

The problem was that the DTS file was corrupt, I solved it by change it to a stable one, the one provided by (OR image) and setting up the frequency to 66666666Hz and the memory reg from 0x0 to 0x0C000000.After that I recompiled the vmlinux and it worked. I'm enclosing my vmlinux and a screenshot maybe it helps.

Btw, I found out another issue kind of off topic but important.
I noticed that if you load and execute a soft in the OR and then you stop the execution and reload it again and run it again you won't see any data coming from the uart, which is kinda misleading because it's not a soft problem. Up to now, I'm dealing with this by reprogramming the FPGA, disconnecting the JTAG2USB and reconnecting it, executing the debugger proxy, gtkterm and gdb all over again.
Seems to me that I'm missing something. If I'm doing something wrong let me know please.

Thank you very much.
vmlinux-scr.tar.gz (2414 kb)
no use no use 1/1 no use no use
© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.