如何将NVMS_GENERIC_PART的条目更改为零(不使用VES .AD_NVMS_DIRECT _...)。

⚠️
嗨,...感谢您来论坛。令人兴奋的消息!我们现在正在迁至我们的新论坛平台,将提供更好的功能,并包含在主对话框网站中。所有帖子和帐户都已迁移。我们现在只接受新论坛上的流量 - 请发布任何新线程https://www.dialog-seminile.com/support.。我们将在未来几天修复错误/优化搜索和标记。
8个帖子/ 0新
最后一篇
rlaxogjs90.
离线
最后一次露面:1年2个月前
加入:2017-04-04 10:04
如何将NVMS_GENERIC_PART的条目更改为零(不使用VES .AD_NVMS_DIRECT _...)。

相关问题
https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bl..。

嗨,我在NVMS适配器有问题,也无法弄清楚。

我使用的是proximity_reporter示例,使用8m位DA14680芯片的suota。(SDK ver1.0.12.1078)
“并尝试使用NVMS_GENERIC_PART未使用VES。”
我读取了Flash适配器手册,并尝试更改分区,但同样的结果。nvms_generic_part - >条目.Flag:2(Ves)

下面是我在custom_config_qspi_suota.h中的项目定义。

#定义dg_configFLASH_ADAPTER 1
#define dg_confignvms_adapter 1.
#define dg_confignvms_ves 0.
#define dg_confignvparam_adapter 1.

我擦除了所有的partition_table.h文件,除了my_partition_table.h文件,以防万一。

下面是my_partition_table.h文件。
PARTITION2(0x000000, 0x01E000, NVMS_FIRMWARE_PART, 0)
Partition2(0x01e000,0x001000,nvms_product_header_part,0)
Partition2(0x01f000,0x001000,nvms_image_header_part,0)
Partition2(0x020000,0x050000,nvms_fw_exec_part,0)
Partition2(0x070000,0x00d000,nvms_log_part,0)
Partition2(0x07d000,0x002000,nvms_platform_params_part,partition_flag_read_only)
partition2(0x07f000,0x001000,nvms_partition_table,partition_flag_read_only)
Partition2(0x080000,0x010000,NVMS_PARAM_PART,0)
Partition2(0x090000,0x051000,nvms_fw_update_part,0)
Partition2(0x0e1000,0x01f000,nvms_generic_part,0)

我在ad_nvms_init()中打印出一些日志以进行一些检查。
void ad_nvms_init(void){
.....
做 {
ad_flash_read(flash_addr,(uint8_t *)&条目,sizeof(partition_entry_t));
if(条目.type!= 0xff &&条目.Type!= 0 &&条目.magic == partition_entry_magic &&
条目。有效== 0xFF) {
printf(“entry.type:%d,stry.flag:%d \ r \ n”,stry.type,stry.flags);
如果条目。标志= = 2){
entry.flags = 0;
}

add_partition_entry(&条目);
}
flash_addr + = sizeof(partition_entry_t);
} whiled(rest.type!= 0xff);
#if config_partition_table_create.
if(partitions == null){
printf(“ad_nvms_init >> init_default_partitions \ r \ n”);
init_default_partitions();
}别的{
Printf ("ad_nvms_init >> partitions2: %d\r\n", partitions);
}
#万一
.....
}

在执行“erase_qspi_jtag_win”和“suota_initial_flash_jtag_win”之后,我得到了这个日志。
entry.type:1,entry.flag:0
entry.type:19,条目氟:0
entry.type:20,条目.flag:0
entry.type:17,条目.FLAG:0
entry.type:4,条目.flag:0
entry.type:15,entry.flag:1
entry.type:16,条目.flag:1
entry.type:2,entry.flag:0
条目。类型:18岁的条目。国旗:0
entry.type:5,条目.Flag:2 < - 预期为条目.FLAG:0(其中条目.Type:5是NVMS_GENERIC_PART)

我检查了整个Flash被SmartSnippets Toolbox删除了执行erase_qspi_jtag_win。
但是总是得到相同的日志,看起来好像有一个分区信息留在flash中。
当然,函数init_default_partitions()不会被调用,因为变量“partitions”不是NULL。

此外,我没有调用ad_nvms_init()函数。它似乎是由BLE NVPARAM适配器调用的。

