-
1Hardware build
There are no particularly noteworthy steps for building the hardware - it's normal surface-mount assembly. For most users, there is no need to populate the two through-hole connectors. You can just short ERASE with a wire briefly when it's necessary, and the SWD interface is not used except for firmware development.
-
2Firmware build
To build the firmware, use Atmel Studio 7 and Atmel Start. This will make an ASF4 codebase from the .atstart file in the GitHub repository. Download the .atzip from Start and open it in Atmel Studio. You need to patch the result in a specific way:
- You need to manually change the two bulk endpoint maximum sizes (CONF_USB_MSC_BULKIN_MAXPKSZ and CONF_USB_MSC_BULKOUT_MAXPKSZ in Config/usbd_msc_config.h) from 0x40 to 0x200 as the HS USB spec requires (and for better performance).
After doing that, take all of the .c and .h files in the GitHub repository and overlay them on top of the project, overwriting any conflicting existing files.
Select a "Release" build (for better performance) and compile the code. Find the ".bin" file in the Release directory. This is what you'll upload to the controller.
Fetch and compile the source for the Micro-SAM-BA client.
Short the ERASE jumper on the board and apply power, then remove the short. You will see a CDC (serial port) device show up on your host. Take note of the device name (the file in /dev that it added). Use the following usamba commands:
usamba [device] write Orthrus.bin 0 usamba [device] gpnvm set 1 usamba [device] gpnvm set 8 usamba [device] gpnvm clear 7 export GPNVM0_CONFIRM=1 usamba [device] gpnvm set 0
That last two commands will set the security bit and "lock" the firmware in and disable all debug interfaces. This will protect you from rogue firmware being installed as long as you prevent access to the ERASE jumper. Unplug the USB cable to terminate SAM-BA and connect it again to start the new firmware.
-
3Using Orthrus
To use Orthrus, just stick any two SDHC or SDXC microSD cards in the slots and connect a USB cable to your host. You can do this in the opposite order if you wish - the microSD slots are hot-swappable. If the two cards have not been previously paired with Orthrus, then the error light will turn on. Press and hold the button and the error light will blink for 5 seconds and then the cards will be paired and initialized. At that point the ready light will turn on and the host will see a volume with twice the space of the smaller of the two cards. You will need to use your host to initialize this volume. After that, it works just like any other USB storage. When ejecting the volume, you can either remove the USB cable or the two cards first.
If you insert an Orthrus paired card into a computer (that is, without Orthrus), it will look like a card filled with garbage. If you damage the key block (block 0 on the card), then THE ENTIRE VOLUME ON BOTH CARDS WILL BE DESTROYED. Once the key material is corrupted, then all the data is irrecoverably lost. That's kinda the point, of course.
There are three lights on Orthrus - ready, activity and error. "Ready" indicates that a correctly matched pair of cards have been inserted and the volume is available to the host. "Error" means that the two cards that are inserted are not a matched pair. You can press the button to pair two such cards, but that will destroy any data on both of them. You can hold the button down for 5 seconds (the error light will blink while you do this) at any time and the two cards will be initialized. If you do this while two paired cards are inserted then all the data on the volume will be destroyed and the volume made ready for new data.
It does not matter which card of a pair is inserted into each slot. The two slots are marked on the board, but in use they are fungible.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.