DA14681 development kit -basic, QSPI program issue

7个帖子/ 0新
Last post
Howardwong
Offline
Last seen:4年2个月前
Joined:2016-11-04 08:56
DA14681 development kit -basic, QSPI program issue

Dear Dialog,

I am studying DA14681 development kit -Basic with the following software & tools
——SmartSnippets某o v1.2.3.588
-- DA1468x_SDK_BTLE_v_1.0.6.968

我试图遵循UM-B-056的第6节,以构建外围演示应用程序和程序QSPI闪存(使用Program_Qspi_serial_win)。它在第一次成功(可以在重置后看到带有TERA术语的输出消息)。但是,如果我想编写其他演示代码或相同的外围设备演示应用程序,它似乎无法编程。它始终报告下面的错误,尝试上传引导加载程序/应用程序可执行文件时,您是否有任何想法?

"Could not connect to device.
Write executable failed: 2nd stage bootloader rejected (-105)"

thanks a lot!
HowardWong

The log message:
.......................................................................................................................
..
.. QSPI编程
..
.......................................................................................................................

Please enter your COM port number and press enter.
-> 137

COMPORT=COM137

D:\ workspace \ workspace_smartsnippets_studio \ da1468x_sdk_btle_v_1.0.6.968 \ umerities \ scripts \ qspi> call“.. \ .. \ .. \ binaries \ cli_progrogmer.exe”--prod-id da14681-01 - -enable-uart y- ram-shuffling 0 com137 write_qspi_exec d:\ workspace \ workspace_smartsnippets_studio \ da1468x_sdk_btle_v_1.0.6.968 \ projects \ dk_apps \ demos \ peripherals_demo \ da14681-01-refoy_qspi \ peripherals_demo.bin
cli_programmer 1.22
Copyright (c) 2016 Dialog Semiconductor

Using serial port COM137 at baud rate 57600.
使用Internal UartBoot.bin未指定引导加载程序文件

连接到设备......
Setting serial port baud rate to 57600.
Press RESET.
Uploading boot loader/application executable...
Could not connect to device.
Write executable failed: 2nd stage bootloader rejected (-105)

.......................................................................................................................
..
..FINISHED
..
.......................................................................................................................

设备:
MT_dialog
Offline
Last seen:1 month 1 day ago
Staff
Joined:2015-06-08 11:34
Hi howardwong,

Hi howardwong,

This is something that came up when using older revision chips or older SDKs, can you please have a look at the chip and report what is the indication on the package or try to download the a fresh copy of the SDK from the support site in case you are using an older one ? Also please make sure that the COM that you are using is the one that should be used, when the pro kit is attached use the COM port with the smaller number among the two ports that appear on the device manager. Additionally i can see the 137 in your com port assignment, can also try to clean up previous registered com ports, perhaps this is causing you some problems as well.

Thanks MT_dialog

Howardwong
Offline
Last seen:4年2个月前
Joined:2016-11-04 08:56
Dear Dialog,

Dear Dialog,

Thanks a lot for your quick response. I am testing with DA14681 Development Kit -Basic (please see the attached picture), the chip is "DA14681 0100 1627NCAA". The SDK I used is DA1468x_SDK_BTLE_v_1.0.6.968 which I just downloaded from the support site a few days ago. Is it OK?

I also tried to assign a smaller COM port for the Jlink CDC UART Port, but it still got the same issue.

thanks
Howard

the log message:
.......................................................................................................................
..
.. QSPI编程
..
.......................................................................................................................

Please enter your COM port number and press enter.
-> 28

comport = com28.

D:\ workspace \ workspace_smartsnippets_studio \ da1468x_sdk_btle_v_1.0.6.968 \ umerities \ scripts \ qspi> call“.. \ .. \ .. \ binaries \ cli_progrogmer.exe”--prod-id da14681-01 - -enable-uart y--ram-shuffling 0 COM28 write_qspi_exec D:\workspace\workspace_SmartSnippets_Studio\DA1468x_SDK_BTLE_v_1.0.6.968\projects\dk_apps\demos\peripherals_demo\DA14681-01-Release_QSPI\peripherals_demo.bin
cli_programmer 1.22
Copyright (c) 2016 Dialog Semiconductor

Using serial port COM28 at baud rate 57600.
使用Internal UartBoot.bin未指定引导加载程序文件

连接到设备......
Setting serial port baud rate to 57600.
Press RESET.
Uploading boot loader/application executable...
Write executable failed: 2nd stage bootloader rejected (-105)
Could not connect to device.

.......................................................................................................................
..
..FINISHED
..
.......................................................................................................................

Attachment:
MT_dialog
Offline
Last seen:1 month 1 day ago
Staff
Joined:2015-06-08 11:34
Hi howardwong,

Hi howardwong,

Since you have the basic kit of the 681 make sure that the jumpers on the J13 are placed at the proper position. If the problem still persists, try to have the reset button pressed and release it when the "Connecting to device...." indication pops up. Seems that the basic kit has this issue since i can replicate what you are experiencing. I will check with the team and let you know for any further guidance.

Thanks MT_dialog

Howardwong
Offline
Last seen:4年2个月前
Joined:2016-11-04 08:56
Dear Dialog,

Dear Dialog,

Thanks a lot for your reply. I checked that it can be programmed successfully sometimes if have the reset button pressed and release it when the "Connecting to device...." . However, it still fails most of times I tried (~90% NG).

thanks
Howardwong

MT_dialog
Offline
Last seen:1 month 1 day ago
Staff
Joined:2015-06-08 11:34
Hi howardwong,

Hi howardwong,

如上所述,我复制了你的问题,这是我们正在检查的东西,你也可以尝试以增加你的下载attemps的成功率(至少它在我身边工作)是试图通过UART下载第一个attemp失败后立即尝试。通过这样做,编程成功应该是大约50%(因为第二次尝试它下载没有错误的代码),或者您可以使用JTAG脚本来下载代码到基本套件。

Thanks MT_dialog

MT_dialog
Offline
Last seen:1 month 1 day ago
Staff
Joined:2015-06-08 11:34
Hi howardwong,

Hi howardwong,

Got some feedback from the hw team. Seems that this issue is caused because of the Segger chip only on the basic kit (since the pro kit uses an FTDI for the UART interface). The root cause of this is the Segger firmware, which doesn't initialize the UART pins at start up, and the initialization occurs when the first data is sent out. While initializing the port the driver will toggle once before sending data, and this is interpreted from the bootlaoder either as a framing error or as a break condition, causing it to hang. The second time you try to donwload fw the port is allready initialized and the booting works ok.

So there a couple of workarounds on this:

1)您可以将设备编程两次,一个将失败,另一个将成功。

2) You can add the following command "@echo a > COM%comprtnr%" at the scripts\qspi\program_qspi_serial.bat, please check bellow for the exact location that the line should be placed:

@echo.
= COM % comprtnr % @echo相称
@echo a > COM%comprtnr% <---additional command that should be placed
@echo on

Thanks MT_dialog