外部处理的话语(如果/ UART)

8 posts / 0 new
最后一篇
scrat75
离线
最后一次露面:4年11个月前
加入:2016-05-03 09:53
外部处理的话语(如果/ UART)

Hi Dialog Users,

我正在研究Suota服务及其在外部处理器模式下工作的DA14580中可能的实现(连接到应用程序代码所在的外部MCU)。
In future projects we will need to upgrade firmware code of the DA14580, not that of the external MCU. If I correctly have understood, the SUOTA feature will instead allow us to upgrade
只有外部MCU代码,而不是DA14580的代码,除非外部MCU能够擦除/编程外部SPI Flash,DA14580的二级引导程序预期
找到它将加载的新图像。
Am I correct?

Thanks for your support,
scrat75。

Device:
mt_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2015-06-08 11:34
Hi scrat75,

Hi scrat75,

Suota将拍摄您从Android应用程序提供的图像,并将该图像写入连接到580的外部闪存/ EEPROM。在Suota操作完成后,580将从Flash启动并运行您刚下载的新固件。在完全嵌入式解决方案外部处理器的情况下,这意味着应用程序在外部MCU上运行Suota Wont更新在外部MCU上运行的应用程序。

Thanks MT_dialog

scrat75
离线
最后一次露面:4年11个月前
加入:2016-05-03 09:53
嗨对话支持/用户,

嗨对话支持/用户,

as you have written I can interpret that the (SUOTA enabled) application task running on the DA14580 is able to erase/write the external
SPI flash and also to send/trigger (via GTL layer/UART interface) some or all of the notification events/callbacks in the application user
section running on the external MCU. Am I right?

Thanks in advance for your answer.

mt_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2015-06-08 11:34
Hi scrat75,

Hi scrat75,

580可以在2个配置中运行,完全嵌入(在外部MCU上运行应用程序恳求,并与GTL -A对话框的自定义协议 - 通过UART通信)并完全托管(内部580 MCU运行应用程序和蓝牙堆栈)。在具有外部MCU的完全嵌入模式中,应用程序处理其位于580中的配置文件部分接收的消息。例如,在创建Suota数据库中,应用程序将发送app_spotar_create_db(),这将传递到580和数据库将被创建,然后580将使用创建数据库的确认消息进行响应,并且应用程序应在Handlembsg()函数中捕获此消息,并通过spotar_create_db_cfm_handler()在db创建之后处理它开始广告或为其他服务等创建DB等。

Thanks MT_dialog

scrat75
离线
最后一次露面:4年11个月前
加入:2016-05-03 09:53
嗨对话支持/用户,

嗨对话支持/用户,

