Xilinx XCZU2EG - Damaged uart tx pin? - Page 1
Forum section: electronics / general

author: glenneaux
author_rank: Contributor
timestamp: December 08, 2024, 09:21:11 am
content: Long time reader, first time poster,I've got a device with a Xilinx XCZU2EG onboard.Have root access via ssh.Have been probing around to get to the bootloader with an old CRO and by piping /dev/urandom to /dev/ttyPS0 identified the uart tx on a service connector.Device appears to have 3.3v pull up on said pin.I have a Nucleo-F411RE board here, got the bright idea to disconnect the power to the micro with the jumper and remove the STLINK data/clk jumpers, then connected jumper wire to the onboard virtual com port and connected directly to this devices uart tx pin.Success, got the full boot up sequence from bootloader to login prompt. Plan was to take some educated guesses at what the RX pin was through a 1k resistor.Next morning connected tx from device to nucleo board again but this time i left the stlink clk/data pins jumpered but nucleo mcu was unpowered.. wasn't sure if this was going to cause a problem but was excited and rushing.Since then device still operates like normal but can only get random ascii symbols at the terminal via the uart. At one stage I got clear text mixed in with garbled data.Now seem to only get garbled data. CRO shows what appears to be a noisy signal, it still switches from 3.3v to gnd but CRO display is different from when it was working.Thoughts have been to try a different device (maybe an ftdi usb to ttl uart device) and pray?Other thoughts have been damaged the xilinx pin driver internally.If this is the case is there any hope I can maybe add external components to get a good output?edit:attached photo of "good" and "bad" waveforms.attached photo of "corrupt" bootup messages from uartedit: partially corrupted boot up (this is inconsistent)Code:▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒7▒▒▒▒▒▒▒▒▒▒?▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒>▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒v▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒~▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒~▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒?▒▒▒▒▒▒▒~▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒?▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒C!▒▒▒▒▒|▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒K▒▒ 3▒H▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒K▒S▒(lpjO▒▒▒▒[▒ ▒▒0▒02▒6] pi▒_max: def▒]▒郚▒▒▒▒j▒▒▒▒յ▒ 301[ 0.000384] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)[ 0.000390] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)[ 0.000881] ASID allocator initialised with 65536 entries[ 0.001362] zynqmp_plat_init Power management API v0.3[ 0.001438] EFI services will not be available.[ 0.001761] Detected VIPT I-cache on CPU1[ 0.001789] CPU1: Booted secondary processor ▒▒ذ`▒0▒▒pv0▒}AU▒▒od▒s▒▒d|▒▒proc▒▒▒▒▒▒▒▒▒6▒▒▒▒▒▒▒▒▒▒▒▒▒E▒▒▒▒▒ ▒▒▒▒[` 0▒▒▒▒ C▒▒▒▒1w▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒џr▒▒▒▒▒▒▒▒▒▒▒▒▒?▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒?▒▒▒▒▒▒▒▒▒▒▒▒>▒▒▒=▒3▒▒▒▒▒▒▒▒▒▒▒▒|2N▒[ 3.438782] hub 1-0:1.0: 1 port detected3.435098] hub 1-0:1.0: USB`hub ▒▒▒d[ 3.442828] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller[ 3.448233] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2[ 3.455942] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003[ 3.462647] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1[ 3.469848] usb usb2: Product: xHCI Host Controller[ 3.474710] usb usb2: Manufacturer: Linux 4.9.0K▒▒▒▒▒v2017.2 xhci-hcd[ 3.481306] usb usb2: SerialNumber: xhci-hcd.0.auto[ 3.486421] hub 2-0:1.0: USB hub found[ 3.490097] hub 2-0:1.0: 1 port detected[ 3.494846] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller[ 3.500261] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3[ 3.508156] xhciKk▒ xx▒▒▒▒▒▒▒▒▒▒▒▒X▒▒▒▒x▒?▒▒1▒▒ظx▒▒▒&▒y ▒▒▒▒▒▒▒▒▒▒|▒▒Z▒▒▒▒▒▒▒▒$▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒v▒▒▒▒▒▒▒▒▒▒▒ &▒▒▒▒▒▒▒▒]▒,▒͉▒: ▒▒WM ▒devi▒62▒չ▒▒ i▒V▒▒K▒1d6b, idProduct=▒▒▒j▒+l▒r▒�¢▒▒u▒,▒͉▒: New USB device strings: Mfr=3, Product=2, SerialNumber=1[ s.=88046] usb us▒: T▒▒Ս▒▒ xHCI ▒oсContr▒▒C▒+▒▒▒▒▒y▒90>▒▒s▒▒4: M▒▒▒cture▒▒▒*▒▒▒▒^▒▒▒▒▒▒Z▒▒▒▒▒▒>▒▒▒▒MɁ▒s▒▒]▒▒▒▒▒▒▒;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

author: Postal2
author_rank: Frequent Contributor
timestamp: December 08, 2024, 02:32:31 pm
content: Quote from: glenneaux on December 08, 2024, 09:21:11 amI also like to read some funny topics.Quote from: glenneaux on December 08, 2024, 09:21:11 amI don't see any problems. First, stop ruining Xilinx. Use normal USB-TTL on CP2102. Second, connect a resistor of at least 100 ohms to the break of the TX you are connecting. Let's say 300 ohms. You can do this right now.

author: glenneaux
author_rank: Contributor
timestamp: December 09, 2024, 10:43:17 am
content: Thanks for the response.Have CP2102 on the way.In the meantime I borrowed a Picoscope.The device can decode the uart stream at 9600 baud OK.Nothing at 115.2kbps though."TEST" at 115.2kbps

author: Postal2
author_rank: Frequent Contributor
timestamp: December 09, 2024, 11:49:56 am
content: The pin is slightly damaged, that's understandable. In order not to spoil it completely, and also for the future, do not poke the signal pins directly with wires from other devices, having poor ground contact between the devices.Now from the Xilinx pin itself, adjust the pull-up or pull-down. I suggest trying a 300 ohm pull-down to ground and see if I can increase it to 750 ohms. Do not disconnect the resistor that is now connected in series, moreover, use them always.Before checking the pull-up, try reducing the series resistor to 100 ohms.Also, when you start using CP2102, use the recommendation from this thread:https://www.eevblog.com/forum/general-computing/ftdi-and-ch340-driver-blue-screens-in-2024/msg5556827/#msg5556827

author: glenneaux
author_rank: Contributor
timestamp: December 13, 2024, 11:07:38 am
content: OK, so, i have connected 300ohm resistor in series and put probe A from picoscope onto the raw tx, and B after 300ohm series resistorSignal as below, device transmitting "A" on uart.If i connect 1K resistor, it pulls signal down to ground completely.If i disconnect pull down and connect to RX of CP2102 device, the signal swings from 3v to ~1.8v and picoscope is unable to decode correctly. This voltage low too high for cp2102 to read.

author: Postal2
author_rank: Frequent Contributor
timestamp: December 13, 2024, 01:29:14 pm
content: Quote from: glenneaux on December 13, 2024, 11:07:38 amYou have to choose the value of the pull-down resistor, you can use a variable resistor, so that the CP2102 works. If we assume a situation where the pin is more damaged, then we would need an lm393, but you have a good signal. Try variable 1..10kOhm.

author: Postal2
author_rank: Frequent Contributor
timestamp: December 13, 2024, 03:59:23 pm
content: Use this diagram (picture).

author: glenneaux
author_rank: Contributor
timestamp: December 14, 2024, 06:18:42 am
content: Thanks for your help.With that device/circuit i can get the uart via usb-uart converter at 9600 baud.Have tested at 9600 upto 38400 OK. Fails at 57.6kbps. This device has the console at 115.2kbps so progress.9.6kbps57.6kbps115.2kbpsMight be asking too much of a damaged device?

author: glenneaux
author_rank: Contributor
timestamp: December 14, 2024, 08:54:23 am
content: As it turns out, i can set the baudrate of uboot console from linux.fw_setenv baudrate 19200this thing is trucking along happily at 19.2kbit.Successfully resurrected in a cripple state, thank you Postal2.

author: Postal2
author_rank: Frequent Contributor
timestamp: December 14, 2024, 03:21:26 pm
content: Quote from: glenneaux on December 14, 2024, 06:18:42 amBased on the oscillogram for 115.2 kbps, it is quite possible to get this speed. First, you need to shorten the wire coming from the faulty TX to reduce the capacitance for the high-resistance output, and second, try a high-resistance pull-up to the middle terminal of the trimmer resistor of the circuit above within 4.7k-10k-22k-47k-100k, you can do this after the 300 ohm resistor for convenience. Based on the pull-up, you can adjust the 0.1 capacitor so that the voltage on it tracks the midpoint of the pulses at 115.2.

author: glenneaux
author_rank: Contributor
timestamp: December 21, 2024, 11:23:00 am
content: Quote from: Postal2 on December 14, 2024, 03:21:26 pmBack again.So just to be clear, you are suggesting,1) use shortest wire possible to tx pin2) add high resistance pull up on the trimmer.3) adjust 0.1uf cap decoupling cap - do you mean trying differenent, lower? values while signal still being decoupled?i guess do these steps in order, possibly making the tx line shorter might resolve the problem?

author: Postal2
author_rank: Frequent Contributor
timestamp: December 21, 2024, 11:55:26 am
content: First, you need to test the pull-up. I think if there is no success with 4.7k-10k-22k, then you can stop trying. Connect 4.7k to the middle terminal of the variable resistor and monitor the 115200 signal with an oscilloscope. Let's say you get a good signal shape when turning to 3.3 volts. If the signal amplitude is less than 0.5 volts, but close to it, then set the 10k pull-up to 3.3 volts, and adjust the comparator threshold with a variable resistor. The signal amplitude of about 0.8..1 volts is desirable, because the LM393 has poor performance when powered by 3.3 volts. If the performance is not enough, then you will have to switch the comparator power supply to 5 volts (power supply only). You do not need to select a 0.1 capacitor yet, this can be used if you cannot get a reliable signal using the method described above.If a good pulse shape on 115200 can be obtained by pulling up only with the amplitude of 0.1..0.2 volts, then the LM393 power supply will need to be raised to 5 volts.

author: glenenglish
author_rank: Frequent Contributor
timestamp: December 26, 2024, 04:55:42 am
content: All excellent advice from Postal2. yes, last chance might be a LM339 comparator , or LM10 etc. DC coupled.rule #1 - dont connect anything off board without a series resistor 100-400 ohms...