Not everything we do is FPGA-related; we often design boards and develop embedded software applications. More often than not, the project involves all three elements. One of the processors we often recommend clients consider for their flight missions is the SAMRH71. It is ideal for system control and management, allowing the selected FPGA to focus on data/signal/image processing.
We have had a SAMRH71 development board for a long time; however, it was allocated to a project, and a software contractor was using it. With the project now wrapped up, there are several things I want to do with it, including writing a few blogs to document how to get it up and running.
If you are familiar with it, the ATSAMRH71F20C is a high-reliability microcontroller from Microchip's SAM family, designed for applications requiring radiation hardness and robust performance.
It is powered by an Arm® Cortex®-M7 core operating at up to 100 MHz and includes 2 MB of dual-bank Flash memory with Error Correction Code (ECC) for secure program storage and 384 KB of tightly coupled SRAM. There is also 768 KB of SRAM provided called FlexRAM. Both these SRAM memories are protected by ECC to ensure high data integrity.
The SAMRH71's radiation-hardened architecture provides immunity to Single Event Latch-Up (SEL) up to 60 MeV.cm²/mg and robust Single Event Upset (SEU) handling through integrated error mitigation features.
One of the great features of the ATSAMRH71F20C is its support for a wide range of interfaces commonly used in space applications. This includes CAN FD and 10/100 Ethernet MAC with IEEE 1588 support. Also supported are two commonly used satellite interfaces: SpaceWire, compliant with the ECSS-E-ST-50-12C standard for high-speed, low-latency data transfer, and MIL-STD-1553, capable of functioning as a Bus Controller (BC), Remote Terminal (RT), or Bus Monitor (BM).
For more generic interfaces, UARTs, SPI, I²C, and USART are provided via FLEXCOMs.
In this blog, we are going to look at installing the correct toolchain and creating a simple "Hello World" program.
To do this, we are going to need the following:
12V Power Supply – Capable of supplying up to 0.5A.
Atmel ICE Debugger.
SAMRH71 development board.
To get started with this development, we need to install several applications. The main one is MPLAB X IDE with the 32-bit compilers installed.
Once we have the software applications installed, we can get started creating our initial application. For this initial application, I want the project to provide a simple "Hello World" program.
The first stage is to create a new project. As part of this project creation process, we can download the Microchip Harmony library. Harmony provides us with a range of middleware and libraries, along with a configurator that allows us to set up the desired configuration of the processor.
For the target device, select ATSAMRH71F20C.
Once the project is opened, we can use the Pack Manager to download the packs that support the target device.
Once the packages are installed, the next step is to use the MCC to configure our design.
For this project, we are using the development board, which has the UART on defined pins. These are connected to FLEXCOM1 and pins PF29 and PF30.
Using the project graph, we can configure FLEXCOM1 as a UART at 115200 and assign the STDIO to that FLEXCOM1.
We can assign the FLEXCOM pins to PF29 and PF30 using the pin settings table.
We can then see this assignment in the pin diagram.
Once this is completed, we can generate the MCC.
Generating the MCC will provide a range of software functions and libraries that we can explore and use in our application.
As we are just wanting a simple "Hello World" application, all we need to do for this project is update the main.c file to print "Hello World" in an infinite loop.
With the software written, we need to compile the application and upload the design using the JTAG interface. Flashing the application to the development board should take a minute or so, and progress will be reported in the Atmel ICE window.
With a terminal program connected, you will see the output reported in the terminal program.
Now that we have walked through how to create a simple project, we can get started looking at application development in more detail.
One of my goals with this is to connect the SpaceWire ports to our SpaceWire IP FPGA cores.
Workshops and Webinars
If you enjoyed the blog why not take a look at the free webinars, workshops and training courses we have created over the years. Highlights include
Upcoming Webinars Timing, RTL Creation, FPGA Math and Mixed Signal
Professional PYNQ Learn how to use PYNQ in your developments
Introduction to Vivado learn how to use AMD Vivado
Ultra96, MiniZed & ZU1 three day course looking at HW, SW and PetaLinux
Arty Z7-20 Class looking at HW, SW and PetaLinux
Mastering MicroBlaze learn how to create MicroBlaze solutions
HLS Hero Workshop learn how to create High Level Synthesis based solutions
Perfecting Petalinux learn how to create and work with PetaLinux OS
Boards
Get an Adiuvo development board
Adiuvo Spartan 7 / RPi 2040 Embedded System Development Board
Adiuvo Spartan 7 Tile - Low Risk way to add a FPGA to your design.
Embedded System Book
Do you want to know more about designing embedded systems from scratch? Check out our book on creating embedded systems. This book will walk you through all the stages of requirements, architecture, component selection, schematics, layout, and FPGA / software design. We designed and manufactured the board at the heart of the book! The schematics and layout are available in Altium here Learn more about the board (see previous blogs on Bring up, DDR validation, USB, Sensors) and view the schematics here.
Comments