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.

[参考译文] MSP432P401R:在闪存中放置 Const 数据和测量数据

Guru**** 2553450 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/594846/msp432p401r-placing-const-data-and-measured-data-in-flash-memory

器件型号:MSP432P401R

我在使用闪存存储器存储硬件配置值查找表以及定期更新的 ADC 样本数组的应用中使用 MSP432P401R。 代码使用函数 map_FlashCtl_performMassEras()来清除 ADC 数据存储阵列。 擦除存储的 ADC 样本后、uint16_t 类型查找表条目全部为65535 (即全部为1)。 当需要擦除数据存储时、如何保护查找表免受擦除影响?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    查尔斯
    如何解除对要擦除的区域的保护?

    /*取消对用户组1、扇区30和31的保护*/
    MAP_FlashCtl_unprotectSector (FLASH_MAIN_MEMORY_SPACE_BANK1、
    FLASH_SECTOR30 | FLASH_SECTOR31);

    /*尝试批量擦除。 由于我们未保护用户组1、
    *扇区31和32、这应该会擦除这些扇区。 如果失败、我们
    *在无限循环内陷阱。
    *
    if (!map_FlashCtl_performMassEras())
    while (1);

    这是从 Resource Explorer 示例中获取的:
    dev.ti.com/.../

    Chris