完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
cc2541开发板存储不够,怎么拓展? 我在cc2541 256k的开发板上有最大十几k的数据需要,所以首先想到用osal_snv_X系列的函数进行读写,但是在翻阅代码时,发现一共可用的nvram页才2页,因此这是 不够的,我的问题是,为什么只有2页充当nvram,能否向系统多要些页面来充当nvram,如果可以,该如何修改代码 |
|
相关推荐
2个回答
|
|
本帖最后由 冒汗的心情 于 2016-3-28 13:49 编辑
Performing Flash Erase From Flash Memory Note that while executing program code from within flash memory, when a flash erase or write operation is initiated the CPU stalls, and program execution resumes from the next instruction when the flash controller has completed the operation. The following code example of how to erase one flash page in the CC2530 is given for use with the IAR compiler: #include unsigned char erase_page_num = 3; /* page number to erase, here: flash page #3 */ /* Erase one flash page */ EA = 0; /* disable interrupts */ while (FCTL & 0x80); /* poll FCTL.BUSY and wait until flash controller is ready */ FADDRH = erase_page_num << 1; /* select the flash page via FADDRH[7:1] bits */ FCTL |= 0x01; /* set FCTL.ERASE bit to start page erase */ while (FCTL & 0x80); /* optional: wait until flash write has completed (~20 ms) */ EA = 1; /* enable interrupts */ 6.3.2 Different Flash Page Size on CC2533 The flash page size has been reduced from 2 KB (2048 bytes) on CC2530, CC2531, CC2540, and CC2541 to 1 KB (1024 bytes) on CC2533. When performing page-erase operations on the flash memory, the page to be erased is addressed with the register bits FADDRH[6:0] on CC2533 as opposed to FADDRH[7:1] on CC2530, CC2531, CC2540, and CC2541. The page-lock bits are still placed in the upper 16 bytes of the last accessible flash page.这个是在其他帖子看到的,可以吗 |
|
|
|
fdvcxhtg 发表于 2016-3-28 13:46 哦,我试试,谢谢 |
|
|
|
只有小组成员才能发言,加入小组>>
物联网工程师必备:怎么选择不同的无线连接技术,本指南帮你忙!
3272 浏览 1 评论
【DFRobot TinkerNode NB-IoT 物联网开发板试用连载】WIFI功能测试
3920 浏览 0 评论
【DFRobot TinkerNode NB-IoT 物联网开发板试用连载】Arduino的替代SublimeText3+STino
3429 浏览 0 评论
使用端口扩展器轻松高效地向IIoT端点添加具有成本效益的子节点
3980 浏览 1 评论
20653 浏览 11 评论
模组有时候复位重启后输出日志为“REBOOT_CAUSE_SECURITY_PMU_POWER_ON_RESET”的原因?
765浏览 2评论
951浏览 2评论
974浏览 1评论
1097浏览 1评论
369浏览 1评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-4 01:18 , Processed in 0.797793 second(s), Total 51, Slave 44 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号