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.

NOR Flash OMAP 137

Other Parts Discussed in Thread: OMAP-L137, OMAPL138

Hello,

We are using a Parallel NOR flash Memory M29W640GB (from MICRON 8MB)  in a custom board with OMAP 137 TI Processor, and we want to download code into the flash memory, using JTAG xds200 and code composer studio v6.

the board is designed to boot from NOR Flash, and the NOR Flash device is connected to the external memory interface (EMIFA) peripheral on EMA_CS[2].

What would be the right way of downloading code into the NOR Flash directly using the JTAG. 

Thank you for the support 

  • Hi Ahmed,

    Please try to use CCS NOR writer project to download the boot image into NOR flash through emulator (JTAG)

    C:\ti\OMAP-L137_FlashAndBootUtils_2_40\OMAP-L137\CCS\NORWriter

    You can get this project from OMAPL137 boot utils.

  • Hi Shankari,

    Thanks for the support,

    I was already working with NORwriter project and I compiled it for the DSP core, and I used AIS to convert a helloworld project from *.out to *.bin and download it to the flash using NORwriter. the issue is the NORwriter can't write to my flash memory but is able to erase it. please see the console output :

    [C674X_0] Starting NORWriter.

    CFI Query...passed.

    NOR Initialization:

    Command Set: AMD

    Manufacturer: Unknown

    Size: 0x8 MB

    Enter the binary AIS application file name (enter 'none' to skip):

    c:\helloDSP8.bin

    Erasing the NOR Flash

    Erased through 0x60002000

    Erase Completed

    Erasing the NOR Flash

    Erased through 0x60004000

    Erase Completed

    Erasing the NOR Flash

    Erased through 0x60006000

    Erase Completed

    Erasing the NOR Flash

    Erased through 0x60008000

    Erase Completed

    Writing the NOR Flash

    Timeout ocurred.

    Buffered write failed. Trying normal write

    Timeout ocurred.

    Normal write also failed

    NOR Write Failed...Aborting!

    ERROR: Writing NOR failed.

    NOR flashing failed!

    Please note that I modified the NORwriter to access the nor flash as 8 bit access, and I set AISgen with the necessary configuration to bbot from NOR.  please see the pic

  • Hi Ahmed,

    Are you working with custom board or TI EVM ?
    If its custom board with different NOR flash then please make sure that you have modified the NOR timing parameters.
  • Hi Shankari,
    I am working with custom board.
    can you please show me where to modify the timing parameters in NORwriter. Should I look into something specific to NOR flash Memory M29W640GB (from MICRON 8MB).
    Thanks for the support
  • Hi,
    You may have to add the following file and recompile the code.
    OMAP-L137_FlashAndBootUtils_2_40\OMAP-L137\Common\src\device_async_mem.c
  • Hi Titus,

    Thanks for the support

    I have already set the timing parameters through the gel file and I can verified them all instead of calling functions from device_async_mem.c

    is there any specific function or variable I have to set somewhere.

    Ahmed 

  • Hi Ahmed,
    Sorry for the delayed response on this.
    Can you try to read/write the NOR memory ( 0x60000000 ) through the CCS memory window.
  • Hi Titus,

    Thanks for the reply,

    here are some screenshots describing what happen when I try to read or write to the address of NOR Flash 0x60000000  (just a reminder that our NOR flash is connected to EMIFA interface  through CS[2] ).

    1- This screenshot is after debugging but before running the NORwriter project 

    2- This screenshot is after  running the NORwriter project 

    3- This screenshot is when I try writing the value 44444444 at a specific address (0x6000002C). It shows the modification at the top address before 0x60000000 but nothing changes in 0x6000002C and it stays at FFFFFFFF value. the NOR flash does not hold the value I am trying to write.

    4- This screenshot is when I try writing the value AAAAAAAA at a specific address (0x6000002C). It shows the modification at the top address before 0x60000000 but nothing changes in 0x6000002C and it stays at FFFFFFFF value. the NOR flash does not hold the value I am trying to write but written value reflects on memory before 0x60000000. 

    Thanks for the support 

    Ahmed 

  • Hi Ahmed,

    Please check that the NOR part you use is of 8-bit / 16 bit.

    Accordingly, in the NOR writer code, make sure that the bandwidth ( 8/ 16 ) of NOR is appropriate against your NOR part number.

    You have to change the ASIZE field in CE2CFG register (CS2) for NOR bus data width.

    As well in the AISGEN, select the BOOT mode option as ( NOR-8bit / NOR-16 bit ) as per the NOR part.

    -------------------------

  • Hi Shankari,

    Thanks for the support,

    I have already made these modifications before and if you check the AISgen tool picture (above in my second post) you will see changes already there, also I have set the pinmux through gel file to activate EMIFA and adjust the size to 8bits in CE2CFG register. I have selected the define variables in NORwriter source files and headers to set buswidth to 8bit value.

    if you check my second post you will notice that I was able to erase but not write to the flash due to a timing issue. Would you suggest anything to modify for the timing parameters and where exactly. 

    Thank you 

  • Dear Ahmed,
    I think, Shankari was right.
    Can you please try to change the NOR data width to 16 and check.

    CE2CFG.ASIZE = 0x1

    I have OMAPL138 LCDK board which has 16bit NAND flash, for that I have configured the code to 8bit then I'm able to erase the NAND but getting error while writing , after set data width to 16bit mode then only I'm able to do read/write/erase all the access.

    So, please do that and let us know.
  • Hi Shankari,

    Just an update,

    I found a TI document ( SPRUFL6F section A.2.2  ) that explains the timings values needed for any specific NOR flash  so I changed the values into (CE2CFG) register based on the NOR read and write timings characteristics.
    I tried an option of connecting a NOR pin to high voltage 12v (which has the option of unprotecting the NOR chip ) while using  NORwriter  and I could have some results as seen in the picture.
     
    The issue is when I try to reflash an LED flash code to test it with the OMAP it doesn't run properly and keeps hanging at the erasing part or doesn't pass the CFI query at all.
    please see picture:

     
     
    Thank you for your support
  • Hi Shankari,

    Just an update,

    I found a TI document ( SPRUFL6F section A.2.2  ) that explains the timings values needed for any specific NOR flash  so I changed the values into (CE2CFG) register based on the NOR read and write timings characteristics.

    I tried an option of connecting a NOR pin to high voltage 12v (which has the option of unprotecting the NOR chip ) while using  NORwriter  and I could have some results as seen in the picture.

    The issue is when I try to reflash an LED flash code to test it with the OMAP it doesn't run properly and keeps hanging at the erasing part or doesn't pass the CFI query at all.

    please see picture:

    Thank you for your support

  • Hi Ahmed,
    Glad to hear that issue got fixed with proper timings.
    BTW, I'm not sure about unprotecting NOR flash or connecting 12V supply to NOR flash.
    NOR flash is getting fail after supplying 12V to flash ?
    Will ask HW guy to check this.
  • Ahmed,

    Why do you want to supply 12V to the NOR flash. What is the recommended voltage for your NOR flash ?

    Regards,
    Senthil
  • Hi Senthil,

    Thanks for the support,

    it is not recommended to supply 12v to the NOR except for fast programming  or unprotecting the chip (based on my understanding). but the chip works normal without 12 v supplied to Vpp (I highlighted the pin in my schematic picture below)

    here is my schematic please see page 3. the pin FLASH_VPP/WP is tight to 3.3 v but when I was using NORWriter, I wasn't able to flash until I raised that pin to

    12v. 

     1

    My question is: would you take a look to the schematic HW connection of the NOR and confirm  if it is correct. for the timing parameters in CE2CFG register would you refer me to document that I can find the the right values for my EMIFA interface OMAP L137 (tsu, th, td) in the picture below. I am using these values but not sure if they are accurate. I know that there is an excel file calculation sheet in the WIKI but that for NAND only. 

    Also it says in the OMAP datasheet that fields for strobe should be cleared if no EMA_WAIT pin which is the case in my EMIFA, so I did not include these fields into the value that should be written to CE2CFG. is that right.

    Thank you for your support

  • Hi Senthil,

    Just an update.

    I did some modification since last post.

    because I have a high temperature version of the omap 137 I used the following document SPRS677B to search for tsu (setup) th (hold) and td (delay) values for EMIFA interface. Also I included R_STROBE and W_STROBE fields in my new calculation for the register CE2CFG.

    I run the code with the new settings for CE2CFG and I could use the NOR flash properly.

    Thank you for your support