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.

[参考译文] AM2634:闪存写入 QSPI 驱动程序

Guru**** 2553430 points


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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1567242/am2634-flash-write-qspi-driver

器件型号:AM2634


工具/软件:

你好

我们将使用当前 SDK 中的电路板闪存驱动程序 (TI_MCU_PLUS_SDK_am263x_10_02_00_13)。

由于我们使用外部闪存作为环形存储器、因此我们希望写入小于 256 字节(页大小)的单位。 我们的外部闪存支持具有 1-256 字节的写入命令。  

最好的方法是什么? 重写 “Flash_norQspiWrite"函“函数还是找到更好的解决方案?

此致

Dominik

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

    我创建了一个自定义的“Flash_norQspiWrite"函“函数。 测试成功。

    只需进行少量修改:

    硬件设计  

        /* Check offset alignment */
        if(0 != (offset % attrs->pageSize))
        {
            status = SystemP_FAILURE;
        }
    最终目的  
        /* Modified check offset alignment */
        {
            int32_t pageOffset = offset % attrs->pageSize;
    
            if(0 != pageOffset)
            {
                /* Prevent page wrapping */
                if ((pageOffset+len) > attrs->pageSize) {
                    status = SystemP_FAILURE;
                }
            }
        }