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.

External NOR Flash Issue for TMS570LS3137 MCU

Other Parts Discussed in Thread: TMS570LS3137

I have connected a 16MB NOR flash(M29W128GL) to the EMIF (using CS2) of TMS570LS3137. Data Bus width of Flash is 16 bit. The connection of the Flash with MCU is shown below
TMS570LS3137             NOR Flash
Address BUS:
             BA1-----------------> A0
             A0   -----------------> A1
                            .
                            .
                            .
             A21----------------> A22

Data BUS:
              D0 ---------------->DQ0
              D1 ---------------->DQ1
                           .
                           .
                           .
             D15--------------->DQ15A-1

I am able to reset/read and CFI Query by using single cycle command as shown below
Reset/Read Command:
              *(unsigned short*)(0x60000000) = 0xF0;
CFI Query Command:
                *(unsigned short*)(0x600000AA) = 0x98;

But the flash is not working for multi-cycles commands like Auto Select Manufacturer code, Device code etc command as shown below
                *(unsigned short*)(0x60000AAA) = 0xAA; //0x555 <----- 0xAA
                *(unsigned short*)(0x60000554) = 0x55; //0x2AA <----- 0x55
                *(unsigned short*)(0x60000AAA) = 0x90; //0x555 <----- 0x90

I have seen there is repeated access for a single access instruction. I know for normal mode R4 CPU will consider the memory to be accessed as RAM and there could be repeated access for a single access instruction. To avoid this problem I have configured access control to "strongly ordered" but still I am facing the same problem. I think somehow I am not able to configure the R4 CPU properly.

So,it will be very helpful if anybody helps me regarding this NOR Flash issue with TMS570LS3137.

Thanks and regards
Srikanta

  • Hello Srikanta,

    I have forwarded your post to one of our experts.  They will respond back soon.

  • Srikanta,

    By default, the EMIF space is configured as "normal" memory. That is why you saw the repeated accesses. You need to use R4 MPU to configure it as "device" memory.

    Thanks and regards,

    Zhaohong

  • Hi Zhaohong,

    Thank you very much for your first response to my query.
    Today I have solved the NOR flash access issue. Previously, I was using "TMS570LS3 Hercules Demo" code of "TMS570LS31x Hercules USB Stick Development Kit" by modifying the PLL and EMIF registers setting and it was working properly for NvSRAM and SDRAM in my custom board. For Nor Flash testing, after configuring access control to "strongly ordered" I was facing the problem during MPU enabling. When I was calling "_mpuEnable_()" function the program control was always going to the "_prefetchAbort" function in "sys_intvecs.asm" file that's way I commented this function. I still don't know what was the reason to behave like this.
    Today I have written a new code and now it is working properly for NOR Flash.

    Thanks and regards,

    Srikanta