Close

Firmware rewrite

A project log for Orthrus

SD card secure RAID USB storage

nick-sayerNick Sayer 04/24/2017 at 00:510 Comments

I rewrote the firmware today for the 32A4U. Of course, I did this in a complete vacuum, as the hardware isn't here yet.

The firmware is much smaller, as would be expected given the removal of all the code to do AES in software. It takes around 11K of flash and uses around 1.5K of global RAM.

I originally chose the 32A4U because it was actually cheaper than the 16A4U, but I'm glad I did - not for the additional flash space, but for the extra RAM.

The AES system is set up to run almost entirely in the background with DMA both loading in the nonce data and reading out the pre-ciphertext into a buffer for XORing during I/O. DMA completion interrupts ping-pong two DMA channels to make this happen, incrementing the counter within for each block.

I've also got an interrupt driven ring buffer system for the diagnostic serial output so you don't have to wait around for it to transmit. Not sure yet what use I'll make of that, but it may be quite handy.

Discussions