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.

[参考译文] TMS320F28388D:如何读取/写入内部闪存?

Guru**** 2601915 points
Other Parts Discussed in Thread: TMS320F28388D, C2000WARE

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1062053/tms320f28388d-how-can-i-read-write-internal-flash-memory

器件型号:TMS320F28388D
主题中讨论的其他器件: C2000WARE

大家好、在这个论坛上、我总是会得到很多帮助。

今天我还有一个问题。

我在 TMS320F28388D 中使用 Cortex-M4。

我想写入和读取内部闪存存储器。

因为、我们必须保存调优参数、但我们没有外部存储器。

所以我试图找到一个问题的例子,但是我不能找到。

我能知道如何解决这个问题吗?

我想为 CMBANK0_SECTOR13写入一些值。

该区域未被使用。

我期待您的答复。

谢谢你。

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

    Meili、

    您是否已经尝试了 C2000Ware 中提供的闪存编程示例?

    谢谢、此致、

    Vamsi

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [引用 userid="16728" URL"~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/C2000-microcontrollers-forume/1062053/tms320f28388d-how -can-i-read-write-internal-flash-memory/3930037#3930037"]您是否已经尝试了 C2000Ware[/C2000Ware]中提供的闪存编程示例?

    当然、但我找到的所有示例都是针对外部存储器和 CPU1的。

    我能知道内部存储器示例的位置吗?

    我使用 C2000Ware_3_04_00_00。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [引用 userid="16728" URL"~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/C2000-microcontrollers-forume/1062053/tms320f28388d-how -can-i-read-write-internal-flash-memory/3930037#3930037"]您是否已经尝试了 C2000Ware[/C2000Ware]中提供的闪存编程示例?

    能否使用'i2c_ex2_EEPROM"项目测试内部闪存写入?

    我尝试过、但函数 I2C_isBusy 返回 ERROR_BUS_BUSY。(第23行~26)

    //
    // writeData - Function to send the data that is to be written to the EEPROM
    //
    uint16_t
    writeData(struct I2CMsg *msg)
    {
        uint16_t i;
    
        //
        // Wait until the STP bit is cleared from any previous master
        // communication. Clearing of this bit by the module is delayed until after
        // the SCD bit is set. If this bit is not checked prior to initiating a new
        // message, the I2C could get confused.
        //
        if(I2C_getStopConditionStatus(I2CA_BASE))
        {
            return(ERROR_STOP_NOT_READY);
        }
    
        //
        // Check if bus busy
        //
        if(I2C_isBusBusy(I2CA_BASE)) // <--An error occurs here!
        {
            return(ERROR_BUS_BUSY);
        }
    
        //
        // Setup number of bytes to send msgBuffer and address
        //
        I2C_setDataCount(I2CA_BASE, (msg->numBytes + 2));
    
        //
        // Setup data to send
        //
        I2C_putData(I2CA_BASE, msg->memoryHighAddr);
        I2C_putData(I2CA_BASE, msg->memoryLowAddr);
    
        for (i = 0; i < msg->numBytes; i++)
        {
            I2C_putData(I2CA_BASE, msg->msgBuffer[i]);
        }
    
        //
        // Send start as master transmitter
        //
        I2C_setConfig(I2CA_BASE, I2C_MASTER_SEND_MODE);
        I2C_sendStartCondition(I2CA_BASE);
        I2C_sendStopCondition(I2CA_BASE);
    
        return(SUCCESS);
    }

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

    Melli、

    在 C2000Ware 4.00.00.00中、您可以使用以下示例对闪存进行编程。

    C2000Ware_4_xx_xx_xx\driverlib\f2838x\examples\cm\flash

    谢谢、此致、
    Vamsi