From 8f9c70da3b824621b5a204b43508ccdfb22764e5 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 22 Sep 2013 12:22:55 -0600 Subject: [PATCH] SAMA5D3x-EK AT25 Serial FLASH: Dropping SPI frequency to 10MHz gives more reliable behavior --- configs/sama5d3x-ek/README.txt | 12 ++++++++++-- configs/sama5d3x-ek/demo/defconfig | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/configs/sama5d3x-ek/README.txt b/configs/sama5d3x-ek/README.txt index aa455cda9ea..dd713ac9c13 100644 --- a/configs/sama5d3x-ek/README.txt +++ b/configs/sama5d3x-ek/README.txt @@ -1011,7 +1011,11 @@ Configurations CONFIG_MTD=y : Enable MTD support CONFIG_MTD_AT25=y : Enable the AT25 driver CONFIG_AT25_SPIMODE=0 : Use SPI mode 0 - CONFIG_AT25_SPIFREQUENCY=20000000 : Use SPI frequency 20MHz + CONFIG_AT25_SPIFREQUENCY=10000000 : Use SPI frequency 10MHz + + The AT25 is capable of higher SPI rates than this. I have not + experimented a lot, but at 20MHz, the behavior is not the same with + all CM modules. This lower rate gives more predictable performance. Application Configuration -> NSH Library CONFIG_NSH_ARCHINIT=y : NSH board-initialization @@ -1490,7 +1494,11 @@ Configurations CONFIG_MTD=y : Enable MTD support CONFIG_MTD_AT25=y : Enable the AT25 driver CONFIG_AT25_SPIMODE=0 : Use SPI mode 0 - CONFIG_AT25_SPIFREQUENCY=20000000 : Use SPI frequency 20MHz + CONFIG_AT25_SPIFREQUENCY=10000000 : Use SPI frequency 10MHz + + The AT25 is capable of higher SPI rates than this. I have not + experimented a lot, but at 20MHz, the behavior is not the same with + all CM modules. This lower rate gives more predictable performance. Application Configuration -> NSH Library CONFIG_NSH_ARCHINIT=y : NSH board-initialization diff --git a/configs/sama5d3x-ek/demo/defconfig b/configs/sama5d3x-ek/demo/defconfig index bc6618345d1..90cc043debf 100644 --- a/configs/sama5d3x-ek/demo/defconfig +++ b/configs/sama5d3x-ek/demo/defconfig @@ -421,7 +421,7 @@ CONFIG_MTD=y # CONFIG_MTD_AT24XX is not set CONFIG_MTD_AT25=y CONFIG_AT25_SPIMODE=0 -CONFIG_AT25_SPIFREQUENCY=20000000 +CONFIG_AT25_SPIFREQUENCY=10000000 # CONFIG_MTD_AT45DB is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_SMART is not set