flash存储地址

公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

Tip / 登入 to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
YaTr_3516311
Level 5
Level 5
25 sign-ins First solution authored 100 replies posted

Hi,

wiced_hal_write_nvram ( BTU_LOCAL_KEYS_VS_ID, sizeof( wiced_bt_local_identity_keys_t ), p_keys ,&status );存到的是下面截图的flash里的哪里的地址

pastedImage_0.png

0 点赞
1 解答
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

这里的函数表述不太准确,应该是在不超过VS1大小的情况下,最多可以有0x75个ID,但是如果总的长度超过了,肯定无法用到0x75个。

在原帖中查看解决方案

0 点赞
4 回复数
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

在NVRAM的说明中可以看到,是存储在VS1区域:

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

**                               Constants

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

/**

* @brief Defines the first usable NVRAM Volatile Section Identifier.

* Application can use the VS ids starting from WICED_NVRAM_VSID_START.

**/

#define WICED_NVRAM_VSID_START      0x01

/**

* @brief Defines the last usable NVRAM Volatile Section Identifier.

* Application can use the VS ids starting from WICED_NVRAM_VSID_START to

* WICED_NVRAM_VSID_END

**/

#define WICED_NVRAM_VSID_END        0x75

pastedImage_0.png

pastedImage_1.png里看出一共有0x75个ID,每个id最大存255,那岂不是算下来要117*255=29K byte了?超过vs1 4k的大小了?

0 点赞

这个问题能回答一下吗

0 点赞
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

这里的函数表述不太准确,应该是在不超过VS1大小的情况下,最多可以有0x75个ID,但是如果总的长度超过了,肯定无法用到0x75个。

0 点赞