When PetaLinux is loaded, messages are sent to the screen and duplicated in the UART(dev/ttyPS0), which I need to use for data exchange. How to disable stdout output in UART?
An easy way is to change your bootargs in uboot...
You need to first workout your standard boot args, this can be determined from the device tree OR on the board just 'cat /proc/cmdline'
hostname:~# cat /proc/cmdlineearlycon clk_ignore_unused
Then in u-boot simply (for instance sending all console output to tty0, you will see some inital boot messags but then it will go quiet.
setenv bootargs 'earlycon clk_ignore_unused console=tty0'