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.
Hello,
We are using am3352 with a SLC 8Gbit NAND flash. Now we need to include option for a 32Gbit NAND flash, but unfortunately we are not able to find a compatible NAND flash memry chip that fits the am335s requirements.
Main problem we are finding is pagesize, am3352 requires 2048/4096 pagesize, and available chips are 8192.
Could you please suggest compatible part numbers?
Our requirements are:
- Size: 32Gbit
- Temperature range: -40 to +85ºC
- One chip select
- 8-bit bus width
- TSOP48
- Technology: SLC preferred. MLC could be an option
Thank you for your help
Best regards
Angel
Hi Angel,
eMMC is managed NAND - its controller handles the ECC, bad block management, and wear leveling for you, offloading this task from the CPU.
eMMC likely uses MLC instead of SLC NAND, which might have different endurance and number of write cycles compared to SLC. Memory manufacturers will have better reliability information and might offer SLC NAND inside the eMMC for reliability concerns (I dont know).
What specifically do you see as reliability concerns of eMMC verses raw NAND?
I have heard complaints that eMMC can introduce less-deterministic latency compared to raw NAND with the controller between memory and the processor (imagine it detects ECC errors or a bad block and needs to move data around behind the scenes).
Generally, the advantages of eMMC (larger capacity, fully managed) outweigh those of raw NAND. We run file systems on eMMC in many of the EVMs we offer.
=-=-
If you choose to use the NAND with 2 chip selects, but only have one CS routed from the processor... I can conceive of some glue logic to share the single CS across 2 CS inputs of the NAND...
* GPIO controlled external mux - use 1 GPIO to select a 2-1 mux to route the single CS to either CS0 or CS1
2-input OR gates with a GPIO and 1 CS as inputs. Connect the output to the CS input on the NAND (when GPIO is low, the active low CS will pass through) - requires 2 GPIOs for 2 CS inputs (or an inverter before one of the OR gates to use the same GPIO pin - high passes CS to one CS input, low passes CS to the other CS input)
I would avoid using the GPIO as a CS because it will leave the devices selected more than necessary.
See this similar post. It is the inverse of this problem where multiple EMIF CS pins are routed through glue logic to address pins, but the approach is similar...
e2e.ti.com/.../2829884
Hope this helps,
Mark
Hi Angel,
Sadly that Toshiba part seems not to support ONFI, and it is not listed with the other supported NAND devices. So it might not be supported by the boot loader.
I will confirm with a colleague and get back to you in a day or two.
Regards,
Mark
[EDIT - Device ID D5 is listed on Table 26-14. Supported NAND Devices (as a 16Gb, x8, 2048/4096 device).
Hi Angel,
I checked Table 26-14 Supported NAND Devices, and it includes Device ID "D5"
The Device ID maps to a 16Gb Capacity, x8 Bus Width, 2048/4096 page size.
How are you programming the NAND? Did you get the NAND Flash Writer to run? What parameters did you pass when programming the NAND?
Do you have any ability to capture waveforms with a scope during the NAND boot?
Helpful E2E threads:
https://e2e.ti.com/support/processors/f/791/t/207275
- nand flash writer
https://e2e.ti.com/support/processors/f/791/t/323432
https://e2e.ti.com/support/processors/f/791/t/244832?AM335x-Android-NAND-Boot-issue
Helpful Wikis:
http://processors.wiki.ti.com/index.php/AM335x_CCS_Flashing_Tools_Guide
Regards,
Mark
Angel,
OK, I understand and agree that switching U-Boot versions won't help with this problem.
We believe that this stems from the 8K page size of your NAND. From our TRM, Ch. 26, we only support 2K and 4K page sizes for booting:
U-Boot and the Kernel can support 8K, but the boot ROM cannot per the above. We would recommend using some other boot media to get to U-Boot.
I hope this addresses your issue.
Angel, are you able to connect to your board via JTAG? It is not clear from the previous post where exactly the failure is occurring, whether in the ROM or SBL. If you can connect thru JTAG, what is the program counter (PC) after a failure. Also, can you run the Debug script described here: http://processors.wiki.ti.com/index.php/AM335x_board_bringup_tips#Analyzing_Boot_Issues_with_CCS_and_JTAG
so we can get more info on the failure.
Thanks,
James
Hi James,
We have been analysing the communication with the scope and made good progress, we would like you to confirm from TI side that our conclusions are correct, and the options we have now.
- SYSBOOT: 0100 0000 0001 0011 (ECC done by ROM, 8 bit device, NAND, NANDI2C, MMC0, UART0)
When we boot from the microSD and read/write the NAND flash we see that it is correctly flashed and that it reads 26 ECC bytes after Reading the data.
When we boot from the NAND flash, we see that only reads 14 ECC bytes after Reading the data. This made us think that it is using BCH-8 while we understand from the SPRUH73P (page 5046) that it should be BCH-16.
For device ID codes D3h, C3h, D5h, C5h, D7h, C7h, DEh, CEh when manufacturer code (first ID byte) is 98h the Cell type information is checked in the 4th byte of ID data. If it is equal to 10b then the ECC correction applied is BCH 16b/sector.
The sequence of operations from the NAND are:
- Reset FF
- Id Read 90 20 98 D5 91 26 (98 Maker code, D5 Device code, 91 Chip Number, Cell Type, 26 Page Size, Block size)
- Reset FF
- Id Read 90 00 98 D5 91 26 (98 Maker code, D5 Device code, 91 Chip Number, Cell Type, 26 Page Size, Block size)
- Read 00 00 10 00 00 00 30 Data read FF
.....
From the 4th byte, 26 we understand that it should be BCH16 instead of BHC8.
We have done the following tests to confirm the previous affirmation.
- Connect Sysboot 9 to 1 -> ECC done by Flash -> This makes the bootloader to boot from NAND.
- Change BCH 16 to BCH 8 in the uboot, and flash it to the NAND. -> This makes the bootloader to from from NAND
Now we have the following questions:
- Is it reading incorrectly the 4th byte and using? Does this mean that we can only use BCH-8 for bootloader?
- Could we use BCH-16 to flash the Kernel and filesystem from the running bootloader? We have always used BCH-16 and we would like to keep it in the same way for reliability at least in the Kernel and Filesystem.
- We have noticed that it takes about 3 times more (from 5 to 15 seconds) to start the bootloader. What could be the reason?
Thanks a lot for your help
Angel
Angel,
If it is reading 0x26 in the 4th byte, that means that bits [3:2] are 01b, which means the cell type is 4 levels, and the ROM will choose BCH-8 because of this (see table 26-15 in the TRM for the decode of the 4th byte). It seems the NAND you are using only requires BCH-8. Thus, that is what the ROM will choose.
You should be able to use BCH-16 for the rest of the NAND which the ROM doesn't read. Or you can just choose the ECC to be performed by the flash.
I'm not sure why the boot is taking 3 times longer. Do you mean it takes 3 times longer with the new 32Gb NAND vs the smaller one? Can you narrow down where the extra time is spent (eg, in ROM, u-boot, or booting kernel)?
Regards,
James
Hi James,
Good to know the bits it is looking into to check for the 01b, we had assumed it was the lowest bits as it's not specified in the TRM.
The problem seems to be that Toshiba's byte meaning is:
What is being searched by the ROM in the 4th byte really is in the 3rd. We have checked D5 memories from Micron and Hynix and it seems that they have the same structure as Toshiba, so we don't see why it is being looked in the 4th byte. These bits [3:2] of the 4th byte are reserved in Toshiba and have information about spare page bytes or other info in other manufacturers.
Our NAND memory is SLC, 2 level cell so BCH-8 would be enough. The ECC needs to be done in the microprocessor as the memory does not have it.
The boot time with this 2x16Gbit NAND SLC flash is 3 times longer than with 16Gbit MT29F16G08ABABAWP-AIT:B. This time is from power on to first uboot characters in terminal.
Thanks
Angel
Angel,
I checked the ROM code, and it does use the SpareBytesPerPage parameter to determine the best ECC type. It looks like you will have to stick with BCH8, at least for the portion read by the ROM.
I don't have any good ideas as to why the boot time is so much longer. In order to debug the long boot time, you would need to get a little more granularity in the boot process. One way to do this is to insert GPIO toggles into different parts of MLO and/or u-boot, and monitor these toggles on a scope to check differences. This will help you check if it is the ROM (measure POR release to first GPIO toggle), or somewhere in the MLO/u-boot.
Regards,
James
Hello James,
Thank you for checking at your side. Now it is clear and we will try to see the options we have.
Regarding the booting time we will keep on making some tests, because adding these seconds to the start up could cause some problems in our systems.
Best regards and thank you for your help
Angel