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

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

相关问题
https://support.dialog-semicondiondiondum/forums/post/dialog-smartbond-bl ...

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

我正在使用Proximity_reporter示例,使用Suota使用8M位DA14680芯片。(SDK Ver1.0.12.1078)
“并且尝试使用NVMS_GENERIC_PART而不使用VES。”
我读取了Flash适配器手册,并尝试更改分区,但同样的结果。nvms_generic_part - >条目.Flag:2(Ves)

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

#define dg_configflash_adapter 1.
#define dg_confignvms_adapter 1.
#define dg_confignvms_ves 0.
#define dg_confignvparam_adapter 1.

我删除了除my_partition_table.h文件之外的所有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()中打印了一些日志以进行一些检查。
空白ad_nvms_init (void) {
.....
做 {
Ad_flash_read (flash_addr, (uint8_t *) &entry, sizeof(partition_entry_t));
如果条目。type != 0xFF &&条目。输入!= 0 &&条目。magic == PARTITION_ENTRY_MAGIC &&
entry.valid == 0xff){
printf(“entry.type:%d,stry.flag:%d \ r \ n”,stry.type,stry.flags);
if(条目.flags == 2){
条目。旗帜= 0;
}

add_partition_entry(&条目);
}
flash_addr + =运算符(partition_entry_t);
}(条目。类型! = 0 xff);
#如果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);
}
# endif
.....
}

执行“erase_qspi_jtag_win”之后,然后“suota_initial_flash_jtag_win”,我收到此日志。
条目。类型:1、条目。国旗:0
entry.type:19,条目氟:0
条目。类型:20岁的条目。国旗:0
entry.type:17,条目.FLAG:0
entry.type:4,条目.flag:0
条目。类型:15日条目。国旗:1
条目。类型:16日条目。国旗:1
条目。类型:2项。国旗:0
entry.type:18,条目.Flag:0
rent.type:5,intry.flag:2<- expected to be entry.flag: 0(where entry.type: 5 is NVMS_GENERIC_PART)

我检查了整个flash被擦除执行erase_qspi_jtag_win smartsnippets工具箱。
但总是获得相同的日志,看起来闪光灯中剩下的分区信息。
当然,由于变量“分区”不是null,因此不会调用函数init_default_partitions()。

此外,我没有调用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.
离线
最后一次露面:3天5小时前
职员
加入:2018-02-08 11:03
嗨rlaxogjs90,

嗨rlaxogjs90,

感谢你创建了一个新的论坛帖子。SDK将NVMS_GENERIC_PART分区作为VES分区处理。原因是这个分区用于写入不断重新加载的数据,因此这种机制增加了flash的生命周期。不过,您可以绕过这个分区并添加您自己的分区,而不需要使用VES。由于您使用的是NVMS_GENERIC_PART名称,因此分区应该配置为VES。您能按照您在上一篇帖子中所描述的步骤来添加您的自定义分区吗?然后请上传带有NVMS_MY_CUSTOM_PAR分区的分区表。

谢谢,PM_DIALOG.

