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.

[参考译文] MSP430F6736A:用户数据写入信息段、64 字节写入需要~32ms

Guru**** 2524460 points
Other Parts Discussed in Thread: MSP430F6736A

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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1558402/msp430f6736a-user-data-write-to-info-segments-taking-32-ms-for-64-byte-write

器件型号:MSP430F6736A


工具/软件:

尊敬的 TI 团队:

我使用 MSP430F6736A、发现闪存写入性能有一些异常情况。 在向 Info A、B、C 或 Info D 任何单独的存储器段  写入时、写入 64 个字节大约需要 31ms。 如果我 只写入 2 个字节、则需要 29ms 的时间。

与预期的闪存写入时序相比、这似乎非常大。 有人请帮助我了解:

  1. 此持续时间对于 Info 存储器写入、或是正常的

  2. 我的实施/顺序可能有问题?

任何指导或参考都将非常有帮助。



谢谢、
Rahul

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

    这对于仅写入来说有点长、但如果包含擦除、则完全合理。 您不显示代码、因此我无法对您的实现进行评论。

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

    您好、David:

    请查看以下代码-

    void user_flash_update(void) {
        uint32_t *addr_pri = (uint32_t*)FLASH_INFO_C_ADDR;
    
        uint16_t ui16GIE = __get_SR_register() & GIE;
        __bic_SR_register(GIE);
        __disable_interrupt();
    
        FCTL3 = FWKEY;
        FCTL1 = FWKEY | ERASE;
        *(uint8_t*)addr_pri = 0;
        FCTL1 = FWKEY | WRT;
    
        memcpy(addr_pri, &flashstr, sizeof(flashstr_t)); // 64 bytes
    
        FCTL1 = FWKEY;
        FCTL3 = FWKEY | LOCK;
    
        __bis_SR_register(ui16GIE);
    }

    谢谢、
    Rahul

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

    您好、

    该时间包含擦除过程。 擦除操作通常需要大约 30ms。  

    FCTL1 = FWKEY | ERASE;

    此致、

    现金好