Migrating an MPLAB® Harmony CSP Application From a SAME70 MCU to a SAM9X75 Hybrid MCU Curiosity Development Board
Introduction
This training module explains how to migrate a QSPI read application based on MPLAB® Harmony v3 from the SAME70 Xplained Ultra board (Arm® Cortex®-M7–based MCU) to the SAM9X75 Curiosity Development Board (Arm926EJ-S™–based SiP). It provides a practical, step-by-step guide to port a QSPI-based application, covering hardware pin mapping, software/firmware changes, verification steps, and a ready-to-use pin-mapping template.
Refer to the "SAM E70 Xplained Ultra User's Guide" and the "SAM9X75 Curiosity User Guide" while preparing the migration.
Gather Required Documentation and Data
- SAME70 Xplained Ultra:
- Identify:
- External flash part number and schematic details (SST26VF032BA)
- Board signal names and their mapping to SAME70 MCU pins (in the schematics)
- Identify:
- SAM9X75 Curiosity Development Board:
- Identify:
- External flash part number and schematic (SST26VF064BEUIT-104I/MF)
- QSPI interface pins and the connector where they are exposed (schematics/connector section)
- Identify:
- Flash Data Sheet (SST26 Family):
- From the Microchip flash data sheet, collect:
- Opcode set
- Timing parameters
- Page/Sector size
- Quad-Enable procedure
- From the Microchip flash data sheet, collect:
Hardware Pin Mapping
The following table maps the QSPI peripheral signals across both development boards and shows their mappings.
| QSPI Signal | SAME70 Xplained Ultra | SAM9X75 QSPI1 (Port B) | Notes |
|---|---|---|---|
| QSPI_SCK (Clock) | PA14 | PB19 | Primary clock signal |
| QSPI_CS (CS0) | PA11 | PB20 | Chip Select |
| QSPI_IO0 | PA13 | PB21 | Data line 0 |
| QSPI_IO1 | PA12 | PB22 | Dual/Quad mode data |
| QSPI_IO2 | PA17 | PB23 | Quad mode data |
| QSPI_IO3 | PD31 | PB24 | Quad mode data |
Migrating to SST26VF064BEUIT Flash Memory
Verify Basic Protocol Compatibility
Both devices belong to the SST26 series, so most protocols are consistent—however, validation is required.
- Opcode Consistency
- Confirm that Read, Write-Enable, Sector-Erase, Chip-Erase, and Quad-Mode opcodes match between the two data sheets
- Mode Settings
- Ensure Quad-Enable and related configuration commands are identical (Critical for high-speed graphics applications)
Update All Driver Parameters
Every parameter related to memory geometry must be updated in the driver/MCC configuration.
| Parameter | SST26VF032BA | SST26VF064BEUIT | Impact |
|---|---|---|---|
| Total Size | 32 Mbit (4 MB) | 64 Mbit (8 MB) | Determines maximum address range |
| Addressing Mode | 3-byte addressing | May require 3-byte or 4-byte addressing | Incorrect mode causes upper memory to be inaccessible |
| Sector/Block Count | Based on 4 MB | Must double for 8 MB | Used for erase/write address calculations |
| Page/Sector Size | Check data sheet | Verify equivalence | Ensures correct erase/write operations |
Software/Firmware Changes in MPLAB Harmony v3
Porting from the SAME70 (Arm Cortex-M7) to the SAM9X75 (Arm926EJ-S) requires full re-initialization of peripheral drivers, pin configuration, and QSPI controller settings.
MPLAB Code Configurator (MCC)
- Create New Project
- Select SAM9X75D2G as target device
- MCC will regenerate the device tree and PLIB headers accordingly
- Clock System (PMC)
Reconfigure the Master Clock, PLLs, and Peripheral Clocks required for QSPI
- GPIO Reconfiguration
- Remove the SAME70 Pin Manager configuration
- Add new Pin Manager settings for SAM9X75
- Assign QSPI pins (e.g., PB19–PB24 for QSPI1) based on the pin mapping table
Replace QSPI Driver
The QSPI peripheral IP is different across SAME70 and SAM9X75.
Therefore, low-level driver code is not compatible.
- Remove SAME70 QSPI Driver
- Delete the old driver instance in MCC
- Add SAM9X75 QSPI Driver
- Configure with parameters:
- Flash part number: SST26VF064BEUIT
- Quad-Enable and Dummy Cycles as per data sheet
- Memory geometry (8 MB size, page/sector size)
- Configure with parameters:
- Update Application-Level API Calls
- Harmony API names remain consistent (e.g., DRV_QSPI_Read(), DRV_QSPI_EraseSector())
- But update the driver handle to the newly created SAM9X75 QSPI instance
Learn More
- MPLAB® Extensions for VS Code: Creating a New Harmony Project/ Migrating a QSPI Application From SAME70 to SAM9X75
- Getting Started with Graphics on SAM9X60 Curiosity Development Board