How to download Firmware to DA14580 BLE chip

23 posts / 0 new
Last post
shrimanth ramesh
Offline
Last seen:5 years 6 months ago
加入:2015-09-15 12:53
How to download Firmware to DA14580 BLE chip

Hi,

Here we are working on Android/Linux platform and the MURATA LBCA2HNZYZ-711 BLE module is embedded into to main board.
This MURATA LBCA2HNZYZ-711 BLE module use Dialog's DA14580 BLE chip
The only interface we have to communicate with BLE chip is via UART TX/RX lines from our processor (imx6 - freescale ).
We configured the UART interface in Linux/Android platform (processor side) and now we need to configure the BLE chip using firmware.

Can you please share/guide us regarding below details:
-Which firmware we need to use ?
-How we can download/configure firmware to BLE chip? Any tool/application available for Linux platform ?
-Is there any details available related to Android( In Google, some of the products are using LBCA2HNZYZ-711 chip-sets in there Android products) configurations/bringup.

Thanks
Shrimanth R

Device:
MHv_Dialog
Offline
Last seen:2 months 6 days ago
工作人员
加入:2013-12-06 15:10
Hi,

Hi,

Please verify that you have connected the UART as defined in Table 1, step 2,4,5, or 6 of UM-B-001http://support.dialog-semiconductor.com/resource/b-001-da14580-booting-serial-interfaces.The standard way to boot load firmware from an external source via UART is alo described in that document. If you have not connected the UART as defined above, your only option is to burn a secondary boot-loader into OTP via J-Link, which would allow you to define any pin combination on the DA14580 as boot loader pins.

The UART boot loader sequence is pretty straight forward. Your host needs to power on (or reset) the DA14580 and wait for it to transmit a STX (0x02) character. After this simply follow table 5 of the above referenced document.

shrimanth ramesh
Offline
Last seen:5 years 6 months ago
加入:2015-09-15 12:53
Thanks MHv_dialog,

Thanks MHv_dialog,

We are able to understand the UART connection b/w DA14580 & host processor (imx6).
From the board schematics we understand that UART Lines from processor(imx6) is directly connected to MURATA LBCA2HNZYZ-711 BLE module. So from hardware point UART connection is fine.

We also understood steps to download firmware from link you shared (Table 5).

-But please can you share firmware file required to be flashed to DA14580 to bringup MURATA LBCA2HNZYZ-711 BLE
-Also Can you share any application code available for Linux platform to download firmware

Note: We got one application code in the github linkhttps://gist.github.com/blindman2k/d1bbef6a60ccf383b095, But its not in C language. So it will be very usefull if you share some application to download firmware in C language

Rgds
Shrimanth

GumpYang
Offline
Last seen:3 days 14 hours ago
加入:2014-05-20 07:38
This is a UART development

This is a UART development with download tool python, in my computer can perform, please refer to。
这是一份用python开发的uart download tool,在我的电脑上可以执行,请您参考

hardy.chen
Offline
Last seen:1 year 10 months ago
加入:2015-03-13 04:20
Hi,

Hi,

I'm also interesting in the alternative of flashing SPI flash (or event OTP) through Linux OS based environment.
It would be great that Dialog can provide such alternative.

To Shrimanth, from the example on github, it seems to use direct control to the SPI flash (not via DA14580) from host PC. But this is also kind of thought of flushing firmware while manufacturing.

FH_Dialog
Offline
Last seen:1 month 6 days ago
工作人员
加入:2013-12-06 15:12
Hi Hardy

Hi Hardy

Our tool for flashing image into SPI flash in Linux OS is not available yet.

Regards

hardy.chen
Offline
Last seen:1 year 10 months ago
加入:2015-03-13 04:20
Hi, Dialog team,

Hi, Dialog team,

Well noted.

But I'm trying to implement 2 protocols for fulfilling my needs.
I suppose that 1) implementation of booting from serial interface (referring to 6.2 of AN-B-001) AND 2) SPI Flash command supported by 'flash_programmer' utility on target could be a try for my purpose.

Two question out from source code of 'programmer.c'

Q#1 what would be the default 'port_sel' when DEVELOPMENT_MODE is not defined.
--
#ifdef USE_UART
#pragma arm section zidata = "non_init"
uint8_t gpio_port;// __attribute__ ((section ("non_init")));
uint8_t gpio_pin;// __attribute__ ((section ("non_init")));
uint8_t port_sel;// __attribute__ ((section ("non_init")));
#pragma arm section zidata
#else

....<>

#ifdef DEVELOPMENT_MODE // To use the debugger, define it and set the UART_PIN_PAIR according to board configuration (periph_setup.h)
port_sel = UART_PIN_PAIR;
#endif
--