所以,总之。我想使用NVMS_GENERIC_PART未使用VES(“intry.flag = 0”)。
如果可能的话,我想将整个NVMS_GENERIC_PART更改为自己的分区。如,nvms_my_custom_part。(实际上,我尝试更改分区名称和标志值。但失败。没有错过执行“erase_qspi_jtag_win”。)
但是如果这是不可能的,那么也许我应该将NVMS_GENERIC_PART扇区大小更改为0x01000,并将其余扇区使用为NVMS_MY_CUSTOM_PART。

有没有其他方法可以解决这个问题?

谢谢你。

设备:
PM_DIALOG.
离线
最后一次露面:6小时40分钟前
职员
加入:2018-02-08 11:03
嗨rlaxogjs90,

嗨rlaxogjs90,

感谢您创建一个新的论坛帖子。SDK将NVMS_GENERIC_PART分区处理为VES分区。原因是因为该分区用于写入持续重新加载的数据,因此该机制增加了闪光灯的寿命。虽然,您可以绕过此分区,并在不使用VES的情况下添加您自己的分区。由于您使用的是nvms_generic_part名称,因此应将分区配置为VES。您可以请遵循您发布的上一个线程中描述的过程,以添加您的自定义分区吗?那么你可以用nvms_my_custom_par分区上传分区表吗?

谢谢,PM_DIALOG.

rlaxogjs90.
离线
最后一次露面:1年2个月前
加入:2017-04-04 10:04
嗨pm_dialog。你的意思是

嗨pm_dialog。您是否意味着我应该更改my_partition_table.h文件的分区名称?

如果正确的话,我只是按照我以前做过的程序,没有任何改变。

my_partition_table.h.
PARTITION2(0x000000, 0x01E000, NVMS_FIRMWARE_PART, 0)
Partition2(0x01e000,0x001000,nvms_product_header_part,0)
Partition2(0x01f000,0x001000,nvms_image_header_part,0)
Partition2(0x020000,0x050000,nvms_fw_exec_part,0)
Partition2(0x070000,0x00d000,nvms_log_part,0)
Partition2(0x07d000,0x002000,nvms_platform_params_part,partition_flag_read_only)
partition2(0x07f000,0x001000,nvms_partition_table,partition_flag_read_only)
Partition2(0x080000,0x010000,NVMS_PARAM_PART,0)
Partition2(0x090000,0x051000,nvms_fw_update_part,0)
partition2(0x0e1000,0x01f000,nvms_user_param_part,0)< - 添加自定义分区表名。

partition_def.h.
typedef枚举{
nvms_firmware_part = 1,
NVMS_PARAM_PART = 2,
nvms_bin_part = 3,
nvms_log_part = 4,
//NVMS_GENERIC_PART = 5, <-阻塞这行只是以防万一。
nvms_user_param_part = 6,
NVMS_PLATFORM_PARAMS_PART = 15,
nvms_partition_table = 16,
NVMS_FW_EXEC_PART = 17,
nvms_fw_update_part = 18,
nvms_product_header_part = 19,
nvms_image_header_part = 20,

} nvms_partition_id_t;

并遵循以下步骤。
project -> clean, build DA14681-01-Release_QSPI_SUOTA,执行erase_qspi_jtag_win,执行suota_initial_flash_jtag_win。

对于结果,我以前喜欢相同的日志。可以找到nvms_generic_part(条目rype:5)而不是nvms_user_param_part(条目.type:6)。

日志
entry.type:1,entry.flag:0
entry.type:19,条目氟:0
entry.type:20,条目.flag:0
entry.type:17,条目.FLAG:0
entry.type:4,条目.flag:0
entry.type:15,entry.flag:1
entry.type:16,条目.flag:1
entry.type:2,entry.flag:0
条目。类型:18岁的条目。国旗:0
rent.type:5,intry.flag:2

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

我也试过这个。通过SmartSnippets工具箱读取分区表,并导出NVMS_PARTITION_TABLE数据。
更改导出文件(条目.Type:5,rent.flag:2到条目.type:5,stry.flag:0)然后保存。
(地址:0x7F090,EA 05 FF“02”E1 00 1F 00更改为EA 05 FF“00”E1 00 1F 00)
擦除NVMS_PARTITION_TABLE部分,然后刻录更改的导出文件。

通过此过程一切似乎都可以,而是通过运行suota_initial_flash_jtag_win,ress.type:5返回到条目.flag:2。

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

任何更多的建议吗?

感谢您的快速回复!

