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.

F28335 TI官方API擦除Flash失败,返回24

Other Parts Discussed in Thread: CONTROLSUITE

controlSUITE3.4.7\device_support\f2833x\v142\DSP2833x_examples_ccsv5\f28335_flash_kernel

这个是TI的官方API例程,我通过仿真器下载到28335中,擦除flash成功。但是我将该API转换为BIN文件,通过串口发送到28335中,擦除FLASH失败,返回24.

具体过程如下:

编译工程生成.out,转换为hex再转换为bin,将28335切换到boot scia模式,通过串口助手发送API,之后API在28335的ram中执行(发送0x41返回0x41),但是执行到擦除flash时失败,返回24。

发生以下两种现象:

1.通过仿真器下载API后,擦除flash成功,此时如果去掉仿真器,保证28335不断电,进入boot scia模式,串口助手发送api,擦除flash成功。

2.一旦28335重新上电后,串口助手发送api,擦除flash每次失败,返回24.

排除hex转bin时错误,因为该转换工具用了比较久了,28062 api和其他dsp程序都是通过同样方式转换的,一直都是正常的;

排除28335硬件问题(如供电问题、芯片问题等),因为使用C2Prog来烧写,同样也是SCI方式,擦除flash每次都正常。

该问题卡了一段时间了,网上查找该问题,都是2014年前的,且没有留下正确详细的解决方式。

不知道为什么会这样,仿真器烧写后不断电发送API成功,重新上电后就不成功;TI例程的API与C2Prog的API又有什么区别呢?我又该如何解决我的问题?

手上有28335的大神能否帮忙测试一下TI的API在你们这是否是正常的?

希望得到TI工程师或各路大神的指点与帮助。

  • 请参考这边帖子:http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/640664

  • 在线的时候操作正常     此时应该在RAM中操作的   

    烧写后加载   可能受到保护或其他原因

  • Seven Han 说:

    请参考这边帖子:http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/640664

    这个帖子好像没有什么帮助哦,C2Prog可以成功,芯片应该没问题吧,我试了好几块芯片了。。请问C2Prog下发的API与例程里的API什么区别呢,为什么他可以擦除成功?C2Prog应该也是基于TI提供的资料开发的吧。

  • mangui zhang 说:

    在线的时候操作正常     此时应该在RAM中操作的   

    烧写后加载   可能受到保护或其他原因

    是的,是在RAM中操作的,如果说是受到保护,那C2Prog为什么可以呢?

  • 芯片应该是没有问题,关于flashapi的使用要求在手册中有给出:controlSUITE_Flash2833x_API_Readme.pdf

    API Don’ts:
    Don’t execute the Flash APIs from the flash or OTP. If the APIs are stored in flash or OTP memory,
    they must first be copied to internal SARAM before they are executed.
    Don’t execute any interrupt service routines (ISRs) that can occur during an erase, program or
    depletion recovery API function from the flash or OTP memory blocks. Until the API function completes
    and exits the flash and OTP are not available for program execution or data storage.
    Don’t execute the API callback function from flash or OTP. When the callback function is invoked by
    the API during the erase, program or depletion recovery routine the flash and OTP are not available for
    program execution or data storage. Only after the API function completes and exits will the flash and
    OTP be available.
    Don’t stop the erase, program or depletion recovery functions while they are executing (for example,
    don’t stop the debugger within API code, don’t reset the part, etc).
    Do not execute code or fetch data from the flash array or OTP while the flash and/or OTP is being
    erased, programmed or during depletion recovery.

  • Seven Han 说:

    芯片应该是没有问题,关于flashapi��使用要求在手册中有给出:controlSUITE_Flash2833x_API_Readme.pdf

    API Don’ts:
    Don’t execute the Flash APIs from the flash or OTP. If the APIs are stored in flash or OTP memory,
    they must first be copied to internal SARAM before they are executed.
    Don’t execute any interrupt service routines (ISRs) that can occur during an erase, program or
    depletion recovery API function from the flash or OTP memory blocks. Until the API function completes
    and exits the flash and OTP are not available for program execution or data storage.
    Don’t execute the API callback function from flash or OTP. When the callback function is invoked by
    the API during the erase, program or depletion recovery routine the flash and OTP are not available for
    program execution or data storage. Only after the API function completes and exits will the flash and
    OTP be available.
    Don’t stop the erase, program or depletion recovery functions while they are executing (for example,
    don’t stop the debugger within API code, don’t reset the part, etc).
    Do not execute code or fetch data from the flash array or OTP while the flash and/or OTP is being
    erased, programmed or during depletion recovery.

    seven,

    谢谢你的回答,这个文档读了好多遍了,我使用的是TI的例程,你的意思是例程有问题让我修改例程吗?

    我确实也尝试过修改例程,包括关闭全局中断等,然而并没有解决问题。

  • 你好 我也遇到了类似问题 请问你是如何解决的
  • 你好,我也遇到这个问题,请问你是怎么解决的

  • 怎么解决的?求回复,QQ621829015.
  • 求回复,怎么解决这个问题的?,QQ621829015