DA14580Basic Kit SDK

15 posts / 0 new
最后一篇
kqtrinh.
离线
最后一次露面:3 years 10 months ago
加入:2016-08-24 00:17
DA14580Basic Kit SDK

Questions about the 580 DSPS peripheral mode FW code I would like to use as the starting point for our custom embedded software development.

As of right now, i would like to understand the mechanism of how Keil IDE or SmartSnippets which downloads the FW bit stream from the Host PC thru the USB connection to the MCU on the 580 to receive the bit stream and write to flash or load it into RAM. Upon power up, I believe the 580 will load the FW from Flash into RAM and starts execution. However, when the 580 has no FW currently resides in flash, I would think there should exist a piece of code that's running in RAM that will handle writing the incoming FW from SmartSnippets or Keil to flash or to RAM. This piece of code might be called ROM code kind of like the BIOS fw in the PC. Can you point me to the part of the code that handles flash or RAM upload interface? If i am totally off base, please educate me so i understand how this process works to help me in our custom development.

If there is a document that explains this process in details, that would be even better.

谢谢,
- khai

Device:
mt_dialog.
离线
最后一次露面:3个月4天前
职员
加入:2015-06-08 11:34
嗨kqtrinh,

嗨kqtrinh,

You can have a look at the AN-B-001.pdf or the UM-B-012.pdf, those documents mention how the booting sequence works, where the code is downloaded and runs. The code that exists in the 580 and loads a external fw is called the primary bootloader (or just bootloader) and its located in the ROM memory area. The source code isn't available, but its functionallity is described in the AN-B-001 document, its an ammount of options for the 580 to download code via UART/SPI/I2C.

谢谢mt_dialog.

kqtrinh.
离线
最后一次露面:3 years 10 months ago
加入:2016-08-24 00:17
Thank you for the timely

谢谢你的及时回应。这2个文档帮助我了解有关580启动过程如何工作的更多信息。

It's OK the ROM code isn't available, will the secondary bootloader as described in the UM-B-012.pdf doc available or other sample code that is close to its functionality for booting from flash.
也许我会尝试描述我的开发方案,您可以推荐如何完成。使用基本套件,我可以通过将代码加载到与keil的SRAM的代码直接调试FW,我也可以用SmartSnippets写入Flash。还有智能公司的写作,我目前没有需要使用的smartsnippet。

我们的定制板很简单。它由带有电话应用程序的BLE接口的前端接口中的580组成。580将从手机接收消息,并通过580内部UART总线将其发送到显示设备。

To debug the 580 application code, we will build an external debugger board (is there such a board exist on the market?) with the Atmel chip (not on the same board with the 580 due to size constraint). Basically separating the 580 basic kit into 2 boards.

所以看待这个HW设计,将有580个应用程序代码的闪存区域。连接到580 UART接口的显示芯片也具有它需要从并执行的FW代码。我们想要580个应用程序代码和显示FW码在相同的闪存中(我认为我们不需要OTP内存,除非有原因。)

我的开发序列的问题下面是:

1.通过上面的HW设计,我需要一种读/写闪光灯的机制,将580应用程序代码从Flash加载到SRAM。这是辅助引导程序的作业吗?但是使用辅助引导加载程序需要OTP板载。是辅助引导加载程序的源代码或类似的东西?

2.假设580现在已启动并从闪存运行启动,需要充当外部主机控制器到显示设备。它需要读取显示设备FW的闪光灯,并将其发送到UART到显示设备,因此它现在可以启动。

That is my approach to the booting sequence for our dev board at the moment. From what you can see, we need code to read/write Flash and dump it to SRAM as well as dump it on to the UART bus by the 580 CPU.

您的反馈和推荐很受欢迎......

Thanks,
- khai

mt_dialog.
离线
最后一次露面:3个月4天前
职员
加入:2015-06-08 11:34
嗨kqtrinh,

嗨kqtrinh,

Yes the secondary bootloader can be found in the utilities folder in the SDK and its quite similar with the primary bootloader. Regarding the debugger module you can use a Segger Jlink Lite ARM debugger, the same debugger that the expert kit uses. Regarding your questions:

1)为了将FW从Flash加载到580 Sysram,您不需要辅助引导程序,只要您遵循SPI引导的默认引脚连接,主要将能够为您执行此操作。二级引导加载程序用于分配不同的引导引脚,打开闪光灯,以便将其关闭为低功耗,加载不同的图像(拟议功能等)。如上所述,SDK中的Utilities目录中可用辅助引导加载程序源代码。

2) If the display chip needs a fw i suppose that the 580 needs to send that fw, if the chip isn't able to download it directly from the flash, so yes you need a routine where the 580 will read the flash and send it to the display over UART. The 580 will exetute the normal booting sequence and after that it will act as a middleman between the display and the flash.

谢谢mt_dialog.

kqtrinh.
离线
最后一次露面:3 years 10 months ago
加入:2016-08-24 00:17
是否有示例代码

是否有示例代码reading/writing from/to Flash?
Thanks,
- khai

mt_dialog.
离线
最后一次露面:3个月4天前
职员
加入:2015-06-08 11:34
嗨kqtrinh,

嗨kqtrinh,

There is a driver for writing in the flash and there is also an example that interacts with the flash, the example is located in the SDK at the peripheral_examples projects in the spi directory. And also as mentioned previously there is the secondary_bootloader source code in the utilities directory. Please check the below SDK directories.

da1458x_sdk \ 5.0.4 \ utilities \ secondary_bootloader:辅助引导程序

