⚠️
嗨,...感谢您来论坛。令人兴奋的消息!我们现在正在迁至我们的新论坛平台,将提供更好的功能,并包含在主对话框网站中。所有帖子和帐户都已迁移。我们现在只接受新论坛上的流量 - 请发布任何新线程//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
14个帖子/ 0新
Last post
rahult
离线
Last seen:3 years 6 months ago
加入:2017-07-14 13:22
Using BT HCI over UART for DA14585

你好,

我们想知道如何通过DA14585的UART模式启用BT HCI。是否有任何需要完成的设置?我们要将BT HCI命令直接发送给UART到BLE控制器并返回响应。我们希望使用另一个蓝牙堆栈并直接与芯片通信。

谢谢,
拉胡湖

Keywords:
Device:
MT_dialog
离线
Last seen:2 months 2 weeks ago
工作人员
加入:2015-06-08 11:34
Hi rahult,

Hi rahult,

为了使585在HCI模式下运行,您必须下载相应的FW,您将能够在以下目录DA14585_SDK \ 6.0.4.326 \ Projects \ target_apps \ hci中找到sdk 6.0.4中的fw。然后,您必须提供与相应引脚的Rx / Tx / RTS / CTS连接(这取决于您使用的设备),您将能够将UART HCI命令直接发送到585并返回适当的响应。

Thanks MT_dialog

硝W
离线
Last seen:2年10个月前
加入:2017-08-30 09:49
Hi MT_dialog,

Hi MT_dialog,

尝试构建'da14585_sdk \ 6.0.4.326 \ projects \ target_apps \ hci'项目,并使用选定的目标hci_585在调试模式下执行,但看到硬盘。试图找出这个问题,但不能root原因导致它。请做
Details:
1. DA14585_SDK -6.0.4.326
2.DA14585 Dev Kit Pro
3. J5 configured for UART, J10 is enabled, J3 is open.
4. SDK config files needed no changes post downloading the sdk.

调试细节:
崩溃在:memcpy(hci_cmd_desc_root_tab,rom_hci_cmd_desc_root_tab,48);在Arch_rom.c.中
R14(LR): 0xFFFFFFF9,
MSP: 0x07FC35F8 - whose PC: 0x07F1E0AC

请告诉我们使用DA14585作为BT HCI UART模式所需的任何配置。

谢谢,

MHv_Dialog
离线
Last seen:2个月1周前
工作人员
加入:2013-12-06 15:10
Hi Nitish,

Hi Nitish,

I just repeated your steps and have no issues as long as I am using mass production version of the DA14585. Trying to repeat with revision AB silicon, I am getting the exact same hardfault.

If the letters AB are part of the revision number marking on the SoC (underneath the chip identifier DA14585), you have early hardware that must be replaced. Please contact your local sales rep for details on how to arrange replacement. The revision number on MP hardware is all zeroes.

/MHv

硝W
离线
Last seen:2年10个月前
加入:2017-08-30 09:49
你好MHV,

你好MHV,

Attaching the images of the DA14585, and the revision number that we see is as below. Don't think its AB silicon. Kindly let us know what else we can do to get this working.
Would appreciate if you could help us out asap.
DA14585-01ATDB-P (1711_00015).

谢谢,

MHv_Dialog
离线
Last seen:2个月1周前
工作人员
加入:2013-12-06 15:10
Thanks for providing the

Thanks for providing the pictures. Your daughter card appears to be an early engineering sample. Please ask your Dialog distributor or representative for a board replacement.

/MHv

硝W
离线
Last seen:2年10个月前
加入:2017-08-30 09:49
Thanks MHv,

Thanks MHv,
We procured the new silicon, and now we don't see the hard fault. But see some other issue.

1. Built the project DA14585_SDK\6.0.4.326\projects\target_apps\hci for 585, started the debug session and started executing the code(F5). I now think that firmware is downloaded to SRAM (through UART1 P0_4utx, P0_5urx, P0_6ucts, P0_7urts ) and started executing. Now stopped the debug session(which was using the uart1).
2.但现在我们认为UART1将用于the BT HCI interfacing (BT host and Dialog585 BT controller ). So, removed the jumpers in J5, connecting the UART P0_4-P0_7 with USB comm pins. And interfaced the UART P0_4-P0_7 with the controller running the BT host via UART interface. And see there is no proper communication happening.
3.当我监视独立对话框585 P0_4和P0_5引脚下载并运行HCI固件,通过PicoSce,请参阅一些随机意外的信号(附加图像)。
Note:
1. BT host set up runs fine with the other BT controllers over UART hci interface.
2.Both the Host and Dialog uart settings are fine. configured 115K2 baud, No parity, and tried with both enabling and disabling the HW flow control.