PM_DIALOG.
离线
最后一次露面:6小时40分钟前
职员
加入:2018-02-08 11:03
嗨rlaxogjs90,

嗨rlaxogjs90,

您可以按照3.1.1验证与SmartSnippets工具箱描述的过程吗Flash适配器概念(HTML)教程才能添加自定义分区表?请尝试一下,让我知道。

谢谢,PM_DIALOG.

rlaxogjs90.
离线
最后一次露面:1年2个月前
加入:2017-04-04 10:04
嗨pm_dialog。

嗨pm_dialog。

由于我在短时间内获得了我的devkit,因此使用我的自定义板是遵循教程的唯一方法(使用JTAG接口)。
我按照教程使用了proximity_reporter suota示例,但是添加或更改分区表失败了。
好吧,我的过程和教程之间的区别是suota/非suota的例子和devkit/自定义板。

这是否会产生任何问题使用NVMS?

谢谢你。

PM_DIALOG.
离线
最后一次露面:6小时40分钟前
职员
加入:2018-02-08 11:03
嗨laxogjs90,

嗨laxogjs90,

本教程演示了非拟议应用程序的分区。雷竞技安卓下载您能否将您使用的所有配置发送到您的项目中?

谢谢,PM_DIALOG.

rlaxogjs90.
离线
最后一次露面:1年2个月前
加入:2017-04-04 10:04
嗨pm_dialog。

嗨pm_dialog。

我会粘贴我的custom_config_qspi_suota.h文件。

谢谢你。

/ * *
****************************************************************************************
*
* @file custom_config_qspi_suota.h.
*
* @brief董事会支持包。用于缓存的QSPI模式的用户配置文件。
*
*版权所有(c)2015对话半导体。雷竞技电竞平台
*此计算机程序包括机密,专有信息
对话半导体雷竞技电竞平台的*。保留所有权利。
*
****************************************************************************************
* /

#ifndef custom_config_qspi_suota_h_
#define custom_config_qspi_suota_h_

#include“bsp_definitions.h”

#define config_use_ble.
#undef config_use_ftdf.
#define config_retarget.

#定义dg_configUSE_LP_CLK LP_CLK_RCX / / LP_CLK_32768
#define dg_configexec_mode mode_is_cached.
#定义dg_configCODE_LOCATION NON_VOLATILE_IS_FLASH
#define dg_configext_crystal_freq ext_crystal_is_16m.

#定义dg_configIMAGE_SETUP DEVELOPMENT_MODE
#define dg_configemulate_otp_copy(0)

#定义dg_configIMAGE_FLASH_OFFSET (0 x20000)
#define dg_configsuota_support(1)

#define dg_configuser_can_use_timer1(0)

#定义dg_configOPTIMAL_RETRAM (1)

#if (dg_configoptimal_ream == 1) / /输入参数
#if(dg_configblack_orca_ic_rev == black_orca_ic_rev_a)
#define dg_configmem_retention_mode(0x1b)
#define dg_configshuffling_mode(0x0)
其他#
#define dg_configmem_retention_mode(0x07)
#define dg_configshuffling_mode(0x0)
#万一
#万一

#define dg_configuse_wdog(1)

#define dg_configflash_connected_to(flash_connected_to_1v8)
#定义dg_configFLASH_POWER_DOWN (0)

#define dg_configpower_1v8_active(1)
#define dg_configpower_1v8_sleep(1)

#定义dg_configBATTERY_TYPE (BATTERY_TYPE_CUSTOM)
#define dg_configbattery_charge_voltage 0xa // 4.2V
#define dg_configbattery_type_custom_adc_voltage(3475)//(3439)
//#define dg_configBATTERY_LOW_LEVEL (2457) // 3V
#define dg_configprecharging_threshold(2462)// 3.006V
#define dg_configCHARGING_THRESHOLD (2498) // 3.05V
#define dg_configbattery_charge_current 13 // 60mA
#define dg_configbattery_precharge_current 29 // 2.1ma
#define dg_configbattery_charge_ntc 1 //禁用
#define dg_configPRECHARGING_TIMEOUT (30 * 60 * 100) // N x 10msec . //设置超时时间

#定义dg_configUSE_SOC 1
/ *取消注释以下行以启用充电状态调试或性能测试* /
//#定义debug_soc
#f定义(debug_soc)
#define config_retarget.
#万一

#define dg_configuse_usb 1
#define dg_configuse_usb_charger 1.
#define dg_configallow_charging_not_enum 1.
#define dg_configuse_not_enum_chnolging_timeout 0.

