Loading and running DSPS hex file

17个帖子/ 0新
最后一篇
Chui
离线
Last seen:1 year 9 months ago
加入:2015-12-08 16:57
Loading and running DSPS hex file

Hi all,

I just received a DA14580 basic demo kit, and have some issue activating the BT.

Successfully installed Keil v5, and ran the blinky test as described in the UM-B-048 Getting started document.
然后尝试运行DSP(DA14580_DSPS_3.150.2 ___13_2_2015),从我的经销商那里得到了应用说明(v1.3)。

Then came the troubles, when I tried to follow the steps in §8.4:

Compiled the sps_device project: OK (0 Error(s), 3 Warning(s))
Connected a FTDI RS232 cable, plus the regular USB cable as instructed in §8.1
When starting the debugging session, a "No Cortex-M SW Device Found" popped up
And the log:
Load "...\\DA14580_DSPS_3.150.2\\dk_apps\\keil_projects\\sps\\sps_device_K5\\Objects\\sps_device.axf"
* JLINK INFO:设备“DA14580”选择。
Set JLink Project File to "...\DA14580_DSPS_3.150.2\dk_apps\keil_projects\sps\sps_device_K5\JLinkSettings.ini"
* JLINK INFO:设备“DA14580”选择。

jlink信息:
-------------
DLL: V5.02f, compiled Oct 2 2015 20:51:34
固件:J-Link Ob-Sam3u128 V1编译2015年8月28日19:26:23
硬件:v1.00
S / N:480055335

错误:Flash下载失败 - 目标DLL已被取消
Flash Load finished at 10:39:47

Question: There is something I don't undestand:
If I change the jumper as in fig14, there is no connection any more between the SAM and the DA, so how do I get the hex file downloaded through the serial link and not the JLink? Or maybe I miss something?

So I also tried with SmartSnippets:
This time the COM port opened is the serial link, but the reset button has no effect!!

[INFO @15-12-09 10:50:41] Read 19480 bytes from file ...\DA14580_DSPS_3.150.2\dk_apps\keil_projects\sps\sps_device_K5\Objects\sps_device.hex.
[INFO @ 15-12-09 10:50:41]与COM40端口的连接已成功打开。
[INFO @15-12-09 10:50:41] Started download procedure...
[ACTION @15-12-09 10:50:42] Please press the hardware reset button on the board to start the download process.
[ERROR @15-12-09 10:50:57] Timeout: Reset signal not detected for more than 16000 msecs.
[INFO @15-12-09 10:50:57] Successfully disconnected from port COM40.
[INFO @15-12-09 10:50:57] Failed downloading firmware file to the board.

What's next? I went through several forum threads, found several customers able to connect, and some not, but can't figure out the right/bad conditions.
BTW,我在原始源代码中修改了任何内容,da14580_config.h定义cfg_uart_hw_flow_ctrl。我应该改变吗?

Thanks.

PS:
SmartSnippets v3.9 32b
和keil信息:
IDE-Version:
μVisionv5.17.0.0
版权所有(c)2015 ARM LTD和ARM Germany GmbH。版权所有。

Tool Version Numbers:
Toolchain: MDK-Lite Version: 5.17
Toolchain Path: C:\Keil\ARM\ARMCC\Bin
C编译器:ARMCC.EXE V5.06更新1(Build 61)
汇编程序:ARMAMAM.EXE V5.06更新1(Build 61)
链接器/定位器:armlink.exe v5.06更新1(Build 61)
Library Manager: ArmAr.exe V5.06 update 1 (build 61)
十六进制转换器:Fromelf.exe v5.06更新1(Build 61)
CPU DLL: SARMCM3.DLL V5.17
Dialog DLL: DARMCM1.DLL V1.12.0.0
Target DLL: Segger\JL2CM3.dll V2.99.16.0
Dialog DLL: TARMCM1.DLL V1.9.0.0

Keywords:
Device:
MT_dialog
离线
Last seen:1 month 1 week ago
职员
加入:2015-06-08 11:34
Hi Chui,

Hi Chui,

For downloading your code through the jlink have you configured your target option -> Settings -> Debug -> to be in the SW and not in the JTAG option, additionally check in the Utilities that the use external tool for Flash programming to be selected. There is no need for code modifications to download code to your da. Most probably is the UART connections. Can you please try to donwload code with the default UART jumpers in order to check the reset functionallity and also chek the board setup (the configuration of the pins) in smart snippets.

