Tutorial issues

I am trying to follow the “Fault 1_1 - Introduction to Clock Glitching” tutorial and it’s taken me a day of troubleshooting and debugging to get it going. I am currently stuck and have a few errors, warnings and questions.

I am currently on this block of code.

 val = target.simpleserial_read_witherrors('r', 4, glitch_timeout=1)#For loop check
    valid = val['valid']
    if valid:
        response = val['payload']
        raw_serial = val['full_response']
        error_code = val['rv']
    
    
    if ret:
        print('Timeout - no trigger')
        gc.add("reset")

        #Device is slow to boot?
        reboot_flush()
    else:
        if response is None:
            gc.add("reset")
            #print these for debugging
            print("reset")
        else:
            # gcnt is the loop counter
            gcnt = struct.unpack("<I", val['payload'])[0]
            
            if gcnt == 2500: #normal response
                gc.add("normal")
                print("normal")
            else: #glitch!!!
                gc.add("success")
                print("success")

The output is something like this:

normal
(ChipWhisperer Glitch WARNING|File ChipWhispererGlitch.py:942) Negative offsets <-45 may result in double glitches!
(ChipWhisperer Glitch WARNING|File ChipWhispererGlitch.py:770) Partial reconfiguration for offset = 0 may not work
normal
normal
success
normal

The little chart seems to update itself nicely and I can see where the glitches are successful:

Questions:

  1. is there a way to mute the WARNINGS from ChipWhisperer?
  2. I have an error when running gc.calc():
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[135], line 1
----> 1 gc.calc()

AttributeError: 'GlitchController' object has no attribute 'calc'

I am running the latest version of chipwhisperer pymodule.

You can disable the warnings via cw.glitch_logger.setLevel(cw.logging.ERROR). Some of the glitch controller stuff was updated after the latest full release, so you may have to grab the latest git commit to get that.

Alex

Thank you, Alex. You are spot on with latest commit - I’ve pulled from develop branch and the gc.calc() is working now.