CN103034588B - A kind of mobile phone camera OTP Memory Allocation, information write and read method - Google Patents

A kind of mobile phone camera OTP Memory Allocation, information write and read method Download PDF

Info

Publication number
CN103034588B
CN103034588B CN201310015526.2A CN201310015526A CN103034588B CN 103034588 B CN103034588 B CN 103034588B CN 201310015526 A CN201310015526 A CN 201310015526A CN 103034588 B CN103034588 B CN 103034588B
Authority
CN
China
Prior art keywords
otp
memory
interval
write
information
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
CN201310015526.2A
Other languages
Chinese (zh)
Other versions
CN103034588A (en
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.)
Truly Opto Electronics Ltd
Original Assignee
Truly Opto Electronics 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 Truly Opto Electronics Ltd filed Critical Truly Opto Electronics Ltd
Priority to CN201310015526.2A priority Critical patent/CN103034588B/en
Publication of CN103034588A publication Critical patent/CN103034588A/en
Application granted granted Critical
Publication of CN103034588B publication Critical patent/CN103034588B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Telephone Function (AREA)

Abstract

The present invention relates to a kind of mobile phone camera OTP Memory Allocation, information write and read method.This OTP memory allocation method, comprises, and obtain the capacity of OTP internal memory, the capacity of described OTP internal memory is A byte; Obtain the byte number of the parameter of described OTP internal memory to be written, the total bytes of all described parameters is S; According to the capacity of described OTP internal memory and the total bytes of described all described parameters, described OTP internal memory is divided into P group, this memory allocation method, due to OTP memory headroom is divided into multiple groups, can make OTP memory headroom realize repeatedly the object of write parameters.This OTP memory headroom is divided into several groups, OTP memory headroom can realize the possibility of write parameters several times, thus, when the failure of OTP memory information write-once, other group write parameters at OTP memory headroom can be continued, avoid OTP write-once failure in prior art, the problem that cell-phone camera module will be scrapped.

Description