Thanks MT_dialog

Chui
离线
Last seen:1 year 9 months ago
加入:2015-12-08 16:57
你好,

你好,

是的,它处于SW模式,我可以在窗口中看到SN。选择外部工具,具有空白值(此技巧并不明显,很难找到,我以前在尝试运行眨眼之后的问题时出现了问题)
加载未修改的代码。
In the quick start guide, Rx/Tx jumpers are to be on P0_4, P0_5 and Baud rate to 115k, but in smartsnippets, P0_4, P0_5 point to 57k.
Both in 115k and 57k I get spurious flow (see attachment), but in a external serial terminal I have series of "[00][00][00][00][00][00][02]" in 115k

好消息,重置按钮停止流量
我相信,绝对是一个UART问题。但我的错在哪里?
And what about my initial question of SAM/DA link when the jumpers are as indicated in the DSPS application note?

非常感谢。

附件:
MT_dialog
离线
Last seen:1 month 1 week ago
职员
加入:2015-06-08 11:34
Hi Chui,

Hi Chui,

我想你的意思是删除连接TMS和TCK的跳线(基本配置OIN图14),那些是JLink的连接。图片中的基本套件的版本有点过时。只是放置那两个跳线,你将能够编制你的董事会。您在终端中看到的数据是DA运行的引导程序,在57K中。当从不同的接口引导时,DA遵循特定过程,包括具有不同波特率的不同引脚中的UART。由于您想要Donvload DSP只是将TMS和TCK引脚放入JLINK连接并按照应用笔记中所示连接FTDI。

Thanks MT_dialog

MT_dialog
离线
Last seen:1 month 1 week ago
职员
加入:2015-06-08 11:34
Hi Chui,

Hi Chui,

I ve attached a picture of a basic dev kit and the correct configuration in using the DSPS project.

The lines and colouring of the FTDI cable are the ones described in the DSPS application note. Try to download the project using keil. In the debug tab -> settings, in the project options (if the basic kit is properly recognized by keil) you should see this (attached picture). In case you dont get SW Device IDCODE and Name please press the reset button on your dev kit and try again. After that you must be able to download the software in your dev kit.

Thanks MT_dialog

附件:
Chui
离线
Last seen:1 year 9 months ago
加入:2015-12-08 16:57
你好,

你好,
我花了一些时间继续在套件上。
您发送的图片之间存在一些差异,并且我跟随的指令。
In the driver setup, max clock was at 5MHz on my side instead of 2.
在UART引脚排出中,CTS(棕色)在P0_3上,如“DA14580串行端口服务参考Application_v1 3”所示,但您的快照说P0_7

I changed the config accordingly, no change in the result.
Note that since I put TMS TCK back again, I was able to launch and debug step by step the soft. Actually it looks like it is cycling in the startup phase, and not advertising.

附件:
MT_dialog
离线
Last seen:1 month 1 week ago
职员
加入:2015-06-08 11:34
Hi Chui,

Hi Chui,

The invalid FTDI connection is in the attachement i have sent, the valid is the one in the application note (i ve used a IO modified code when running the example and taking the pictures).

I guess that where the software stucks is in the while(), in the attachment, and awaits until the debugger is disabled.

Since you have your TMS and TCK back and you are able to download code in the da in order to see the device advertising you have to exit the debug mode while being in to sleep mode. If you want to debug while operating you have to disable the sleep mode, You can do that by going to the da14580_config.h and #undef CFG_EXT_SLEEP.

Thanks MT_dialog

Chui
离线
Last seen:1 year 9 months ago
加入:2015-12-08 16:57
Hi MT,

Hi MT,
我真的不想调试它,我只是想知道它在哪里被困。当我undef cfg_ext_sleep时,由于UART,显然,当我放回来时,执行失败了,并且当我退缩时(并且不调试)我仍然没有广告。
There is surely something basic missing in my config or HW, but I carefully followed the (corrected) instructions, and made no progress.

MT_dialog
离线
Last seen:1 month 1 week ago
职员
加入:2015-06-08 11:34
Hi Chui,

Hi Chui,

Even if there aren't any UART connections you should be able to donwload code in your basic kit and run and just advertise properly the DSPS project. Now the only reason that i can think of that results in Hardfault Handler is not selecting the proper project for your chip. In the DSPS application in each folder (device/host) there are two .uvproj files, one for a different chip.

