Hello,
I have connected the AD2 to Spy on an existing SPI Bus between a STM Controller and an IC provided by our Company, and am trying to just spy and log the traffic for tool verification reasons.
When i use the Setup with the Waveforms GUI, everything works fine. It displays all Samples, the data looks ok, everything fine.
As soon as I start using the tool via API (Python or C#, happens on both) the SPI Phase Settings seems to get ignored. I get flipping Bits all over the place, which is the same behaviour as if i set the Phase in the Waveforms GUI (Waveforms -> Protocol -> SPI) to the wrong setting.
The correct Setting for my application is polarity=0 and phase=1, so I used FDwfDigitalSpiModeSet with it's parameter set to 1.
I attached the C# and Python programs below for reference, maybe i overlooked something in there, but wouldn't know what should be wrong with it...
Program.cs spi_tracker.py