Jump to content

Tood

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Tood

  1. Hi,

    I am sampling DIO 7 from wavegen GUI. The mode is record without triggers. Sampling rate is 4MHz.
    I am using 16x16k buffers. The results are perfect. No corrupt samples (see picture below).

    When I am using sample code digitalin_record.cpp as base and sampling above 2MHz the result is a lot of corrupt samples.
    See attached C file digitalin_record.c.

    My OS is win10 and the compiler is gcc. Output from digitalin_record.exe:

    $ ./digitalin_record.exe
    Open automatically the first available device
    Starting record...
    receivedSamples: 93743 discardedCorruptSamples: 83844
    sample:0  pinstate:0x01b9
    sample:1  pinstate:0x01b9
    sample:2  pinstate:0x01b9
    sample:3  pinstate:0x01b9
    sample:4  pinstate:0x01b9
    sample:5  pinstate:0x01b9
    sample:6  pinstate:0x01b9
    sample:7  pinstate:0x01b9
    sample:8  pinstate:0x01b9
    sample:9  pinstate:0x01b9
    sample:10  pinstate:0x01b9

    What is wrong with my implementation?

    Best Regards,
    Tood

     

    wave_forms_4mhz_sampling.thumb.JPG.7a7a36307dcbae382e3f34e13df2e337.JPG

    digitalin_record.c

  2. Hi,

    I am trying to implement spi_spy thru SDK.  
    My C program, based on Digital_Spi_Spy.py, decodes  correctly about ~90% of the data. Sometimes it seems to loose trigger and the rest of the frame is corrupt.

    The WaveForms Protocol->SPI->Spy works perfectly every time for my setup.

    Included is my C code and a .jpg from my and WaveForms output log. The faulty data is marked as yellow in the left log in the picture.

    I am writing in C and the spi frequency is 300kHz settings are active low, cpol 0, cpha 0.

    Is there something I am missing here? How is SPI Spy implemented in WaveForms?

    Best Regards,
    Tood

    spi_spy_sdk_and_waveforms_log.JPG

    hello.c

×
×
  • Create New...