Programm SPI Flash: UART works, JTAG error ... address 81FE8

⚠️
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.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
10 posts / 0 new
Last post
gme_johannes
Offline
Last seen:2 weeks 4 days ago
加入:2017-12-22 10:09
Programm SPI Flash: UART works, JTAG error ... address 81FE8

Dear dialog support,

I have a custom board with Murara ZY module (DA14580), attached is an SPI flash Winbond W25X20.
I program the DA14580 directly, or the flash via UART through Smart Snippets v4.8.3.1804 . I use the IoT Kit programmer board [edit: the CIB].
两个板都通过J4的15cm平板电缆连接。

通过UART连接时,我可以连接,读取,擦除,刻录成功,固件将在启动时加载,我可以使用设备。

通过JTAG(SWD)连接时,连接似乎已成功建立:


[信息概述@ 18-08-12 21:01:50]无法衡量总IR LEN。TDO是恒定的。
[信息概述@ 18-08-12 21:01:50]无法衡量总IR LEN。TDO是恒定的。
[信息概述@ 18-08-12 21:01:50]找到了带有ID 0x0BB11477的SWD-DP
[INFO General @18-08-12 21:01:50] FPUnit: 4 code (BP) slots and 0 literal slots
[信息概述@ 18-08-12 21:01:50]找到了Cortex-M0 R0P0,Little Endian。
[INFO General @18-08-12 21:01:50] BTLE device selected.

加载SPI Flash固件也需要工作:


(信息SPI Flash @18-08-12 21:04:25] Found SWD-DP with ID 0x0BB11477
(信息SPI Flash @18-08-12 21:04:25] FPUnit: 4 code (BP) slots and 0 literal slots
(信息SPI Flash @18-08-12 21:04:25] Found Cortex-M0 r0p0, Little endian.
[信息SPI Flash @ 18-08-12 21:04:25]固件文件C:\ Program Files(x86)\ dialog \ smartsnippetsstudio \ toolbox \ common_resources \ jtag_progrogmer.bin已被选中以下载。
[信息SPI Flash @ 18-08-12 21:04:25]成功下载了固件文件到电路板。
[信息SPI Flash @ 18-08-12 21:04:25]成功配置了SPI闪存端口和引脚。

Reading does not work (nor does flash/erase)


[信息SPI Flash @ 18-08-14 22:22:06]开始从内存中读取32768个字节。
[错误SPI Flash @ 18-08-14 22:22:06]地址81FE8的读取内存失败。
(犯错OR SPI Flash @18-08-14 22:22:06] Failed reading memory.

