Sorry, you need to enable JavaScript to visit this website.

IF I switch the serial port from UART1 to UART0, What need I do ?

Unsolved
6 posts / 0 new
videoswitch's picture
videoswitch
Junior(0)
IF I switch the serial port from UART1 to UART0, What need I do ?

HI,
I designed a board based on the ZedBoard board. Compare to the Zedboard, I removed the USB port and switched the main serial port from UART1 to UART0 (pin MIO14 & MIO15) for my project. Furthermore, I use a chip named MAX232 connect to the output of pin MIO14 & MIO15 to change the output level. The other parts of my design, such as DDR, SD, QSPI and NETWORK are the same to the design of ZedBoard. The pin of MIO0 is also connect to the GND through a 510 ohm resistor.
Now, when I run a "Hello Zynq" program generated from ISE tools through Jtag interface, I can get the output message from UART0, and flash the LEDs, such as the pin of MIO7 and MIO49. Moreover, in this work mode, I also can add a user defined "IP CORE", and downloaded the related bit file to the chip to flash other LEDs.
During this process, what I did in ISE tools is very simple. I selected EVM-ZedBoard-7020 as my base hardware configuration, where all the configuration is kept to default value. In "Zynq PS Configuration" dialog box, I firstly disabled the USB0 and UART1, And then I enabled UART0 and allocated MIO14 & MIO15 (pullup is enabled) for this peripheral.
However, when I run the same program (for the sake of simple, not include any user IP COREs, just operating "PS") from SD card. I still can flash the LEDs from program, but I can't get anying from UART0........
Have I left anything out???
I am sorry , I am a novice of these design tools. Any help will be appreciated.
Thank you!
Best Regards,
vs

TroutChaser's picture
TroutChaser
Moderator(18)
I don't see anything

I don't see anything inherently incorrect with what you describe. If I understand correctly you get an output from UART0 if you configure your board using JTAG but not if you configure the same design via SD Card? If they designs are not the same I would suggest using exactly the same configuration both times. You might check your BSP settings to make sure that UART0 is set to be the std_in and std_out.
 
Given that the signals you have selected are all connected to the JE PMOD connector on the ZedBoard you could verify your basic operation on a ZedBoard by connecting your MAX232 to JE.
 
-Gary

videoswitch's picture
videoswitch
Junior(0)
Do you mean the UART address definition in the file "xparameters

Hi Gary,

I have checked my BSP settings of my "hellozynq" project,and I can find the following definition
...
#define STDIN_BASEADDRESS 0xE0000000
#define STDOUT_BASEADDRESS 0xE0000000
...
in the file of "..\hellozynq\ps7_cortexa9_0\include\xparameters.h". According to this, can I believe that the UART0 is set to be the std_in and std_out?

However,I still can't get anything from UART0.

Thank you very much!
Best Regards,
vs

videoswitch's picture
videoswitch
Junior(0)
Just as you thought

Hi Gary,

Thank you for your reply!
Yes, your understand is correct. As you suggest, I have used the same program to test two different work modes(JTAG & SD card).Moreover,if I run the same program on the ZedBoard via SD card, I can't get any output from UART0 too.

According to your advice, I searched to all the BSP files with the keyword of "STDOUT" and "STDIN". However, I can't find any important clues. Closest I can think of is adding the sentence "#define STDOUT_BASEADDRESS XPAR_XUARTPS_0_BASEADDR" in the file of fsbl_debug.h. But the STDOUT_BASEADDRESS seems not to be defined originally in these BSP files.

Could you tell me how to check my BSP settings to make sure that UART0 is set to be std_out ?
Thank you very much!

Best Regards,
vs

TroutChaser's picture
TroutChaser
Moderator(18)
To check the BSP stdin -

To check the BSP stdin - stdout settings in the SDK right click on your BSP in the Project Explorer pane on the left.
 
Select 'Board Support Package Settings' from the dialog box and then select 'standalone'. The value for stdin and stdout should be ps7_uart_0 for your application.
 
-Gary

videoswitch's picture
videoswitch
Junior(0)
Thanks a lot!

Thank you very much Gary, you are right! I get it...