UART misread


#1

Hi guys,

I am processing the UART data of a target board, and in the glitch explorer sometimes it seems gibberish after the glitch, but I also monitor the same UART data with a bus pirate, and it actually isn’t always gibberish. When it is, then the glitch was too hard and it crashed the target, but the glitch explorer has false positive results, meaning that it is actually an uncorrupted data which I can see with the BP. Baud rate and everything is fine, as in other cases CW can read it correctly without any problems.
How can I correct this error?


#2

Hi Daniel,

How often would you say this false positive occurs? Maybe you could do some more research into the problem, see if it is related to how the serial read is carried out and passed to the glitch explorer. If you do find the fix you can take out a pull request for the fix on github, to share it with the community. Might also be a fun project. Let me know if you need anymore information to get started.

If you do find more details about the problem feel free to create an issue on github, and you do not want to fix it yourself, then we can take a look at it. Details are important, like when it happens (you already shared that with me), how often, how to recreate it the most reliably (glitching has inherent unreliability), your setup, code running on the target, and any other relevant information.

Cheers,
Franz


#3

Hi Franz,

Do you have a function call graph for the code?
And what if it is in hardware? Or in the transfer from the hardware to the gui?
Are the source codes for the microcontroller and for the FPGA available?

Sometimes it inserts junk characters, sometimes it misreads only one character into another one.

How often it happens, sometimes frequently, sometimes not at all.
How to recreate it, I have no idea. If I would have an influence on that, I would choose not to recreate it at all.


#4

Hi Daniel,

We do not have an updated call graph for the ChipWhisperer project. If you are mostly working with the glitch explorer most of the high level logic for the glitch explorer can be found in GlitchExplorerDIalog.py under chipwhisperer/software/chipwhisperer/capture/ui. The results get appended after the glitch explorer receives a signal form the capture part of the software with the information needed to add to the table. CWCaptureGUI.py line 93 calls the addResponse function in the GlitchExplorerDialog.py file after the signal defined on line 46 CWCaptureGUI.py is emitted. Hope this helps a little and gives you something to start with. :slight_smile:

The source code for the FPGA and the micro-controller can be found in the chipwhisperer folder (hdl and sam3u_fw respectively). Source code.

We can try on our end to recreate it, see if we have any luck. Can I have a sample output of a run of your glitch explorer sessions? And maybe include a picture of the measurements you took of the junk characters. This way we have some idea where to start to look for a problem.

Cheers,
Franz