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

⚠️
嗨,...感谢您来论坛。令人兴奋的消息!我们现在正在迁至我们的新论坛平台,将提供更好的功能,并包含在主对话框网站中。所有帖子和帐户都已迁移。我们现在只接受新论坛上的流量 - 请发布任何新线程//www.xmece.com/support.我们会在接下来的几天修复bug /优化搜索和标记。
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。”
我阅读了闪存适配器手册,试图改变分区,但得到了相同的结果。NVMS_GENERIC_PART - >条目。国旗:2(大)

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

#define dg_configflash_adapter 1.
#定义dg_configNVMS_ADAPTER 1
#定义dg_configNVMS_VES 0
#定义dg_configNVPARAM_ADAPTER 1

我删除了除my_partition_table.h文件之外的所有partition_table.h文件。

下面是my_partition_table.h文件。
Partition2(0x000000,0x01e000,nvms_firmware_part,0)
分区2(0x01E000, 0x001000, NVMS_PRODUCT_HEADER_PART, 0)
分区2(0x01F000, 0x001000, NVMS_IMAGE_HEADER_PART, 0)
分区2(0x020000, 0x050000, NVMS_FW_EXEC_PART, 0)
分区2(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)
分区2(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 &&
entry.valid == 0xff){
printf("条目。类型:% d,条目。国旗:% d \ r \ n”条目。类型,entry.flags);
if(条目.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
条目。类型:19岁的条目。国旗:0
entry.type:20,条目.flag:0
条目。类型:17岁的条目。国旗:0
条目。类型:4项。国旗:0
entry.type:15,entry.flag:1
entry.type:16,条目.flag:1
entry.type:2,entry.flag:0
entry.type:18,条目.Flag:0
entry.type:5,条目.Flag:2 < - 预期为条目.FLAG:0(其中条目.Type:5是NVMS_GENERIC_PART)

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

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

因此,在总结。我想使用NVMS_GENERIC_PART而不是使用VES(”条目。国旗= 0”)。
如果可能的话,我希望将整个NVMS_GENERIC_PART更改为我自己的分区。比如,NVMS_MY_CUSTOM_PART。(实际上,我试图更改分区名称和标志值。但失败了。没有错过执行“erase_qspi_jtag_win”)
但如果它是不可能的,那么也许我应该将NVMS_GENERIC_PART扇区大小更改为0x01000并使用其余扇区到NVMS_MY_CUSTOM_PART。

还有其他办法解决这个问题吗?

谢谢你!

设备:
PM_Dialog
离线
最后看到:3天8小时前
工作人员
加入: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年5个月前
加入:2017-04-04 10:04
嗨PM_Dialog。你的意思是

嗨PM_Dialog。你的意思是我应该修改my_partition_table.h文件的PARTITION NAME吗?

如果是对的话,我只是遵循我之前完成的程序,没有任何改变。

my_partition_table.h.
Partition2(0x000000,0x01e000,nvms_firmware_part,0)
分区2(0x01E000, 0x001000, NVMS_PRODUCT_HEADER_PART, 0)
分区2(0x01F000, 0x001000, NVMS_IMAGE_HEADER_PART, 0)
分区2(0x020000, 0x050000, NVMS_FW_EXEC_PART, 0)
分区2(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)
分区2(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-Refoy_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
条目。类型:19岁的条目。国旗:0
entry.type:20,条目.flag:0
条目。类型:17岁的条目。国旗:0
条目。类型:4项。国旗:0
entry.type:15,entry.flag:1
entry.type:16,条目.flag:1
entry.type:2,entry.flag:0
entry.type:18,条目.Flag:0
条目。类型:5项。国旗:2

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

我也试过这个。通过SmartSnippets Toolbox读取分区表,并导出NVMS_Partition_Table数据。
更改导出的文件(条目)。类型:5项。国旗:2to entry.type: 5, entry.flag: 0) and then save.
(地址: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,条目。类型:5返回entry。国旗:2。

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

有更多的建议......?

谢谢您的快速回复!

PM_Dialog
离线
最后看到:3天8小时前
工作人员
加入: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。

由于我在短时间内获得了我的devkit,因此使用我的自定义板是遵循教程的唯一方法(使用JTAG接口)。
我跟着Proximity_reporter upota示例的教程,但是添加或更改分区表。
嗯,我的程序与教程之间的差异是Suota /非拟议示例和Devkit / Custom Board。

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

谢谢你!

PM_Dialog
离线
最后看到:3天8小时前
工作人员
加入:2018-02-08 11:03
嗨Laxogjs90,

嗨Laxogjs90,

本教程演示了非suota应用程序的分区。亚博国际官网平台网址你能把你在项目中使用的所有配置发给我吗?

谢谢,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 Dialog yabo国际娱乐Semiconductor。
*本计算机程序包括机密、专有信息
*对话框半yabo国际娱乐导体。版权所有。

****************************************************************************************
* /

的ifndef CUSTOM_CONFIG_QSPI_SUOTA_H_
#定义CUSTOM_CONFIG_QSPI_SUOTA_H_

# include“bsp_definitions.h”

#define config_use_ble.
#undef config_use_ftdf.
#定义CONFIG_RETARGET

#define dg_configuse_lp_clk lp_clk_rcx // lp_clk_32768
#定义dg_configEXEC_MODE MODE_IS_CACHED
#define dg_configcode_location non_volatile_is_flash.
#定义dg_configEXT_CRYSTAL_FREQ EXT_CRYSTAL_IS_16M

#define dg_configimage_setup development_mode.
#定义dg_configEMULATE_OTP_COPY (0)

#define dg_configimage_flash_offset(0x20000)
#define dg_configsuota_support(1)

#define dg_configuser_can_use_timer1(0)

#define dg_configoptimal_retram(1)

#if(dg_configoptimal_retram == 1)
#if(dg_configblack_orca_ic_rev == black_orca_ic_rev_a)
#define dg_configmem_retention_mode(0x1b)
#定义dg_configSHUFFLING_MODE (0 x0)
#别的
#定义dg_configMEM_RETENTION_MODE (0 x07)
#定义dg_configSHUFFLING_MODE (0 x0)
#万一
#万一

#define dg_configuse_wdog(1)

#define dg_configflash_connected_to(flash_connected_to_1v8)
#define dg_configflash_power_down(0)

#定义dg_configPOWER_1V8_ACTIVE (1)
#define dg_configpower_1v8_sleep(1)

#define dg_configbattery_type(battery_type_custom)
#define dg_configBATTERY_CHARGE_VOLTAGE 0xA // 4.2V . define dg_configBATTERY_CHARGE_VOLTAGE
#define dg_configbattery_type_custom_adc_voltage(3475)//(3439)
//#定义dg_configbattery_low_level(2457)// 3V
#define dg_configPRECHARGING_THRESHOLD (2462) // 3.006V . define dg_configPRECHARGING_THRESHOLD (2462) //
#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
#f定义(debug_soc)
#定义CONFIG_RETARGET
#万一

#define dg_configuse_usb 1
#define dg_configuse_usb_charger 1.
#定义dg_configALLOW_CHARGING_NOT_ENUM 1
#定义dg_configUSE_NOT_ENUM_CHARGING_TIMEOUT 0

#define dg_configuse_prodk(1)

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

/ *************************************************************************************************
*外围特定配置
* /
#define dg_configflash_adapter 1.
#定义dg_configNVMS_ADAPTER 1
#定义dg_configNVMS_VES 0
#定义dg_configNVPARAM_ADAPTER 1

//#定义dg_configdisable_background_flash_ops 1

#define dg_configgpadc_adapter 1.

#define dg_configuse_hw_i2c 1
#定义dg_configUSE_HW_QUAD 1
#define dg_configuse_hw_spi 1
#define dg_configuse_hw_timer0 1
#定义dg_configUSE_HW_TIMER2 1

#定义dg_configI2C_ADAPTER 1
#定义dg_configSPI_ADAPTER 1

#define defaultBLE_ATT_DB_CONFIGURATION (0x10) // with "外围首选连接参数"
#define defaultble_ppcp_interval_min(ble_conn_interval_from_ms(500))// 500 ms
#define defaulble_ppcp_interval_max(ble_conn_interval_from_ms(750))// 750 ms
#define defaultble_ppcp_slave_latency(0)// 0事件
#define defaulble_ppcp_sup_timeout(ble_supervision_tmo_from_ms(6000))// 6000 ms

#define ble_max_misses_allowed(3)
#定义BLE_MAX_DELAYS_ALLOWED (3)

/ *使用动态列表BLE事件而不是Freertos队列* /
#define 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。在这里是中心设备
*可以根据其偏好使用两者中的任何一种。
* /
#定义SUOTA_VERSION SUOTA_VERSION_1_3
#define suota_psm 0x81

//#定义USE_PARTITION_TABLE_1MB_WITH_SUOTA
#定义USE_MY_PARTITION_TABLE

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

#如果SUOTA_PSM
#定义SUOTA_HEAP_OVERHEAD (3200)
#别的
#定义SUOTA_HEAP_OVERHEAD (0)
#万一

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

/ *************************************************************************************************
* BLE设备配置
* /
#定义dg_configBLE_CENTRAL (0)
#define dg_configble_gatt_client(0)
#define dg_configble_observer(0)
#define dg_configble_broadcaster(0)
#ifndef suota_psm.
#定义dg_configBLE_L2CAP_COC (0)
#万一

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

PM_Dialog
离线
最后看到:3天8小时前
工作人员
加入:2018-02-08 11:03
嗨rlaxogjs90。

嗨rlaxogjs90。

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

谢谢,

PM_Dialog