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:3 weeks 6 days 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:15 hours 33 min 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:2 days 21 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:2 days 21 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\u JEDEC\u ID,W25X20\u JEDEC\u ID\u MATCHING\u BITMASK,W25X20\u TOTAL\u FLASH\u SIZE,W25X20\u PAGE\u SIZE,W25x\u MEM\u PROT\u BITMASK,W25X20\u MEM\u PROT\u 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:3 weeks 6 days 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.exeUI工具设置最大SPI闪存大小。
The value
entry key="SPI_MEM_LENGTH" value="524288"
在“用户”中???\智能代码段\首选项.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:3 weeks 6 days 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:3 weeks 6 days ago
加入:2014-08-15 05:08
Dear WI_Dialog,

Dear WI_Dialog,

的课题ess of this issue?

lizhuobin
Offline
Last seen:3 weeks 6 days ago
加入:2014-08-15 05:08
Dear WI_Dialog,

Dear WI_Dialog,

的课题ess of this issue?

WI_Dialog
Offline
Last seen:2 days 21 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:3 weeks 6 days ago
加入:2014-08-15 05:08
Dear WI_Dialog,

Dear WI_Dialog,

Thanks so much for your support!!!

Topic locked