Kindly let us know if any other settings/uart configuration to be used to make it work.

谢谢,

MH_Dialog (not verified)
Hi Nitish,

Hi Nitish,

I believe that the procedure to remove the jumper and connect to BT host can trigger the DA14585 a reset. Can you try to connect the UART with BT host in the beginning andrepeat step 1? JTAG (SWDIO and SWCLK) is used to download the code into SRAM, but UART in Keil.

硝W
离线
Last seen:2年10个月前
加入:2017-08-30 09:49
谢谢mh_dialog,

谢谢mh_dialog,

我尝试了以下步骤,但请参阅DA14585的P0_5 [URX]引脚或其他UART引脚(P0_4,P0_6或P0_7)没有响应/活动。

Steps:
1.使用Keil为585构建项目DA14585_SDK \ 6.0.4.326 \ Projects \ Target_Apps \ HCI。
2.Now using SmartSnippets Toolbox with Jtag configuration for Da14585 option selected, opened the device and selected the 'Booter' tool.
- Used the DA14585\DA14585_SDK\6.0.4.326\projects\target_apps\hci\hci\Keil_5\out_585\hci_585.hex binary that is generated using keil.
- 根据它的选择保留。sysctrlreg = 0xa6 585
- Tried using both enabling and disabling 'close debug session'.
3.下载FW的发布成功。Now don't see the random signals in UART port P0_4-P0_7 but neither do i see any response(monitoring the P0_4 uTx through Picoscope) for the HCI reset command that is sent from the host.

Kindly suggest.

谢谢,

Booter日志:
[信息常规@ 17-09-14 17:30:26]固件文件c:\ diasemi \ smartsnippetsstudio \ toolbox \ common_resources \ jtag_programmer_585.bin已被选中以下载。
[INFO General @17-09-14 17:37:41] Could not measure total IR len. TDO is constant high.
[INFO General @17-09-14 17:37:41] Could not measure total IR len. TDO is constant high.
[INFO General @17-09-14 17:37:41] Found SWD-DP with ID 0x0BB11477
[INFO General @17-09-14 17:37:41] FPUnit: 4 code (BP) slots and 0 literal slots
[信息概述@ 17-09-14 17:37:41]找到了Cortex-M0 R0P0,Little Endian。
[INFO General @17-09-14 17:37:41] BTLE device selected.
[INFO Booter @17-09-14 18:48:27] Found SWD-DP with ID 0x0BB11477
[INFO Booter @17-09-14 18:48:27] FPUnit: 4 code (BP) slots and 0 literal slots
[信息Booter @ 17-09-14 18:48:27]找到了Cortex-M0 R0P0,Little Endian。
[info booter @ 17-09-14 18:48:28]成功地将固件文件下载到电路板上。

MH_Dialog (not verified)
Hi Nitish,

Hi Nitish,

There are few possible reasons that no reponse from DA14585.

1.电路板上有XTAL 32K吗?如果没有,请将CFG_LP_CLK定义为LP_CLK_RCX20,因为LP_CLK用于唤醒芯片。

2.if you have XTAL 32K, then please disable the sleep mode to see if there is any response. Change app_default_sleep_mode = ARCH_SLEEP_OFF;

3. if step 2 works, please restore the sleep mode and define CFG_EXTERNAL_WAKEUP

Please let me know if these recommendations fix the problems

硝W
离线
Last seen:2年10个月前
加入:2017-08-30 09:49
谢谢mh_dialog,

谢谢mh_dialog,
By disabling the sleep mode, UART communication works fine. Please find inline comments.

1.电路板上有XTAL 32K吗?如果没有,请将CFG_LP_CLK定义为LP_CLK_RCX20,因为LP_CLK用于唤醒芯片。
- [Nitish] As per the DA14580 Dev kit Pro document, this dev board has support for XTAL32K. I verified it by putting breakpoint to check the LP clock is set to XTAL32K.

In file: arch_system.c, init_pwr_and_clk_ble()
SetBits16(SYS_CTRL_REG, CLK32_SOURCE, 1); // Select XTAL32K as LP clock

2.if you have XTAL 32K, then please disable the sleep mode to see if there is any response. Change app_default_sleep_mode = ARCH_SLEEP_OFF;
- [Nitish] Yes, now Da585 is responding to Host BT Hci commands.

