SAMA5D29-Curiosity – Copy MPLAB® Harmony v3 Application and at91bootstrap to SD Memory Card

Last modified by Microchip on 2024/05/07 13:30

Introduction

In this training topic you will copy two binary images, harmony.bin (an MPLAB® Harmony v3 Software Framework Application) and boot.bin (Second-stage bootloader, at91bootstrap), to a micro Secure Digital (SD) memory card for booting on the SAMA5D29-Curiosity Development Board. Once the images are copied, the micro SD memory card is inserted, and upon reset, the SAMA5D29 will boot and run the application. 

For this exercise, you will write the binaries that were created in the training topics:

Prerequisites

  • Knowledgeable of the SAMA5D2 Series Boot Process 
  • SAMA5D29 Data Sheet – Section 17. Standard Boot Strategies 

Hardware

For this training, you will use the SAMA5D29-Curiosity Development Board (P/N: EV07R15A)

SAMA5D29-Curiosity Development Board

For more information, see the “SAMA5D29-Curiosity Development Board – Features page. 

Setup the SAMA5D29-Curiosity as listed below to the host computer running the SAM-BA® Host Application

Jumpers 

Jumper J10, QSPI BOOT, must be open to prevent booting from the onboard SQI™ Flash Memory. 

SD Memory Cards 

  • Ensure no SD memory cards are plugged into SD memory card slots (J6 or J7). 

Power 

Secure Digital Multimedia Card (SDMMC)

The SAMA5D29-Curiosity has two SD memory card slots. 

  • Secure Digital Multimedia Card (SDMMC) (J7) – J7 is an SD or MultiMediaCard (MMC) memory card slot. It is connected to the SD MultiMediaCard port 1 (SDMMC1) peripheral of the SAMA5D29. 
  • Micro Secure Digital (J6) (Bottom Side) – J6 is a micro SD memory card slot mounted on the bottom side of the development board. It is connected to the SD MultiMediaCard port 0 (SDMMC0) peripheral of the SAMA5D29. 

In this example, we selected the micro SD memory card slot (J6), mounted on the bottom side of the development board, in the training topic: SAMA5D29-Curiosity – Configure and Build at91bootstrap to Load a MPLAB Harmony v3 Application from SD Memory Card.  

Setup Console Serial Communications

To view the target console, connect the host computer running a terminal emulation program in accordance with the SAMA5D29-Curiosity – Console Serial Communications” page. 

Copy boot.bin to micro SD Memory Card

In this section, you will copy the at91bootstrap binary image, boot.bin, to micro SD memory card. 

Change the directory to the location of boot.bin:

<project_directory>\at91bootstrap\build\binaries\ 

Back to Top


Copy boot.bin to micro SD memory card.

Back to Top

Write harmony.bin to micro SD Memory Card

In this section, you will write the MPLAB Harmony v3 Software Framework application binary image, harmony.bin, to micro SD memory card. 

Change the directory to the location of harmony.bin

C:\Users\<user>\Harmony3\csp_apps_sam_a5d2\apps\pio\pio_led_on_off_interrupt\firmware\sam_a5d2_curiosity.X\dist\sam_a5d2_curiosity\production\​​​​​

Back to Top


Copy harmony.bin to a micro SD memory card.

Back to Top

Run MPLAB Harmony v3 Application on the Target

In this section, you will insert the micro SD memory card and wake-up the SAMA5D29-Curiosity to run the MPLAB Harmony v3 Software Framework application. 

Ensure the QSPI_BOOT (J10) jumper is open.  

This will prevent booting from the onboard Serial Quad I/O™ (SQI™) flash memory.  

Back to Top


Insert the micro SD memory card into slot J6, located at the bottom of the development board.

Back to Top


Apply power as shown in the “Power Options” section on the “SAMA5D29-Curiosity – Features page. 

The USB-A port (J1) also functions as a source to power the SAMA5D29-Curiosity. The port is limited to 500 mA. If greater current is required, the SAMA5D29-Curiosity should be powered via J2.

Back to Top


To run the application, press the START (SW3) push button to wake up the MPU. It will take a moment for the SAMA5D29 to boot. Observe the RGB LED (D7) lights green (during boot). 

Press the USER (SW1) push button and observe the RGB LED (D7) light up green. Release the USER push button and the RGB LED will turn off.  

Back to Top

The application uses the PIO Peripheral library to generate a callback on switch press and release and drives the GPIO pin connected to the RGB LED to indicate the switch status. 

Console: application running

Summary

In this training topic, you copied the binary files harmony.bin and boot.bin to a micro SD memory card for booting on the SAMA5D29-Curiosity and ran the application on the target. 

Back to Top

What’s Next?

For training topics on configuring at91boostrap for other Non-Volatile Memories (NVM), see: 

Back to Top