Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Milestone: Glitching and trigger library #11

Open
Kiboneu opened this issue May 25, 2018 · 3 comments
Open

Milestone: Glitching and trigger library #11

Kiboneu opened this issue May 25, 2018 · 3 comments
Labels
milestone Important enchancements. Increment minor version number when completed.

Comments

@Kiboneu
Copy link
Contributor

Kiboneu commented May 25, 2018

Use primitives in io.c (potentially expanding on it if necessary), and make some code to handle triggering. Applications can be made with the library for more specific glitch routines for specific chips and applications.

Some parameters for a preliminary voltage glitching implementation:

  • Target pin to glitch (usually Vcc)

  • Nominal voltage

  • Glitch voltage

  • Pin to listen to for triggering (a data pin, might be worth abstracting this for parallel buses.)

  • Clock pin (user can use device's or add their own clock to a free pin)

  • Trigger type

    • Trigger on Nth rising edge
    • Trigger on Nth falling edge
    • Trigger when a defined bit sequence pattern is encountered N times
  • Delay (in clock cycles from 'clock pin')

  • Duration (in clock cycles)

Need to measure and figure out how to deal with delays introduced when changing voltages of the target pin.

Working on this right now and this is still cooking, feedback would be appreciated.

@JohnDMcMaster
Copy link
Owner

Have you looked at chip whisperer at all? What do they do?

@Kiboneu
Copy link
Contributor Author

Kiboneu commented May 25, 2018

I've used CW for power analysis, but I haven't considered looking into its glitch implementation for this project.

https://github.com/newaetech/chipwhisperer/blob/develop/software/chipwhisperer/capture/scopes/cwhardware/ChipWhispererGlitch.py

The parameters the CW glitch module uses are:

  • Clock source
  • Glitch width as % of periods and "fine adjust" (duration I think)
  • Glitch offset as % of period and "fine adjust"
  • Glitch trigger : Manual, Continuous (external), Continuous, Single (external)
    Not sure what continuous exactly means here, but it seems that single is trigger based.
  • Arm timing (whether to arm the glitch module before or after the scope)
  • External offset (how many clock cycles after a trigger to perform the glitch)
  • Repeat (number of glitch pulses to generate per trigger)
  • output (clock_xor, clock_or, glitch_only (?), clock_only, enable_only)

Looks somewhat similar, would be good to keep them as compatible as possible so folks can port parameters between the CW and tl866. I like the idea of combining voltage / clock glitching like the CW does, so I will keep that in mind while working on this.

@Kiboneu Kiboneu changed the title Milestone: Voltage glitching and trigger library Milestone: Glitching and trigger library May 29, 2018
@Kiboneu
Copy link
Contributor Author

Kiboneu commented May 29, 2018

Instead of scheduling voltage and clock changes in the main loop for glitching, the tl866a MCU has a few timers and counters which might assist greatly in implementing this with precision.

ww1.microchip.com/downloads/en/DeviceDoc/39775c.pdf

Section 12.x and onwards.

@cr1901 cr1901 added the milestone Important enchancements. Increment minor version number when completed. label May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
milestone Important enchancements. Increment minor version number when completed.
Projects
None yet
Development

No branches or pull requests

3 participants