Hello NI Community,
I am currently working on validating the UART protocol using the Digital Pattern Editor with a PXI-based system. My Device Under Test (DUT) is an STM32F407VGT6 microcontroller, and I am transmitting UART data from the STM32 to the PXI hardware.
Issue Description:
While attempting to capture UART data sent from the STM32 using the PXI Digital Pattern Instrument, I am facing a synchronization issue. The PXI pattern does not seem to reliably align with the UART transmission from the STM32, resulting in invalid or missed data captures.
What I Have Done So Far:
-
The UART baud rate is configured at [mention baud rate, e.g., 9600/115200] on the STM32.
-
I have created a pattern in the Digital Pattern Editor to capture the UART waveform using a match()
opcode followed by a repeat()
to sample the bits.
-
The trigger (start bit) is configured using match()
on a falling edge (Idle High to Start Low transition).
-
I am using repeat(79)
or similar values to delay sampling to the middle of the data bit period.
Problem Observed:
-
The PXI capture pattern either starts too early or too late.
-
In many cases, the pattern completely misses the UART frame or captures incorrect data.
-
I suspect that the issue is due to lack of proper synchronization between the STM32's asynchronous UART transmission and the PXI pattern's start.
Questions:
-
What is the recommended method to synchronize the pattern start with an external asynchronous UART transmission?
-
Should I use an external trigger line from STM32 GPIO to the PXI system to trigger pattern start?
-
Are there recommended practices for reliably capturing asynchronous UART with PXI instruments and Digital Pattern Editor?