PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

capture waveform

Solved!
Go to solution

Hello NI Community,

I'm working on capturing UART data sent from an STM32 microcontroller using a PXIe-6570 Digital Pattern Instrument and NI-Digital Pattern Driver. The UART baud rate is 115200, and I’m trying to capture the character 'A' (ASCII 65 = 01000001) on pin UART_IO_1.

I've created a pattern file using the match, jump_if(matched, label), capture_start, and capture opcodes to detect the start bit and capture the 10-bit UART frame (start + 8 data bits + stop). The waveform name is set to "read", and I'm using niDigital Fetch Capture Waveform in LabVIEW with Samples to Read = 10.

Here’s the issue:

  • I only receive 1s or random results, not the expected bit pattern for 'A'.

  • Sometimes the capture buffer shows all 1s.

  • It seems the capture is either starting too early or too late.

I’ve verified:

  • Timing set is configured with t.bit = 8.68 µs

  • Levels file is set for 3.3V logic

  • Pattern starts with a match to detect UART_IO_1 going low (start bit)

  • jump_if(matched, capture_frame) is placed after 80 match cycles (as required)

  • Pattern captures 10 vectors using capture

  1. What’s the best way to synchronize the pattern start with STM32's UART transmission, given that the PXIe-6570 doesn’t support external hardware triggers?

  2. Is my usage of jump_if(matched, ...) correct, or would seqflag be more suitable?

  3. Could the capture window alignment still be off despite correct timing?

  4. Any best practices for reliably capturing UART from an external asynchronous device like STM32?

I can share my full pattern file, timing set, and LabVIEW VI screenshots if needed.

Thanks in advance!

0 Kudos
Message 1 of 3
(123 Views)
Solution
Accepted by topic author ANUPSW

If you cannot make the DUT synchronous to 657x, then the only way is to use match opcode.

 

Here is an example https://forums.ni.com/t5/Example-Code/Digital-Pattern-Instrument-Source-Synchronous-Acquisition/ta-p...

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 2 of 3
(104 Views)

Thank you for the clarification and for sharing the example. I understand that if synchronizing the DUT with 657x isn't feasible, using the match opcode is the alternative.

I'll review the example you provided in detail. If I have any follow-up questions or need help with the implementation, I’ll reach out again.

0 Kudos
Message 3 of 3
(40 Views)