This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CCS/LAUNCXL-CC2640R2:外部闪存问题

Guru**** 2606725 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/633444/ccs-launchxl-cc2640r2-external-flash-memory-problem

部件号:LAUNCHLL-CC2640R2

工具/软件:Code Composer Studio

我有两个关于访问外部闪存的主要问题。

首先,当我要使用  #include <ti/MW/extflash/ExtFlash.h>将ExtFlash文件引用到我的程序 时,它将始终用报告ME错误  

":Description Resource Path Location Type (说明资源路径位置类型)
未解析的符号ExtFlash_open,首先在./memory.obj memory_CCS C/C++问题中引用"

但如果我使用  #include <ti/mW/extflash/ExtFlash.c>来执行此操作。  这种问题已经不存在了,但我知道这不是一种合适的方法。

然后我尝试测试 ExtFlash_open() 函数,我做了一个非常简单的编码:

Board_initGeneral ();

SPI_handle SPI;
SPI_Params spiParams;

SPI_init();//初始化SPI驱动程序
SPI_Params_init(&spiParams);//初始化SPI参数
spiParams.dataSize =8;// 8位数据大小
SPI = SPI_OPEN (Board_SPI0,&spiParams);
IF (SPI != NULL){
system_printf ("SPI传输打开");
}

bool isOpen = ExtFlash_open();
如果(isOpen == false){
system_printf ("无外部闪存");
}
否则{
system_printf ("外部闪存打开唤醒");
}
返回(0);

我已经在 ExtFlash.c中检查了支持设备列表, 我看到了设备类型


manfId = MF_MACRONIX,// Mac电子
DevID = 0x14,// MX25R8035F
devicesize = 0x10万 // 1 MB (8 Mbit)
},

结果是SPI始终可以启动,但 ExtFlash_open()的返回值 始终为false。 是否有人知道任何可能的解决方案?