DA1458x_SDK\5.0.4\projects\target_apps\peripheral_examples\spi : the spi flash example

谢谢mt_dialog.

kqtrinh.
离线
最后一次露面:3 years 10 months ago
加入:2016-08-24 00:17
关于你的答案

关于你的答案question 1 above, If I understand correctly, I don't need the secondary bootloader to do what I need. The primary bootloader can do the job. Then my questions are:

1.主引导程序是否驻留在ROM中?如果是这样,我们必须在生产时手动将主引导加载程序加载到每个芯片的ROM上?或者在我们收到DA14580S进行生产时已经为我们完成了此过程?

2. Assuming the DA application FW resides in SPI Flash, where in external SPI Flash address does the primary loader read the FW from to download to SysRAM? Is it by default address 0? Is this starting address programmable?

Thanks,
- khai

kqtrinh.
离线
最后一次露面:3 years 10 months ago
加入:2016-08-24 00:17
跟进问题:

跟进问题:

1.外部PC应用程序如SmartSnippets的直接访问(读/写/擦除FW)到580外部闪光灯。我可以将Smartsnippet用于FW应用程序的闪存数据文件吗?它是否必须绑定到某种格式,以将此数据文件上传到Flash?

2. Once FW is on external Flash, ROM primary bootloader must need to know 2 piece of info: address and size of FW to load to SRAM. Does SmartSnippets have these information set somewhere in flash so ROM has a knowledge so it can load the FW to SRAM?

3.使用Flash中的数据文件,FW应用程序代码也需要知道数据存储在Flash中的地址和大小,以便它可以读取和消耗数据。

Thanks,
- khai

mt_dialog.
离线
最后一次露面:3个月4天前
职员
加入:2015-06-08 11:34
嗨kqtrinh,

嗨kqtrinh,

1)主引导加载程序在ROM中刻录,加载器的功能实体在AN-B-001.PDF文档中描述,通常它为您提供了一些标准引脚,以便通过UART / SPI / I2C引导。启动加载程序会在启动设备时立即执行,因此您不必刻录引导加载程序,因为我已经提到它已有位于ROM中即可。

2) The bootloader when the procedure is flash related and the 580 executes as master it will access the address 0 of the flash memory, in the primary bootloader this is not programmable. All those info are documented in the .pdf i mentioned.

Regarding the follow up questions:

1) When smart snippets is instructed to connect to 580 in order to program the flash it downloads a small fw named flash_programmer or jtag_programmer, that fw handles all the commands from Smart Snippets (Erase/Burn etc ). Yes you can use smart snippets to flash your fw application. Regarding the format question, i dont quite get it, the SS will take the .hex convert it to .bin or you can place the .bin file directly and the tool will burn it on your flash.

2) Please read the manual i ve indicated to see the procedure that the bootloader follows.

3)正如我所提到的,SPI模式中的580将从闪存中从地址0请求数据,并且闪光灯应开始发送图像。该图像必须是可引导的,这意味着它应该具有可启动标题和代码的长度 - 如果选择可启动选项,则由Smart Scippets测量和分配。因此,智能代码段另外做的是安装0x70 0x50标题,以指示图像可引导应用一些零填充并附加.bin文件的大小。

谢谢mt_dialog.

kqtrinh.
离线
最后一次露面:3 years 10 months ago
加入:2016-08-24 00:17
让我澄清我的问题

让我澄清我的问题little better.

所以哒应用FW装载在flash的开始ing at address 0 so the primary loader upon power up can read from Flash and write it to SysRAM. Upon completely booted and running in SysRAM, the custom FW requires some data from flash to perform its task. This is the input data to some algorithm in the custom FW that we intended to write. This was the question I asked previously about the data file. Can I use SS to upload data file to Flash for my custom FW to consume after it was booted? This data file is not a bootable image. It's just some data that is required in the FW algorithm. For SS to be able to burn this data file to flash, does it need to follow some format so SS will recognize it and able to burn it to Flash?

Thanks,
- khai

mt_dialog.
离线
最后一次露面:3个月4天前
职员
加入:2015-06-08 11:34
嗨kqtrinh,

嗨kqtrinh,

是智能代码段能够将自定义数据刻录到闪光灯中,可以使用完全标题编程器甚至闪光灯刻录机,没有任何特定的格式,以便使用智能片段将数据刻录到闪光灯中。您可以通过将随机二进制文件刻录到DEV套件闪存的某些地址来测试此问题。

谢谢mt_dialog.

kqtrinh.
离线
最后一次露面:3 years 10 months ago
加入:2016-08-24 00:17
I would like to learn how

I would like to learn how SmartSnippets uses flash_programmer or jtag_programmer to /write/erase flash. Do you have source code for them?

Thanks,
- khai

kqtrinh.
离线
最后一次露面:3 years 10 months ago
加入:2016-08-24 00:17
never mind. Found it.

never mind. Found it.

kqtrinh.
离线
最后一次露面:3 years 10 months ago
加入:2016-08-24 00:17
有应用笔记吗?

有关Flash_Programmer实用程序的谈话吗?

mt_dialog.
离线
最后一次露面:3个月4天前
职员
加入:2015-06-08 11:34
嗨kqtrinh,

嗨kqtrinh,

No, there is no application note that documents the functionallity of the jtag_programmer. This fw is ment to be used by the Smart Snippets tool and not as a code reference.

Also please dont post a new question on an irrelevant topic, you can always create a new post.

谢谢mt_dialog.