AM263x MCU+ SDK  08.02.00
QSPI Flash Diag

Introduction

This is a diagnostic example for NOR-QSPI Flashes. This example doesn't use the flash driver and should ideally pass for any NOR-QSPI flash. For this particular example, the options in SysCfg like the number of transfer lines used, or the clock divider value are ignored. This example will always talk to the flash in the lowest settings possible. The flash device is reset, and is expected to support 1s1s1s mode after reset. Then the QSPI controller is programmed to work in 1s1s1s mode with 3 byte addressing mode.

The test itself is simple, first it tries to read the JEDEC ID of the flash which consists of the flash manufacturer ID and the flash device ID. These are then printed onto the logging console. When doing flash bring-ups in new boards, this example can be run first for sanity. Users can cross check the printed ID with the one in flash datasheet to confirm that basic communication with flash is working.

The test then tries to erase a flash memory block at an offset of 64 KB and then write some known data to that memory. This data is then read back and verified to confirm that reads and writes are working in 1s1s1s mode.

Supported Combinations

Parameter Value
CPU + OS r5fss0-0 freertos
r5fss0-0 nortos
Toolchain ti-arm-clang
Boards am263x-cc, am263x-lp
Example folder examples/drivers/qspi/qspi_flash_diag

Steps to Run the Example

Sample Output

Shown below is a sample output when the application is run,

[QSPI Flash Diagnostic Test] Starting ...
[QSPI Flash Diagnostic Test] Flash Manufacturer ID : 0x1
[QSPI Flash Diagnostic Test] Flash Device ID : 0x2018
[QSPI Flash Diagnostic Test] Executing Flash Erase on first block...
[QSPI Flash Diagnostic Test] Done !!!
[QSPI Flash Diagnostic Test] Performing Write-Read Test...
[QSPI Flash Diagnostic Test] Write-Read Test Passed!
All tests have passed!!