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

⚠️
嗨,那里..感谢您参加论坛。激动人心的消息!现在,我们正在转到我们的新论坛平台,该平台将提供更好的功能,并包含在主话网站中。所有帖子和帐户都已迁移。我们现在仅在新论坛上接受流量 - 请在https://www.dialog-spoomendonductor.com/support。我们将在未来几天修复错误 /优化搜索和标记。
7帖子 / 0新
最后一篇文章
Anushiya
离线
最后一次露面:10个月5天前
加入:2017-12-20 02:30
连接到DA14585的外部闪存失败编程

你好,
具有DA14585和闪存AT25XE011的自定义板通过JTAG连接连接到开发板DA14580-DEVKT-P_VC。
使用Smartsnippet Studio v1.6.3.918 Kiel IDE I可以在调试模式下运行固件。

我正在尝试编程外部闪存,这引发了我们的错误。我已经连接了2张屏幕截图。希望您能看到他们的问题。

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

2)按Connect,该工具成功配置了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 first):ff ff ff ff ff ff f8
[错误SPI Flash @18-05-08 13:15:10]内存燃烧失败。

谢谢您的帮助

设备:
设备编号:
DA14585和AT25XE011
pm_dialog
离线
最后一次露面:2天18小时前
职员
加入:2018-02-08 11:03
嗨,阿努希亚(Anushiya),

嗨,阿努希亚(Anushiya),

SmartSnippets工具箱使用Flash_programmer项目来燃烧SPI闪存。默认闪存程序员不支持ADESTO 25XE011 SPI闪存。为了使用此类型的内存,您应该修改Flash程序员并添加SPI Flash的配置。您可以在SDK的以下路径中找到Flash程序员项目:

DA1458X_SDK \ 5.0.4 \ UTILITION \ flash_programmer

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

谢谢,pm_dialog

Anushiya
离线
最后一次露面:10个月5天前
加入:2017-12-20 02:30
非常感谢您的

非常感谢您的建议。我进行了更改,从out_jtag文件夹中编译并复制了JTAG_PROGRAGIN.BIN,然后将其粘贴到SmartSnippetSStudio \ toolbox \ common_Resources作为JTAG_PROGRAMER.BIN的path以及JTAG_PROGRAGMER_585.BIN,因为该文件夹都在两个文件中都始于两个文件。但是出现同样的错误。我已经附上了Flash_programmer项目文件和一个Word文件,其中包括我所做的所有更改。

您能让我知道我犯了什么错误?

附件:
pm_dialog
离线
最后一次露面:2天18小时前
职员
加入:2018-02-08 11:03
嗨,阿努希亚(Anushiya),

嗨,阿努希亚(Anushiya),

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

谢谢,pm_dialog

Anushiya
离线
最后一次露面:10个月5天前
加入:2017-12-20 02:30
你好,

你好,
我不要求您实时调试代码。
由于对话框的工作人员经历了Flash程序员代码对话框的经验,因此人员将知道需要在哪里添加订单以添加不同的闪存。
我只是想让您视觉检查我是否在所有相关位置中添加了信息。顺便说一句,我们选择了AT25XE011作为第24页的文档AN-B-055,指的是支持它。

另一方面,如果您可以向我发送Flash程序员模板代码,并带有有关包含哪些信息的注释,并使用一个共同的标记(例如TODO之类的示例上方的示例)标记,那么它将更加容易用户在尝试引入不同的闪存时确定要包含的所有信息。

谢谢

在我看来,我所做的更改的问题是

在spi_flash.c中我包括
{at25XE011_JEDEC_ID,AT25XE011_JEDEC_ID_MATCHING_BITMASK,AT25XE011_TOTAL_FLASH_SIZE,AT25XE011_PAGE_SIZE,AT25XE011_MEM_MEM_PROT_BITOT_BITMASK,AT25XE_BITMMASK,AT25XE011_MEMEM_MEMEM_NONEONENOONE,}
作为列表中的第七项
const spi_flash_device_parameters_by_jedec_id_t_t spi_flash_nown_known_devices_devices_parameters_list []

这创造了改变的需求
1)从spi_flash.h中的6起为7
//各种SPI闪存设备的定义
#define spi_flash_devices_supported_count(7)// ak:7之前6
2)然后包括(索引从此列表中的0开始,所以我必须使用6。但是6和6之后的数字已经在SPI闪存设备定义中使用。因此,我在这里感到困惑。
// AK。AT25XE011,AT25DF011
#define spi_flash_device_index_at25xe011 6 // ??
#Define AT25XE011_JEDEC_ID 0x1F4200
#define at25xe011_jedec_id_matching_bitmask 0xffff00
#define at25xe011_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_PROTETED 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 Programmer项目的正确位置包含在正确的位置,或者我缺少任何内容或包含错误的信息?

pm_dialog
离线
最后一次露面:2天18小时前
职员
加入:2018-02-08 11:03
嗨,阿努希亚(Anushiya),

嗨,阿努希亚(Anushiya),

SDK不支持Flash AT25XE011,也不支持文档,在表6中提到了所有支持的记忆,Adesto家族AT25DN011,AT25DF011,AT25DS011,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
离线
最后一次露面:10个月5天前
加入:2017-12-20 02:30
正如pm_dialog确认的那样,

As PM_dialog confirmed, the 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.

VCC和NCS具有适当的电压。但是,由于加速度计lis2dh12tr(没有电源),问题所面临命令。一旦加速度计Lis2DH12TR从自定义板中删除,就可以对闪光灯进行编程。

非常感谢您的帮助PM_Dialog。