we've made a custom board with the SAMA5D36 with the following configuration:
- DDR2, 32Bit, 256MByte
- NAND, 16Bit, 256MByte, 1Bit ECC required
- CPU Clk 12MHz
- bootstrap in external serial flash
i can send big binary-files(40MByte) to the external DDR2-RAM and read back the correct binary via SAM-BA ... so IMHO: DDR2 OK!
i can program the bootstrap in the spi-flash via SAM-BA 2.15/2.16 and the bootstrap is starting ... so IMHO: bootstrap OK!
- i can program any binary file to the NAND with 1bit ECC and/or without any ECC correction via SAM-BA ... so IMHO: electrical connections, wiring and timing to the flash seems to be OK!
-> BUT: when i want to program any binary to the NAND by using the PMECC (doesn't matter which parameters i'm using ... and i tested all of them ) the "RawNandFlash.c" applet stucks during programming
Code: Select all
-I- PMECC Header configuration command -I- Configure paramHeader to c0902405. -I- Nandflash PMECC nbSectorPerPage is 2 -I- Nandflash PMECC spareSize is 64 -I- Nandflash PMECC eccBitReq is 4 -I- Nandflash PMECC sectorSize is 0 -I- Nandflash PMECC eccOffset is 36 -I- Nandflash PMECC currentPmeccHeaderValue is c0902405 -I- End of applet (command : 15 --- status : 0) -I- SEND FILE command -I- Pmecc initialized -I- WRITE arguments : offset 0x40000, buffer at 0x20010e48, of 0x20000 Bytes -I- WRITE at block 0x2, page 0x0, offset 0x0 -D- RdPg(B#2:P#0) -D- RdPg(B#2:P#1) -D- RawNandFlash_EraseBlock(B#2) -D- EraseBlock(2) -D- RdPg(B#2:P#0) -D- RdPg(B#2:P#1) -D- EccNandFlash_WritePage(B#2:P#0) -D- RawNandFlash_WritePage(B#2:P#0) -D- WritePage(B#2:P#0)
i dug in the SAM-BA applet sources and for me it seems that the applet may freezes in "sam-ba_2.15(6)\applets\sama5d3x\libraries\libnandflash\source\RawNandFlash.c", line 513 where the core is waiting for the PMECC to get finished
i'm a bit confused, because it seems that nobody else (regarding to googles search-results) is having similiar issues with the SAM-BA programming ... so maybe the nandflash-applet isn't the reason for my problem?!
Code: Select all
while((SMC->SMC_PMECCSR) & SMC_PMECCSR_BUSY);
-> any ideas or recommendations, etc... thx!!!!!