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.

CC1310: 软件复位时,如果正在操作flash,会出现什么问题

Part Number: CC1310

如题,如果有一个任务正在操作擦写flash,此时另一个任务调用SysCtrlSystemReset去复位芯片。

底层是否会等待flash擦写结束后再去复位芯片?

  • 您好,我们已收到您的问题并升级到英文论坛寻求帮助,如有答复将尽快回复您。谢谢!

  • 您好,

    不存在底层等待闪存擦除完成的情况。以下是 SysCtrlSystemReset 的代码:

    SysCtrlSystemReset( void )
    {
       // Disable CPU interrupts
       CPUcpsid();
       // Write reset register
       HWREGBITW( AON_SYSCTL_BASE + AON_SYSCTL_O_RESETCTL, AON_SYSCTL_RESETCTL_SYSRESET_BITN ) = 1;
       // Finally, wait until the above write propagates
       while ( 1 ) {
          // Do nothing, just wait for the reset (and never return from here)
       }
    }

    但我们认为,在擦除闪存时,让闪存擦除任务被抢先并不太好。 此外,请参阅driverlib 文档中的以下内容:

    Please note that code can not execute in flash while any part of the flash is being programmed or erased. The application must disable interrupts that have interrupt routines in flash. This function calls a ROM function which handles the actual program operation.

    所以建议您在闪存被擦除时阻止任何其他任务运行。