CN102543215B - 一种基于ARM控制器的Nand FLASH智能检测方法 - Google Patents

一种基于ARM控制器的Nand FLASH智能检测方法 Download PDF

Info

Publication number
CN102543215B
CN102543215B CN201010603853.6A CN201010603853A CN102543215B CN 102543215 B CN102543215 B CN 102543215B CN 201010603853 A CN201010603853 A CN 201010603853A CN 102543215 B CN102543215 B CN 102543215B
Authority
CN
China
Prior art keywords
nand flash
chip
arm controller
read
enable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201010603853.6A
Other languages
English (en)
Other versions
CN102543215A (zh
Inventor
刘升
雒宵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Leizhi digital system technology (Xi'an) Co.,Ltd.
Original Assignee
XI'AN KEYWAY TECHNOLOGY CO LTD
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by XI'AN KEYWAY TECHNOLOGY CO LTD filed Critical XI'AN KEYWAY TECHNOLOGY CO LTD
Priority to CN201010603853.6A priority Critical patent/CN102543215B/zh
Publication of CN102543215A publication Critical patent/CN102543215A/zh
Application granted granted Critical
Publication of CN102543215B publication Critical patent/CN102543215B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

一种基于ARM控制器的Nand FLASH智能检测方法,包括:1)将主控ARM的GPIO分组,分别对应闪存芯片的数据总线、地址总线和控制总线,并进行配置;2)用主控的GPIO模拟Nand FLASH的读写时序,由ARM控制器读出闪存芯片的芯片ID及坏块信息;3)ARM控制器整理出一个数据列表;坏片判断标准为芯片中坏块的个数;4)用检测出的坏块个数与数据列表中相对应的值比较,判定是否为坏片等步骤。本发明具有硬件电路简单稳定,外围电路少,指令运行快、一次可检测多片,且不需要外加驱动电路、软件代码少,执行效率高以及兼容的芯片种类多,并且新的芯片出来之后只需要改动很小的代码就能兼容的优点。

Description