A kind of mobile phone camera OTP Memory Allocation, information write and read method
Technical field
The present invention relates to a kind of cell-phone camera module, particularly relate to a kind of mobile phone camera OTP Memory Allocation, information write and read method.
Background technology
Along with the fast development of mobile phone camera, to image effect and coherence request more and more higher.Each camera module is due to its individual difference, and its image effect is also not quite similar, and in order to reach the consistance of the image effect of like product, needs to carry out some effects correction to single module.This just requires that mobile phone camera module is when dispatching from the factory, best each parameter information is all written to OTPM(one time programmablememory) in, client is when using camera module, as long as read the parameter information be pre-written in this OTPM and apply it on this camera module from OTPM, the high consistency of mobile phone camera photographic effect just can be realized as much as possible.
OTP is a kind of type of memory, i.e. one-off programming, and many employing fuse structures, programming process is irreversible destructive activity.Namely OTP can only write memory headroom once.
One section of storage space on the sensitive chip (CMOS sensor) that mobile phone camera is used is OTPM(one time programmable memory), on this storage space, each position can only be write a secondary data and enters, and has wrongly write just cannot delete or cover new value and get on.OTP, with its cheap price, is used in easily and fast in high-pixel camera head and obtains increasing application.But due to primary information can only be write in OTP, once information write error, whole mobile phone module will be caused to scrap, increase production cost.
In prior art, because OTP internal memory does not divide into groups, OTP internal memory can only use once, when first time by parameter read-in to OTP internal memory time, if write unsuccessfully, just can not again write, mobile phone camera module faces the risk of scrapping, and causes great waste.The OTP internal memory wiring method that the present embodiment provides, due to before write parameters information, divide into some groups by OTP internal memory in advance, can hold all parameters owing to often organizing OTP internal memory.So when writing, first whole parameter can be write on one group, if write unsuccessfully in this group, can continue write parameters information in other group.Have how many groupings in OTP, just can write how many times, add the number of times of OTP write, thus avoid OTP write-once failure in prior art, mobile phone camera module just faces the risk of scrapping, thus has saved cost.
Summary of the invention
In view of this, the invention provides a kind of mobile phone camera OTP Memory Allocation, information write and read method, write unsuccessfully to solve OTP primary information in prior art, the problem that camera module is just scrapped.
In order to solve the problems of the technologies described above, technical scheme of the present invention is as follows:
A kind of mobile phone camera OTP memory allocation method, comprising:
Obtain the capacity of OTP internal memory, the capacity of described OTP internal memory is A byte;
Obtain the byte number of the parameter of described OTP internal memory to be written, the total bytes of all described parameters is S;
According to the capacity of described OTP internal memory and the total bytes of described all described parameters, described OTP internal memory is divided into P group,
Wherein, described OTP internal memory has Q layer address, and at least containing a predetermined layer address in a described Q layer address; all described predetermined layer addresses are divided into M interval; at least one layer address in arbitrary described interval and described OTP internal memory except described predetermined layer address forms a group, and any layer address except described predetermined layer address only belongs to a group;
A, S, Q, P, M, n are natural number, and M is not less than 2.
Preferably, the memory size often organizing OTP is equal.
Preferably, the memory size of the layer address of each OTP is equal.
Preferably, the quantity in the interval in described predetermined layer is equal with the quantity of the group of described OTP internal memory.
A kind of mobile phone camera OTP memory information wiring method, comprising:
OTP memory allocation method according to above-mentioned any one distributes OTP internal memory;
M preset parameter being written to described predetermined layer address is interval;
Judge whether described preset parameter writes successfully, if so, the parameter of write except described preset parameter successively in the OTP internal memory of p group except described predetermined layer address; Described m interval belongs to described p group;
Wherein, the memory headroom shared by described preset parameter is B byte, and the memory size in arbitrary described interval is not less than B byte; M is natural number, 0<m<M, 0<p<P.
Preferably, describedly judge whether described preset parameter writes successfully, also comprise, if not, m interval write fail flag in described predetermined layer address, and the described preset parameter of m+1 interval write in described predetermined layer address, determine the successful operation of the described preset parameter of m+1 interval write in described predetermined layer address, and in the OTP internal memory of p+1 group except described predetermined layer address, write the parameter information except described preset parameter successively; Described m+1 interval belongs to p+1 group.
Preferably, the capacity in each interval of described predetermined layer address is equal.
A kind of mobile phone camera OTP memory information read method, comprising:
Read the flag register in the m interval of predetermined layer address, containing preset parameter write whether successfully information in described flag register;
Judge that whether the information in described flag register is effective; If so, all parameters in p group OTP internal memory are read;
Wherein, all described parameters carry out information write according to the memory information wiring method described in above-mentioned any one.
Preferably, whether the described information judged in described flag register is effective, also comprises, if not, read the flag register in the m+1 interval of described predetermined layer address.
The present invention is by being divided at least 2 groups by mobile phone camera OTP internal memory, and the memory headroom capacity often organized is not less than the total bytes of all parameters.Several layer address are had in this OTP, wherein at least one layer address is predetermined layer address, this predetermined layer address is divided into several interval, at least one layer address in arbitrary interval and described OTP internal memory except described predetermined layer address forms a group, and any layer address except described predetermined layer address only belongs to a group.
In OTP internal memory during write parameters, first at arbitrary interval write preset parameter of predetermined layer, if write successfully, write the parameter except preset parameter at other layer address with this interval place group; If preset parameter writes unsuccessfully, in this interval write fail flag, and at the interval write parameters of the another one of predetermined layer, if write successfully, repeat aforesaid operations.
This OTP memory headroom distribution method, due to OTP memory headroom is divided into multiple groups, can make OTP memory headroom realize the object of repeatedly write parameters information.This OTP memory headroom is divided into several groups, OTP memory headroom can realize the possibility of write parameters several times, thus, when the failure of OTP memory information write-once, other group write parameters at OTP memory headroom can be continued, avoid OTP write-once failure in prior art, the problem that cell-phone camera module will be scrapped.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the process flow diagram of embodiment one in the present invention;
Fig. 2 is the process flow diagram of embodiment two in the present invention;
Fig. 3 is the process flow diagram of embodiment three in the present invention.
Embodiment
For enabling above-mentioned purpose of the present invention, feature and advantage become apparent more, are described in detail the specific embodiment of the present invention below in conjunction with accompanying drawing.
Set forth a lot of detail in the following description so that fully understand the present invention, but the present invention can also adopt other to be different from alternate manner described here to implement, those skilled in the art can when without prejudice to doing similar popularization when intension of the present invention, therefore the present invention is by the restriction of following public specific embodiment.
Embodiment one
Embodiment one is a kind of mobile phone camera OTP memory allocation method provided by the invention.Composition graphs 1.Fig. 1 is the process flow diagram of the embodiment of the present invention one.The mobile phone camera OTP memory allocation method that the present embodiment provides, comprises the following steps:
The capacity of S101, acquisition OTP internal memory:
The OTP of mobile phone camera module all can be provided with the OTP internal memory of certain capacity during fabrication, obtains the capacity of OTP internal memory, assuming that the capacity of OTP internal memory is A byte.
S102, obtain the total bytes of all parameters of described OTP internal memory to be written:
Mobile phone camera module has many kinds of parameters, as parameter etc. corrected by module basic parameter, white balance parameter, camera lens.Each parameter can occupy certain memory headroom when being written in OTP, and obtain the total bytes of all parameters of the OTP internal memory be written in mobile phone camera module, the total bytes of this all parameter is S.
S103, according to the capacity of OTP internal memory and the byte number of all parameters, OTP internal memory is divided into P group:
OTP internal memory has Q layer address, and namely Q gets integral part, n is natural number, and in order to easy, n generally gets 1 or 2, and the capacity of every layer of OTP is not all very large like this, write and can not easily makeing mistakes when reading.This layer address is generally preset in mobile phone camera module, not afterwards people for dividing into.
At least containing a predetermined layer address in this Q layer address, in this predetermined layer address, only store a certain preset parameter, such as, be parameter x1, and other parameter except this parameter x1 is stored in the layer address beyond predetermined layer address.If the space shared by preset parameter x1 is comparatively large, and want to reach can possibility of more times written information, and predetermined layer address can be multilayer, to have enough space storage preset parameter x1.This all predetermined layer address be divided into M interval, at least one layer address in the arbitrary interval in this M interval and OTP internal memory except predetermined layer address forms a group, and any layer address except predetermined layer address only belongs to a group.
Divide into as P group according to the OTP memory size A of above-mentioned acquisition and the total bytes S of all parameters by OTP internal memory, P is integer, and namely the internal memory of OTP is at least divided into 2 groups, mostly is most ( integral part) group, and the capacity often organized is not less than the total bytes of all parameters, and the OTP internal memory so often organized all can hold all parameters, and such one group of complete parameter information can be stored in one group of OTP memory headroom.The group of OTP is at least 2 groups, this memory allocation method in the internal memory of OTP repeatedly write parameters possibility is provided, can to avoid in prior art the failure of OTP internal memory write-once, whole mobile phone camera module just faces the risk of scrapping.Consider from the angle realizing repeatedly write parameters, point group more, can the number of times of write parameters more, more can make full use of the memory headroom of OTP.
In order to follow-up in OTP internal memory write parameters convenient, simple and direct, the capacity preferably often organizing OTP internal memory is equal, and the layer address memory size of each OTP is equal.In order to not waste OTP memory headroom, OTP memory headroom is fully utilized, the number of the demarcation interval of predetermined layer address is preferably equal with the number of the group that OTP internal memory divides into.From the angle of inventive concept, the number of the number of demarcation interval and the group of OTP matches, and namely predetermined layer address has how many intervals, preferably has the group of how many OTP to match with it.
In order to more clearly understand the OTP memory allocation method that the present embodiment provides, give one example below.The capacity of OTP internal memory is 256 bytes, containing 8 layer address (bank0, bank1 ..., bank7), the capacity of these 8 layer address can identical also can not be identical, preferably identical, namely the capacity of each layer address is 32 bytes, and wherein, a selected layer address bank0 is predetermined layer address, can only preset parameter be stored, other parameter can not be stored.This predetermined layer bank0 is 3 intervals by people for dividing into: first interval, second interval and the 3rd interval.Each interval is used for storage preset parameter.First interval forms first group with layer address bank1 and bank2, and the second interval forms second group with layer address bank3 and bank4, and the 3rd interval and layer address bank5 and bank6 form the 3rd group, and bank7 is reserved OTP memory headroom, can as subsequent use.
Wherein, any one deck in layer address bank1 ~ bank6 can only belong to arbitrary one group of first to the 3rd group, and can not belong to two groups simultaneously.Can learn, predetermined layer belongs to multiple groups, but the arbitrary interval in predetermined layer can only belong to a group, and can not belong to two groups simultaneously.
It is pointed out that the numerical range of above-mentioned citing is only to more clearly understand this technical scheme, the group number of the number of plies of the OTP in the present embodiment, the interval number of predetermined layer and OTP is not limited to the concrete numerical range of above-mentioned citing.Wherein, the group number of OTP is at least 2, and group number is more, and the number of times that can write when follow-up parameter read-in is more.
The mobile phone camera OTP memory allocation method that embodiment one provides, is divided into some groups by OTP internal memory, and the memory size often organized all can hold all parameters, provides possibility for OTP internal memory can realize repeatedly writing.Based on the mobile phone camera OTP memory allocation method that embodiment one provides, embodiment two provides a kind of mobile phone camera OTP memory information wiring method.
Embodiment two
Embodiment two provides a kind of mobile phone camera OTP memory information wiring method.
Composition graphs 2.Fig. 2 is the process flow diagram of the mobile phone camera OTP memory information wiring method of the present embodiment.This mobile phone camera OTP memory information wiring method, comprises the following steps:
S201, OTP internal memory to be distributed:
According to any one mobile phone camera OTP memory allocation method that above-described embodiment one provides, OTP internal memory is distributed.
In order to be expressly understood the solution of the present invention, the present embodiment is described with the example of embodiment one.That is: the capacity of OTP internal memory is 256 bytes, containing 8 layer address (bank0, bank1 ..., bank7).The capacity of each layer address is 32 bytes, and wherein, a selected layer address bank0 is predetermined layer address, can only store preset parameter, can not store other parameter.This predetermined layer bank0 is 3 intervals by people for dividing into: first interval, second interval and the 3rd interval.Each interval is used for storage preset parameter.First interval forms first group with layer address bank1 and bank2, and the second interval forms second group with layer address bank3 and bank4, and the 3rd interval and layer address bank5 and bank6 form the 3rd group, and bank7 is reserved OTP memory headroom, can as subsequent use.
S202, preset parameter x1 is written to the first interval of predetermined layer address bank0:
Containing multiple parameter in cell-phone camera module, such as parameter etc. corrected by module basic parameter, white balance parameter, camera lens, in order to for simplicity, represents various different parameter here with symbol x1, x2, x3 etc.Toward in OTP internal memory during write parameters, preliminary setting parameter x1 is preset parameter, and in fact, the arbitrary parameter in cell-phone camera module can be all preset parameter.The present embodiment is described using parameter x1 as preset parameter.This preset parameter x1 can only write on or be stored on the predetermined layer address bank0 in OTP internal memory, and this preset parameter x1 can write on the arbitrary interval on the bank0 of predetermined layer address.In this step, preset parameter x1 is written to first in the bank0 of predetermined layer address interval.
According to step S201, predetermined layer address bank0 is divided into multiple interval, the memory size in any one interval is not less than the memory headroom shared by preset parameter x1, and any one interval namely divided into all can hold a preset parameter.Suppose that preset parameter x1 accounts for 10 byte numbers, the capacity in each interval is at least 10 bytes.If the capacity in each interval on the bank0 of predetermined layer address is 10 bytes, the capacity due to predetermined layer address bank0 is 32 bytes, then leave 2 bytes regardless of on described interval, as headspace.
As described in embodiment one, the memory size in each interval can be identical, also can be different, preferably identical.
In order to make full use of the memory headroom of OTP, and in order to make in order well arranged on OTP internal memory of parameter read-in, preferably first preset parameter x1 is written to first interval of predetermined layer address bank0, if write unsuccessfully in the first interval, preset parameter x1 is written to successively the second interval, the 3rd interval etc.Interval sequence carries out dividing according to the order of predetermined layer address bank0.
S203, judge that preset parameter is written to the first interval and whether writes successfully:
Be written to after the first interval completes at preset parameter x1, read the value in this first interval, if the value read is that namely the value write in advance writes successfully, then any operation is not carried out to the most significant digit in this interval, now, the most significant digit in this interval is 0 and other position is not 0 entirely; If the value read is not that namely the value write in advance writes failure, the most significant digit in this interval writes 1.Judge whether preset parameter x1 writes successfully according to the information in the most significant digit in the first interval.If write successfully, perform step S204, if write unsuccessfully, perform step S205.
S204, on layer address bank1 and bank2 the parameter information of write except preset parameter x1 successively:
Distribute the internal memory of OTP according to step S201, a group of the OTP of division is made up of the interval of on predetermined layer address and at least one layer address except predetermined layer address.Wherein, the first interval in layer address bank0 and bank1 and bank2 form first group of OTP.Judging that preset parameter x1 is written to first of predetermined layer address bank0 and interval writes successfully, write parameters x2, x3 etc. other parameter except preset parameter x1 successively on layer address bank1 and bank2 in the 1st group of OTP.Like this, one group of complete parameter is all in same group of OTP, and preset parameter x1 and other parameters are not if x2, x3 etc. are on same layer address, the clear layer of such storage information, for client is provided convenience when reading the memory information of OTP.
If all parameters are all successfully writing on the internal memory of OTP, then the operation of the internal memory write parameters of OTP completes.If just write successfully words when first time write, so only used OTP on OTP internal memory first group.Other group of OTP comprise second group and the 3rd group all do not use, empty as headspace.
S205, the first interval write fail flag in predetermined layer address, and the second interval write preset parameter x1 in described predetermined layer address:
If it is interval that preset parameter x1 is written to first in the bank0 of predetermined layer address unsuccessfully, namely preset parameter x1 is written to the first interval operation failure, then in this interval, that is the first interval writes fail flag, preferably from the most significant digit in the first interval, write fail flag, the fail flag symbol most significant digit of write is 1, and the second interval write preset parameter x1 in predetermined layer address.
It is pointed out that if preset parameter x1 writes unsuccessfully in the first interval, at the arbitrary interval of other except the first interval (as the second interval or the 3rd interval) write preset parameter x1, in the present embodiment, can not limit preset parameter write second interval.
S206, judge that preset parameter x1 is written to the second interval and whether writes successfully:
Determination methods according to step S203 judges whether the second interval that preset parameter x1 is written to predetermined layer address bank0 writes successfully.If success, perform step S207, if failure, perform step S208.
S207, on layer address bank3 and bank4 the parameter of write except preset parameter x1 successively:
If it is interval that preset parameter x1 is successfully writing to second in bank0, OTP memory allocation method according to step S201 is learnt, interval common second group of forming OTP of bank3 and bank4 and second, then other parameter of write other parameter x2, x3 except preset parameter x1 etc. in layer address bank3 and bank4.
If this successful operation, then to the successful operation of write parameters in OTP.Can learn from above-mentioned steps, if first time is to write parameters failure in OTP, owing to being divided into groups by the internal memory of OTP in advance, and at least divided 2 groups, again to other group write parameters of OTP, thus the failure of OTP write-once can be avoided, the risk that whole cell-phone camera module is just scrapped.
S208, the second interval write fail flag at predetermined layer address bank0, and at the 3rd interval write preset parameter x1 of described predetermined layer address bank0:
If the operation writing preset parameter x1 in the second interval is still failed, then write fail flag according to the method described in step S205 in this second interval, and write preset parameter x1 in the 3rd interval of this predetermined layer address bank0.
S209, judge that preset parameter x1 is written to the 3rd interval and whether writes successfully:
Judge whether the 3rd interval that preset parameter x1 is written to predetermined layer address bank0 writes successfully according to the method for step S203 or S206.If success, perform step S210, if failure, perform step S211.
S210, on layer address bank5 and bank6 other parameter except preset parameter x1 of write successively:
If it is interval that preset parameter x1 is successfully writing to the 3rd in bank0, OTP memory allocation method according to step S201 is learnt, interval common 3rd group of forming OTP of bank5 and bank6 and the 3rd, then other parameter of write other parameter x2, x3 except preset parameter x1 etc. in layer address bank5 and bank6.
If this successful operation, the OTP memory information wiring method that the present embodiment provides provides three chances to written information in OTP, thus decreases the failure of OTP memory information write-once, the risk that cell-phone camera module is just scrapped.
S211, terminate write parameters in OTP:
In the present embodiment, the internal memory of OTP be divide into three groups, because the internal memory of three groups all employs, if still failed at the 3rd interval write preset parameter x1, then to the operation failure of write parameters in OTP, show that the internal memory of this OTP can not re-use.
The OTP memory information wiring method that the present embodiment provides, be not limited to described above three times to the chance of write parameters on the internal memory of OTP, be also not limited to step described above.Because each grouping of OTP all can hold all parameters, so on the internal memory of OTP during write parameters information, in units of the group of OTP, one group of all parameter all writes in same group of OTP.When single job failure, the parameter writing cell-phone camera module in the group of next OTP can be continued, until the parameter read-in success of cell-phone camera module, terminate write parameters on the internal memory of OTP.If the grouping of all OTP is all finished using, and the write of parameter is still failed, and now, show the operation failure of write parameters on the OTP internal memory of this cell-phone camera module, this OTP can not use, and this cell-phone camera module faces to be scrapped.
The memory information wiring method that the present embodiment provides does not limit the number of the memory size of OTP, the number of plies of OTP, interval number and group yet.Interval number on the predetermined layer address of OTP and the number of group should be not less than 2, can be the integers being greater than 2 such as 3,4,10.Number is larger, and in OTP, the number of times of write parameters is more, and the risk of scrapping is less because OTP memory information writes unsuccessfully for cell-phone camera module, thus has saved cost.
Embodiment three
Embodiment three provides a kind of mobile phone camera OTP memory information read method.Refer to Fig. 3.Fig. 3 is the process flow diagram of mobile phone camera OTP memory information read method.This read method, comprises the following steps:
The flag register in the first interval of S301, reading predetermined layer address:
Start OTP, read the flag register in the first interval on predetermined layer address.Successful information whether is write containing preset parameter x1: if write successfully, the information most significant digit in flag register is 0, and other position is not 0 entirely in this flag register; If write unsuccessfully, the information most significant digit in flag register is 1.Information in flag register be in OTP internal memory when written information store on.When reading, preferably identical with the order that information writes, can more fast and effeciently the information be stored on OTP internal memory be read out like this.
Whether S302, the information judged in the flag register in the first interval is effective:
Whether effective according to the information in the rule judgment flag register of predetermined set.When write parameters information, if write successfully, the information most significant digit in flag register is 0, and other position is not 0 entirely, and such as, information in flag register is 0xffff or 0xff.If the most significant digit reading the information of flag register is 0, and other position is not 0 entirely, shows that the information in flag register is effective.If effectively, perform step S303.If the most significant digit of the information in reading flag register is 1, then show that the information in flag register is invalid, perform step S304.
S303, all parameters read in first group of OTP:
If the information in the flag register in first interval of reading is effective, show that the parameter information in first group successfully writes.The all parameter informations be stored in first group of this first interval place are all read out, uses in order to client.
Due to when write or parameter information, after only having a certain interval success of preset parameter x1 write or storage predetermined layer, just the parameter information except preset parameter x1 can be written on other layer address in the group of the OTP at this interval place.It can thus be appreciated that preset parameter x1 and other parameters are stored in same group of OTP.Like this, if the information in the flag register of predetermined layer address is effective, show that all parameter informations are all successfully writing in the internal memory of OTP.When reading, just can the information of a judge mark register, each parameter information of the different OTP of reading one by one internal memory, then judges that whether this parameter information is effective.The method of this reading parameter information, comparatively fast effectively.
The flag register in the second interval of S304, reading predetermined layer address:
If the information in the flag register in the first interval is invalid, show, the parameter of camera module is unsuccessful to be written in first group of this OTP, without the need to reading the parameter information in this group.Write due to the parameter information of the present embodiment completes according to the wiring method of embodiment two, so write unsuccessfully first group of OTP, and can at second group even the 3rd group of write parameters information.So, when reading parameter, if the parameter information of first group writes unsuccessfully, need the information in the flag register in second interval of reading on predetermined layer address.Then step S305 is performed.
Whether S305, the information judged in the flag register in the second interval is effective:
Judge that according to the determination methods described in step S302 whether the information in the flag register in the second interval is effective.If effectively, perform step S306, if invalid, perform step S307.
S306, all parameters read in second group of OTP:
If the information in the flag register in second interval of reading is effective, show that the parameter information in second group successfully writes.The all parameter informations be stored in second group of this second interval place are all read out, uses in order to client.
The flag register in the 3rd interval of S307, reading predetermined layer:
If the information in the flag register in the second interval is invalid, show, the parameter of camera module is unsuccessful to be written in second group of this OTP, without the need to reading the parameter information in this group.Read the information in the flag register in the 3rd group.
S308, judge that whether the information in the flag register in the 3rd interval is effective:
Judge that according to the determination methods described in step S302 or S305 whether the information in the flag register in the 3rd interval is effective.If effectively, perform step S309, if invalid, perform step S310.
S309, all parameters read in the 3rd group of OTP:
If the information in the flag register in the 3rd interval of reading is effective, show that the parameter information in the 3rd group successfully writes.The all parameter informations be stored in the 3rd group of the 3rd interval place are all read out, uses in order to client.
S310, the failure of reading OTP memory information:
If the information in the flag register in the 3rd interval of reading is invalid, show the unsuccessful write of parameter information in the 3rd group.Because the flag register of three all groups by OTP all reads complete, if the information of flag register remains invalid, then show that the memory information of this OTP reads unsuccessfully.
The OTP memory information read method that the present embodiment provides, is not limited to the chance of the information on the described above internal memory reading OTP for three times on flag register, is also not limited to step described above.The memory information read method that the present embodiment provides does not limit the number of the memory size of OTP, the number of plies of OTP, interval number and group yet.Interval number on the predetermined layer address of OTP and the number of group should be not less than 2, can be the integers being greater than 2 such as 3,4,10.Number is larger, and the number of times reading parameter in OTP is more.
The OTP memory information read method that the present embodiment provides, only need to judge that whether the information on the flag register in predetermined layer is effective, namely can learn that whether the parameter information in this OTP group is correct, without the need to reading the parameters information of OTP internal memory one by one, then carry out judging that it is invalid, thus improve the reading efficiency of OTP memory information.
The above is only preferred embodiment of the present invention, not does any pro forma restriction to the present invention.Although the present invention discloses as above with preferred embodiment, but not to limit the present invention.Any those of ordinary skill in the art, do not departing under technical solution of the present invention ambit, the Method and Technology content of above-mentioned announcement all can be utilized to make many possible variations and modification to technical solution of the present invention, or be revised as the Equivalent embodiments of equivalent variations.Therefore, every content not departing from technical solution of the present invention, according in technical spirit of the present invention to any simple modification made for any of the above embodiments, equivalent variations and modification, all still belong in the scope of technical solution of the present invention.

