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.

关于HAL生成的系统初始化函数的问题(TMS470MF06607)

专家好,

        请问:

   在_systemInit中,

   /** - Setup flash read mode, address wait states and data wait states */
    flashWREG->FRDCNTL =  0x01000000U
                       | (2U << 8U)
                       | (0U << 4U)
                       |  1U;

    /** - Setup flash bank power modes */
    flashWREG->FBFALLBACK = 0x05050000
                          | (SYS_SLEEP << 14U)
                          | (SYS_SLEEP << 12U)
                          | (SYS_SLEEP << 10U)
                          | (SYS_SLEEP << 8U)
                          | (SYS_SLEEP << 6U)
                          | (SYS_SLEEP << 4U)
                          | (SYS_ACTIVE << 2U)
                          |  SYS_ACTIVE;

    在对这两个寄存器进行设置的时候,datasheet的说明中是未用的位,却为何要赋初值,比如0x05050000,这样做有什么意义吗?有些迷惑。

  • Pengyuan 您好,

    我觉得这样做的意义不大,既然TRM(Technical Reference Manual)中注明了”Reserved“,那么就不需要对这些bit进行多余的操作。

    但是,这个寄存器有一些特殊,请参考TMS470的Errata。

    www.ti.com/.../spnz179.pdf

    FWM#90的Workaround中提到,最好使用0505FFFFh来对这个寄存器进行赋值。

    所以,建议您还是保留这个0x0505的值。