HPS in DE0-nano-SoC has 2 UARTs. First of them (UART0) is used for console (ttyS0) via USB.
I want to use second UART (UART1) for data transfer from Linux (Debian wheezy armhf).
I used Linux 4.3
My first test was to open /dev/ttyS0 via ssh. (stty -F /dev/ttyS0)
Device was successfully opened and keystrokes successfully transmitted to the serial terminal
But I was unable to open /dev/ttyS1 (stty -F /dev/ttyS1) with error
hi!!
take a look at the device tree and hps.xml(qsys files) in your altera project!
if (cat proc/device-tree/soc/serial1@ffc03000/status = disable) then
change your device tree src file and enable uart1
else
if (uart1 = disable (in hps.xml > altera project)) then
change the qsys project and enable uart1(under hps/periph) with the right pinning
else
???
end if;
end if;
So!! check your fpga project and your device tree!!!
bye
I have done the same and enabled UART1. I am accessing this throught the HPS using a Linux application. I am able to use ‘open’ on ‘/dev/ttyS1’. However, any write to the UART1(Tx and Rx mapped to GPIO_0 pins), does not produce any output at the pins. Do yo have any idea on this?
I have also tried accessing the UART1 directly via terminal using the following command
update : echo 0xFF < /dev/ttyS1
However, there seems to be no change in signal on the GPIO pins mapped to UART:
So after that I got the tx-side of UART1 running, rx side didn’t .
After reading a lot of stuff I found one possible problem:
The pin-muxing has to be set in the HPS, meaning of you go via FPGA fabric and route the RX TX lines to GPIOs, the tx is line is always connected as the HPS UART1 TX is anyway always there and doesn’t need to be muxed.
For the RX as input, story is different: It must be configured properly and this is done by u-boot and the preload.
After I generated the preloader with bsp editor again I found u-boot pin muxing not updated.
This means initially RX is not switched to FPGA. It appears you need to do this manually.