Jump to content
  • 0

Zedboard- connected GPS device on UART0- Viewing streaming gps data on PC terminal


Sridhar Prasath Aruppukottai Ganesan

Question

Greetings all,

This might be a basic question. I have connected a GPS module (gtpa010) tx and rx pins to UART0 port(EMIO pins JA2 and JA4 of JA connectors).  Its baud rate is 9600. So i have changed the baudrate to 9600 in the configuration of UART0. So i have created the hardware design, added the constraints for the EMIO pins.

set_property PACKAGE_PIN AA11 [get_ports UART_0_rxd]
set_property PACKAGE_PIN AA9 [get_ports UART_0_txd]
set_property IOSTANDARD LVCMOS25 [get_ports UART_0_*]
set_property PULLDOWN true [get_ports UART_0_*]

So I have exported the hardware and launched the SDK and created basic program for viewing the serial data coming on UART0. I have attached the program as well. I donno whether it is correct or not. What should i do to view the serial data on PC terminal that has been coming through UART 0.??

int main()
{


        XUartPs_Config *Uartpsconfig;
            XUartPs myuartps;
            int Status;

            init_platform();
            Uartpsconfig= XUartPs_LookupConfig(XPAR_PS7_UART_0_DEVICE_ID);
            XUartPs_CfgInitialize(&myuartps, Uartpsconfig, Uartpsconfig->BaseAddress);
while(1){
      Status= XUartPs_SelfTest(&myuartps);

    printf("gps data : %d", Status);

    cleanup_platform();
    return 0;
}
}

 

 

This might me wrong .So help me with this

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

Hi @Sridhar Prasath Aruppukottai Ganesan,

In the linked  example it states that

" This function sends data and expects to receive the data thru the UartLite * such that a physical loopback must be done with the transmit and receive * signals of the UartLite."

you need to physically connect the rx and tx pins to complete the loopback.

thank you,

Jon

 

Link to comment
Share on other sites

Hello @jpeyron Thanks for your reply..I have used AXI uartlite port  for connecting the gps module on JA connector and i have modified the constraints file as well. And this gps module works on 9600 baudrate. I have changed that also. Finally i hvae changed stdin and stdion as AXI UARTLITE 0 in BSP settings. But I have an EMPTY TERMINAL.

If i use UART1 as stdin and stdout, then UARTLITE TEST HAS BEEN FAILED and its been displayed in the terminal. But for axi uartlite stdin and stdout, i m getting nothing.

I have attached the corresponding screenshots for your reference. Thank you in advance

zed 4.JPG

zed 3.JPG

zed 2.JPG

zed 1.JPG

Link to comment
Share on other sites

Dear @jpeyron I think I did not do that. could u please explain why should i do that and what is that purpose? or is there any link to explain that? Is it necessary to make that connection to view the incoming data on the Pc terminal?  

 

Note: Do i have to connect both tx and rx pins(I m using JA2 and JA4 of JA connector) physically with a wire to facilitate the operation

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...