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
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.
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.
--------------------------------------------------------------------------------------------------------
kaka said:If we used the NAND/SPI flasher program, we can verify the data on NAND/SPI flash by using CCS.
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.