NandFlash Application of S5PV210 (Part 3)

Publisher:创意旅程Latest update time:2020-04-01 Source: eefocusKeywords:S5PV210 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Prepare for analysis


After reading "NandFlash Application of S5PV210 (II)", I have a certain understanding of the access method of the first 16k of binary files. This time, I want to prove the access method after the 4th page of NandFlash. 210.bin (16k in size) in "NandFlash Application of S5PV210 (II)" is stored in the first 4k of each page of the first 4 pages (0, 1, 2, 3) in units of 4k. For this reason, I wrote an 8k binary file (named AB) and pasted it behind 210.bin. According to the inference, the 8k should be stored in the 4th page. Then change to nand_cp.c to read the 4th page in 8k mode, and then output the data to the serial port, and then compare it with the original binary file.

Resource Tools


Same as "LED Application of S5PV210 (I)"

NandFlash: K9GAG08U0F (2G)

Special binary file AB:

Start writing the program


(1) int nandll_read_blocks (ulong dst_addr, ulong size, int large_block), reads a block size. Here it is changed to read a page in 8k mode.

(2) cat 210.bin AB > 210210.bin can merge two files


Specific implementation:

/*

 * Read data from NAND.

 */

static int nandll_read_blocks (ulong dst_addr, ulong size, int large_block)

{

        fly *buf = (fly *)dst_addr;

        int i;

        uint page_shift = 9;


        if (1 == large_block)

        {

                page_shift = 11;

                /* Read pages */

                for (i = (0x6000>>page_shift); i < (size>>page_shift); i++, buf+=(1<                {

                        nandll_read_page(buf, i, large_block);

                }

        }

        else if(3 == large_block)

       {

                page_shift = 13;

                //Read a page in 8k mode

                for (i = 4; i < 5; i++, buf+=(1<<(page_shift))) 

                {

                        nandll_read_page(buf, i, large_block);

                }

        }

        

        return 0;

}


Download and run


Same as "LED Application of S5PV210 (I)"

The download file is: 210210.bin


Run Debug

       

The comparison with the "special binary file AB" is shown in the figure:

There were no problems with the three important points and they all corresponded to each other, confirming the hypothesis.

It is concluded that files after 16k are stored starting from page 4 of NandFlash.

         

Remaining problem

  

1. None

Keywords:S5PV210 Reference address:NandFlash Application of S5PV210 (Part 3)

Previous article:NandFlash application of S5PV210 (I)
Next article:Uart application of S5PV210

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号