一种基于ARM控制器的Nand FLASH智能检测方法
技术领域
本发明涉及一种基于ARM控制器的Nand FLASH的智能检测方法。具体涉及一种通过一款低成本ARM控制器完成对Nand FLASH的ID信息、坏块数、电气特性的智能检测。
背景技术
FLASH全名叫做FLASH Memory,属于非易失性存储设备(Non-volatileMemory Device),与此相对应的是易失性存储设备(Volatile Memory Device)。Nand FLASH是FLASH中应用较为广泛的一种,Nand FLASH设计中,读取ID,意思是读取芯片的ID信息,这里读取的ID中,是读取多个字节,一般最少是4个,新的芯片支持5个甚至更多,从这些字节中,可以解析出很多相关的信息。同时读出厂家指定区的数据可以检测出坏块的信息。
常用的Nand FLASH检测都是基于FPGA或CPLD完成,或者在Nand FLASH已经被做成U盘或硬盘后用上位机软件进行检测。前一种实现起来比较复杂,且灵活性不好,并且需要完成上位机软件的编写,后一种方法检测比较方便,但需要频繁更换Nand FLASH和量产Nand FLASH。本身就对FLASH产生损伤,直接造成产品寿命的降低。
发明内容
本发明是一种基于ARM控制器的Nand FLASH智能检测方法,该方法由ARM控制器模拟Nand FLASH时序完成Nand FLASH检测,能检测出详细的芯片信息、坏块信息和电气特性。
具有硬件电路简单稳定、一次性检测数量多、USB供电方便、软件代码简练、执行效率高等优点。
本发明的技术方案是:
一种基于ARM控制器的Nand FLASH智能检测方法,其特殊之处在于,该方法包括:
1)首先,将主控ARM的GPIO分组,分别对应闪存芯片的数据总线、地址总线和控制总线,并进行配置;
2)用主控的GPIO模拟Nand FLASH的读写时序,由ARM控制器读出闪存芯片的芯片ID及坏块信息;
3)ARM控制器整理出一个数据列表,用以存储各个闪存芯片的坏片判断标准;所述坏片判断标准为芯片中坏块的个数;
4)用检测出的坏块个数与数据列表中相对应的值比较,判定是否为坏片;
5)由于ARM接口电平兼容LVTTL及LVCOMS接口标准,电气特性完全兼容NandFLASH,在完成功能检测的同时,检测Nand FLASH的电气特性;
所述用主控的GPIO模拟Nand FLASH的读写时序具体是:
a首先为发命令字,先将地址锁存信号和读使能信号禁止,使能命令锁存信号,为了稳定锁存信号,在使能之前通过GPIO将命令字发送到芯片的数据线,将写使能信号使能,并使其在触发后保持一段时间;
b发送要读信息的地址,此时将命令锁存禁止而将地址锁存使能,发送地址,同时将写信号使能,并使其在触发后保持一段时间;
c将命令锁存和地址锁存都禁止,读信号使能,从而在GPIO将指定的数据就会读出。
上述ARM控制器整理出一个数据列表具体是:
定义了一个保存芯片信息的结构体指针和一个指定扇区的索引;能在扇区任意位置读取的任意数据。
上述ARM控制器包括单片机及PowerPC微处理器。
本发明的优点在于:
1、硬件电路简单稳定,外围电路少,指令运行快。
由于ARM芯片集成度高,管脚兼容性好,不需要加转换电路所以硬件电路少且稳定;另外由于ARM芯片采用精简指令集,指令周期短,指令运行速度快
2、一次可检测多片,且不需要外加驱动电路。
由于在检测时可以将多个芯片一次放入后,多管脚的ARM控制器上有多个数据线和控制线,而FLASH只需要少量的数据线和控制线,所以可以一次检测多路的FLASH芯片;此外此ARM芯片的管脚有多种输出方式,且输出电流大,足以驱动各种FLASH芯片。
3、软件代码少,执行效率高。
由于ARM本身指令的优点和速度优势,再加上优化的代码,使得代码量很少,且效率很高。
4、兼容的芯片种类多,并且新的芯片出来之后只需要改动很小的代码就能兼容。
软件程序定义了一个保存芯片信息的结构体指针和一个指定扇区的索引,另外整理了多片Nand FLASH芯片的ID信息和坏块检测信息并整理成一个可供用户调用的头文件和一个可调用的函数库;因而可以兼容多种Nand FLASH芯片。
附图说明
图1为本发明实现硬件框图。
具体实施方式
参见图1,
1)首先,将主控ARM的GPIO分组,分别对应闪存芯片(Nand FLASH)的数据总线、地址总线和控制总线,并进行寄存器配置。
2)用主控的GPIO模拟Nand FLASH的读写时序,读出闪存芯片的芯片ID及坏块信息。
3)整理出一个数据列表,用以存储各个Nand FLASH的坏片判断标准,具体为芯片中坏块的个数。
4)用检测出的坏块个数与数据列表中相对应的值比较,判定是否为坏片。
本发明的特点在于:
ARM的选择和GPIO灵活配置,将GPIO灵活的配置成为三总线,每条总线可以灵活的配置成不同的电路特性;
其次优化的数据结构,定义了一个保存芯片信息的结构体指针和一个指定扇区的索引。可以将在扇区任意位置读取的任意数据。使软件的兼容性非常高。
本发明的硬件为:一种新颖的ARM控制器,直接将GPIO对应于Nand FLASH的管脚。并有USB接口供电和上位机输出,此外还有串口用于调试和打印结果。

Claims (3)

