How to Set the maximum SPI Flash Memory size when use the command to write data to flash

10 posts / 0 new
Last post
lizhuobin
Offline
Last seen:2 months 4 weeks ago
加入:2014-08-15 05:08
How to Set the maximum SPI Flash Memory size when use the command to write data to flash

We use a 4M bit spi flash.

If we use the SmartSnippets.exe tools to write data to the adress greater than 0x20000 , that is ok.

But when we write data to the flash by the command

"SmartSnippets.exe -type spi -chip DA14580-01 -com_port 51 -baudrate 57600 -cmd write -file prox_reporter_img.bin -offset 491520",

it return the error massage

EEPROM memory offset can not be greater than the maximum EEPROM address ( 0x1FFFF).
记忆燃烧失败了。

How to Set the maximum SPI Flash Memory size when use the command to write data to flash.

Device:
JE_Dialog
Offline
Last seen:1 month 1 day ago
Staff
加入:2013-12-05 14:02
嗨,有人来自

嗨,有人来自local team will respond to yuo shortly offline from the forum . BR JE_Dialog

WI_Dialog
Offline
Last seen:5 days 18 hours ago
Staff
加入:2014-01-03 16:21
Hi,

Hi,
It may due to the limitation in our SmartSnippets tools as we didn't foresee customers to use more than 2Mb FLASH (256kB) in DA14580 BLE applications. Will communicate to our application team what's the best approach to meet your request.
问候,WI_Dialog

WI_Dialog
Offline
Last seen:5 days 18 hours ago
Staff
加入:2014-01-03 16:21
Hi,

Hi,
In our SDK release DA14580_581_SDK_3.0.8.0 (for example), you can find a project named:
DA14580_581_SDK_3.0.8.0\tools\flash_programmer\programmer_itag.uvproj, ORr
DA14580_581_SDK_3.0.8.0\tools\flash_programmer\programmer_uart.uvproj
Open and edit spi_flash.c in this project, locate the following structure at line 27,
const SPI_FLASH_DEVICE_PARAMETERS_BY_JEDEC_ID_t SPI_FLASH_KNOWN_DEVICES_PARAMETERS_LIST[] =
{
{W25X10_JEDEC_ID, W25X10_JEDEC_ID_MATCHING_BITMASK, W25X10_TOTAL_FLASH_SIZE, W25X10_PAGE_SIZE, W25x_MEM_PROT_BITMASK, W25x10_MEM_PROT_NONE},
{w25x20_jedec_id,w25x20_jedec_id_matching_bitmask,w25x20_total_flash_size,w25x20_page_size,w25x_mem_prot_bitmask,w25x20_mem_prot_none},
{AT25Dx011_JEDEC_ID, AT25Dx011_JEDEC_ID_MATCHING_BITMASK, AT25Dx011_TOTAL_FLASH_SIZE, AT25Dx011_PAGE_SIZE, AT25Dx011_MEM_PROT_BITMASK, AT25Dx011_MEM_PROT_NONE},
};
insert the new SPI Flash information and compile a new binary HEX to replace the "flash_programmer.bin" in "Users\???\SmartSnippets\resources" directory.
OR
Open and edit periph_setup.h in this project, locate the following definition at line 42,
#define SPI_FLASH_DEFAULT_SIZE 131072 // SPI Flash memory size in bytes
#define SPI_FLASH_DEFAULT_PAGE 256 // SPI Flash memory page size in bytes
do the changes according to your SPI Flash, and compile a new binary HEX to replace the "flash_programmer.bin" in "Users\???\SmartSnippets\resources" directory.
Start "SmartSnippets" tool again to verify your issue be fixed or not.
问候,WI_Dialog.

lizhuobin
Offline
Last seen:2 months 4 weeks ago
加入:2014-08-15 05:08
Dear WI_Dialog,

Dear WI_Dialog,

I have done
"Open and edit periph_setup.h in this project, locate the following definition at line 42,
#define SPI_FLASH_DEFAULT_SIZE 131072 // SPI Flash memory size in bytes
#define SPI_FLASH_DEFAULT_PAGE 256 // SPI Flash memory page size in bytes
do the changes according to your SPI Flash, and compile a new binary HEX to replace the "flash_programmer.bin" in "Users\???\SmartSnippets\resources" directory."
before.

It is mean that I have replace the flash_programmer.bin.

当我使用SmartSnippets.exe UI工具来设置最大SPI闪存大小。
The value
entry key="SPI_MEM_LENGTH" value="524288"
在“用户\ ??? \ smartsnippets \ preferences.xml”中将被修改为“524288”。
Data will be written to flash successful.

But If I use the command "SmartSnippets.exe -type spi -chip DA14580-01 -com_port 51 -baudrate 57600 -cmd write -file prox_reporter_img.bin -offset 491520" to write data,
It will return the error massage "EEPROM memory offset can not be greater than the maximum EEPROM address ( 0x1FFFF).
记忆燃烧失败了。"

So, I think it may be the issue with the SmartSnippets.exe.
Or In the SmartSnippets.exe UI mode, The parameter SPI_MEM_LENGTH in the "Users\???\SmartSnippets\preferences.xml" file, will be set to SmartSnippets.exe.
But in command mode, I can not find the way to set the SPI_MEM_LENGTH to SmartSnippets.exe.

Thankyou very much for your support!!!

lizhuobin
Offline
Last seen:2 months 4 weeks ago
加入:2014-08-15 05:08
Dear WI_Dialog,

Dear WI_Dialog,

的课题ess of this issue?

In the UI mode,the SPI_MEM_LENGTH which in "Users\???\SmartSnippets\preferences.xml" is active.And we can burn data to flash successful.

How to set the SPI_MEM_LENGTH which in "Users\???\SmartSnippets\preferences.xml" to SmartSnippets.exe by the command mode.

lizhuobin
Offline
Last seen:2 months 4 weeks ago
加入:2014-08-15 05:08
Dear WI_Dialog,

Dear WI_Dialog,

的课题ess of this issue?

lizhuobin
Offline
Last seen:2 months 4 weeks ago
加入:2014-08-15 05:08
Dear WI_Dialog,

Dear WI_Dialog,

的课题ess of this issue?

WI_Dialog
Offline
Last seen:5 days 18 hours ago
Staff
加入:2014-01-03 16:21
Hi,

Hi,
It is confirmed that the supported limit is hard coded in the SmartSnippets software. This limitation will be removed in the next SmartSnippets. Please stay tuned to monitor the updates in our portal.
问候,
WI_Dialog

lizhuobin
Offline
Last seen:2 months 4 weeks ago
加入:2014-08-15 05:08
Dear WI_Dialog,

Dear WI_Dialog,

Thanks so much for your support!!!

Topic locked