1.3 FAT Filesystem using SQI Flash Media

This application shows an example of using the MPLAB Harmony File System to access SQI based flash media. The SAMA5D29 Curiosity Development Board, SAMA5D27-SOM1-EK1 and the SAMA5D27-WLSOM1-EK1 have the SST26 flash media.

Description

File System Operations on the On-Board SQI Flash Memory

  • Performs a SYS_FS_FormatDisk
  • Opens a newfile.txt on the flash memory
  • Write and reads back 4KB of data on newfile.txt
  • Verifies the Data Read back

File system layer uses the following components:

  • One instance of the Memory driver is used to communicate with the On-Board SQI Flash memory

Downloading and Building the Application

To clone or download this application from Github, go to the main page of this repository and then click Clone button to clone this repository or download as zip file. This content can also be downloaded using content manager by following these instructions.

Path of the application within the repository is apps/fs/sqi_flash_fat/firmware.

To build the application, refer to the following table and open the project using its IDE.

Project NameDescription
sama5d29_curiosity.XMPLABX project for SAMA5D29 Curiosity Development Board
sama5d29_curiosity_freertos.XMPLABX project for SAMA5D29 Curiosity Development Board
sam_a5d27_som1_ek_freertos.XMPLABX project for SAMA5D27-SOM1-EK1
sam_a5d27_wlsom1_ek1_freertos.XMPLABX project for SAMA5D27-WLSOM1-EK1

Setting Up AT91Bootstrap loader

To load the application binary onto the target device, we need to use at91bootstrap loader. Refer to the at91bootstrap loader documentation for details on how to configure, build and run bootstrap loader project and use it to bootstrap the application binaries.

Setting Up the Hardware

The following table shows the target hardware for the application projects.

Project NameDescription
sama5d29_curiosity.XSAMA5D29 Curiosity Development Board

sama5d29_curiosity_freertos.X

SAMA5D29 Curiosity Development Board
sam_a5d27_som1_ek_freertos.XSAMA5D27-SOM1-EK1
sam_a5d27_wlsom1_ek1_freertos.XSAMA5D27-WLSOM1-EK1

Setting Up SAMA5D29 Curiosity Development Board

  • Connect the SQI Boot Jumper (J10)
  • Connect the USB_A port on board to the computer using a USB-C type cable.

Setting Up SAMA5D27-SOM1-EK1

  • Connecting a micro-USB cable to J10 both powers the board as well as provides a virtual COM port to open a serial terminal

Setting Up SAMA5D27-WLSOM1-EK1

  • Connect a USB to UART FTDI cable to J26 (DEBUG FTDI) to open a serial terminal
  • Connecting a micro-USB cable to J10 powers the board
  • Press the SW3 (nSTART_SOM) button to power the ATSAMA5D27-WLSOM1 System-On-Module
  • Make sure to disconnect the Jumper J8 (disable boot pin)