cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Participant
Participant
733 Views
Registered: ‎11-09-2019

FPGA only works with platform cable plugged in

Jump to solution

Hello. I have programmed the FPGA in my Spartan 3E starter kit board sucessfully, ran tests, etc. it all works nicely. The program receives serial data from MATLAB and returns a certain output that MATLAB reads. However, when I decided I was done testing, I removed the platform cable and tried to use the FPGA again with just the RS-232 cable, but when I do this, the FPGA doesn't react to the data that MATLAB sends, even though it reacts to me physically removing the RS-232 Rx and Tx wiring. This is very strange to me. I don't see how removing the platform cable could affect how the FPGA reacts to MATLAB data on a different cable, considering that it apparently works if I remove and put the wiring back on (changing the voltage on that line).

Anybody know what is wrong?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
349 Views
Registered: ‎01-22-2015

...every line Tx/rx etc is visible and I'm using jumpers to connect just the Rx and tx lines. 

Sounds like you have a breakout board at one of the RS232 cable, which is fine.  Ensure you are making the GND connection (pin 5 of DB9) between the board and your PC. 

Maybe by disconnecting USB cable you are losing a good GND connection between the board and the PC.  You need this good GND connection.

 

...(I'm using LVCMOS25) the signal standards to LVVTL and LVCMOS33 but nothing happens (With LVVTL there are some issues even with the programming cable on I think)

If you are talking about the TXD and RXD connections between the FPGA  and the MAX3232, then you should be using LVCMOS33 - because these signals are coming from banks 1 and 2 of FPGA and both banks have VCCO=3.3V.  Also, MAX3232 is  powered from 3.3V.

Do you have other connections between the board and your PC - besides RS232?

 

View solution in original post

11 Replies
Highlighted
Explorer
Explorer
706 Views
Registered: ‎03-31-2016

You're going to have to give us a lot more than "reacts" for anyone to have a reasonable guess.  Describe the differences in behavior in detail.

Are you absolutely certain that your design is loaded when not connected over JTAG?  Do you have some LEDs to prove this?

Does your logic have a good clock running when not connected?  Is it out of reset? Are the state-machines in a state to act on data from the UART?

Are you sure you are using the physical UART connection and not a UART over JTAG IP?

0 Kudos
Highlighted
Participant
Participant
651 Views
Registered: ‎11-09-2019

@necare81 

I had replied earlier but Xilinx removed my comment because I edited it too fast...

I should mention that the programming cable I'm using is a a USB type B cable that came with the starter kit

Anyway, sorry I should have clarified better, by reacts I mean I have set the leds to representt the state of the UART transceiver, so what I mean is that without the platform cable the LEDs don't blink which means the FPGA doesn't recognize the start bit sent by MATLAB if the programming cable isn't plugged in. (Or MATLAB doesn't send but that makes even less sense) 

You're going to have to give us a lot more than "reacts" for anyone to have a reasonable guess.  Describe the differences in behavior in detail.


If I run the MATLAB code with the platform cable plugged ON, the LEDs blink, indicating that the state machine receives a start bit that causes it to go from an idle state to the other states. Additionally, I get the correct return data.

If I run the MATLAB code with the platform cable plugged OFF, the LEDs don't blink, indicating that the state machine does not receive a start bit. It just stays in idle because the data_in line is always high. I know the implementation is in the FPGA ready to be used because if I remove the  RS-232 cable's tx wires from the FPGA rx RS 232 port, low voltage is sent to the RS-232, making the leds blink. I don't understand how the presence of a programming cable could affect how the RS-232 senses high or low signals sent from MATLAB? Or maybe its something else? Anyway in MATLAB I get the same message with the platform cable plugged off as I would if it were plugged in and the RS-232 cable was unplugged from the FPGA but connected to the computer. This message just means that MATLAB never gets a start bit (which isn't sent because the UART never goes into a sending state).


Are you absolutely certain that your design is loaded when not connected over JTAG?  Do you have some LEDs to prove this?


Yes because of the LEDs.


Does your logic have a good clock running when not connected?  Is it out of reset? Are the state-machines in a state to act on data from the UART?


The states (and consequently the LEDs) change at the rising edge of the clock and they do change when I fiddle with the RS-232 wiring, which makes me assume that yes the clock is working properly?


Are you sure you are using the physical UART connection and not a UART over JTAG IP?


Yes the data exchange only works with the RS-232 cable plugged in, and like with the clock, since the state changes when I mess with the rs-232 ports, I'm sure data is going through there..

0 Kudos
Highlighted
Participant
Participant
530 Views
Registered: ‎11-09-2019

bump

0 Kudos
Highlighted
Teacher
Teacher
507 Views
Registered: ‎07-09-2009
did you by some chance power off the board ?
remember the FPGA is SRAM based, you need to program the prom on the board for the image to be persist ant when power is removed.
<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
Highlighted
505 Views
Registered: ‎01-22-2015

Some FPGA boards (eg. Digilent Arty) can sometimes be powered from the USB-JTAG connection.  Does your board have this feature?

It sounds like you purchased the board.  Can you tell us the board part number or send us a schematic for the board?