#define dg_configuse_prodk(1)

#define dg_configuse_sw_cursor(1)

#define dg_configcacheable_qspi_area_len(nvms_param_part_start - memory_qspif_base)

/*************************************************************************************************\
*内存特定配置
* /
#define dg_configqspi_cached_optimal_retram_0_size_ae(64 * 1024)
#define dg_configqspi_cached_ram_size_ae(32 * 1024)
#define dg_configQSPI_CACHED_RETRAM_0_SIZE_AE (96 * 1024)

/*************************************************************************************************\
*外围特定配置
* /
#定义dg_configFLASH_ADAPTER 1
#define dg_confignvms_adapter 1.
#define dg_confignvms_ves 0.
#define dg_confignvparam_adapter 1.

//#定义dg_configdisable_background_flash_ops 1

#定义dg_configGPADC_ADAPTER 1

#define dg_configuse_hw_i2c 1
#define dg_configuse_hw_quad 1.
#define dg_configuse_hw_spi 1
#定义dg_configUSE_HW_TIMER0 1
#define dg_configuse_hw_timer2 1

#define dg_configi2c_adapter 1.
#define dg_configspi_adapter 1.

#define defoulble_att_db_configuration(0x10)//带有“外设首选连接参数”
#define defaultBLE_PPCP_INTERVAL_MIN (BLE_CONN_INTERVAL_FROM_MS(500)) //设置间隔时间
#define defaulble_ppcp_interval_max(ble_conn_interval_from_ms(750))// 750 ms
#define defaultBLE_PPCP_SLAVE_LATENCY (0) // 0 events
#define defaulble_ppcp_sup_timeout(ble_supervision_tmo_from_ms(6000))// 6000 ms

#define ble_max_misses_allowed(3)
#define ble_max_delays_allowed(3)

/*使用动态列表的BLE事件,而不是FreeRTOS队列*/
#定义BLE_MGR_USE_EVT_LIST (1)

/ *
* Suota Loader配置:
* - 仅在GATT上启用Suota,将Suota_version设置为任何版本> = suota_version_1_1
*并留下upota_psm未定义。
* - 要在GATT和L2CAP COC上启用Suota,将Suota_version设置为任何版本> = suota_version_1_2
*并定义Suota_psm以匹配所需的PSM。在这种情况下,中央设备
*可以根据其偏好使用两者中的任何一种。
* /
#define suota_version suota_version_1_3.
#定义x81 SUOTA_PSM 0

//#定义USE_PARTITION_TABLE_1MB_WITH_SUOTA
#define使用_my_partition_table

/*************************************************************************************************\
* FreeRTOS特定配置
* /
#define os_freertos / *定义它以使用freertos * /

#if suota_psm.
#define suota_heap_overhead(3200)
其他#
#define suota_heap_overhead(0)
#万一

#if(dg_configuse_soc)
#f定义(debug_soc)
#ifndef Refored_Build.
/ *调试SOC不应在发布构建中使用* /
#define configTOTAL_HEAP_SIZE (12900 + SUOTA_HEAP_OVERHEAD) /*这是FreeRTOS总堆大小*/
其他#
#Error“Debug SoC和Suota Over L2CAP不能在发布目标中一起使用”
#万一
其他#
#define configTOTAL_HEAP_SIZE (11100 + SUOTA_HEAP_OVERHEAD) /*这是FreeRTOS总堆大小*/
#万一
其他#
#define configtotal_heap_size(11000 + suota_heap_overhead)/ *这是freertos total堆大小* /
#万一

/*************************************************************************************************\
* BLE设备配置
* /
#define dg_configble_central(0)
#定义dg_configBLE_GATT_CLIENT (0)
#define dg_configble_observer(0)
#define dg_configble_broadcaster(0)
的ifndef SUOTA_PSM
#define dg_configble_l2cap_coc(0)
#万一

/ *包括BSP默认值* /
#include“bsp_defaults.h”
/*包含内存布局*/
#include“bsp_memory_layout.h”
#endif / * custom_config_qspi_suota_h_ * /

PM_DIALOG.
离线
最后一次露面:6小时40分钟前
职员
加入:2018-02-08 11:03
嗨rlaxogjs90。

嗨rlaxogjs90。

感谢提供您的配置。让我检查一下,我会尽快给您答复。

谢谢,

PM_DIALOG.