fossasia / pslab-firmware

Firmware for PSLab Open Hardware Platform https://pslab.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logic analyzer: Trigger mode is not applied until next capture

bessman opened this issue · comments

trigger_mode can be one of

    EVERY_SIXTEENTH_RISING_EDGE = 5
    EVERY_FOURTH_RISING_EDGE = 4
    EVERY_RISING_EDGE = 3
    EVERY_FALLING_EDGE = 2
    EVERY_EDGE = 1
    DISABLED = 0

However, when calling e.g. start_1chan_LA with trigchan & 7 equal to any of these, the capture does not always trigger on the correct edge type. Subsequent captures do trigger on the correct edge type. The same is true for start_2chan_la and start_4chan_LA.

For clarity, this is only the case for trigger_mode, which controls when to start capturing edges, not mode, which controls which type of logic event to capture. The latter works correctly, as far as I can tell.

I can't reproduce this anymore. Must have been on the Python side after all.