0 Kudos
Highlighted
Participant
Participant
482 Views
Registered: ‎11-09-2019

@drjohnsmith 

No, it is still powered on, I can see them LEDs blinking. I also thought that was the issue but even programming the PROM didn't help

0 Kudos
Highlighted
Participant
Participant
481 Views
Registered: ‎11-09-2019

markg@prosensing.com 

No that is not the case, the LEDs keep blinking if I fiddle with the Rx and Tx wires) 

I haven't purchased it, my university did, probably some years ago. The part number is PN 0330753 : Xilinx Digilent Spartan-3e Starter Kit 03300753 Xc3s500e Dev Board

0 Kudos
Highlighted
387 Views
Registered: ‎01-22-2015

@hugobpontes 

Documentation for the Spartan-3E Starter Kit Board from Digilent shows that configuring the FPGA via the USB cable uses Xilinx proprietary circuits.   So, we are unlikely to find out what has gone wrong with these circuits.  That is, the User Guide, UG230, gives no warnings about plugging/unplugging the USB cable while the board is powered ON.

As a workaround, try sending the configuration file to the on-board Flash, XCF04S, (see UG230 starting on page 31). Then, cycle power to the board so the FPGA configures itself from Flash.  Does your RS232 connection with MATLAB then work?

Results of your wiggle/fiddling with the RS232 cable are strong evidence that other problems lie with the RS232 connector/circuits, which probably received years of beating from students at your university.  Problems with connections are likely.  Check the pins on the board’s DB9 connectors for RS232.  Inspect solder where the DB9 connectors attach to the board.

There are two RS232 connections with the board.  Are you seeing the problem on both of them?

Note that a MAX3232 IC is the interface between the FPGA and your RS232 cable.  On the FPGA side, the RXD and TXD signals are LVCMOS33.  However, on the RS232-cable side of the MAX3232, the RXD and TXD swing +/-5V.  Get out your oscope and see what happens to RXD and TXD on both sides of the MAX3232 when you start fiddling/wiggling – and when you plug/unplug the USB cable.

Digilent_Spartan3E_SB_RS232.jpg

Finally, check that power-rails on the board have the correct voltage.  Use your oscope to watch these voltages as you wiggle/fiddle and as you plug/unplug the USB cable.  For the MAX3232, the minimum value for VCC is 3.0V when using LVCMOS33.

Highlighted
Participant
Participant
374 Views
Registered: ‎11-09-2019

markg@prosensing.com 

First of all thanks for taking the time to look into this!


As a workaround, try sending the configuration file to the on-board Flash, XCF04S, (see UG230 starting on page 31).


I have already programmed XCF04S, the problem persists unfortunately!


Results of your wiggle/fiddling with the RS232 cable are strong evidence that other problems lie with the RS232 connector/circuits.


I should have been more clear but I dont think there's anything wrong with RS232 connectors since everything works perfectly when the programming cable is plugged on. I should have been more clear because the RS-232 cable I'm using has no end/connector (I'm not sure of the correct terminology here), every line Tx/rx etc is visible and I'm using jumpers to connect just the Rx and tx lines. What I mean by fiddling is removing the data_in wire which triggers a start bit, and the FPGA works correctly, it just doesn't receive the start bit(or any bit) from MATLAB when the platform cable is plugged off...Makes no sense to me!


Use your oscope


Unfortunately because of this pandemic situation I can't use it at the moment..Anyway I have tried to use PlanAhead to change (I'm using LVCMOS25) the signal standards to LVVTL and LVCMOS33 but nothing happens (With LVVTL there are some issues even with the programming cable on I think)

How could the programming cable being plugged ON and the receiving (or sending by MATLAB?? I dont know at this point) of bits from MATLAB be connected?

0 Kudos
Highlighted
350 Views
Registered: ‎01-22-2015

...every line Tx/rx etc is visible and I'm using jumpers to connect just the Rx and tx lines. 

Sounds like you have a breakout board at one of the RS232 cable, which is fine.  Ensure you are making the GND connection (pin 5 of DB9) between the board and your PC. 

Maybe by disconnecting USB cable you are losing a good GND connection between the board and the PC.  You need this good GND connection.

 

...(I'm using LVCMOS25) the signal standards to LVVTL and LVCMOS33 but nothing happens (With LVVTL there are some issues even with the programming cable on I think)

If you are talking about the TXD and RXD connections between the FPGA  and the MAX3232, then you should be using LVCMOS33 - because these signals are coming from banks 1 and 2 of FPGA and both banks have VCCO=3.3V.  Also, MAX3232 is  powered from 3.3V.

Do you have other connections between the board and your PC - besides RS232?

 

View solution in original post

Highlighted
Participant
Participant
326 Views
Registered: ‎11-09-2019

Maybe by disconnecting USB cable you are losing a good GND connection between the board and the PC.  You need this good GND connection.


Yes!!! That was it! I connected the ground cable with the ground rs232 port and now it works! Turns out yes the programming cable was acting as ground! My electrical knowledge is a bit subpar and I didn't think of that

Thanks so much for all the help, youve been incredibly helpful! And thanks for the lvcmos33 tip too !

0 Kudos