这两种情况都是相同的(SPI Flash引脚配置,SPI闪存选项,SPI闪存大小(HEX,以字节为单位),请参阅附加的PDF。

你有什么想法出错了吗?

Best regards
Johannes

附件:
设备:
PM_Dialog
Offline
Last seen:3 days 6 hours ago
工作人员
加入:2018-02-08 11:03
Hi gme_johannes,

Hi gme_johannes,

I am not able to understand what you want to do. Do you want to program your custom board or the murata module through JTAG and using SmartSnippets tool? What do you mean with the “IoT Kit programmer board” ? Do you mean the Communication Interface Board (CIB)? Please, provide more specific information abaut the connection diagram in order to give you the proper answer.

Thanks, PM_Dialog

gme_johannes
Offline
Last seen:2 weeks 4 days ago
加入:2017-12-22 10:09
I have acquired the IoT

我已经收购了带有CIB的IOT传感器开发套件,是的。
使用此CIB,我尝试使用MurataZy和Const Winbond W25x20编写自定义板。

使用UART工作 - >可以编程内存,默塔拉ZY将从闪存中加载固件。
With SWD it does not work.
What confuses me is that SWD does seem to work and it does establish a connection to the module, yet programming the flash fails.
在上面看到的日志。

Which other information do you require?

gme_johannes
Offline
Last seen:2 weeks 4 days ago
加入:2017-12-22 10:09
是否有可能闪光

是否有可能闪光_programmer.bin (which is used for UART) supports the W25X20, whereas jtag_programmer.bin does not?
我应该修改和重建此固件吗?
编辑:我已经调查了da1458x_sdk \ 5.0.4 \ umerities \ flash_programmer和我(作为一个外包)看起来w25x20支持不区分UART / JTAG。
此外,GPIOS似乎被拉了,这很好,因为我有其他传感器共享SPI总线(无论如何它与UART工作好,所以我没想到这将是罪魁祸首)。

Also I see a possible relation to this thread:
https://support.dialog-semicondiondiondum/forums/post/dialog-smartbond-bl ...
Do you have the document available which is mentioned there? Can it be helpful?

PS: I realize I should have posted this in the "Tools" forum? Maybe you can move it.

gme_johannes
Offline
Last seen:2 weeks 4 days ago
加入:2017-12-22 10:09
我现在注意到了

我现在注意到了reading and programm the flash via SWD works fine, as long as the W25X20 is empty.

1. Flash被编程,闪光灯的设备靴,工作正常
2.使用SWD打开SS工具箱 - >表现如初始帖子中所述
3. Open SS Toolbox with UART -> delete flash
4.使用SWD打开SS Toolbox - >可以成功读取Flash(全部空= FF)[见下面的首页]
5.尝试编写Flash - >成功,但直接(自动)回读失败[下面的第二个日志]
6.成功的Flash编程确认,因为设备再次从闪光开始工作,工作正常

First log

[INFO General @18-08-19 11:01:22] Could not measure total IR len. TDO is constant high.
[INFO General @18-08-19 11:01:22] Could not measure total IR len. TDO is constant high.
[INFO General @18-08-19 11:01:22] Found SWD-DP with ID 0x0BB11477
[INFO General @18-08-19 11:01:22] FPUnit: 4 code (BP) slots and 0 literal slots
[信息概述@ 18-08-19 11:01:22]找到了Cortex-M0 R0P0,Little Endian。
[信息概述@ 18-08-19 11:01:22]选择了BLE设备。
(信息SPI Flash @18-08-19 11:03:16] Header records have been removed from hex file wrbl_sfl_580.hex.
[信息SPI Flash @ 18-08-19 11:03:16]从文件wrbl_sfl_580.hex读取30776字节。
(信息SPI Flash @18-08-19 11:03:18] Found SWD-DP with ID 0x0BB11477
[信息SPI Flash @ 18-08-19 11:03:18] FpUnit:4代码(BP)插槽和0个字幕插槽
[信息SPI Flash @ 18-08-19 11:03:18]找到了Cortex-M0 R0P0,Little Endian。
(信息SPI Flash @18-08-19 11:03:19] Firmware File C:\Program Files (x86)\Dialog\SmartSnippetsStudio\Toolbox\common_resources\jtag_programmer.bin has been selected for downloading.
(信息SPI Flash @18-08-19 11:03:19] Successfully downloaded firmware file to the board.
[信息SPI Flash @ 18-08-19 11:03:19]成功配置了SPI闪存端口和引脚。
[信息SPI Flash @ 18-08-19 11:03:33]从内存开始读取32768个字节。
[信息SPI Flash @ 18-08-19 11:03:34]阅读已完成。阅读32768字节。

Second log

(信息SPI Flash @18-08-19 11:05:01] Started burning memory with 31096 bytes of data at address 0x00000.
(信息SPI Flash @18-08-19 11:05:01] Memory burning completed successfully.
[信息SPI Flash @ 18-08-19 11:05:01]阅读内存以刷新内存内容....
[错误SPI Flash @ 18-08-19 11:05:01]地址81FE8的读取内存失败。
(犯错OR SPI Flash @18-08-19 11:05:01] Failed reading memory.

PM_Dialog
Offline
Last seen:3 days 6 hours ago
工作人员
加入:2018-02-08 11:03
Hi gme_johannes,

Hi gme_johannes,

In case that you want to connect and the read the SPI flash while it is empty, the most possible reason is because of your firmware disable the debugger. So, could you please check if your firmware disables the debugger? Also, when the flash in not empty, can you please press the reset button and then try to connect and read the SPI flash?

Thanks, PM_Dialog

gme_johannes
Offline
Last seen:2 weeks 4 days ago
加入:2017-12-22 10:09
嗨pm_dialog,

嗨pm_dialog,

如在日志中所示

[信息SPI Flash @ 18-08-12 21:04:25]固件文件C:\ Program Files(x86)\ dialog \ smartsnippetsstudio \ toolbox \ common_resources \ jtag_progrogmer.bin已被选中以下载。
[信息SPI Flash @ 18-08-12 21:04:25]成功下载了固件文件到电路板。
[信息SPI Flash @ 18-08-12 21:04:25]成功配置了SPI闪存端口和引脚。

the jtag_programmer.bin firmware is successfully loaded to the device. Hence, at this point, my firmware is not running anymore... (which I can also tell by the behavior of an LED).
Can it be that the device is not being fully reset in the process of loading jtag_programmer.bin (???) and that some registers in the DA14580 are still programmed as they were by my firmware (e.g. the disabled debugger)?

此外,在我对Suxcesspectused Simed Specture的时候,读取闪光灯的读数是多么读取闪存?
毕竟,由于设备未重置,新固件不会从Flash立即加载。

PM_Dialog
Offline
Last seen:3 days 6 hours ago
工作人员
加入:2018-02-08 11:03
Hi gme_johannes,

Hi gme_johannes,

在加载JTAG_Programmer.bin的过程中,该设备无法完全复位。您是否检查了固件是否禁用调试器?我试图重现你的问题,但我能够在没有空的情况下成功连接/读取SPI闪存。

Thanks, PM_Dialog

gme_johannes
Offline
Last seen:2 weeks 4 days ago
加入:2017-12-22 10:09
嗨pm_dialog,

嗨pm_dialog,

我不了解你的论点,因为你说自己:一旦jtag_programmer.bin成功加载(根据日志它是),那么设备完全重置 - 因此,设备中不会存在固件的剩余内容,无论我的固件如何,它都不重要。

Nevertheless let me answer your question:
固件不禁用调试器,但确实我已经为连接到关联端口的两个LED实现了此选项。
我确保不禁用调试器,也不使用关联的GPIO端口。我已经验证了它,因为我可以轻松地通过操作而无法操作。


#ifdef使用_jtag_as_gpio.
setbits16(sys_ctrl_reg,debugger_enable,0);
#别的
SetBits16(SYS_CTRL_REG, DEBUGGER_ENABLE, 1);
#万一


#ifdef使用_jtag_as_gpio.
#define LEDG_PORT GPIO_PORT_1
#define ledg_pin gpio_pin_5.
#define LEDB_PORT GPIO_PORT_1
#define LEDB_PIN GPIO_PIN_4
#万一

Still I can not read the flash when it is programmed.

PM_Dialog
Offline
Last seen:3 days 6 hours ago
工作人员
加入:2018-02-08 11:03
Hi gme_johannes,

Hi gme_johannes,

Please try to program the SPI flash through JTAG and when the procedure finished press the reset button from the CIB, and then try to connect and read the SPI flash. Could you please let me know if that is working? As I am able to see from you last post, you the debugger is not disable, but in fact that is a custom board, I am not able to replicate your issue.

Thanks, PM_Dialog