Q#2 What the 'size' shall I put for the first command of 'ACTION_SPI_WRITE', I don't quite understand the purpose of following code with protocol defined at section 6.3 of AN-B-001 regarding to the definition of 'Code length MS byte' and 'Code length LS byte' in table 7.

--
headersize = size+8;
if (starting_address==8)
{
Headerbuffer[6]= (unsigned char) (0xfF&(headersize>>8));
Headerbuffer[7]= (unsigned char)(0xfF&headersize);
spi_flash_write_data(Headerbuffer, 0, 8);
spi_flash_write_data(p,starting_address, size);
}
--
else

shrimanth ramesh
Offline
Last seen:5 years 6 months ago
加入:2015-09-15 12:53
Hi,

Hi,

We want to flash firmware to SysRAM of DA14580.

Can you please share/guide us regarding below details:
-Firmware file required to be flashed to DA14580 to bringup MURATA LBCA2HNZYZ-711 BLE
可用于Linux platfor——任何应用程序代码m to download firmware to DA14580 through UART

Thanks
Shrimanth

shrimanth ramesh
Offline
Last seen:5 years 6 months ago
加入:2015-09-15 12:53
Hi,

Hi,

We are able to develop the application code on Android Platform for downloading firmware from host processor (imx6) to MURATA LBCA2HNZYZ-711 BLE (DA14580 chip) through UART

For Developing the APP code, we have followed steps as given in Table 5 ofhttp://support.dialog-semiconductor.com/resource/b-001-da14580-booting-s...document.

But we are getting 0x15 (NACK) when we send 0x01(SOH) & length of code to be downloaded 0x37 (LSB) & 0xD3 (MSB)

The firmware file we used to download is in following folder DA14580_581_583_SDK_3.0.10.1\binaries\da1458x\prod_test/prod_test.hex.
Its Size is 54.1K

The Size of SRAM is 42K, If we reduce the lenght of code to be downloaded, we are getting 0x06 (ACK)

So we are doubting on the firmware file.

Could you please share the proper Firmware file for MURATA LBCA2HNZYZ-711 BLE

Thnaks
Shrimanth

MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi shrimanth ramesh,

Hi shrimanth ramesh,

There is no other valid proper firmware. You have to download the bin file, not the .hex file. You can either compile the prod_test project and take the .bin file from the out directory or convert the .hex file to a .bin file.

Thanks MT_dialog

shrimanth ramesh
Offline
Last seen:5 years 6 months ago
加入:2015-09-15 12:53
Thanks MT_dialog,

Thanks MT_dialog,

Now we are able to download prod_test.bin file to DA14580 chip successfully through UART.
Also sent 0x06(ACK) from host processor(imx6) to DA14580 chip.

But we have following doubts:
-Do we have to program SYS_CTRL_REG registers from host side(imx6) or will it be done by DA14580 chip itself ?
-什么是程序测试Linux的祝福/Android Platform level, to check whether the firmware is proper or not? Is there any application available?
-Is there any libbt-vendor HAL code for android for DA14580 chip, which communicates b/w bluedroid stack & lower chip firmware via HCI commands

Rgds

shrimanth ramesh
Offline
Last seen:5 years 6 months ago
加入:2015-09-15 12:53
Hi

Hi

Please can anyone help on below issues:

But we have following doubts:
-Do we have to program SYS_CTRL_REG registers from host side(imx6) or will it be done by DA14580 chip itself ?
-什么是程序测试Linux的祝福/Android Platform level, to check whether the firmware is proper or not? Is there any application available?
-Is there any libbt-vendor HAL code for android for DA14580 chip, which communicates b/w bluedroid stack & lower chip firmware via HCI commands

Thanks
Shrimanth

MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi remesh,

Hi remesh,

-The SYS_CTRL_REG are the registers are controlled by the da if you are workiing with an external proccessor you can take a look at the reference design of the proximity monitor in the SDK at the following directory \DA1458x_SDK_5.0.2.1\DA1458x_SDK\5.0.2.1\projects\host_apps\windows\proximity\monitor you can check this alsohttp://support.dialog-semiconductor.com/resource/um-b-010-user-manual-pr....

-You can test your application in any application that supports BLE on android or LInux.

-No i dont think there is such thing.

Thanks MT_dialog

shrimanth ramesh
Offline
Last seen:5 years 6 months ago
加入:2015-09-15 12:53
Thanks MT_dialog

Thanks MT_dialog

We used DSPS.apk to test BLE on android.
But when we run that app we are getting ALERT " Please Enable the bluetooth !"
Can you explain how Application(DSPS.apk) communicates with DA14580 chip.
Is there any documents which explains how application communicates with DA14580 chip.

