External flash memory connected to DA14585 fails programming

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
7 posts / 0 new
Last post
anushiya
Offline
Last seen:6 months 2 weeks ago
Joined:2017-12-20 02:30
External flash memory connected to DA14585 fails programming

Hi,
具有DA14585和AT25XE011的闪存的自定义板通过JTAG连接连接到开发板DA14580-Devkt-P_VC。
我公司使用SmartSnippet Studio V1.6.3.918基尔的IDEuld run the firmware on debug mode.

I am trying to program the external flash memory and it is throwing our errors. I have attached 2 screen shots. Hope you can see the problem with them.

1) I opened SmartSnippets tool Box and selected JTAG serial number and chip version DA14585_00

2) Press connect and the tool said successfully configured SPI flash ports and pins

3) SPI_CLK: P0_0; SPI_EN: P0_3; SPI_DI: P0_5; SPI_DO: P0_6
JTAG pin connections are VBAT = 3.2V; GND; SW_CLK; and SWDIO

4) When I press "Erase", it gives an error
[ERROR SPI Flash @18-05-08 13:14:00] SPI Memory erasing failed.

5) When I try to burn I get:
[ERROR SPI Flash @18-05-08 13:15:10] Adddittional error info at JTAG address 0x81FEC (MSB first): FF FF FF F8
[ERROR SPI Flash @18-05-08 13:15:10] Memory burning failed.

Thank you for your assistance

Device:
Device Number:
DA14585 and AT25XE011
PM_Dialog
Offline
Last seen:1 day 9 hours ago
Staff
Joined:2018-02-08 11:03
Hi anushiya,

Hi anushiya,

SmartSnippets Toolbox使用Flash_Programmer项目才能刻录SPI闪存。默认闪存程序员不支持Adesto 25xe011 SPI闪光灯。为了使用这种类型的内存,您应该修改Flash程序员并添加该SPI闪存的配置。您可以在SDK的以下路径中找到Flash程序员项目:

DA1458x_SDK\5.0.4\utilities\flash_programmer

构建Flash_Programmer项目时,您有两个选项,将其作为Programmer_jtag或Programmer_uart构建。在您的情况下,您应该将其作为programmer_jtag构建。修改和构建Flash程序员项目后,您应该从Out_JTAG文件夹中复制JTAG_Programmer.bin并粘贴smartsnippetsstudio \ toolbox \ common_resources路径中的粘贴(具有相同的名称),该路径位于工具的安装文件夹中。之后,您可以将固件下载到Adesto 25xe011 SPI Flash中

Thanks, PM_Dialog

anushiya
Offline
Last seen:6 months 2 weeks ago
Joined:2017-12-20 02:30
非常感谢你的

非常感谢您的建议。我从Out_JTAG文件夹中编译和复制了JTAG_Programmer.bin并将其粘贴在smartsnippetsstudio \ toolbox \ common_resources路径中作为jtag_programmer.bin以及jtag_programmer_585.bin,因为该文件夹最初有两个文件。但同样的错误即将到来。我已经附加了Flash_Programmer项目文件和一个单词文件,其中包含我所做的所有更改。

你能告诉我我所做的错误吗?

Attachment:
PM_Dialog
Offline
Last seen:1 day 9 hours ago
Staff
Joined:2018-02-08 11:03
Hi anushiya,

Hi anushiya,

I am not able to replicate your problem because we don’t have this type of SPI flash, so we can’t test your code. Please try to debug your code in order to find the cause of that error. I suggest you to build the flash_programmer project as programmer_uart ,run it in debug mode and then try to connect the SPI flash from SmartSpippets through UART. With that procedure you can find where your code hits.

Thanks, PM_Dialog

anushiya
Offline
Last seen:6 months 2 weeks ago
Joined:2017-12-20 02:30
Hi,

Hi,
I am not requesting you to debug the code in real time.
Since Dialog staff are experienced with the flash programmer code Dialog staff will know where exactly information is needed to be added in-order to add a different flash memory.
我只是希望你在视觉上检查我是否在所有相关地方添加了信息。顺便说一句,我们选择了AT25XE011的页面上AN-B-055 24 22指出,它支持的文件。

On the other hand, if you could send me a flash programmer template code with comments about what information to be included and mark it with a common marker (some thing like TODO with an example above the TODO line), then it will be easier for the user to identify all information to be included when they try to introduce a different flash memory.

