FreeRTOS SDK SPI Sector read issues

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mohdamerkhalidi
New user
Posts: 2
Joined: 11 Aug 2016, 08:06

FreeRTOS SDK SPI Sector read issues

#1 Post by mohdamerkhalidi » 11 Aug 2016, 08:07

Hi,
I am trying to work with the SPI APIs for esp8266-12f. When reading the SPI device ID using the SPI SDK API for getting the device id, I get 4016E0. It seems the external flash on the board is of size 4Mbytes divided into 4KByte sectors(I did verify this). While reading the flash sectors, I can read the sectors from 0-127 but when reading sector 128,129.., the API returns error. Is this because the flash size is 4Mbit rather than 4Mbyte. Or is there something that I am missing here? The FreeRTOS' API system_get_sdk_version returns the SDK Version as 1.4.0(c599790).

Martinus

Re: FreeRTOS SDK SPI Sector read issues

#2 Post by Martinus » 11 Aug 2016, 20:52

I have no experience with FreeRTOS but in general it looks like your flash is 512kByte (indeed 4MBit). Then it ends at sector 127.

mohdamerkhalidi
New user
Posts: 2
Joined: 11 Aug 2016, 08:06

Re: FreeRTOS SDK SPI Sector read issues

#3 Post by mohdamerkhalidi » 18 Aug 2016, 12:45

Yes it seems like it is 512KB but the Device ID and the manufacturer claims it is a 4MB flash. I am wondering if the SPI APIs provided with the RTOS SDK has some kind of check which returns ERROR once I try to read more than 127 sectors. Also I tried to program the esp using the esptool.py with code size greater than 512KB and everything works fine.The esptool.py uses its own script to program the flash.

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: FreeRTOS SDK SPI Sector read issues

#4 Post by tozett » 18 Aug 2016, 14:27

looked here,

http://bbs.espressif.com/download/file.php?id=1371
( 99A-SDK-Espressif IOT Flash RW Operation__EN_v1.0.pdf)

but this did not help to clarify.
may you find some hint in pete scargills blog? he has done something with the SDK..

https://www.google.de/webhp?sourceid=ch ... h%20sector

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 13 guests