如何在空中更新DA14583上的FLAHS?

22 posts / 0 new
Last post
shezhe9
Offline
Last seen:2个月前1年
加入:2015-09-22 01:28
如何在空中更新DA14583上的FLAHS?

Since the 14583 has 1024k flash on chip,I think maybe this area canbe update by air.But in the documents,I cannot find the cosponding datasheet to dicribe how to updata the context in DA14583.I am wonndering do you got any document like 《AN-B-003: DA14580 Software Patching over the Air (SPotA)》that tell how to updata software over the ait.but not only in DA14580,just also in DA14583

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

Hi shezhe9,

14583和Suota没有专门的申请文件。但我想你能够做到这一点,就像DA14580一样,差异只是SPI的引脚配置。您可以尝试尝试使用SDK5的邻近应用。

Thanks MT_dialog

shezhe9
Offline
Last seen:2个月前1年
加入:2015-09-22 01:28
Thanks,I’ve notice that this

Thanks,I’ve notice that this chip contian 1K Flash wtih spi bus onchip。which means it just take the internal flash as external spi Flash as well.

JE_Dialog
Offline
Last seen:1 day 17 hours ago
工作人员
加入:2013-12-05 14:02
HI Shezhe9, you might also

HI Shezhe9, you might also want to read AN-B-010 that is the application for SUOTA and explains it in more detail.As Marios mentions, it references the 14580, but 14583 is just the 14580+FLASH inside), so the same SUOTA scheme works (as documented in the 14580), In SDK5, it is included in the project example for the 14583 proximity reporter project.

BR JE_DIalog

shezhe9
Offline
Last seen:2个月前1年
加入:2015-09-22 01:28
谢谢je先生。And another

谢谢je先生。还有另一个问题,dou你在14580代理方面和主机侧获得了任何偶像顺序的代码,如iOS应用程序或和riod应用程序?

MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi shezhe9,

Hi shezhe9,

You can find an implementation of the SUOTA profile in the proximity_reporter and in smart tag reference design. As far as the host side a mail has been sent.

Thanks MT_dialog

gayan_gamage
Offline
Last seen:4 years 10 months ago
加入:2016-04-28 21:23
Hi,

Hi,

Suota模块似乎在5KB左右使用,这是推动我的实施过去32K。这是一个最小的.implementation。端口选择,如果固定,则不需要的所有内容。此外,在该示例中的接近模块的使用是什么。我认为自定义实施是必需的吗?

Regards
Gayan

MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi gayan_gamage,

Hi gayan_gamage,

There is no smaller version of the SUOTA implementation. Regarding the proximity module of the example, i dont quite get what you mean, the proximity example includes the SUOTA profile in
order to update over the air, the existing proximity firmware. If you just want the SUOTA profile in your custom design you dont have to add the proximity profile or the battery or other profiles that the proximity example implements.

Thanks MT_dialog

hogyunkim
Offline
Last seen:5 months 2 weeks ago
加入:2016-01-18 04:23
Dear MT_dialog,

Dear MT_dialog,
I also want to test a OAT function with DA14583 and dialog USB dongle in window PC.
But I can't understand a test environment.
1) Put a fw_multi_part_spi.bin file into DA14583.
2) Which project should I execute for dialog USB dongle ?
3),公关ogram shoud I execute in window PC ?
-> I runed a SmartSnippets program for' SUOTA initiator. But I can't connect a COM port because Connect button is not activated.

MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi hogyunkim,

Hi hogyunkim,

2) I suppose that you would like to use the dongle as a central and the 583 as a device, there is no need to download any fw on the dongle, Smart Snippets will do that upon connection (whn you hit the connect in Smart Snippets).

3) You should run the Smart Snippets and the OTA application, that will allow you to use the dongle as a central and download the SUOTA central fw into the dongle, you will have to use UART interface in order for the "Connect" option to be available.

Thanks MT_dialog