sps_device.uvproj -> is for the 580

sps_device_581.uvproj -> is for the 581

如果您打开,编译并下载SPS_DEVICE_581.UVPROJ进入580芯片,这将导致硬盘处理程序和当然是另一个芯片。

Thanks MT_dialog

Chui
离线
Last seen:1 year 9 months ago
加入:2015-12-08 16:57
你好,

你好,
其实我14580的工具。我有h的区别ere wrt the doc is that I'm running UV5, as said in my first post (v5.17, windows 7)
有直接电话的任何方式?自我开始以来已经是一个月......
Thanks.

MT_dialog
离线
Last seen:1 month 1 week ago
职员
加入:2015-06-08 11:34
Hi Chui,

Hi Chui,

这听起来非常奇怪,至少你能从SDK下载并正确运行任何其他示例,并检查它是否正确,App_ble_Barebone或来自新SDK的App_ble_Peripheral。你能试试吗?

Thanks MT_dialog

Chui
离线
Last seen:1 year 9 months ago
加入:2015-12-08 16:57
尝试了BLE_APP_BAREBONE.

尝试在keil_5中的BLE_APP_BAREBONE,无缝工作,无任何类的修改,只需编译和转到(选定的对话框/ DA14580组件);它宣传了。
So it is somewhere in the settings. For the DSPS, I had to open and port in UV5 the original UV4 projet, is that where it failed?

MT_dialog
离线
Last seen:1 month 1 week ago
职员
加入:2015-06-08 11:34
Hi Chui,

Hi Chui,

I 've attached a .hex file of the DSPS application tested on my basic kit and compiled with keil5.14. can you please use the smart snippets tool to download the file into your basic kit and let me know if you can see it advertising. I have also attached the target option -> Device that you should have when migrating from keil4 to keil5.

Thanks MT_dialog

附件:
Chui
离线
Last seen:1 year 9 months ago
加入:2015-12-08 16:57
Between ble_app_barebone and

BLE_APP_BAREBONE和DSP之间,散射文件不同,也是ROM区域(附加)。我应该改变rom区域吗?选择启动单选按钮后,我无法取消选择。

附件:
MT_dialog
离线
Last seen:1 month 1 week ago
职员
加入:2015-06-08 11:34
Hi Chui,

Hi Chui,

The DSPS project should run as is, you dont have to change or alter anything in the source code or in the ROM configuration. The only thing that you might want to change is to undefine the CFG_EXT_SLEEP in order for the code to execute while you are in debug mode otherwise you will have to exit the debug mode in order to see it advertising. Please try to run the .hex file just to make a simple test. Also can you please upload either your .hex file or your project to test it on my basic kit. You can find you .hex file in the \DA14580_DSPS_3.150.2\dk_apps\keil_projects\sps\sps_device\out directory.

Thanks MT_dialog

Chui
离线
Last seen:1 year 9 months ago
加入:2015-12-08 16:57
你好,

你好,
Your .hex works, not mine.

附件:
MT_dialog
离线
Last seen:1 month 1 week ago
职员
加入:2015-06-08 11:34
Hi Chui,

Hi Chui,

在您上传的文件中,您没有icluded您的配置文件da14580_config.h,da14580_scatter_config.h,da14580_stack_config.h,您也可以上传那些,我能够用我的配置文件编译和运行项目。我也能够跑掉我发给我,通过UART下载它,在通过JTAG下载时,你不会看到它的广告(它只广告几秒钟,然后等待分离调试器 -如果您在下载代码时有手机扫描,您可以拿起广告的前两秒钟),因为您有CFG_EXT_SLEEP以来陷入困境才能连接到它。为了通过UART下载固件,您必须在UART配置中设置引脚(右侧J4标题旁边),打开智能片段并选择UART(仅限)选项,转到Booter并下载TH E.HEX文件。我的项目能够在您的董事会上运行,因为睡眠模式未定义。

我已经附上了我使用的文件和项目,为了测试它们,您可以将文件夹放在此目录下的dsps \ da14580_dsps_3.150.2 ___ 13_2_2015_keil5 \ da14580_dsps_3.150.2 \ dk_apps \ keil_projects \ sps编译和执行,iVE也包含在.zip文件中生成的sps_device.hex文件从项目和.hex文件中。

Thanks MT_dialog