Claims (9)

1. a mobile phone camera One Time Programmable OTP memory allocation method, is characterized in that, comprising:
Obtain the capacity of OTP internal memory, the capacity of described OTP internal memory is A byte;
Obtain the byte number of the parameter of described OTP internal memory to be written, the total bytes of all described parameters is S;
According to the capacity of described OTP internal memory and the total bytes of described all described parameters, described OTP internal memory is divided into P group,
Wherein, described OTP internal memory has Q memory bank, and at least containing a predetermined memory bank in a described Q memory bank, all described predetermined memory bank are divided into M interval, at least one memory bank in arbitrary described interval and described OTP internal memory except described predetermined memory bank forms a group, and the arbitrary memory bank except described predetermined memory bank only belongs to a group;
A, S, Q, P, M, n are natural number, and M is not less than 2.
2. OTP memory allocation method according to claim 1, is characterized in that, the memory size often organizing OTP is equal.
3. OTP memory allocation method according to claim 1, is characterized in that, the memory size of the memory bank of each OTP is equal.
4. OTP memory allocation method according to claim 1, is characterized in that, the quantity in the interval in described predetermined memory bank is equal with the quantity of the group of described OTP internal memory.
5. a mobile phone camera One Time Programmable OTP memory information wiring method, is characterized in that, comprising:
OTP memory allocation method according to any one of claim 1-4 distributes OTP internal memory;
M preset parameter being written to described predetermined memory bank is interval;
Judge whether described preset parameter writes successfully, if so, the parameter of write except described preset parameter successively in the OTP internal memory of p group except described predetermined memory bank; Described m interval belongs to described p group;
Wherein, the memory headroom shared by described preset parameter is B byte, and the memory size in arbitrary described interval is not less than B byte; M is natural number, 0<m<M, 0<p<P.
6. OTP memory information wiring method according to claim 5, it is characterized in that, describedly judge whether described preset parameter writes successfully, also comprise, if not, in the m interval write fail flag of described predetermined memory bank, and write described preset parameter in the m+1 interval of described predetermined memory bank, determine the successful operation of the described preset parameter of m+1 interval write in described predetermined memory bank, and in the OTP internal memory of p+1 group except described predetermined memory bank, write the parameter information except described preset parameter successively; Described m+1 interval belongs to p+1 group.
7. the OTP memory information wiring method according to claim 5 or 6, is characterized in that, the capacity in each interval of described predetermined memory bank is equal.
8. a mobile phone camera One Time Programmable OTP memory information read method, is characterized in that, comprising:
Read the flag register in the m interval of predetermined memory bank, containing preset parameter write whether successfully information in described flag register;
Judge whether the information in described flag register is that preset parameter writes successful information; If so, all parameters in p group OTP internal memory are read;
Wherein, all described parameters carry out information write according to the memory information wiring method as described in any one of claim 5-7.
9. OTP memory information read method according to claim 8, it is characterized in that, whether the described information judged in described flag register is that preset parameter writes successful information, also comprises: if not, reads the flag register in the m+1 interval of described predetermined memory bank.
CN201310015526.2A 2013-01-15 2013-01-15 A kind of mobile phone camera OTP Memory Allocation, information write and read method Active CN103034588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310015526.2A CN103034588B (en) 2013-01-15 2013-01-15 A kind of mobile phone camera OTP Memory Allocation, information write and read method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310015526.2A CN103034588B (en) 2013-01-15 2013-01-15 A kind of mobile phone camera OTP Memory Allocation, information write and read method

