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.

[参考译文] MSP430F5438A:从闪存地址0x11000到0x11c00读取时、MSP 挂起

Guru**** 2538950 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1038998/msp430f5438a-msp-hangs-when-reading-from-flash-address-0x11000-to-0x11c00

器件型号:MSP430F5438A

您好!

我正在尝试对闪存中的代码空间进行 CRC 计算、如果  我尝试从0x11000到0x11c00读取、MSP 将挂起:

以下是代码:

    const uint32_t startAddr = 0x11000;
    const uint32_t endAddr = 0x11C00;
    uint32_t i;
    unsigned char CRCRESULT_LSB, CRCRESULT_MSB;
    WDTCTL = WDTPW + WDTHOLD;

    CRCINIRES = 0xFFFF;
    for (i = startAddr; i <= endAddr; i++){
        CRCDIRB_L = *(unsigned char*)(i);
    }
    CRCRESULT_LSB = CRCINIRES_L; // value stored at 0x1A02
    CRCRESULT_MSB = CRCINIRES_H;

中断被禁用、WDT 被禁用。 PMM 被设定为 V (CORE)电平3。

我已确认它与 CRC16模块无关、将 CRC 相关代码替换为从闪存读取的其他代码。 因此、对我来说、这似乎是一个闪存读取问题。

如果我将 startAddr 和 endAddr 替换为0x10000和0x11000、代码工作正常。 实际上、只要我避免0x11000到0x11c00、0x21000到0x21c00、0x31000到0x31c00和0x41000到0x41c00、它就可以工作。

在调试模式下、我发现 MSP 在此 while 循环中挂起(copy_zero_init.c)

   /*------------------------------------------------------------------------*/
   /* Zero initialize the output buffer.                                     */
   /*------------------------------------------------------------------------*/
   #if __MSP430__
      while(count--) WRITE8_ADV(outbuf, 0);

我检查了勘误表、找不到任何有用的东西。

我们非常感谢您的任何帮助。

谢谢、

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

    不用担心、在20位地址空间中读取数据时、我必须使用 __data20_read_char ()。