Jump to content
  • 1

[AD2, Waveforms SDK, Python] UART Spy mode in Python SDK


Piotr Rzeszut

Question

Hi!

I am using currently UART SPY mode in Waveforms software.

However I really need to use this mode in Python SDK, as I am decoding some protocol and with python scripting I may simplify the process a lot.

I went through SDK manual and examples and I found only UART Rx or UART Tx Rx - no example for "dual Rx"...
 

Am I missing something?

Thanks in advance for help.

Edited by Piotr Rzeszut
title corrected
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi @Piotr Rzeszut

Such could be implemented with custom application:
FDwfDigitalInAcquisitionModeSet(hdwf, acqmodeRecord)
FDwfDigitalInSampleFormatSet(device.hdwf, 16)
FDwfDigitalInInternalClockInfo(hdwf, &hzBase)
FDwfDigitalInDividerSet(hdwf, hzBase/UartRate/X) X = ~5
forever:
    FDwfDigitalInStatus(hdwf, 1, &sts)
    FDwfDigitalInStatusRecord(hdwf, &ca, &ce, &cw)
    for i in ca:
        uint16 sample
        FDwfDigitalInStatusData2(hdwf, &sample, i, 2) // 16bits = 2bytes
        process it: look for start, bits, stop... X=5 sample/uart-bit

I've added UartSpy to the SDK motodo list but I don't know when I'll have time to implement it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...