连接到DA14585的外部闪存失败编程

⚠️
嗨,...感谢您来论坛。令人兴奋的消息!我们现在正在迁至我们的新论坛平台,将提供更好的功能,并包含在主对话框网站中。所有帖子和帐户都已迁移。我们现在只接受新论坛上的流量 - 请发布任何新线程https://www.dialog-seminile.com/support.。我们将在未来几天修复错误/优化搜索和标记。
7个帖子/ 0新
最后一篇
Anushiya.
离线
最后一次露面:6个月2周前
加入:2017-12-20 02:30
连接到DA14585的外部闪存失败编程

你好,
A custom board with DA14585 and flash memory AT25XE011 is connected to the development board DA14580-DEVKT-P_VC via JTAG connection.
使用SmartSnippet Studio V1.6.3.918 Kiel IDE我可以在调试模式下运行固件。

我正在尝试编写外部闪存,它正在抛出我们的错误。我已经附上了2个屏幕镜头。希望你能看到它们的问题。

1)我打开SmartSnippets工具箱,选择了JTAG序列号和芯片版DA14585_00

2)按CONNEC,该工具已成功配置SPI闪存端口和引脚

3)SPI_CLK:P0_0;SPI_EN:P0_3;spi_di:p0_5;SPI_DO:P0_6.
JTAG销连接是VBAT = 3.2V;GND;SW_CLK;和swdio

4)当我按“擦除”时,它会产生错误
[错误SPI Flash @ 18-05-08 13:14:00] SPI内存擦除失败。

5)当我试图刻录时,我得到:
[错误SPI Flash @ 18-05-08 13:15:10] JTAG地址0x81FEC(MSB第一)Addditional错误信息:FF FF FF F8
[错误SPI Flash @ 18-05-08 13:15:10]内存刻录失败。

谢谢您的帮助

设备:
设备编号:
DA14585和AT25XE011
PM_DIALOG.
离线
最后一次露面:1小时12分钟前
职员
加入:2018-02-08 11:03
嗨Anushiya,

嗨Anushiya,

The SmartSnippets toolbox uses the flash_programmer project in order to burn the SPI flash. The Adesto 25XE011 SPI Flash is not supported from the default flash programmer. In order to use this type of memory, you should modify the flash programmer and add the configurations of that SPI Flash. You can find the flash programmer project in the following path of the SDK:

da1458x_sdk \ 5.0.4 \ Utilities \ flash_programmer

When you build the flash_programmer project you have two options, to build it as programmer_jtag or as programmer_uart. In your case, you should build it as programmer_jtag. After modifying and building the flash programmer project, you should copy the jtag_programmer.bin from the Out_jtag folder and paste it (with the same name) in the SmartSnippetsStudio\Toolbox\common_resources path, which is located in the installation folder of the tool. After that, you could download firmware into the Adesto 25XE011 SPI Flash

谢谢,PM_DIALOG.

Anushiya.
离线
最后一次露面:6个月2周前
加入:2017-12-20 02:30
谢谢very much for your

谢谢very much for your advice. I did the changes, compiled and copied jtag_programmer.bin from the Out_jtag folder and paste it in the SmartSnippetsStudio\Toolbox\common_resources path as jtag_programmer.bin as well as jtag_programmer_585.bin as that folder had both files initially. But the same error is coming up. I have attached the flash_programmer project file and a word file with all the changes I made.

can you please let me know what mistake I am making please?

附件:
PM_DIALOG.
离线
最后一次露面:1小时12分钟前
职员
加入:2018-02-08 11:03
嗨Anushiya,

嗨Anushiya,

我无法复制您的问题,因为我们没有这种类型的SPI Flash,所以我们无法测试代码。请尝试调试代码才能找到该错误的原因。我建议您将Flash_Programmer项目构建为Programmer_uart,以调试模式运行它,然后尝试通过UART连接SmartSppets的SPI闪存。使用该过程,您可以找到代码命中的位置。