1.一种基于ARM控制器的Nand FLASH智能检测方法,其特征在于,该方法包括:
1)首先,将主控ARM的GPIO分组,分别对应闪存芯片的数据总线、地址总线和控制总线,并进行配置;
2)用主控的GPIO模拟Nand FLASH的读写时序,由ARM控制器读出闪存芯片的芯片ID及坏块信息;
3)ARM控制器整理出一个数据列表,用以存储各个闪存芯片的坏片判断标准;所述坏片判断标准为芯片中坏块的个数;
4)用检测出的坏块个数与数据列表中相对应的值比较,判定是否为坏片;
5)由于ARM接口电平兼容LVTTL及LVCOMS接口标准,电气特性完全兼容NandFLASH,在完成功能检测的同时,检测Nand FLASH的电气特性;
所述用主控的GPIO模拟Nand FLASH的读写时序具体是:
a首先为发命令字,先将地址锁存信号和读使能信号禁止,使能命令锁存信号,为了稳定锁存信号,在使能之前通过GPIO将命令字发送到芯片的数据线,将写使能信号使能,并使其在触发后保持一段时间;
b发送要读信息的地址,此时将命令锁存禁止而将地址锁存使能,发送地址,同时将写信号使能,并使其在触发后保持一段时间;
c将命令锁存和地址锁存都禁止,读信号使能,从而在GPIO将指定的数据就会读出。
2.根据权利要求1所述基于ARM控制器的Nand FLASH智能检测方法,其特征在于,所述ARM控制器整理出一个数据列表具体是:
定义了一个保存芯片信息的结构体指针和一个指定扇区的索引;能在扇区任意位置读取的任意数据。
3.根据权利要求2所述基于ARM控制器的Nand FLASH智能检测方法:所述ARM控制器包括单片机及PowerPC微处理器。
CN201010603853.6A 2010-12-20 2010-12-20 一种基于ARM控制器的Nand FLASH智能检测方法 Active CN102543215B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010603853.6A CN102543215B (zh) 2010-12-20 2010-12-20 一种基于ARM控制器的Nand FLASH智能检测方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010603853.6A CN102543215B (zh) 2010-12-20 2010-12-20 一种基于ARM控制器的Nand FLASH智能检测方法

Publications (2)

Publication Number Publication Date
CN102543215A CN102543215A (zh) 2012-07-04
CN102543215B true CN102543215B (zh) 2015-01-21

Family

ID=46349900

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010603853.6A Active CN102543215B (zh) 2010-12-20 2010-12-20 一种基于ARM控制器的Nand FLASH智能检测方法

Country Status (1)

