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.

[参考译文] TMS320F28388D:为何程序在使用外部扩展的 SDRAM 后非常缓慢地进入 main 函数?

Guru**** 2589245 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1223998/tms320f28388d-what-is-the-reason-why-the-program-enters-the-main-function-very-slowly-after-using-the-externally-expanded-sdram

器件型号:TMS320F28388D

大家好、

以下是客户可能需要您的帮助的问题:

--

23888D 的 EMIF2 CS0接口用于扩展16M×16 SDRAM 的部件;

SDRAM 中定义了使用整个 SDRAM 存储器大小的阵列。 该数组未初始化并放置在.farbsss 段中;

在两秒周期内使用计时器切换 LED;

问题:当程序在闪存中运行时,运行到主函数大约需要27秒,判断的基础是 LED 在27秒后开始闪烁;

问题位置:定义为当 SDRAM 阵列的大小变小时、运行主函数的时间也会变短、并且存在正相关关系、因此被判定为 SDRAM 阵列存在问题;

具体代码如下:

C 文件:

#define SDRAMSize 8388608U
__attribute__((far)) volatile uint32_t SDRAMBuf[SDRAMSize];

CMD 文件:

EMIF2_CS0n      : origin = 0x90000000, length = 0x01000000

.farbss          : > EMIF2_CS0n

补充说明:在程序中没有针对 SDRAMBuf 的初始化操作。

--

谢谢、此致

耶鲁