rlaxogjs90.
离线
最后一次露面:1年5个月前
加入: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 enum {
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-Refoy_qspi_suota,运行erase_qspi_jtag_win,运行suota_initial_flash_jtag_win。

结果,我得到了和以前一样的日志。可以找到NVMS_GENERIC_PART(entry。type: 5)而不是NVMS_USER_PARAM_PART(entry。类型:6)。

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

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

我也试过这个。通过SmartSnippets Toolbox读取分区表,并导出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.
离线
最后一次露面:3天5小时前
职员
加入:2018-02-08 11:03
嗨rlaxogjs90,

嗨rlaxogjs90,

请您按照3.1.1验证使用SmartSnippets Toolbox中描述的步骤Flash适配器概念(HTML)教程才能添加自定义分区表?请尝试一下,让我知道。

谢谢,PM_DIALOG.

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

嗨pm_dialog。

因为我的开发工具包很短,使用我的自定义板是遵循教程的唯一方法(使用jtag接口)。
我跟着Proximity_reporter upota示例的教程,但是添加或更改分区表。
嗯,我的程序与教程之间的差异是Suota /非拟议示例和Devkit / Custom Board。

这对使用NVMS有什么问题吗?

谢谢你。

PM_DIALOG.
离线
最后一次露面:3天5小时前
职员
加入:2018-02-08 11:03
嗨Laxogjs90,

嗨Laxogjs90,

本教程演示了非拟议应用程序的分区。亚博国际官网平台网址您能否将您使用的所有配置发送到您的项目中?

谢谢,PM_DIALOG.

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

嗨pm_dialog。

我将粘贴custom_config_qspi_suota.h文件。

谢谢你。

/ **
****************************************************************************************
*
* @file custom_config_qspi_suota.h
*
* @brief董事会支持包。用于缓存的QSPI模式的用户配置文件。
*
*版权所有(c)2015对话半导体。yabo国际娱乐
*此计算机程序包括机密,专有信息
*对话框半yabo国际娱乐导体。版权所有。
*
****************************************************************************************
*/

#ifndef custom_config_qspi_suota_h_
#define custom_config_qspi_suota_h_

#include“bsp_definitions.h”

#定义CONFIG_USE_BLE
# undef CONFIG_USE_FTDF
#define config_retarget.

#define dg_configuse_lp_clk lp_clk_rcx // lp_clk_32768
#define dg_configexec_mode mode_is_cached.
#define dg_configcode_location non_volatile_is_flash.
#define dg_configext_crystal_freq ext_crystal_is_16m.

#define dg_configimage_setup development_mode.
#define dg_configemulate_otp_copy(0)

#define dg_configimage_flash_offset(0x20000)
#定义dg_configSUOTA_SUPPORT (1)

#定义dg_configUSER_CAN_USE_TIMER1 (0)

#define dg_configoptimal_retram(1)

#if(dg_configoptimal_retram == 1)
# dg_configBLACK_ORCA_IC_REV == BLACK_ORCA_IC_REV_A
#定义dg_configMEM_RETENTION_MODE (0 x1b)
#define dg_configshuffling_mode(0x0)
#别的
#define dg_configmem_retention_mode(0x07)
#define dg_configshuffling_mode(0x0)
# endif
# endif

#定义dg_configUSE_WDOG (1)

#定义dg_configFLASH_CONNECTED_TO (FLASH_CONNECTED_TO_1V8)
#define dg_configflash_power_down(0)

#define dg_configpower_1v8_active(1)
#定义dg_configPOWER_1V8_SLEEP (1)

#define dg_configbattery_type(battery_type_custom)
#define dg_configbattery_charge_voltage 0xa // 4.2V
#定义dg_configBATTERY_TYPE_CUSTOM_ADC_VOLTAGE (3475) / / (3439)
//#定义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_configprocharging_timeout(30 * 60 * 100)// n x 10毫秒

#define dg_configuse_soc 1
/ *取消注释以下行以启用充电状态调试或性能测试* /
//#定义debug_soc
#如果定义(DEBUG_SOC)
#define config_retarget.
# endif

#定义dg_configUSE_USB 1
#定义dg_configUSE_USB_CHARGER 1
#define dg_configallow_charging_not_enum 1.
#define dg_configuse_not_enum_chnolging_timeout 0.

#定义dg_configUSE_ProDK (1)

#define dg_configuse_sw_cursor(1)

定义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)

/ *************************************************************************************************
*外围设备的具体配置
*/
#define dg_configflash_adapter 1.
#define dg_confignvms_adapter 1.
#define dg_confignvms_ves 0.
#define dg_confignvparam_adapter 1.

/ / # define dg_configDISABLE_BACKGROUND_FLASH_OPS 1

#define dg_configgpadc_adapter 1.

#定义dg_configUSE_HW_I2C 1
#define dg_configuse_hw_quad 1.
#定义dg_configUSE_HW_SPI 1
#define 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))// 500 ms
#define defaultBLE_PPCP_INTERVAL_MAX (BLE_CONN_INTERVAL_FROM_MS(750)) // 750毫秒
#define defaultble_ppcp_slave_latency(0)// 0事件
#define defaultBLE_PPCP_SUP_TIMEOUT (BLE_SUPERVISION_TMO_FROM_MS(6000)) //

#定义BLE_MAX_MISSES_ALLOWED (3)
#define ble_max_delays_allowed(3)

/ *使用动态列表BLE事件而不是Freertos队列* /
#define ble_mgr_use_evt_list(1)

/ *
* SUOTA加载器配置:
* -只支持GATT的SUOTA,设置SUOTA_VERSION为任意版本>= SUOTA_VERSION_1_1
*且未定义SUOTA_PSM。
* - 要在GATT和L2CAP COC上启用Suota,将Suota_version设置为任何版本> = suota_version_1_2
*并定义Suota_psm以匹配所需的PSM。在这种情况下,中央设备
*可以根据自己的喜好使用两者中的任何一个。
*/
#define suota_version suota_version_1_3.
#define suota_psm 0x81

/ / #定义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)
# endif

#if(dg_configuse_soc)
#如果定义(DEBUG_SOC)
#ifndef Refored_Build.
/* DEBUG SOC不应该在发布版本中使用*/
#define configtotal_heap_size(12900 + suota_heap_overhead)/ *这是freertos total堆大小* /
#别的
#error "DEBUG SOC和SUOTA over L2CAP不能在发布目标中一起使用"
# endif
#别的
#define configtotal_heap_size(11100 + suota_heap_overhead)/ *这是freertos total堆大小* /
# endif
#别的
#define configtotal_heap_size(11000 + suota_heap_overhead)/ *这是freertos total堆大小* /
# endif

/ *************************************************************************************************
* BLE设备配置
*/
#define dg_configble_central(0)
#define dg_configble_gatt_client(0)
#定义dg_configBLE_OBSERVER (0)
#定义dg_configBLE_BROADCASTER (0)
#ifndef suota_psm.
#define dg_configble_l2cap_coc(0)
# endif

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

PM_DIALOG.
离线
最后一次露面:3天5小时前
职员
加入:2018-02-08 11:03
嗨rlaxogjs90。

嗨rlaxogjs90。

谢谢您提供配置。让我检查一下,我会尽快回复你。

谢谢,

PM_DIALOG.