Note: The power supply voltage of k9f1208u0b is 3.3 V, the fclk of the system is 533 MHz, and the hclk is 533/4 = 133 MHz.
NAND Flash Controller Initialization
Call nf_init () in the mian function of stepldr to initialize the NAND flash controller. The following describes this function.
Where
// Hclk = 100 MHz
# Define tacls 7
# Define twrph0 7
# Define twrph1 7
(1) Configure nfconf in the configuration register of NAND Flash
The actual meanings of tacls, twrph0, and twrph1 can be found in the following sequence diagram and nfconf register descriptions.
We can see from the two figures above:
Tacls: the setup time of CLT/ALE ).
Twrph0: the duration of CLE/ALE.
Twrph1: hold time of CLE/ALE ).
We use the relevant sequence diagram below k9f1208u0b
And
Based on the above figure, we can know
Tacls is equivalent to the tcls parameter, twrph0 is equivalent to TWP, and twrph1 is equivalent to tclh
Here tacls = 7, that is, 7 * 7.5ns = 52.5ns> 0ns; twrph0 = 7, and 7 * 7.5ns = 52.5ns> 25ns; twrph1 = 7, that is, 7 * 7.5ns = 52.5ns> 10ns