| Kinetis SDK Demo Applications User Guide 1.0.0-beta Freescale Semiconductor, Inc.

- Main Page
- Related Pages
- Demos

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
SPI Flash Demo Introduction
SPI Flash Demo

Introduction and the function/configuration of SPI Flash functions. More...

### SPI Flash Demo Introduction

# Overview

This demo application provides a command line console and a series of commands to access the SPI Flash. These commands can be used either to read, write, or erase the SPI flash.

# Supported Hardware

- TWR-K64F120M (OpenSDA as debug UART)
- FRDM-K64F120M (OpenSDA as debug UART)

# Default Debug Console

- UART instance: OpenSDA CDC
- Baud rate: 115200 bps

# UART Output

SF Test >probe 0:0 5000000
SF: Detected AT26DF081A with page size 4096, total 1048576
SF Test >help
SPI flash sub-system
probe [[bus:]cs] [hz] [mode] - init flash device on given SPI bus
and chip select
read addr offset len - read `len' bytes starting at
`offset' to memory at `addr'
write addr offset len - write `len' bytes from memory
at `addr' to flash at `offset'
update addr offset len - erase and write `len' bytes from memory
at `addr' to flash at `offset'
erase offset [+]len - erase `len' bytes from `offset'
`+len' round up `len' to block size
help - print usage
SF Test >erase 0x0 0x100000
SF: Successfully erased 1048576 bytes @0x0
SF Test >