Thank you

在我脑海中有些问题在于我所做的改变

in spi_flash.c I included
{AT25XE011_JEDEC_ID, AT25XE011_JEDEC_ID_MATCHING_BITMASK, AT25XE011_TOTAL_FLASH_SIZE, AT25XE011_PAGE_SIZE, AT25XE011_MEM_PROT_BITMASK, AT25XE011_MEM_PROT_NONE},
as the 7th item in the list
const SPI_FLASH_DEVICE_PARAMETERS_BY_JEDEC_ID_t SPI_FLASH_KNOWN_DEVICES_PARAMETERS_LIST[]

which created the need to change
1) The count to 7 from 6 in spi_flash.h
// Definitions for the various SPI Flash Devices
#define SPI_FLASH_DEVICES_SUPPORTED_COUNT (7) // AK: 7 before 6
2) And then include (Index starts from 0 in this list, So I had to use 6. But 6 and numbers after 6 is already used in SPI Flash device definitions. So I am confused here.
// AK. AT25XE011, AT25DF011
#define spi_flash_device_index_at25xe011 6 // ??
#define AT25XE011_JEDEC_ID 0x1F4200
#define AT25XE011_JEDEC_ID_MATCHING_BITMASK 0xFFFF00
#define at 25xe011_total_flash_size 0x20000
#define AT25XE011_PAGE_SIZE 0x100
#define AT25XE011_MEM_PROT_BITMASK 4
#define AT25XE011_MEM_PROT_NONE 0
#define AT25XE011_MEM_PROT_ENTIRE_MEMORY_PROTECTED 4

I also included the following lines in user_periph_setup.h
#define AT25XE011_MANF_DEV_ID (0x1F42) // AK: AT25XE011 Manufacturer and ID
#define AT25XE011_SIZE 131072 // AK: SPI Flash memory size in bytes
#define AT25XE011_PAGE 256 // AK: SPI Flash memory page size in bytes

Have I correctly included all configuration information in the right place in flash programmer project or Am I missing anything or Included wrong information?

PM_Dialog
Offline
Last seen:1 day 9 hours ago
Staff
Joined:2018-02-08 11:03
Hi anushiya,

Hi anushiya,

SDK中不支持AT25XE011,也不支持该文件,在表6中提到,从Adesto族AT25DF011,AT25DS011和不是AT25XE011(仅在表上提到的文件)中支持的所有存储器。7: Performance of the SPI memories supported I will try to find out why we mention that flash in the doc, since I don’t see the reference of that flash type in the flash programmer). Regarding the additions that you made in the code, you are correct (you didn't have to change the whatever you changed in the periph_setup.h file, but even if you did it doesn't matter since those defines are not used, the values from the spi_flash.h are used), regarding the index that you used, that depends on the place that you will assign the flash in the SPI_FLASH_KNOWN_DEVICES_PARAMETERS_LIST[], in your case this 6 as you have inserted. So if the flash that you are using has the same commands as the adesto already used in the programmer (check the spi_flash.h) WRITE_ENABLE, READ_DATA etc, and the connection are proper, you should be ok. If not you will to try to access the flash and debug the fw in order to see why you cannot interface with the flash. As far as I can tell from the datasheet of the flash that you mentioned I see that the commands used are identical, and the flash should work even without the mods adding a new flash, since the recon of the flash occurs via the JEDEC ID which are identical to the already existing Adesto of the flash programmer.

谢谢pm_dialog.

anushiya
Offline
Last seen:6 months 2 weeks ago
Joined:2017-12-20 02:30
As PM_dialog confirmed, the

当PM_DIALOG被确认时,闪存_programmer在编译Flash_Programmer时接受Flash_Programmer的AT25xe011配置更改,并且将out_jtag文件夹中的JTAG_Programmer.bin用SmartSnippetsStudio \ Toolbox \ Common_resources路径中的名称jtag_programmer_585.bin复制并粘贴它。

VCC和NCS具有适当的电压。但由于加速度计LIS2DH12TR(未通电),所面临的问题是使用AT25XE011共享SPI线SI,SI和SI的电压下降到1.5V以下,导致闪存不会反应命令。一旦从定制板中移除加速度计LIS2DH12TR,闪光灯就可以编程。

非常感谢你的help PM_Dialog.