在这里,我的最终测试结果:

  1. I loaded in KEIL uVision IDE the靠近报告器外部模式located in the
    DA1458x_SDK_5.0.3\DA1458x_SDK\5.0.3\projects\target_apps\ble_examples\prox_reporter_extfolder.
    我修改了app_dis_sw_rev“0.0.1”在app.h标题文件中定义,我构建了项目的项目
    hex file that I renamed intoprox_reporter_ext.hex;
  2. I ran the commandhex2bin prox_reporter_ext_0.hex生成相应的二进制文件prox_reporter_ext.bin;
  3. I loaded in KEIL uVision IDE theProduction Testlocated in the
    da1458x_sdk_5.0.3 \ da1458x_sdk \ 5.0.3 \ projects \ target_apps \ prod_test \ prod_testfolder.
    I built the project producing bin fileprod_test_580.bin.;
  4. I ran the commandmkimage single prox_reporter_ext.bin ble_580_sw_version_0.h prox_reporter_ext.jmg;
    文件ble_580_sw_version_0.h.contains the following code lines:

    #define DA14580_SW_VERSION "v_5.0.3.0"
    #define DA14580_SW_VERSION_DATE "2016-05-19 16:01"
    #define DA14580_SW_VERSION_STATUS "REPOSITORY VERSION"
  5. I ran the commandmkimage single prod_test_580.bin ble_580_sw_version_1.h prod_test_580.jmg;
    现在file ble_580_sw_version_1.hcontains the following code lines:

    #define DA14580_SW_VERSION "v_5.0.3.1"
    #define DA14580_SW_VERSION_DATE "2016-05-19 16:04"
    #define DA14580_SW_VERSION_STATUS "REPOSITORY VERSION"
  6. 我加载并内置于Keil Uvision IDE中的二级Bootloadle项目
    C:\Users\monsminc\Documents\Dialog\DA1458x_SDK_5.0.3\DA1458x_SDK\5.0.3\utilities\secondary_bootloader
    producing thesecondary_bootloader.hex;converted in binary format running the following command:
    hex2bin secodut_bootloader.hex.
  7. I ran the command:
    mkimage multi spi secondary_bootloader.bin prox_reporter_ext.img 0x8000 prod_test_580.img 0x13000 0x1F000 da14580.bin
    要生成使用SmartSnippet(我没有启动的外部SPI Flash中刻录的双重图像
    图像是因为如果我正确理解了mkimage.exemakes automatically that operation);
  8. I loaded and built in Microsoft Visual Studio C++ 2010 edition the projecthost_proxr.located
    in theDA1458x_SDK_5.0.3\DA1458x_SDK\5.0.3\projects\host_apps\windows\proximity\reporterfolder.
    I executed the resultinghost_proxr._sdk.exepassing it at the command line the COMM number
    of the Virtual Com Port seen when I attached the DA14580 Development Kit to my PC.
  9. 接下来我安装在Nexux 9上运行Androind 6.0.1对话框Suota应用程序,通过USB将Nexus附加到PC
    and copying in theNexus 9\Internal storage\Suotafolder another img files result of previous experiments.
  10. I launched the SUOTA app that successfully discovered my DA14580 Development Kit; then I made a connection to it;
    由此产生的下一个屏幕向我展示了我设置的确切固件修订版和软件版本。点击
    更新设备button of the SUOTA app let me obtained the next screen page where I selected the
    图像银行升级;我选择了第二个(图像库设置为2)告诉应用程序重新编程SPI
    flash memory mapped on the P0_0 (sck), P0_3 (cs), P0_5 (miso) and P0_6 (miso). The SUOTA correctly download the new
    image that I selected (I saw the downloading progress both on the screen app and in the console of the
    host_proxr.项目。
  11. At the completion of download I answered no to the boot request and I disconnect from my development board;
    also I terminated the running console program of thehost_proxr.项目。这n I compared
    the choosen image present on the Nexus 9 (the one that I downloaded with the SUOTA app) against the file
    upgrade_image2.imggenerated by the console program (present in
    da1458x_sdk_5.0.3 \ da1458x_sdk \ 5.0.3 \ projects \ host_apps \ windows \ proximity \ eporer \ host_proxr_sdkfolder:
    它们的大小相同,仅在一个字节中(字节33th - 我使用cmp -l -b file1.img file2.img来比较两个图像)。
  12. To be sure that the SUOTA app did not modify the external SPI Flash connected to the DA14580 I used the SmartSnippets
    to read its contents before and after the tests exposed above and compared against to see if they differ. They match.
    这意味着在外部模式(也称为完全嵌入),Suota应用程序允许更新固件
    of the external MCU, not the one burned in the SPI Flash.

So my question is: Is there a way to update also the SPI Flash from which the DA14580 boots in the presence of External Mode configuration?

Thank in advance for your attention

mt_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2015-06-08 11:34
Hi scrat75,

Hi scrat75,

外部接近记者中的示例s the file that from SUOTA and stores it on the disk. So since the file is located at your external processor you have the option to download the firmware on your 580 directly. Since you dont want to download the firmware directly and you want to burn the flash with the image i can think of two options.

1)外部处理器用580共享SPI闪光灯,因此将图像直接刻录到SPI的相应内存地址(棘手的部分是为了确保两个MCU都试图访问闪光灯当外部MCU下载二进制时,您可以尝试将580保持在重置状态。

2)您可以通过580将FW下载到Flash,在这种情况下,您可以更改Flash_Programmer(智能片段使用的实用程序),将Flash_Programmer下载到580然后提供新的仿仿图像,以便580将将其刻录到闪光灯(这需要从MCU的主机侧实现)。

Thanks MT_dialog

scrat75
离线
最后一次露面:4年11个月前
加入:2016-05-03 09:53
嗨对话支持,

嗨对话支持,

Is there a documents in the User Manual or in the Application Note folders that explains the protocol the external Main MCU and theflash_programmer
both must implement and to follow to exchange data and to correctly program the external SPI Flash. I know that I can obtain it making the reverse engineering of the
flash_programmer一篇的代码项目,但我认为如果你能把我指向官方文件,那就更好了..

Thanks in advance for your reply

mt_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2015-06-08 11:34
Hi scrat75,

Hi scrat75,

上面解释的实现不是通过对话框实现,并且没有解释闪存程序员功能的文档。Flash Programmer的主要目的是仅在智能片段中使用而不是由外部MCU使用,以便通过580刻录闪光灯,但这是您想要遵循此选项的唯一可用示例。

Thanks MT_dialog

主题锁定