hogyunkim
Offline
Last seen:5 months 2 weeks ago
加入:2016-01-18 04:23
Dear Dialog,

Dear Dialog,

I can't activate the "Connect" button with my dongle.
At previous time, I can connect but now I can't connect to my dongle.
Is there any firmware to execute for USB dongle ?
I already select the right COM port with USB donlge port.

此致,

MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi hogynkim,

Hi hogynkim,

如果聪明的片段OTA的connect按钮rvices is deactivated is because you are using the JTAG interface in order to connect with the tool and not the UART port. When the Smart Snippets starts, please select the plain UART mode (not the UART/SPI mode). After that open the OTA services and hit the "Connect button", Smart Snippets will indicate "Loading firmware, please wait...." and after that it should indicate that "Firmware loaded successfully" and it will start the scanning procedure. The scanning procedure will finish automatically.

Thanks MT_dialog

hogyunkim
Offline
Last seen:5 months 2 weeks ago
加入:2016-01-18 04:23
Thanks for your comment.

Thanks for your comment.
I succesfully download a new image to DA14583 board with SUOTA.

So, I merged the OTA profile to DSPS project
After that, I tested again with the merged DSPS project.
But I got the message from SmartSnippets below.
What did I wrong ? I refered the comment on "How to add the SUOTA profile to my SDK 5.0.3 application ?" page on FAQ.
I also checked the downloading image is normal.

==============================================================================
[INFO @17-03-14 18:46:01] Establishing Link with target device...
[INFO @17-03-14 18:46:02] Link with target device has been established.
[INFO @17-03-14 18:46:02] Characteristics discovery started.
[INFO @17-03-14 18:46:03] Characteristics discovery finished.
[INFO @17-03-14 18:46:37] Firmware download started...
[INFO @17-03-14 18:46:37] SPOTAR_IMG_STARTED
[INFO @17-03-14 18:46:37] Memory Info:
0 bytes

[ERROR @17-03-14 18:46:37] SPOTAR_INVAL_PRODUCT_HDR
[INFO @17-03-14 18:46:37] Firmware download failed.
[INFO @17-03-14 18:46:37] Target device has been disconnected. Please try to re-establish link.
==============================================================================

此致,

MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi hogyunkim,

Hi hogyunkim,

The error that you got indicates that something is wrong with the product header in the flash, this is the only reason that you can have this kind of error. Is there a product header in your multipart image (at the address 0x1F000) and if there is one, does it have the proper product header signature 0x70 and 0x52 ?

Thanks MT_dialog

hogyunkim
Offline
Last seen:5 months 2 weeks ago
加入:2016-01-18 04:23
Dear Dialog,

Dear Dialog,

I checked the product header, and I got the data below
[0x1f000] 70 52 00 00 00 00 80 00 00 00 00
[0x1F008] 00 30 01 00 FF FF FF FF
[0x1F010] FF FF FF FF FF FF FF FF
...

I think that the multipart image is right.
I doubt the SPI communication to flash memory in DA14583.

I included the spi.c and spi_flash.c files in sdk_driver folder within DSPS project.
And I configure the SPI_PORTs and SPI_PINs in user_periph_setup.h file.
Is there any fixing points in DSPS project ?

此致,

MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi hogyunkim,

Hi hogyunkim,

Have you applied the on_spotar_status_change() function in order for the flash to be enabled since your device is the 583 in order for the application to enable the flash ?

您将能够在Prox_reporter示例中找到实现,这是函数的实现代码:

void on_spotar_status_change( const uint8_t spotar_event)
{
#if defined(__DA14583__) && (!SPOTAR_SPI_DISABLE)
int8_t man_dev_id = 0;

man_dev_id = spi_flash_enable(SPI_EN_GPIO_PORT, SPI_EN_GPIO_PIN);
if (man_dev_id == SPI_FLASH_AUTO_DETECT_NOT_DETECTED)
{
// The device was not identified. The default parameters are used.
// Alternatively, an error can be asserted here.
spi_flash_init(SPI_FLASH_DEFAULT_SIZE, SPI_FLASH_DEFAULT_PAGE);
}

if( spotar_event == SPOTAR_END )
{
//电源向下SPI Flash
spi_flash_power_down();
}
#endif
}