Country Link
CN (1) CN102543215B (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106155947B (zh) * 2015-04-03 2019-02-22 南京理工大学 一种数据存储模块的实现方法
CN106158047A (zh) * 2016-07-06 2016-11-23 深圳佰维存储科技股份有限公司 一种nand flash测试方法
CN108682442B (zh) * 2018-05-23 2022-04-05 置富科技(深圳)股份有限公司 一种不同封装闪存芯片在线测试和分类方法及测试系统
CN109388583B (zh) * 2018-10-10 2024-01-12 深圳芯邦科技股份有限公司 一种参数检测的方法及相关设备

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101521956A (zh) * 2008-12-19 2009-09-02 康佳集团股份有限公司 一种通过gpio口读写t卡的方法、系统和手机

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080307134A1 (en) * 2007-06-05 2008-12-11 Geissler Andrew J I2C bus interface and protocol for thermal and power management support

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101521956A (zh) * 2008-12-19 2009-09-02 康佳集团股份有限公司 一种通过gpio口读写t卡的方法、系统和手机

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于单片机的Flash存储器坏块自动检测;王新舜等;《电子设计工程》;20100331;第18卷(第3期);第124-125页及第128页 *

Also Published As

Publication number Publication date
CN102543215A (zh) 2012-07-04

Similar Documents

Publication Publication Date Title
US9176865B2 (en) Data writing method, memory controller, and memory storage device
US9442834B2 (en) Data management method, memory controller and memory storage device
US8255656B2 (en) Storage device, memory controller, and data protection method
CN102543215B (zh) 一种基于ARM控制器的Nand FLASH智能检测方法
US9858366B2 (en) Simulator and simulating method for flash memory background
CN107678988A (zh) 一种多功能串口装置及实现方法
US9552287B2 (en) Data management method, memory controller and embedded memory storage apparatus using the same
US8943264B2 (en) Data storing method, and memory controller and memory storage apparatus using the same
TW201351137A (zh) 記憶體管理方法、記憶體控制器與記憶體儲存裝置
JPWO2003009222A1 (ja) 電子装置、情報処理装置、アダプタ装置及び情報交換システム
CN103577344A (zh) 数据写入方法、存储器控制器与存储器储存装置
CN103389941A (zh) 存储器格式化方法、存储器控制器及存储器存储装置
CN102629212A (zh) 一种基于j-link间接烧写程序到nandflash的方法
CN102890653A (zh) 指令执行方法、存储器控制器与存储器储存装置
US8595418B2 (en) Memory configuring method, memory controller and memory storage apparatus
CN112988069B (zh) 存储器管理方法、存储器存储装置及存储器控制器
CN112540881B (zh) 存储装置测试管理方法以及存储装置测试管理系统
CN102467459B (zh) 数据写入方法、存储器控制器与存储器储存装置
CN109994147B (zh) 一种固态硬盘的测试装置及方法
US20120226371A1 (en) Memory storage apparatus, memory controller, and audio playing method
CN102736985B (zh) 数据合并方法、控制器与储存装置
CN102456401B (zh) 区块管理方法、存储器控制器与存储器储存装置
CN102236584B (zh) 用来抑制数据错误的方法以及相关的记忆装置及其控制器
US9268554B2 (en) Controlling method, memory controller, and data transmission system
CN103823704A (zh) 闪存的模拟方法与模拟器

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 710065 Xi'an high tech Zone, Jin Industrial Road, No., No. C Venture Park, No. 8,

Applicant after: Xi'an Keyway Technology Co.,Ltd.

Address before: 710077 Xi'an high tech Zone, Jin Industrial Road, No., No. C Venture Park, No. 8,

Applicant before: Xi'an Qivi Test & Control Technology Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: XI'AN QIVI TEST + CONTROL TECHNOLOGY CO., LTD. TO: XI'AN KEYWAY TECHNOLOGY CO., LTD.

C14 Grant of patent or utility model
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 710065 Xi'an high tech Zone, Jin Industrial Road, No., No. C Venture Park, No. 8,

Patentee after: Xi'an Qiwei Technology Co. Ltd.

Address before: 710065 Xi'an high tech Zone, Jin Industrial Road, No., No. C Venture Park, No. 8,

Patentee before: Xi'an Keyway Technology Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20170920

Address after: 710065 Xi'an high tech Zone, Jin Industrial Road, No., No. C Venture Park, No. 8,

Co-patentee after: Beijing Polytechnic Leike Electronic Information Technology Co., Ltd.

Patentee after: Xi'an Qiwei Technology Co. Ltd.

Address before: 710065 Xi'an high tech Zone, Jin Industrial Road, No., No. C Venture Park, No. 8,

Patentee before: Xi'an Qiwei Technology Co. Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211019

Address after: 710117 No. a1-134, building 4, phase II, information industry park, No. 526, Xitai Road, high tech Zone, Xi'an, Shaanxi Province

Patentee after: Xi'an siduoruizhi Information Technology Co.,Ltd.

Address before: 710065 No. 8, C District, pioneering research and Development Park, 69 Jinye Road, hi tech Zone, Xi'an, Shaanxi

Patentee before: XI'AN KEYWAY TECHNOLOGY Co.,Ltd.

Patentee before: BIT RACO ELECTRONIC INFORMATION TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211201

Address after: 710117 a2-02, building 4, phase II, information industry park, No. 526, banxitai Road, Xinglong Street, high tech Zone, Xi'an, Shaanxi Province

Patentee after: Leizhi digital system technology (Xi'an) Co.,Ltd.

Address before: 710117 No. a1-134, building 4, phase II, information industry park, No. 526, Xitai Road, high tech Zone, Xi'an, Shaanxi Province

Patentee before: Xi'an siduoruizhi Information Technology Co.,Ltd.