Rgds
Shrimanth

JE_Dialog
Offline
Last seen:1 month 6 days ago
工作人员
加入:2013-12-05 14:02
Hello Shrimanth, please see

Hello Shrimanth, please see the user guide for DSPS : this contains all the details.

http://support.dialog-semiconductor.com/resource/um-b-038-user-manual-di...

BR JE_Dialog

raghuchaitanya....
Offline
Last seen:5 years 4 months ago
加入:2015-11-05 08:31
Hello JE_Dialog,

Hello JE_Dialog,

We are working on i.MX6 Sololote Android platform and the MURATA LBCA2HNZYZ-711 BLE module(based on Dialog's DA14580 BLE chip ) is interfaced via UART. We are able to load the prod_test.bin firmware successfully when the Bluetooth is enabled through the Android UI, but we are unable to proceed further. The logcat shows the following messages after the firmware is loaded successfully.

I/bt_hci_bdroid( 3104): Inside bt_hc_worker_thread function HC_EVENT_TX
E/bt_h4 ( 3104): [h4] Unknown HCI message type drop this byte 0x0
E/bt_h4 ( 3104): H4: Unable to acquire buffer for incoming HCI message.

Can you please help us to understand the probable cause of the above error. Do you have any Reference Android porting guide that describes the required changes/modifications to be done for porting BLE drivers.

Thanks & Regards
Raghu Chaitanya

MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi raghuchaitanya.l

Hi raghuchaitanya.l

I suppose that the issue is that, if you are using 580, it does not support HCI commands, the 581 does.

Thanks MT_dialog

raghuchaitanya....
Offline
Last seen:5 years 4 months ago
加入:2015-11-05 08:31
Hello MT_Dialog,

Hello MT_Dialog,

Thanks for your reply. We are trying to integrate the (DA14580 based) Murata BLE module in Android 4.4 . In the DA14580x software architecture guide, it is mentioned that " The BLE core protocol stack is a third party implementation licensed from Riviera Waves " .

1) Does this mean that the BLE stack is already embedded inside the module ?
2) Can we use the Bluedroid stack ?
3) The serial port service application guide has the information only about flashing the firmware to the module. How do we proceed after loading the firmware to the module ?
4) Do you have any document that explains the complete integration procedure?

Please help . We are stuck up at this issue for almost two weeks.

Regards
Raghu Chaitanya

MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi raghuchaitanya.l,

Hi raghuchaitanya.l,

1) Yes the BLE is located in ROM.

2) About the Bluedroid the 580 doesn't support HCI commands the 581 does.

3) What do you mean how to proceed after loading the fw to the module, if you want to run the application you can donwload DSPS application and the data flowing from your pc to your android application.

4) There are docs explaining how to use the da580 with an external MCU please have a look in the documents section of the support site, but there isn't a doc about how to integrate the da with android.

Thanks MT_dialog

raghuchaitanya....
Offline
Last seen:5 years 4 months ago
加入:2015-11-05 08:31
Hello MT_Dialog,

Hello MT_Dialog,

Thanks for your prompt response. Can you please help me with the following ?

How we can map the Android Native Bluetooth Application (From Android Settings -> Bluetooth(ON/OFF)) to Dialog 14580 chip communication. Because Android Native Bluetooth App communicates with Android Bluetooth state Machine, which bind with Android Bluedroid stack which uses libbt HAL interface to communicate with UART interface.

Bluetooth Native App -> Android Bluetooth State Machine -> Android Bluetooth Stack -> Libbt Vendor -> UART interface - > Bluetooth Chip Firmware.

-How DSPS apk communicates with Dialog Bluetooth application which internally communicates with Dialog Firmware.

Regards
Raghu Chaitanya

MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi raghuchaitanya,

Hi raghuchaitanya,

Sorry, but there is no doc or example in doing what you are asking, you can have a look at the external proccessor configuration examples, also as i ve posted in my previous post the 580 doesn't support HCI only 581 does.

About the dsps the application, it uses a custom profile to push uart data into the android application, plase have a look to the DSPS application note for more info on this. Also, if you are interested i can sent you the android source code for the DSPS.

Thanks MT_dialog

raghuchaitanya....
Offline
Last seen:5 years 4 months ago
加入:2015-11-05 08:31
Hello MT_Dialog,

Hello MT_Dialog,

Thank you. Yes, please send the android source code for the DSPS.apk.

Regards
Raghu Chaitanya

MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi raghuchaitanya,

Hi raghuchaitanya,

Mail sent

Thanks MT_dialog