01-09-2019 05:35 AM
I managed to get Linux on APU an my own Bare-metal DPD application on RPU, running from an SD card boot. However, the only thing missing is having UART 0 to be use by the APU only and UART 1 used for printf on RPU only. I performed the Embedded design tutorial successfully (UG1209), however, I am failing to perfom the transition to my own application. I did the:
- Isolation part on the Zynq processing in my Vivado block design
- RPU R5 BSP modification to link my R5 app to psu_uart_1 instead of 0.
It works correctly, during boot up. I can see both UART console outputting their own printf messages but once Linux booting sequence is finished, RPU UART 1 stop printing (as if Linux takes the control or close the UART 1 peripheral).
Am I missing something? I don't know much about Linux. Should I modify the device tree? Or is it additional code on the RPU bare-metal app?
01-13-2019 05:56 PM - edited 01-13-2019 06:01 PM
In my experience, when Xilinx DPD baremetal boots, it deactivates all interrupts except for some of the interrupts that it uses. So, please check first if your UART application uses Tx/Rx interrupt. If so, you could reactivate UART interrupt after DPD boot, or modify your UART application in polling.
01-13-2019 11:04 PM
Hi and thanks for your reply.
My DPD baremetal app uses UART simply to print data on the console. I am still not sure if I need interrupts to do this but if I remove Linux from the equation (on the APU, instead of running my others apps in Linux, I run their baremetal version), it works, APUs apps are printing on UART 0 and the DPD process on RPU is printing on UART 1. As you said, Linux seems to disable something, somewhere. I will look into the interrupts, as you suggest.
01-14-2019 06:15 AM
I worked a little bit today on the problem. I read on the Xilinx forums (https://forums.xilinx.com/t5/Embedded-Linux/ZCU102-V1-0-petalinux-2017-4-ttyPS1-uart-doesn-t-work/td-p/866806) that by default, the UART1 is disabled in petalinux, so I modified the system-user.dtsi with the following:
status = "okay";
As proposed by Xilinx on the forum. However, after petalinux boot, I still don't see ttyPS1 as a device, only ttyPS0. I am using the Xilinx final 2017.4 BSP for petalinux, I didn't touched any configuration besides modifying the dtsi.
I also checked my Vivado 2017.4 FPGA design to make sur that both UART are enabled, which is the case.