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.

[OMAPL137] Read external flash memory via emulator

Guru 24520 points

Hi community member,

Please let me confirm the following question.

[Question]

Can we read the *.bin file on external flash memory  via emulator?

If yes, would you please show me the way how to do it?

Best regards.

Kaka

  • Hi Kaka,
    We can read the content of *.bin through online "Hex Editor" or separate hex editor tool for windows or linux.
  • Hi Stalin,

    Thank you for your comment.
    My customer would like to verify the .bin file on Flash via Emulator(CCS).
    i.e. confirm whether they can write the image correctly or not.
    Do you have any solution for this?

    Best regards.
    Kaka
  • Hi Kaka,
    Yes, we can do.
    They have to modify the gel to initialize the flash media such as NAND, NOR etc., like CS and EMIF setup etc., then they can access the memory area of flash through CCS browser.
  • Hi Stalin,
    Thank you for your response.
    > they can access the memory area of flash through CCS browser.
    I do not know how to read the NAND flash via CCS memory browser. Can we confirm the date on NAND using CCS?
    I have tried to read the data on NAND by using C6748LCDK, however I could not confirm the data on it.
    I think that customer need to prepare the sample program in order to read NAND or NOR.

    Best regards.
    Kaka
  • HI Kaka,

    To confirm the data integrity of the binary which is flashed into the memories like NAND / SPI, you can use the NAND flash writer project or SPI flash writer project which is already available. These programs will flash the binary as well verify that the images written are correct.

    I have seen in the source code of NAND flash writer that it verifies data after the write operation. Have a look at the code snippet below.

     // Write the AIS image data to the NAND device
          if (NAND_writePage(hNandInfo, blockNum,  pageNum, dataPtr) != E_PASS)
          {
            DEBUG_printString("Write failed. Marking block as bad...\n");
            NAND_reset(hNandInfo);
            NAND_badBlockMark(hNandInfo,blockNum);
            dataPtr -=  pageNum * hNandInfo->dataBytesPerPage;
            blockNum++;
            continue;
          }
    
          UTIL_waitLoop(200);
    
          // Verify the page just written
          if (NAND_verifyPage(hNandInfo, blockNum, pageNum, dataPtr, gNandRx) != E_PASS)
          {
            DEBUG_printString("Verify failed. Marking block as bad...\n");
            NAND_reset(hNandInfo);
            NAND_badBlockMark(hNandInfo,blockNum);
            dataPtr -=  pageNum * hNandInfo->dataBytesPerPage;
            blockNum++;
            continue;
          }
    

    Regards,

    Shankari

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

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

     

  • Hi Shankari,
    Thank you for your response.
    Please let me confirm your comments.
    If we used the NAND/SPI flasher program, we can verify the data on NAND/SPI flash by using CCS.

    Is my understanding correct?
    Best reagrds.
    Kaka
  • Hi kaka,

    kaka said:
    If we used the NAND/SPI flasher program, we can verify the data on NAND/SPI flash by using CCS.


    You neednot manually do the verification of the data. The program itself will take care.
    Do you need to manually look at the data as well?

    Regards,
    Shankari

    -------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    ------------------------------------------------------------------------------------------------------
  • Hi Shankari,

    Thank you for your comments.
    My customer confirmed to us the way to check the data in manually.

    Best regards.
    Kaka
  • HI kaka,

    Then, in either of the two ways you can go-ahead.

    1.Using Gel file, after you initialize the NAND flash, in the CCS memory Window, you can manually check the value by giving the appropriate addresses of the NAND flash

    2. or using NAND flash writer program in debugging mode, you can check using the NAND_read function.

    Regards,

    Shankari

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

    Please click the Verify Answer button on this post if it answers your question.

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

  • Hi Shankari,

    Thank you for your response.
    Would you please check my way in order to check NAND flash on EVM(c6748LCDK)?

    1. Connect the EVM to PC and launch CCSv6.
    2. Make ".ccxml" file and set emulator (used XDS510 in my environment)
    3. Push "Launch Selected Configuration".
    4. Connect the EVM
    5. Re-run the GEL file in order to read NAND

         [GEL setup script]
         1 . EMIFA NAND PINMUX
         2. Clear Memory map
         3. Setup Memory map
         4. Core 300MHz mDDR 150MHz


    6. Open "Memory browser"
    7. Type "0x6200 0000"

    I used this way but I could not read the data on NAND.
    If you have any question, please let me know.
    Best regards.
    Kaka

  • Hi Kaka,

    I think, this initialization is not sufficient, we need to map the CS3 memory address to NAND flash.

    2. or using NAND flash writer program in debugging mode, you can check using the NAND_read function.

    You can try the 2nd point.

    I've ran the DSP NAND write code upto "DEVICE_init()" function and not call "nandwriter()" then able to read the contents of NAND flash.

  • Hi Stalin,
    Thank you for your kindly support.

    I will provide this solution to my customer.
    If we have more questions, please let me confirm them.

    Best regards.
    Kaka