Jump to content

Search the Community

Showing results for tags 'uart0'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • New Users Introduction
    • Announcements
  • Digilent Technical Forums
    • FPGA
    • Test and Measurement
    • Measurement Computing (MCC)
    • Multisim Live
    • Add-on Boards
    • LabVIEW
    • Other
  • General Discussion
    • Project Vault
    • Learn
    • Suggestions & Feedback
    • Buy, Sell, Trade
    • Sales Questions
    • Off Topic
    • Educators
    • Technical Based Off-Topic Discussions
    • Archived

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. I am trying to send data from arty z7-7020 board to PC using uart through a function (driver xuartps.h). within the main program, the code works but calling it from function, output at putty gets overlapped. i tried to debug the code but it looks fine and get output as expected. Need help. thanks code: #include "platform.h" #include "xil_printf.h" #include<stdlib.h> #include "xuartps.h" void uart_output(){ char *p; char tip[100]=" hi : uart_text_multiple time \n\r\0"; u32 transmittedBytes; u32 totalTransmittedBytes; u32 status; u16 byteCnt; XUartPs_Config *PiUartConfig; XUartPs PiUart; byteCnt=0; PiUartConfig=XUartPs_LookupConfig(XPAR_PS7_UART_0_DEVICE_ID); status = XUartPs_CfgInitialize(&PiUart,PiUartConfig, PiUartConfig->BaseAddress); if(status!=XST_SUCCESS) print("Uart initialization failed...\n\r"); status = XUartPs_SetBaudRate(&PiUart, 115200); if(status!=XST_SUCCESS) print("BaudRATE init failed....\n\r"); int o; o=0; p =tip; while(*p != '\0'){ byteCnt+=1; p++; } do{ totalTransmittedBytes=0; p =tip; while( totalTransmittedBytes<byteCnt+2){ transmittedBytes = XUartPs_Send(&PiUart, (u8*)&p[totalTransmittedBytes],byteCnt); totalTransmittedBytes += transmittedBytes; } p++; o++; }while(o<10); } int main() { init_platform(); uart_output(); uart_output(); cleanup_platform(); return 0; }
×
×
  • Create New...