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.
Then tried to run the DSPS (DA14580_DSPS_3.150.2___13_2_2015), got the application note (v1.3) from my distributor.
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: Device "DA14580" selected.
Set JLink Project File to "...\DA14580_DSPS_3.150.2\dk_apps\keil_projects\sps\sps_device_K5\JLinkSettings.ini"
* JLink Info: Device "DA14580" selected.
JLink info:
------------
DLL: V5.02f, compiled Oct 2 2015 20:51:34
Firmware: J-Link OB-SAM3U128 V1 compiled Aug 28 2015 19:26:23
Hardware: V1.00
S/N : 480055335
Error: Flash Download failed - Target DLL has been cancelled
闪存负荷在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] Connection to COM40 port has successfully opened.
[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, I modified nothing in the original source code, and da14580_config.h defines CFG_UART_HW_FLOW_CTRL. Should I change that?
谢谢。
PS:
SmartSnippets v3.9 32b
And Keil Info:
IDE-Version:
µVision V5.17.0.0
Copyright (C) 2015 ARM Ltd and ARM Germany GmbH. All rights reserved.
工具版号码:
Toolchain: MDK-Lite Version: 5.17
Toolchain路径:C:\ Keil \ ARM \ ARMCC \ BIN
C Compiler: Armcc.exe V5.06 update 1 (build 61)
Assembler: Armasm.exe V5.06 update 1 (build 61)
Linker/Locator: ArmLink.exe V5.06 update 1 (build 61)
Library Manager: ArmAr.exe V5.06 update 1 (build 61)
Hex Converter: FromElf.exe V5.06 update 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
对话框DLL:tarmcm1.dll v1.9.0.0
Hi Chui,
要通过JLink下载代码,您是否已配置目标选项 - >设置 - >调试 - >在JTAG选项中,此外,此外,请在使用外部工具进行闪存编程的实用程序中查看要选择的实用程序。无法将代码下载到DA的代码修改。最可能是UART连接。您可以尝试使用默认的UART跳线Donwload代码,以检查智能片段中的复位功能,也是Chek Choet Setup(PIN的配置)。
Thanks MT_dialog
Hi,
Yes it is in SW mode, and I can see the SN in the window. And External tool is selected, with blank values (this trick was not obvious and tough to find, I previously had the issue while trying to run the blink example)
Unmodified code loaded.
在“快速入门指南”中,RX / TX跳线将在P0_4,P0_5和波特率上至115K,但在SmartSnippet,P0_4,P0_5点到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
Good news, the reset button stops the flow
Definitively an UART issue, I believe. But where is my fault?
当跳线如DSPS应用笔记中指示时,我概述了SAM / DA链接的初始问题?
Thanks a lot.
Hi Chui,
I suppose that you mean if you remove the jumpers that connect the TMS and the TCK (the basic configuretion oin figure 14), those are the jlink's connections. The version of the basic kit in the picture is a bit outdated. Just place those two jumpers and you will be able to program your board. The data you see in the terminal is the bootloader of the da running, in 57k. The da follows a specific procedure when booting from different interfaces including uart in different pins with different baud rates. Since you want to donwload the DSPS just place the TMS and TCK pins connect through jlink and connect the ftdi as indicated in the app note.
Thanks MT_dialog
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
Hi,
我花了一些时间继续在装备上。
有some differences found between the pictures you sent and the instructions I followed.
In the driver setup, max clock was at 5MHz on my side instead of 2.
In the UART pinout, CTS (brown) was on P0_3 as indicated in the "DA14580 Serial Port Service reference application_v1 3" but your snapshot says P0_7
我相应地更改了配置,结果没有变化。
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.
Hi Chui,
无效的FTDI连接在附件我已发送,有效是应用笔记中的一个(在运行示例时使用IO修改的代码)。
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
Hi MT,
I didn't really want to debug it, I just wanted to know where it was stuck. When I undef CFG_EXT_SLEEP, the execution fails in a hardware fault due to the UART, apparently, and when I put it back (and don't debug) I still have no advertising.
There is surely something basic missing in my config or HW, but I carefully followed the (corrected) instructions, and made no progress.
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 - >是580
sps_device_581.uvproj -> is for the 581
If you open, compile and download the sps_device_581.uvproj into a 580 chip this will result to a Hardfault Handler and the otherway around of course.
Thanks MT_dialog
Hi,
我实际上是14580的工具。我在这里的差异是Doc就是我正在运行UV5,如我的第一个帖子所说的(V5.17,Windows 7)所说
Any way to have a direct call? It's been a month since I started now...
谢谢。
Hi Chui,
That sounds very weird, at least are you able to download and properly run any other example from the SDK and check if its advertising properly, the app_ble_barebone or the app_ble_peripheral from the new SDK. Can you please try that ?
Thanks MT_dialog
Tried ble_app_barebone in Keil_5, worked seamlessly, no modification of any sort, just compile and go (selected Dialog/DA14580 component); it advertised.
所以它在设置的某个地方。对于DSP来说,我必须在UV5中打开和港口原来的UV4 Projet,是它失败的地方吗?
Hi Chui,
我附上了一个。在我的基本套件上测试的DSP应用程序的.hex文件并用Keil5.14编译。请您可以使用智能代码段工具将文件下载到您的基本套件中,并告诉我您是否可以看到它广告。我还附上了目标选项 - >从keil4迁移到keil5时应该拥有的设备。
Thanks MT_dialog
Between ble_app_barebone and DSPS, scatterfiles are different, and ROM areas as well (attached). Should I change the ROM area, and what to? Once the startup radio button is selected, I can't unselect it.
Hi Chui,
DSPS项目应按原样运行,您不必在源代码或ROM配置中更改或更改任何内容。您可能想要更改的唯一方法是拒绝CFG_EXT_SLEEP,以便在您处于调试模式时执行代码,否则您必须退出调试模式以查看IT广告。请尝试运行.hex文件只是为了进行简单的测试。此外,您还可以上传您的.hex文件或项目,以在我的基本套件上测试它。您可以在\ da14580_dsps_3.150.2 \ dk_apps \ keil_projects \ sps \ sps_device \ out目录中找到您.hex文件。
Thanks MT_dialog
Hi,
Your .hex works, not mine.
Hi Chui,
In the file you have uploaded you haven't icluded your configuration files da14580_config.h, da14580_scatter_config.h, da14580_stack_config.h can you please upload those as well, i was able to complile and run the project with my configuration files. Also i was able to run the .hex you ve sent me, downloading it via UART, when downloading it via the JTAG you wont be able to see it advertising (it advertises only for a couple of seconds and then waits to detach the debugger - if you have your phone scanning while downloading the code you can pick up the first two seconds of advertising) because the debbuger stays attached to it since you have the CFG_EXT_SLEEP. In order to download firmware via uart you have to set the pins in the UART configuration (right next to the j4 header), open the smart snippets and select the UART (only) option, go to the booter and download th e.hex file. My project was able to run on your board because the sleep mode was undefined.
I have attached the files i ve used and your project as well, in order to test them you can place the folder as is under this directory DSPS\DA14580_DSPS_3.150.2___13_2_2015_keil5\DA14580_DSPS_3.150.2\dk_apps\keil_projects\sps compile and execute, i ve also included in the .zip file the produced sps_device.hex file from the project and your .hex file.
Thanks MT_dialog