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.

28335flash初始化问题

我在调试28335时,为什么将InitFlash()函数放置到MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart)函数之前板子便无法正常工作,非要将InitFlash()函数放置到MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart)函数之后才行?

  • 请注意该函数的注释:

    // CAUTION
    // This function MUST be executed out of RAM. Executing it
    // out of OTP/Flash will yield unpredictable results

  • 楼上正解。

    InitFlash()是在RAM里面运行的。

  • 这个是有原因的     还有初始化系统的函数   不能调到后面  

  • 所有对flash操作的函数都不能直接运行在flash中,所以需要把这个函数复制到RAM中之后才能运行。

    所以你去看一下这个Iniflash的定义,在函数上方有把这个函数定义到一个区域,即烧写在flash,运行前复制到RAM中,然后再调用。

    Eric