微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > 射频无线通信设计 > cc2541开发板存储不够,怎么拓展?

cc2541开发板存储不够,怎么拓展?

时间:10-02 整理:3721RD 点击:

cc2541开发板存储不够,怎么拓展?


我在cc2541 256k的开发板上有最大十几k的数据需要,所以首先想到用osal_snv_X系列的函数进行读写,但是在翻阅代码时,发现一共可用的nvram页才2页,因此这是 不够的,我的问题是,为什么只有2页充当nvram,能否向系统多要些页面来充当nvram,如果可以,该如何修改代码


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 <ioCC2530.h>
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.这个是在其他帖子看到的,可以吗

哦,我试试,谢谢

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top