[Cryptech Tech] road to berlin

Paul Selkirk paul at psgd.org
Mon May 2 04:37:50 UTC 2016


On 04/30/2016 08:52 PM, Paul Selkirk wrote:
> On 04/29/2016 01:09 PM, Peter Stuge wrote:
>> Paul Selkirk wrote:
>>> It appears that the AVR is programmed through a 6-pin SPI header with a
>>> usbtiny programmer, but we will need a software-based upgrade path (PC
>>> -> STM32 -> AVR).
>>
>> That's not possible on the Alpha board since the STM32 is not
>> connected in parallel with the ISP header.
> 
> I think we can use I2C. We have 4 GPIO lines between the ARM and the
> AVR. The CMSIS library includes an I2C module for the STM32, and it
> appears from the STM32Cube examples that we can use arbitrary GPIOs. On
> the AVR, there is public domain I2C master and slave code.

Or maybe the software guy doesn't know what he's talking about when it
comes to hardware.

While it might be plausible from the STM32 side, it's less convincing on
the AVR side. I've spent a while staring at the ATtiny828 data sheet,
the I2C application note, and the extant code. The app note and code use
the Universal Serial Interface (USI) module, which isn't present on the
828. Even if it was, USI seems to overlay I2C onto the same lines that
SPI uses, which is the situation we already have.

And even if we could coerce I2C onto GPIOs, it's not clear that it would
be worth the effort.

The AVR has to do approximately the following:
- receive a tamper interrupt from an external circuit (currently a panic
button)
- wipe the MKM
- raise an interrupt on the ARM, so it can do whatever it needs to do
- light an LED (red, of course)

If we get that right, we might never have to upgrade the AVR.

				paul



More information about the Tech mailing list