⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
14 posts / 0 new
Last post
rahult
Offline
Last seen:3年6个月前
加入:2017-07-14 13:22
使用BT HCI对DA14585的UART

Hi,

We would like to know how to enable BT HCI over UART mode of DA14585. Are there any settings that need to be done ? We want to send the BT HCI command over UART directly to BLE controller and get back the response back. We want to use another Bluetooth stack and communicate with chip directly.

Thanks,
Rahul

关键词:
Device:
MT_dialog
Offline
Last seen:2 months 2 weeks ago
工作人员
加入:2015-06-08 11:34
Hi rahult,

Hi rahult,

In order for the 585 to operate under HCI mode, you will have to download the appropriate fw, you will be able to find the fw in the SDK 6.0.4 in the following directory DA14585_SDK\6.0.4.326\projects\target_apps\hci, then you will have to provide the RX/TX/RTS/CTS connections with the corresponding pins (that depends on the device you are using) and you will be able to send UART HCI commands directly to the 585 and get back the appropriate response.

Thanks MT_dialog

Nitish W
Offline
Last seen:2 years 10 months ago
加入:2017-08-30 09:49
Hi MT_dialog,

Hi MT_dialog,

Tried building the 'DA14585_SDK\6.0.4.326\projects\target_apps\hci' project and executed in the Debug Mode with selected target hci_585, but seeing the Hardfault. Tried finding out the issue, but couldn't root cause it. Kindly do the
Details:
1. DA14585_SDK -6.0.4.326
2. DA14585 DEV KIT PRO
3. j5配置为UART,J10已启用,J3已打开。
4. SDK配置文件无需下载SDK的更改。

调试细节:
Crash seen at: memcpy(hci_cmd_desc_root_tab, rom_hci_cmd_desc_root_tab, 48); in arch_rom.c
R14(LR): 0xFFFFFFF9,
MSP: 0x07FC35F8 - whose PC: 0x07F1E0AC

Kindly let us know any configurations required to use DA14585 as BT HCI UART mode.

Thanks,
Nitish

mhv_dialog.
Offline
Last seen:2 months 1 week ago
工作人员
加入:2013-12-06 15:10
Hi Nitish,

Hi Nitish,

我刚刚重复你的步骤,只要我使用DA14585的大规模生产版本就没有问题。试图用修订版AB Silicon重复,我得到了完全相同的硬盘。

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.

Nitish W
Offline
Last seen:2 years 10 months ago
加入:2017-08-30 09:49
Hello MHv,

Hello 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).

Thanks,
Nitish

mhv_dialog.
Offline
Last seen:2 months 1 week ago
工作人员
加入:2013-12-06 15:10
谢谢你提供

谢谢你提供图片。您的女儿卡似乎是早期的工程样本。请询问您的对话经销商或代表换货替换。

/ mhv.

Nitish W
Offline
Last seen:2 years 10 months ago
加入:2017-08-30 09:49
谢谢mhv,

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

1.构建项目da14585_sdk \ 6.0.4.326 \ projects \ target_apps \ hci 585,启动了调试会话并开始执行代码(F5)。我现在认为固件下载到SRAM(通过UART1 P0_4UTX,P0_5URX,P0_5CUCTS,P0_7urts)并开始执行。现在停止了调试会话(使用UART1)。
2.但现在我们预计UART1将用于BT HCI接口(BT主机和Dialog585 BT控制器)。因此,在J5中删除了跳线,将UART P0_4-P0_7与USB通信引脚连接。并通过UART接口运行BT主机的控制器连接UART P0_4-P0_7。并看看没有适当的沟通。
3. When i monitored the standalone Dialog585 P0_4 & P0_5 pins post downloading and running the HCI firmware, through picoscope, see some random unexpected signals (attached the images).
Note:
1. BT主机设置随着UART HCI接口的其他BT控制器运行精细。
2.主机和对话框UART设置都很好。配置了115K2波特,无奇偶校验,并尝试了启用和禁用HW流量控制。

请告诉我们是否使用其他设置/ UART配置以使其工作。

Thanks,
Nitish

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.

Nitish W
Offline
Last seen:2 years 10 months ago
加入:2017-08-30 09:49
Thanks MH_Dialog,

Thanks MH_Dialog,

I tried the following steps, but see there is no response/activity from the P0_5 [uRx] pin or other UART pins(P0_4, P0_6 or P0_7) of the DA14585.

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.
- Options was kept as it is. SysCtrlReg=0xA6 for 585
- Tried using both enabling and disabling 'close debug session'.
3. Post downloading the fw is successful. 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.

善意。

Thanks,
Nitish

Booter Logs:
[INFO General @17-09-14 17:30:26] Firmware File C:\DiaSemi\SmartSnippetsStudio\Toolbox\common_resources\jtag_programmer_585.bin has been selected for downloading.
[信息概述@ 17-09-14 17:37:41]无法衡量总IR LEN。TDO是恒定的。
[信息概述@ 17-09-14 17:37:41]无法衡量总IR LEN。TDO是恒定的。
[INFO General @17-09-14 17:37:41] Found SWD-DP with ID 0x0BB11477
[信息概述@ 17-09-14 17:37:41] FpUnit:4代码(BP)插槽和0个字幕插槽
[INFO General @17-09-14 17:37:41] Found 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
[INFO Booter @17-09-14 18:48:27] Found Cortex-M0 r0p0, Little endian.
[INFO Booter @17-09-14 18:48:28] Successfully downloaded firmware file to the board.