Publications (2)

Publication Number Publication Date
CN103034588A CN103034588A (en) 2013-04-10
CN103034588B true CN103034588B (en) 2015-08-19

Family

ID=48021501

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310015526.2A Active CN103034588B (en) 2013-01-15 2013-01-15 A kind of mobile phone camera OTP Memory Allocation, information write and read method

Country Status (1)

Country Link
CN (1) CN103034588B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104266822A (en) * 2014-09-30 2015-01-07 信利光电股份有限公司 Test method, test system and test device of micro camera module
CN105988282A (en) * 2015-11-08 2016-10-05 乐视移动智能信息技术(北京)有限公司 Camera module set fault detection method and camera module set fault detection device
CN108769667A (en) * 2018-05-30 2018-11-06 华勤通讯技术有限公司 Camera module, electronic equipment and burning information call method
CN111782288B (en) * 2020-06-30 2021-11-16 联想(北京)有限公司 Electronic device and control method thereof
CN117573155B (en) * 2024-01-16 2024-04-09 成都电科星拓科技有限公司 Product information processing method and chip

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662534A (en) * 2008-08-28 2010-03-03 深圳富泰宏精密工业有限公司 Mobile telephone and internal memory sharing method thereof
CN102158589A (en) * 2011-01-19 2011-08-17 宁波舜宇光电信息有限公司 High-pixel photographic module and burning method for chip
CN102203726A (en) * 2008-09-10 2011-09-28 茵芬尼特麦默里有限公司 Method for using an otp storage device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080294838A1 (en) * 2007-05-25 2008-11-27 Agere Systems Inc. Universal boot loader using programmable on-chip non-volatile memory

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662534A (en) * 2008-08-28 2010-03-03 深圳富泰宏精密工业有限公司 Mobile telephone and internal memory sharing method thereof
CN102203726A (en) * 2008-09-10 2011-09-28 茵芬尼特麦默里有限公司 Method for using an otp storage device
CN102158589A (en) * 2011-01-19 2011-08-17 宁波舜宇光电信息有限公司 High-pixel photographic module and burning method for chip

