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: Extending NOR flash through SPI

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Dear team:

One of my clients modified the routine spi_ex6_eeprom.c, hoping to expand a 2G nor flash through SPI. 

Can we provide this information for customers' reference? If not, what should be paid attention to when modifying routines?

  • Green,

    I didn't understand customer's requirement. What is the NOR flash being used? Was the customer successfully able to erase / program NOR flash? Were they successful in reading contents of NOR flash? Generally, sequence and frame format NOR flash excepts should be mentioned in NOR flash datasheet. If you have questions about specific frame format you need to check the NOR flash manufacturer.

    Can we provide this information for customers' reference?

    What information? Please elaborate.

    Regards,

    Manoj

  • Hi Manoj:

    Thank you for your reply. Customer should expand nor flash only to test its feasibility.

    His experiment is based on the routine "spi_ex6_eeprom.c", He modified the corresponding pin and chose one of the 4 SPIs to communicate with NOR flash chip. At present, his experimental results are as follows:

    We can see the data of writebuffer and readbuffer from expressions, and the value of error is not 1.

    Does this mean that the NOR flash memory can be read and written normally?

    In addition, the "information" mentioned before refers to: he also wants to know whether it is necessary to define the address space for NOR flash in the project through SPI extension?

  • Green,

    Based on the snapshot, it looks like you are trying to write 0 to 7 into EEPROM and trying to read back. From the read buffer, the first word is 255 and it doesn't seem to be correct. Expect that all other words are correct.

    I don't see why you need to define the address space in linker command file because you anyway have to use SPI to receive in RAM and then execute from RAM device.

    Regards,

    Manoj

  • 1
    Hello, I'm Vince, the questioner of the above post.
    您好,我是vince,上面帖子的提问者
    2
    The chip model I use is:
    我使用的芯片型号是:
    TMS320F28388D

    3
    My goals are:
    Expand a 2GB nor flash from the SPI port of tms320f28388d (because the memory space of tms320f28388d is very small)
    我想实现的目标是:
    从TMS320F28388D的SPI口,外扩一个2Gb的NOR flash(由于TMS320F28388D自身所带的存储空间很小)

    4
    The current progress is as follows:
    The production of the circuit board has been completed.
    目前的进度是:
    电路板的制作已完成

    5
    The problems are as follows:
    Would like to ask if there is a SPI port through the expansion of a 2GB nor flash hardware driver and access function routines.If so, I hope to get your help

    遇到的问题是:
    想请教一下是否有通过SPI口外扩一个2Gb的NOR flash的硬件驱动和存取功能实现的例程。

    如果有的话,希望能得到您的帮助

    6
    My tentative plan:
    Looking up the routine of c2000ware, I didn't find it.

    Try to modify SPI_ ex6_ EEPROM. C routine, to achieve the goal I want.
    自己的尝试方案:
    查找了一下C2000ware的例程,没有找到。

    尝试通过修改spi_ex6_eeprom.c的例程,来实现我想要的目标。


    7
    Questions raised:
    1. Would you like to inquire whether such a modification scheme is feasible
    2. The corresponding hardware connection pin is modified, and the value of the array variable writebuffer written to the memory is modified. However, the data of the read back variable array readbuffer is always the same as the figure below. What's the reason?
    提出的问题:
    1、想咨询一下,这样的修改方案是否可行
    2、修改了对应的硬件连接引脚,修改了写入存储器的数组变量writeBuffer的值,但是,读回的变量数组readBuffer的数据却一直是下图的样子,这是什么原因呢?


    I've come to ask you how to deal with it
    特来请教,我该如何处理

    thank!
    感谢!

  • Vince,

    I'm still ambiguous of your exact requirement. 

    Are you trying to use execute your code directly from NOR flash without copying into RAM (through SPI port)?

    Regards,

    Manoj

  • Hello, Manoj
    My requirement is that the code is copied to ram to run, nor flash is only responsible for storing and fetching the data given by the outside world.

    thanks

    vince

  • Vince,

    My requirement is that the code is copied to ram to run, nor flash is only responsible for storing and fetching the data given by the outside world.

    Okay. You should be able to achieve this using SPI and spi_ex6_eeprom.c example is great example to start with.

    5
    The problems are as follows:
    Would like to ask if there is a SPI port through the expansion of a 2GB nor flash hardware driver and access function routines.If so, I hope to get your help

    We unfortunately don't have a ready made example. The closest SPI related example code we have is spi_ex6_eeprom.c.

      The corresponding hardware connection pin is modified, and the value of the array variable writebuffer written to the memory is modified. However, the data of the read back variable array readbuffer is always the same as the figure below. What's the reason?

    It is difficult to guess just based on the snapshot you had sent. Did you check NOR flash datasheet to see whether you sending the right commands to read correct address of NOR flash. Generally NOR flash manufacturer would have an example code to write / erase NOR flash with MCU. I would start with adapting that code to make my effort easier.

    Regards,

    Manoj

  • thanks

    Manoj

    Thank you very much for your help. I will continue to revise spi_ex6_eeprom.c.

    vince

  • I'm closing this ticket for now. You can either reopen this ticket (or) open a new thread if you have further questions.

    Regards,

    Manoj