如何使用Code_size配置QSPI的XIP大于512KB

⚠️
嗨,...感谢您来论坛。令人兴奋的消息!我们现在正在迁至我们的新论坛平台,将提供更好的功能,并包含在主对话框网站中。所有帖子和帐户都已迁移。我们现在只接受新论坛上的流量 - 请发布任何新线程https://www.dialog-seminile.com/support.。我们将在未来几天修复错误/优化搜索和标记。
5 posts / 0 new
最后一篇
加里克拉克森
离线
Last seen:1 year 11 months ago
加入:2019-04-16 09:57
如何使用Code_size配置QSPI的XIP大于512KB

大家好,

我有一个DA1469x PROKIT和BUITION CODE,带有SDK_10.0.4.66,这具有标准MX25U3235F闪存设备。我正在执行评估以检查设备将符合客户应用程序的要求。

我的应用程序被配置为从QSPI执行XIP,使用Sample Application Freertos_Retarget构建初始测试,并在使用4MB分区表时运行正常。

Now when I am adding the rest of my application I have linked in some proprietary code libraries and constant code tables which increases the code mapped to the ROM region to larger than the default 512KB. The ROM linker region grows to around 800KB. I have left the cache for QSPI configured as default at 64KB.

我创建了一个修改过的4M基于4M的分区表,它将固件分区定义为较大的正常,我调整了链接器脚本:

#define nvms_product_header_part_start 0x000000 #define nvms_product_header_part_size 0x002000 #define nvms_firmware_part_start 0x002000 / *对齐到512kb是由默认flash_region_size指定的。* / #define nvms_firmware_part_size 0x0de000 / *从默认值0x07e000增加以使用空格* /

I flashed the device using theprogram_qspi_jtag.脚本正确刷新所有扇区,但是我无法从0x80000(remapped)或0x36080000直接的地址读回任何常量数据或执行代码。它甚至可能有一个NVMS_FIRMWARE_PART_SIZEgreater than 512KB?

要么是program_qspi_jtag.脚本无法正确闪烁上部区域,或者QSPI内存(RE)映射以某种方式仍然存在错误。

Please can you offer any guidance.

Thanks

~Garry

设备:
PM_Dialog
离线
Last seen:3天5小时前
职员
加入:2018-02-08 11:03
Hi Garry Clarkson,

Hi Garry Clarkson,

请检查DA1469X数据表的表976。缺省情况下,闪存区域大小设置为0.5 MB,但可以通过在OTP标题中编程Cache_Flash_Reg [Flash_Region_Size]来更改此值。bootloader将设置cache_flash_reg [flash_region_base]和cache_flash_reg [flash_region_offset],因此您不需要对它们进行编程。只有Cache_Flash_reg [Flash_Region_size]必须编程。

  1. 假设您希望拥有1MB闪存区域大小,因此您必须将Cache_Flash_reg [flash_region_size]设置为0x5。请查找附上您应该遵循的步骤以便编程OTP标题。
  2. 燃烧的OTP头后,应该改变the partition table, because the FW partitions must be aligned to 1MB with offset up to 0x4000. In general the FW partition must be aligned to FLASH_REGION_SIZE. You could find a reference partition table in the attachments. As you can see, both firmware and generic partition are 1MB aligned. The NVMS_PRODUCT_HEADER should start at 0x0000 and the size should be 0x2000. Except from the NVMS_PRODUCT_HEADER, NVMS_FIRMWARE and NVMS_GENERIC_PART could be modified according your implementation and requirements. Make sure that you have set the correct value according to Table 976 and burn the OTP header.
  3. 如果您使用MX25U3235F和4MB分区表,则必须具有与CONFIG.PNG快照中相同的配置。运行program_qspi_config脚本以确保您具有相同的配置。除非,请改变它们。
  4. 首先擦除,然后通过执行相应的脚本来编程QSPI。之后打开QSPI分区表,请介绍SmartSnippets工具箱的工具栏。强烈建议使用版本2.0.8的最新版本。如果按Connect和Read,则会将更新的分区表视为partition_table.png快照。nvms_partition_table应该在QSPI地址0x3FF00开始,4千字节(1次闪存扇区大小)应放置在所选闪光灯尺寸结束之前。如果不是这种情况,则工具箱无法识别您的新分区方案(nvms_partition_table.png)!

此外,如果您希望具有偶像功能,则必须分别修改Suota分区表。

Thanks, PM_Dialog

附件:
加里克拉克森
离线
Last seen:1 year 11 months ago
加入:2019-04-16 09:57
你好,

你好,

非常感谢您的指导和步骤指令。我在启动代码早期将Cache_Flash_Reg [Flash_Region_size]设置为0x5,而不会实现必须通过OTP路由完成。

当我将Cache_Flash_reg [flash_region_size]设置为0x4以进行某些余量并调整分区表来更改为使用2mbyte配置。它现在正常工作。谢谢你的帮助。

Regards,

Garry

PM_Dialog
离线
Last seen:3天5小时前
职员
加入:2018-02-08 11:03
Hi Garry,

Hi Garry,

很高兴你识上你的问题。如果您发现我的答案有用,请将其标记为“已接受”。

Thanks, PM_Dialog

PM_Dialog
离线
Last seen:3天5小时前
职员
加入:2018-02-08 11:03
嗨加里,

嗨加里,

In addition you should change the dg_configQSPI_CODE_SIZE_AA macro in bsp_memory_defaults.h file. Please make the following modifications in bsp_memory_defaults.h

#ifndef dg_configqspi_max_image_size #define dg_configqspi_max_image_size(image_partition_size)#endif #ifndef dg_configqspi_code_size_aa #define dg_configqspi_code_size_aa(dg_configqspi_max_image_size  - (136 * 1024))/ *考虑CMI固件大小* / #endif

The 136KB is the size of the CMAC which is running in M0+.

Thanks, PM_Dialog