Also Published As

Publication number Publication date
CN103034588A (en) 2013-04-10

Similar Documents

Publication Publication Date Title
CN103034588B (en) A kind of mobile phone camera OTP Memory Allocation, information write and read method
JP4842563B2 (en) MEMORY CONTROLLER, NONVOLATILE MEMORY DEVICE, NONVOLATILE MEMORY SYSTEM, AND DATA WRITE METHOD
CN108874301A (en) data storage device and operation method thereof
CN102023843B (en) Function calling method and device as well as smart card
KR100843218B1 (en) Flash memory device and method for changing a block size using address shifting
CN104008061A (en) Internal memory recovery method and device
CN102087878A (en) Flash memory device and method of programming same
CN101901169B (en) Scanner and method
CN112596668A (en) Bad block processing method and system for memory
JP4895262B2 (en) Information processing apparatus, controller, and file reading method
CN102663471A (en) Mobile terminal safety information storage method and system on basis of EMMC (Embedded MultiMedia Card) chip
CN103632185A (en) Covering film intelligent card with extended functions
US9396769B1 (en) Memory device and operating method of same
CN103377135A (en) Addressing method, device and system
CN106155572B (en) Data storage device and data access method
US20130019056A1 (en) Data Storing Method and Apparatus Applied to Flash Memory Storage Device
CN103019950B (en) The space allocation method of One Time Programmable chip, using method, and device
CN111427499A (en) Handwriting drawing method, device, equipment and storage medium
CN104182181A (en) Data processing method, device and terminal of memory card
CN110866127A (en) Method for establishing index and related device
CN203535643U (en) Control device with system use function
CN105094991A (en) Stack capacity setting method and system
CN203773958U (en) One time programmable (OTP) register read-write device
CN111427508B (en) File equilibrium distribution method and device
CN106100790A (en) A kind of data transmission method and system

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: 516600 Guangdong Industrial Zone, Shanwei City Road, Lee Lee Industrial City, a district of the building fifteenth

Applicant after: Truly Opto-Electronics Ltd.

Address before: 516600, Fifteenth Industrial Zone, Xinli Industrial Road, downtown industrial district, Guangdong, Shanwei

Applicant before: Truly Semiconductors (Shanwei) Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: TRULY OPTO-ELECTRONICS LIMITED TO: TRULY OPTO-ELECTRONICS LTD.

C14 Grant of patent or utility model
GR01 Patent grant