Hi,
my connection is unstable using JTAG with my custom board.
首先我可以检测到我的板,但是当我进入工具箱时,下载Booter固件,它出错了。
日志显示如下:
[INFO General @19-01-11 16:33:26] Found SWD-DP with ID 0x0BB11477
[信息概述@ 19-01-11 16:33:26]找到了Cortex-M0 R0P0,Little Endian。
[信息概述@ 19-01-11 16:33:26] FpUnit:4代码(BP)插槽和0个字幕插槽
[信息概述@ 19-01-11 16:33:26] Coresight组件:
[信息概述@ 19-01-11 16:33:26] romtbl 0 @ E00FF000
[INFO General @19-01-11 16:33:26] ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB008 SCS
[信息概述@ 19-01-11 16:33:26] Romtbl 0 [1]:FFF02000,CID:B105E00D,PID:000BB00A DWT
[INFO General @19-01-11 16:33:26] ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 000BB00B FPB
[信息普通@ 19-01-11 16:33:26]选择了BTLE设备。
[信息概述@ 19-01-11 16:33:34]找到了带ID 0x0BB11477的SWD-DP
[errow aligent @ 19-01-11 16:33:34]读取DP-Ctrl-Stat寄存器时DAP错误。
[INFO General @19-01-11 16:33:35] Could not measure total IR len. TDO is constant high.
[INFO General @19-01-11 16:33:35] Could not measure total IR len. TDO is constant high.
[INFO General @19-01-11 16:33:35] Could not measure total IR len. TDO is constant high.
[error aligent @ 19-01-11 16:33:35]无法读取内存地址0x50003200功能jlinkarm_readmemhw
[INFO General @19-01-11 16:33:35] Could not measure total IR len. TDO is constant high.
[ERROR General @19-01-11 16:33:35] Could not read memory address 0x50003201 with function JLINKARM_ReadMemHW
[INFO General @19-01-11 16:33:35] Could not measure total IR len. TDO is constant high.
[errow aligent @ 19-01-11 16:33:35]无法使用jlinkarm_readmemhw读取内存地址0x50003202
[INFO General @19-01-11 16:33:35] Could not measure total IR len. TDO is constant high.
[error aligent @ 19-01-11 16:33:35]无法读取内存地址0x50003200功能jlinkarm_readmemhw
[INFO General @19-01-11 16:33:35] Could not measure total IR len. TDO is constant high.
[error aligonal @ 19-01-11 16:33:35]无法阅读内存地址0x50003204功能jlinkarm_readmemhw
[INFO General @19-01-11 16:33:35] Could not measure total IR len. TDO is constant high.
[error alignal @ 19-01-11 16:33:35]无法阅读内存地址0x50003208功能jlinkarm_readmemhw
[INFO General @19-01-11 16:33:35] Could not measure total IR len. TDO is constant high.
[errow aligent @ 19-01-11 16:33:35]无法读取内存地址0x5000320c与功能jlinkarm_readmemhw
[INFO General @19-01-11 16:33:35] Could not measure total IR len. TDO is constant high.
[ERROR General @19-01-11 16:33:35] Could not read memory address 0x50040200 with function JLINKARM_ReadMem
[INFO General @19-01-11 16:33:35] Could not measure total IR len. TDO is constant high.
[error aligent @ 19-01-11 16:33:35]无法读取内存地址0x50040204与函数jlinkarm_readmem
[INFO General @19-01-11 16:33:35] Could not measure total IR len. TDO is constant high.
[ERROR General @19-01-11 16:33:35] Could not read memory address 0x50040208 with function JLINKARM_ReadMem
[INFO General @19-01-11 16:33:35] Could not measure total IR len. TDO is constant high.
[errow aligent @ 19-01-11 16:33:35]无法读取内存地址0x5004020c与函数jlinkarm_readmem
[error alional @ 19-01-11 16:33:35]在打开jlink连接时找不到已知的芯片。终止Proccess ...
[错误Booter @ 19-01-11 16:33:35]将固件文件下载到电路板上。
有什么问题?我的电缆或我的董事会?
Hi daniel59,
这是来自JLINK软件而不是来自智能片段的指示(当通过JTAG连接时,智能代码段使用JLink以访问设备)。您提到您有一个定制板,所以您是否在自定义PCB上有JTAG,或者您正在使用Pro或基本DK以便编程您的电路板?我强烈建议您检查您是否已正确配置SmartSnippet Toolbox的“电路板设置”选项卡中的SPI闪存引脚。可能在自定义PCB上的处理器和试图与设备通信的JLINK FW之间没有连接。这可能是从与PCB的问题联系起来,这使得580无法操作的PCB。我的建议是检查引导加载程序是否正在执行,以便验证580是否正常运行。您可以探测P04和P05引脚,并且应切换引导程序的一部分的引脚,因此在连接到终端时,您应该看到设备打印垃圾。此外,我建议您使用jlink本身连接电路板,而是使用智能片段,而且我也会尝试通过keil下载代码。
Thanks, PM_Dialog
嗨pm_dialog,
我想我正在使用一个自定义的JTAG设备,连接到我的自定义板。
I can use Keil go into the debug session, but when i run the code,using ble_app_barebone project, it go to code:
if ((GetWord16(SYS_STAT_REG) & DBG_IS_UP) == DBG_IS_UP)
__asm("BKPT #0\n");
I tested my 5 boards only 1 board can go through the code.
Is my boards quality bad?
Hi daniel59,
你能澄清你用自定义JTAG设备的意思吗?您使用的是哪个版本的J-Link?这意味着你得到了一个nmi。你能试着调试你的代码并尝试找到nmi的原因吗?您的申请代码卡在哪里?如果没有意识到如何找到NMI的原因,我会建议你看看Tutorial 8: Debugging methods_v1.1来自我们的支持门户。此外,很可能是错误的,因为您的PCB质量差。
Thanks, PM_Dialog
嗨,pm_dialog
呃......我的意思是自定义J-Link设备。这就像J-Link Edu Mini,但只有SWDIO,SWCLK,VCC和GND。
我正在使用jlink v5.12f,由smartsnippets studio v2.0.6推荐用于DA14580。
我看一个教程8,但我无法找到错误使用两种方法的位置。
I‘m thinking about my power supply. Commonly use J-link is directly connect swdio to pin 25, swclk to pin 26, vcc to pin 15 and gnd to pin 16, using QFN40 DA14580 .
but for my board, because i want to both charge battery and JTAG, I connect swdio to pin 25, swclk to pin 26, gnd to pin 16 but vcc to a battery management chip ltc4054 to charge li-ion battery, then connect battery to a 3.3v LDO, then connect 3.3v output from LDO to pin 15.
这会让事情错了吗?
i tried many times, sometime toolbox can find chip but shows CPU could not be halted, sometime toolbox cant find chip, sometime it directly shows Failed writing file D:\Desktop\empty_peripheral_template_580.hex at address 20000000.
Hi daniel59,
Be aware that we use H-Link Lite in our development boards and I am not completely sur if we have ever used J-Link EDU Mini. Could you please try to download firmware into the SysRAM using Keil in order to make sure that your custom board is working correctly? Only one of your boards has this problem or all of them?
Thanks, PM_Dialog
嗨,pm_dialog
使用keil将固件下载到Sysram进入调试会话吗?
只有我的一些董事会有这个问题......
sometime the log shows Could not start CPU core. (Error code: -1).
and some boards after I tried and tried it can be connected by SPI Flash programmer, but then next time failed. As the attachment log show.
我用的电缆长度将用J-Link连接我的电路板是否会影响连接?
Daniel
Hi daniel59,
您能否检查您是否正确配置了SmartSnippet的“Booter&Boars Setup”选项卡的SPI Flash PIN?“SPI Flash引脚配置”应根据您的电路板连接。您提到您能够连接到SPI闪光灯,因此在尝试读取或写入闪存时的过程失败时?电缆的长度可能是一个问题,因此尝试使用更短的电缆。关于Sysram,是的,我的意思是使用Keil下载固件。这是一点奇怪的行为,所以这可能是你的PCB上的硬件问题。你也提到只有一些板有这个问题,所以让我问你一些澄清。除了那些董事会,如果您有任何完全功能的板(连接,读取,写SPI闪光,可引导和启动广告,请告诉我,您可以让我知道吗?
Thanks, PM_Dialog
嗨,pm_dialog
使用keil,当我运行代码时,使用ble_app_barebone项目,它转到代码:
if ((GetWord16(SYS_STAT_REG) & DBG_IS_UP) == DBG_IS_UP)
__asm("BKPT #0\n");
我的意思是SPI Flash错误是,例如,这次我按下连接它显示成功,下次我按连接它显示失败。
是的,我有一个完全运行的板,它可以正确连接。所以我认为J-Link设备运行良好。
Daniel
Hi daniel59,
This means that somewhere your application code gets stuck either to NMI_HandlerC or to HardFault_HandlerC. Could you please clarify where if gets stuck? I have recommended you a tutorial for how you are able to find the reason of the NMI / HARDFAULT. Since you have functional boards and you run some code, I suppose that some of your boards have hardware issue.
Thanks, PM_Dialog
嗨pm_dialog,
是的,我尝试了Tutorial 8,2种方法都不工作。
Show callee just jump to the __asm("BKPT #0\n");
and the MSP method shows address 0xFFFF0000; which is MOVS r0,r0
也许是因为我的自定义J-Link设备?
and is there any method to detect whether bad chip or bad board?
Hi daniel59,
您是否检查了引导加载程序是否正在执行,以便验证580是否正常运行?您可以探测P04和P05引脚,并且应切换引导程序的一部分的引脚,因此在连接到终端时,您应该看到设备打印垃圾。
Thanks, PM_Dialog