Ext_offset with manual trigger?

Hey guys,

I’m pretty new to this so I’m sure I’m doing something wrong, but having trouble wrapping my head around using the ext_offset parameter with a manual voltage glitch. What I want to do is take a chip into reset, then experiment voltage glitches at various (precise) times after the reset.

Based on the docs, I was thinking that in enable_only mode with a manual trigger, ext_offset would set the number of clock cycles after the trigger to start the glitch, and repeat would set the number of clock cycles to keep the glitch active for.

However, it seems like the glitch always fires immediately after executing manual_trigger() and it does not delay for the ext_offset time. Is this the expected behavior?

Here’s my scope, which I was hoping would delay 1 second (10Mhz = 10E6 cycles) for 1000 cycles:

adc = 
    state          = False
    basic_mode     = rising_edge
    timeout        = 2
    offset         = 0
    presamples     = 0
    samples        = 5000
    decimate       = 1
    trig_count     = 11841875
    fifo_fill_mode = normal
clock = 
    adc_src       = clkgen_x4
    adc_phase     = 0
    adc_freq      = 39999996
    adc_rate      = 39999996.0
    adc_locked    = True
    freq_ctr      = 0
    freq_ctr_src  = extclk
    clkgen_src    = system
    extclk_freq   = 10000000
    clkgen_mul    = 5
    clkgen_div    = 48
    clkgen_freq   = 10000000.0
    clkgen_locked = True
trigger = 
    triggers = tio4
    module   = basic
io = 
    tio1         = serial_rx
    tio2         = serial_tx
    tio3         = high_z
    tio4         = high_z
    pdid         = high_z
    pdic         = high_z
    nrst         = high_z
    glitch_hp    = True
    glitch_lp    = True
    extclk_src   = hs1
    hs2          = clkgen
    target_pwr   = True
    tio_states   = (1, 1, 0, 0)
    cdc_settings = array('B', [0, 0])
glitch = 
    clk_src     = clkgen
    width       = 1.171875
    width_fine  = 0
    offset      = 10.15625
    offset_fine = 0
    trigger_src = manual
    arm_timing  = after_scope
    ext_offset  = 10000000
    repeat      = 1000
    output      = enable_only

Thanks.

I got around this by instead using the ext_single trigger source and attaching the trigger to tio4, which is also what I’m using for the reset signal. However, I’m not getting very consistent timing.

For my reset, I’m using:

def reset():
    scope.io.tio4 = "gpio_low"
    sleep(.01)
    scope.io.tio4 = "high_z"

Then I’m triggering like this:

scope.arm()
reset()

My thought being that the trigger will catch the board coming out of reset (rising edge) and start counting cycles for the delay. This seems to work, except that the delay can vary wildly. I need to glitch many seconds after the reset (10-15) and I’m finding that the actual glitch trigger can happen 3-4 seconds on either side of when it should.

Is ext_offset OK to use for multi-second delays? Is there a better way to do this?

Is TIO4 hooked up to a reset line on the target? Is there any reason you’re not using the nRST pin for this?

Alex