MH_Dialog (not verified)
Hi Nitish,

Hi Nitish,

There are few possible reasons that no reponse from DA14585.

1. Is there a XTAL 32K on the board ? if not, please define CFG_LP_CLK as LP_CLK_RCX20 because LP_CLK is used to wake up the chip.

2.如果您有xtal 32k,请禁用睡眠模式以查看是否有任何响应。更改app_default_sleep_mode = arch_sleep_off;

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

如果这些建议提出解决问题,请告诉我

Nitish W
Offline
Last seen:2 years 10 months ago
加入:2017-08-30 09:49
Thanks MH_Dialog,

Thanks MH_Dialog,
By disabling the sleep mode, UART communication works fine. Please find inline comments.

1. Is there a XTAL 32K on the board ? if not, please define CFG_LP_CLK as LP_CLK_RCX20 because LP_CLK is used to wake up the chip.
- [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.

在文件中:ARCH_SYSTEM.C,INIT_PWR_AND_CLK_BLE()
SetBits16(SYS_CTRL_REG, CLK32_SOURCE, 1); // Select XTAL32K as LP clock

2.如果您有xtal 32k,请禁用睡眠模式以查看是否有任何响应。更改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] Now even in sleep mode its working fine by enabling the external wakeup. But see following observation or performance issue.
使用app_default_sleep_mode = arch_sleep_off;BT init发生在秒内。
With app_default_sleep_mode = ARCH_SLEEP_ON && CFG_EXTERNAL_WAKEUP enabled, See that BT init takes 4-5 seconds. Not sure why DA585 is taking so much time to respond.
Kindly let us know, if anything could be done to resolve this performance issue with DA585 could be resolved.

问候,
Nitish.

MT_dialog
Offline
Last seen:2 months 2 weeks ago
工作人员
加入:2015-06-08 11:34
嗨nitish w,

嗨nitish w,

我已经测试了HCI弗兰克-威廉姆斯(取决于反对figuration that you have regarding the flow control, no flow control/with flow control), as far as i can tell you dont need to define the CFG_EXTERNAL_WAKEUP unless you use an additional pin for waking up the device. Check that the HW_CONFIG is set to work with the pro dk and not and make sure that the terminal that you are issuing the HCI commands has the RTS/CTS flow control enabled. Tested on my side with the pro kit, the responses for the commands for getting the bd address and the reset command are proper and i dont see any delays between the command and the response. Also since the device is only working with the sleep deactivated i can assume that something is wrong with the flow control, so please make sure that you have enabled it from the terminal that you send the HCI commands.

Thanks MT_dialog

Nitish W
Offline
Last seen:2 years 10 months ago
加入:2017-08-30 09:49
Hi Support Team,

Hi Support Team,

Firstly, Am unable to post new queries on the website.
其次,我在使用DA14585上使用BT固件中的错误。

Issue: BLE Advertising Enable Command Fails post BLE Scanning is enabled(as per the BT spec, both adv & le scan can go simultaneously(by time sharing)).
Steps:
1.使用Keil为585构建项目DA14585_SDK \ 6.0.4.326 \ Projects \ Target_Apps \ HCI。(Tried disabling and enabling Sleep mode 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. Post downloading the fw is successful.
4. Run my host stack over the DA585, then host app does the ble scan enable and then followed by ble advertising enable. But the advertising enable hci command(0x200a) fails with status 'cmd disallowed 0x0C'.
Logs::
Nitish:: prepare_cmd: opcode=0x2008

Nitish:: prepare_cmd: opcode=0x2006

prepace_cmd:params [0] = 0x40
prepare_cmd: params[1]=0x0
prepace_cmd:params [2] = 0xa0
prepace_cmd:params [3] = 0x0
prepace_cmd:params [4] = 0x3
prepare_cmd: params[5]=0x0
prepare_cmd: params[6]=0x0
prepare_cmd: params[7]=0x0
prepace_cmd:params [8] = 0x0
prepare_cmd: params[9]=0x0
prepare_cmd: params[10]=0x0
prepare_cmd: params[11]=0x0
prepare_cmd: params[12]=0x0
prepace_cmd:params [13] = 0x7
prepace_cmd:params [14] = 0x0
Nitish:: 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.将HCI命令和事件附加到/从控制器发送,以供参考。

Thanks,
Nitish

MT_dialog
Offline
Last seen:2 months 2 weeks ago
工作人员
加入:2015-06-08 11:34
嗨nitish w,

嗨nitish w,

关于您无法发布新问题的事实,请在支持论坛上打开三个主要类别之一,应该有一个黑色按钮,表示“新主题”您是否能够看到。

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