FAQs
Base Address is the start address of the allocated area in Flash Memory, which a control unit understands. Because LLD (ONLD.cpp) of SAMSUNG XSR uses the address defined by PAM (PAM.cpp) to access OneNAND™, you must define Base Address in PAM. However, if you want to make Low Level Driver (LLD), you can set Base Address within your own LLD, not using PAM.
SAMSUNG Electronics provides software utilities as sample codes for NAND booting; NAND Writer (NW) and NAND boot loader (NBL1/NBL2). They use the APIs of BML (Block Management Layer) in XSR.
To read or write OS image to NAND, invalid block management scheme must be used. SAMSUNG XSR includes BML (Block Management Layer), thus you can use Read/Write API of BML.
OneNAND™
- DEFERRED_CHK : If you define this MACRO, LLD APIs do not check whether the command is executed or not after an erase and program command. And then, when the next erase and program command is executed, LLD APIs will check whether the previous command was executed or not. This feature is helpful for improving OneNAND?performance.
- CACHED_READ : If you define this MACRO, you can use OneNAND?is dual buffering feature. For more information about dual buffering feature of OneNAND? please refer to OneNAND?Feature and Performance White Paper provided by SAMSUNG Electronics.
- ALIGNED_MEMCPY : If you define this MACRO, you can use memcpy library provided by the system if the byte alignment is appropriate.
- SYNC_READ : If you define this MACRO, you can use synchronous read operation provided by OneNAND? The default value for synchronous read operation is set based on OneNAND?Specifications. To use synchronous read function of OneNAND? the platform environment must also be set as synchronous read operation.
- STRICT_CHK : If you want to check the validity of LLD status, you can use this MACRO. This MACRO activates _StrictChk() function in LLD codes and this function checks the device number, device open flag, device power flag and out of block boundary.
STL_Format() formats NAND flash memory to run STL codes in the specified volume. When STL_format() is executed, STL retrieves STL configurations like the fill factor, the number of reserved unit and the number of block per unit as a function parameter.
BML_format() formats NAND flash memory to run BML code in the specified volume. Also, it stores partition information and valid-invalid block map table into NAND flash memory.
XSR supports two volumes composed of different types of NAND, and each volume can have four devices composed of the same type of NAND. Each NAND can be notified through setting nBaseAddr[] of PAM_GetParm function in PAM.cpp.
Usually, gang-programmers use the following two procedures.
In the case of write error, most gang-programmers ignore it and discard that block that contains an error. The first reason to ignore it is that the initial program error hardly occurs. And the second reason is that it takes too much time to handle that error block.
- When you are using SAMSUNG Software
If you use SAMSUNG Software, you can apply GBBM (Global Bad Block Management) scheme. However, you must complete a NDA with SAMSUNG Electronics and gang-programmers.
- When you are not using SAMSUNG Software
If you are not using SAMSUNG Software, you must consider managing initial invalid blocks and runtime invalid blocks. In this case, SAMSUNG Electronics can guide only indirectly.
The type of File System and the size of a block should be specified when formatting a hard disk. STL has to configure a few related items when formatting, corresponding to the specified form.
The following describe the configuration of the untried of STLConfig structure.
STL stores both user data and meta data on NAND flash memory. Meta data area is reserved for performance improvement, so you actually use the rest for the user data area. The user data area can be configured by nFillFactor.
For example, if nFillFactor value is 100, it allows you to use the whole user data area except for meta data area. If nFillFactor is 50, it allows you to use 50 percent of the user data area. As the usable data area becomes smaller, the performance will improve.
A unit is a logical quantity which can be composed of one block or multiple blocks. Normally, a unit is composed of N blocks and the smallest erasable unit. The number of blocks per unit is configured by nBlksPerUnit. For large block NAND device, nBlksPerUnit should be only 1. And for small block NAND device, nBlksPerUnit can be specified from 1 to 7. As the unit value is increased, the memory used by XSR is larger, but the performance of random write operation becomes better. It is highly recommended that you set nBlksPerUnit to under 4 in Small Block NAND.
STL manages the whole memory space as a set of units. Some of the units are specified as reserved units and are not accessible by users. The number of the reserved units is configurable and should be 2 or more. As the reserved unit value is increased, the usable disk capacity for users will be decreased, but the whole write operation will improve.
In those cases, you should modify the following 3 files.
- First, you should modify PAM.cpp in PAM directory. The function pointer value of pstLFT[] should be changed according to the NAND type you want to use because each NAND can have its unique functions.
- Second, you should modify LLD code in LLD directory such as ONLD.cpp or PNS.cpp. LLD means a low level driver and describes the exact operation of each NAND.
- Lastly, you should modify tfs4_pdev_nand_xsr.h in TFS4\FAL\INC directory. In this file, you can configure NAND parameters for XSR on your n
They have different meanings from each other. In XSR, a volume is a set of chips. One volume could be bundled by up to 4 of the same types of chips and is managed by STL. For example,
- If you use one chip, you can configure it as one volume.
- If you use two chips and they are different types, you can configure it as 2 volumes. But if the two chips are the same type, it could be one volume.
In TFS4, a volume is a sort of partition. Formatting TFS4 by fdisk, the memory device could be partitioned as /a/, /b/, /c/, and /d/ volume like a hard disk drive. It is a logical concept. But, there should be one partition that has a File System attribute in XSR.