#endif //(ble_spota_receiver)
/// @} 应用程序

Thanks MT_dialog

hogyunkim
Offline
Last seen:5 months 2 weeks ago
加入:2016-01-18 04:23
Dear Dialog,

Dear Dialog,

我已经将此代码置于user_sps_device.c文件中。

I find the root-cause the reason why my DSPS project doesn't work the OTA operation.
The reason is that I set the GPIO0_3 to below.
=> GPIO_ConfigurePin(GPIO_PORT_0, GPIO_PIN_3, INPUT_PULLDOWN, PID_SPI_DI, false);
Could you let me know why this pin is related to OTA operation.
And I want to know other pins affecting the OTA operaion.

我正在使用DA14580DEVKT-P_VB与DA14583芯片。
And I am using a flash area with SPI communication.
Also I didn't connect any connection with PIN0_3.

此致,

MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi hogyunkim,

Hi hogyunkim,

Since you are using a 583 (and you have defined in your DSPS application that the dev kit used is a 583) there is no use for the GPIO0_3 the pins from the SUOTA sw, if the 583 is selected as a running device then the pins used by SUOTA are pins for the flash of the 583, (2_0 CLK / 2_3 CS / 2_4 MISO / 2_9 MOSI). In case of a 580 then the P0_3 is used as a CS for the external flash.

Thanks MT_dialog

hogyunkim
Offline
Last seen:5 months 2 weeks ago
加入:2016-01-18 04:23
Dear Dialog,

Dear Dialog,

I also know your comment.
So, It is strange SUOTA operation is effected on GPIO0_3 pin.

If you test the below environment, then you can reproduce this phenamenon.
1) D14580DEVKT-P_VB, DA14583ATDB-P
2) ble_app_ota.uvprojx
+ gpio_configurepin(gpio_port_0,gpio_pin_3,input_pulldown,pid_spi_di,false);在set_pad_functions()函数中。

MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi hogyunkim,

Hi hogyunkim,

Yes i am able to replicate what you are experiencing, it seems that when your configure the pin as PID_SPI_DI and when the SUOTA operates (it configures the pins of the SPI module whenever it starts an interaction with the flash) you have two pins that are simultaneously connected to one SPI module. When something like this happens (both pins have PID_SPI_DI so you have two sources in one input) the functionallity of the pin will be assigned to the GPIO that has the smaller GPIO index, therefore to the 03 port pin (and that why the SUOTA doesn't work). What you can do in your case, since i get that you would like to have an additional SPI device on the 583 is to apply the same thing that the SUOTA does (more or less) as far as the configuration of the pins is concerned, dont configure your pins in the periph_init() function with a specific functionallity but have them as PID_GPIO and as soon as you are going to use them, apply the corresponding configuration as soon as you finish de-configure your pins to the PID_GPIO functionallity.

Thanks MT_dialog

hogyunkim
Offline
Last seen:5 months 2 weeks ago
加入:2016-01-18 04:23
Dear Dialog,

Dear Dialog,

Thanks for your reply.
我理解你的评论。
Your comment is that if I want to use OTA function with SPI communication, then I don't use the PID_SPI_DI definition or I have to use PID_SPI_DI definition after finishing OTA function.

我有另一个问题。
Then the PID_SPI_CLK, PID_SPI_EN, PID_SPI_DO definitions doesn't effect to OTA function ?

此致,

MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi hogyunkim,

Hi hogyunkim,

不,它不会影响其他SPI引脚,因为这些引脚并配置为输出功能,而不是朝向SPI模块的输入。

Thanks MT_dialog