谢谢,PM_DIALOG.

Anushiya.
离线
最后一次露面:6个月2周前
加入:2017-12-20 02:30
你好,

你好,
我不要求您实时调试代码。
由于对话人员经验丰富的闪存程序员代码对话框人员将知道需要添加完全信息以便添加不同的闪存。
I just wanted you to visually check whether I have added information in all the relevant places. BTW, we chose AT25XE011 as the document AN-B-055 on page 22 of 24 stated that it is supported.

另一方面,如果您可以向我发送闪存程序员模板代码,那么评论要包含的信息并用常用标记标记它(与Todo Line上方的示例类似的东西),那么它将更容易用户试图引入不同的闪存时要识别要包括的所有信息。

谢谢

Some questions in my mind in-regard to the changes I made are

在spi_flash.c中包含
{at25xe011_jedec_id,at25xe011_jedec_id_matching_bitmask,at25xe011_total_flash_size,at25xe011_page_size,at 25xe011_mem_prot_bitmask,at25xe011_mem_prot_none},
作为列表中的第7项
const spi_flash_device_parameters_by_jedec_id_t spi_flash_known_devices_parameters_list []

它创造了需要改变
1)从SPI_FLASH.H中的6个计数到7
//各种SPI闪存设备的定义
#define spi_flash_devices_supported_count(7)// ak:7之前
2)然后包括(索引从此列表中的0开始,所以我必须使用6.但是在SPI闪存设备定义中已经使用了6个和数字。所以我在这里混淆了。
// ak。AT25XE011,AT25DF011
#define SPI_FLASH_DEVICE_INDEX_AT25XE011 6 //??
#define at25xe011_jedec_id 0x1f4200.
#define at 25xe011_jedec_id_matching_bitmask 0xffff00.
#define AT25XE011_TOTAL_FLASH_SIZE 0x20000
#define at25xe011_page_size 0x100.
#define at25xe011_mem_prot_bitmask 4.
#define在25xe011_mem_prot_none 0.
#define at25xe011_mem_prot_entire_memory_protected 4.

我还包括user_periph_setup.h中的以下行
#define at25xe011_manf_dev_id(0x1f42)// ak:aT25xe011制造商和ID
#define at25xe011_size 131072 // ak:spi闪存大小以字节为单位
#define at25xe011_page 256 // ak:spi闪存页面大小以字节为单位

我是否正确地将所有配置信息包含在Flash程序员项目中的正确位置,或者我错过了任何东西或包含错误的信息?

PM_DIALOG.
离线
最后一次露面:1小时12分钟前
职员
加入:2018-02-08 11:03
嗨Anushiya,

嗨Anushiya,

不支持flash AT25XE011 SDKand also the document, mentions in table 6 all the memories that are supported, from the adesto family the AT25DN011, AT25DF011, AT25DS011 and not the AT25XE011 (the document mentions only that type of flash on table 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.

Thanks PM_dialog

Anushiya.
离线
最后一次露面:6个月2周前
加入:2017-12-20 02:30
作为PM_DIALOG确认,

作为PM_DIALOG确认,AT25XE011 configuration change in flash_programmer is accepted by smart snippets toolbox when flash_programmer was compiled and the jtag_programmer.bin from the Out_jtag folder is copied and pasted it with the name jtag_programmer_585.bin in the SmartSnippetsStudio\Toolbox\common_resources path.

The VCC and nCS were having proper voltages. But the problem faced was, due to accelerometer LIS2DH12TR (which was NOT powered up) sharing the SPI lines SI, SO and SCK with AT25XE011, the voltage of SI and SCK were pulled down below 1.5V resulting in the flash memory not reacting to the commands. Once the accelerometer LIS2DH12TR is removed from the custom board, the flash was able to be programmed.

非常感谢您的帮助PM_DIALOG。