3. if step 2 works, please restore the sleep mode and define CFG_EXTERNAL_WAKEUP
- [nitish]现在即使在睡眠模式下,它通过启用外部唤醒而工作正常。但看到以下观察或绩效问题。
With app_default_sleep_mode = ARCH_SLEEP_OFF; BT init happens within a second.
使用app_default_sleep_mode = arch_sleep_on && cfg_external_wakeup启用,请参阅bt init需要4-5秒。不确定为什么DA585正在花这么多时间来回应。
Kindly let us know, if anything could be done to resolve this performance issue with DA585 could be resolved.

Regards,
nitish。

MT_dialog
离线
Last seen:2 months 2 weeks ago
工作人员
加入:2015-06-08 11:34
Hi Nitish W,

Hi Nitish W,

我测试了HCI FW(取决于您对流量控制的配置,没有流量控制/有流量控制),只要我可以告诉您不需要定义CFG_EXTERNAL_WAKEUP,除非您使用额外的PIN唤醒设备。检查HW_Config是否设置为使用PRO DK,而不是并确保您发出的终端发出HCI命令具有启用RTS / CTS流量控制。使用Pro套件在我的身边测试,对获取BD地址的命令和reset命令的命令响应是正确的,我不会在命令和响应之间看到任何延迟。此外,由于设备仅与睡眠失效,因此我可以假设流量控制有问题,因此请确保您已从您发送HCI命令的终端启用它。

Thanks MT_dialog

硝W
离线
Last seen:2年10个月前
加入:2017-08-30 09:49
Hi Support Team,

Hi Support Team,

Firstly, Am unable to post new queries on the website.
Secondly, Am seeing a bug in BT firmware that am using on DA14585.

问题:BLE广告enable命令失败后BLE扫描已启用(根据BT规范,ADV&LE SCAN都可以同时进行(按时间分享))。
Steps:
1.使用Keil为585构建项目DA14585_SDK \ 6.0.4.326 \ Projects \ Target_Apps \ HCI。(尝试禁用和启用睡眠模式app_default_sleep_mode)
2.Now using SmartSnippets Toolbox with Jtag configuration for Da14585 option selected, opened the device and selected the 'Booter' tool.
- Used the DA14585\DA14585_SDK\6.0.4.326\projects\target_apps\hci\hci\Keil_5\out_585\hci_585.hex binary that is generated using keil.
3.下载FW的发布成功。
4.在DA585上运行主堆栈,然后主机应用程序执行BLE扫描启用,然后是BLE广告启用。但是,广告启用HCI命令(0x200A)失败,状态'CMD不允许0x0C'失败。
Logs::
nitish :: prepaser_cmd:opcode = 0x2008

nitish :: prepaser_cmd:opcode = 0x2006

prepare_cmd: params[0]=0x40
prepace_cmd:params [1] = 0x0
prepare_cmd: params[2]=0xa0
prepare_cmd: params[3]=0x0
prepare_cmd: params[4]=0x3
prepare_cmd: params[5]=0x0
prepare_cmd: params[6]=0x0
prepare_cmd: params[7]=0x0
prepare_cmd: params[8]=0x0
prepare_cmd: params[9]=0x0
prepare_cmd: params[10]=0x0
prepace_cmd:params [11] = 0x0
prepace_cmd:params [12] = 0x0
prepare_cmd: params[13]=0x7
prepare_cmd: params[14]=0x0
硝:: prepare_cmd: opcode=0x200a

prepare_cmd: params[0]=0x1
CC_evt: opcode=0x2008, status=0x00

cc_evt:opcode = 0x2006,status = 0x00

CC_evt: opcode=0x200a, status=0x0c

5. But when the same adv enable command is executed without issuing the BLE scan enable command then it succeeds. I think this is the root cause of the issue. Kindly confirm the issue and share us the fix for this issue.

Note:
1. And the same host app and stack runs on different ble controller fine. And the issued commands are BT 5.0 spec compliant.
2.Attaching the hci commands and events sent & received to/from controller for reference.

谢谢,

MT_dialog
离线
Last seen:2 months 2 weeks ago
工作人员
加入:2015-06-08 11:34
Hi Nitish W,

Hi Nitish W,

Regarding the fact that you are not able to post a new question, please open one of the three main categories on the support forum and there should be a black button indicating "New Topic" are you able to see that.

Regarding your second question, the BLE stack of the 585 doesn't support scan and advertising at the same time, when you are connected you can scan or advertise but not advertise and scan simultaneously. So have you stopped the scanning or the advertising before starting the new advertising or scanning accordingly ?

Thanks MT_dialog