USB communication with PC

Home Forums miniSpartan3 USB communication with PC

This topic contains 3 replies, has 2 voices, and was last updated by  staticfloat 3 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1794

    staticfloat
    Participant

    Hey there, I’m trying to communicate from my softcore (a Microblaze with a builtin UART) to the PC. I have the microblaze UART hooked up to pins 86 and 88 on the Spartan 3 (these are the relevant pins from the board schematic I believe, USB_TX and USB_RX), but my PC isn’t receiving anything. Has anyone else managed to get the board to talk to a PC yet?

    #1796

    DogP
    Participant

    I haven’t tried yet… but just a couple things.

    Do you have it connected with Tx connected to Rx, and vice versa? Pin 88 is USB_TXD (Tx output from USB), which should be connected to the Microblaze serial Rx (Rx input on Microblaze), and pin 86 is USB_RXD which should connect to the Microblaze Tx.

    Do you see the FT2232D serial port enumerated on the computer? I’d try building a test file where you simply connect pin 86 <= pin 88 (loopback)… then see if everything you send to the serial port is echoed back to you. If that works, it’ll rule out a hardware and configuration problem with the board itself, and point to your Microblaze setup… if it doesn’t work, then you’ve probably got a FTDI configuration problem, or possibly a hardware problem. If that’s the case, I’d grab an oscilloscope/logic analyzer if you have one and check what the pins are doing… or if you don’t have one, build the file to connect those pins to a couple of the LEDs and see if they at least blink corresponding to activity.

    Good luck… I hope this helps.

    DogP

    #1800

    staticfloat
    Participant

    Thank you DogP! I hadn’t realized that the pins needed to be flipped; I figured it was labeled such that they should match your softcore. :)
    Everything works now, thank you very much.

    #1821

    staticfloat
    Participant

    Another problem now; I seem to be unable to receive data from the PC; XIOModule_RecvByte(STDIN_BASEADDRESS) doesn’t seem to work like it should. My code is very simple, check out this gist for the softcore C code, VHDL code, and constraints. A .zip file containing everything (including the .bit file for flashing) is also available (3 MB).

    The problem is that output works great, (I can xil_printf() or XIOModule_SendByte() to my heart’s content) but input doesn’t seem to work. Trying to read from the UART causes my program to hang indefinitely.

    Thanks in advance for all your help!

    • This reply was modified 3 years, 11 months ago by  staticfloat.
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.