CN106201984A - A kind of method for reading data and device - Google Patents

A kind of method for reading data and device Download PDF

Info

Publication number
CN106201984A
CN106201984A CN201610562223.6A CN201610562223A CN106201984A CN 106201984 A CN106201984 A CN 106201984A CN 201610562223 A CN201610562223 A CN 201610562223A CN 106201984 A CN106201984 A CN 106201984A
Authority
CN
China
Prior art keywords
data message
equipment
mentioned
data
interface
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.)
Pending
Application number
CN201610562223.6A
Other languages
Chinese (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.)
Qingdao Hisense Electronics Co Ltd
Original Assignee
Qingdao Hisense Electronics 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 Qingdao Hisense Electronics Co Ltd filed Critical Qingdao Hisense Electronics Co Ltd
Priority to CN201610562223.6A priority Critical patent/CN106201984A/en
Publication of CN106201984A publication Critical patent/CN106201984A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/17Interprocessor communication using an input/output type connection, e.g. channel, I/O port

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Communication Control (AREA)

Abstract

The invention discloses a kind of method for reading data and device, in order to solve main equipment read the data from equipment by GPIO interface time, exist owing to main SOC cannot know the current state from equipment, the problem causing reading error in data.Whether the method is: after main equipment reads the data message from equipment, it is judged that meet pre-conditioned from the IIC interface of equipment;If so, judge that data message is not target data information, again reads off the data message from equipment;Otherwise, it is determined that data message is target data information.So, after main equipment reads the data message from equipment, can automatically detect the current state from equipment I IC interface, as long as determining and meeting pre-conditioned from equipment I IC interface, the data message from equipment will be re-read, it is achieved thereby that IIC interface automatic detection function, it is to avoid owing to main SOC cannot know the current state from equipment I IC interface, the problem that causes reading error in data.

Description

A kind of method for reading data and device
Technical field
The present invention relates to communication technical field, particularly relate to a kind of method for reading data and device.
Background technology
Along with the development of electronic technology, the update paces of electronic industry are faster, from traditional negative electrode Display is to flat faced display for ray tube (Cathode Ray Tube, CRT), from function electronic equipment to network electronic devices, Arrive 3D electronic equipment and intelligent electronic device again, only use the time of short 10 years.From existing situation analysis, ultra high-definition electronics sets The standby latest development direction having become electronic industry.
At present, high definition electronic equipment can be realized at image quality by triangular web level chip (System on Chip, SOC) Reason, tonequality process, etc..And for ultra high-definition electronic equipment, owing to data processing amount has reached at high definition electronic device data 10 times of reason amount, so, ultra high-definition electronic equipment cannot realize whole data by single SOC and process, and can only use main SOC With " 1+1 " separation scheme from process chip, it is achieved all of data process, the most main SOC refers to from process chip transmission task Order, after process chip receives the assignment instructions that main SOC sends, performs corresponding task.
In prior art, main SOC be IC bus by self (Inter Integrated Circuit, IIC) interface and the connection from the IIC interface processing chip, it is achieved master slave communication function, specifically, IIC interface uses two Bar line communicates, and one is serial data line (Serial Data Line, SDA), and another is serial time clock line (Serial Clock Line, SCL), in communication process, SCL and SDA of IIC interface must strictly observe the sequential change that IIC agreement specifies Changing, such as: data condition for validity is: when SCL is in high level, the data on SDA must keep stable, is in low at SCL During level, SDA just can carry out the switching of low and high level;Initial conditions are: when SCL is in high level, SDA by high level to low electricity Truncation is changed;Stop condition is: when SCL is in high level, and SDA is switched to high level by low level, etc..But, should in reality In with, main SOC needs to control substantial amounts of to perform corresponding task from processing chip, thus there will be due to too much from processing chip, Cause the problem that the IIC interface of main SOC is in short supply.
In order to solve the problems referred to above, it will usually employing universal input output (General Purpose Input Output, GPIO) method of interface simulation IIC interface, solves the problem that the IIC interface of main SOC is in short supply.Although, GPIO interface can be with mould Intend the communication protocol (such as: the input and output of data) that IIC interface is most basic, i.e. can realize the communication that IIC interface is most basic Function, but, GPIO interface cannot simulate the communication function that IIC interface is more complicated, such as: GPIO interface does not support IIC interface Interrupt priority level and interrupt nesting function, and, main SOC by GPIO interface control from process chip perform multiple tasks Time, if corresponding task cannot be completed from processing chip in the time range that main SOC specifies and makes respective response, the most main SOC Also cannot know that from the implementation status processing chip, i.e. GPIO interface does not the most support implementation status detection function, so, even if from Processing chip and be not fully complete corresponding task, main SOC still can read from processing chip after determining the time range arriving regulation Data, thus cause main SOC read error in data.
Based on above-mentioned analysis, in prior art, main SOC is sent to from process chip by GPIO interface simulation IIC interface Assignment instructions, and read when the data processed chip, exist owing to using the main SOC of GPIO interface cannot know from process Chip performs implementation status during corresponding task, causes the problem that main SOC reads error in data.
Summary of the invention
Embodiments provide a kind of method for reading data and device, lead in order to solve main equipment of the prior art Cross GPIO interface simulation IIC interface when reading data from equipment, exist due to main SOC cannot know from equipment current from Reason situation, the problem causing reading error in data.
The concrete technical scheme that the embodiment of the present invention provides is as follows:
A kind of method for reading data, uses integrated circuit for using the main equipment of universal input output GPIO interface to read The data message from equipment of bus IIC interface, including:
Above-mentioned main equipment reads above-mentioned data message from equipment;
Above-mentioned main equipment judges whether the above-mentioned IIC interface from equipment meets pre-conditioned;
The most then judge that above-mentioned data message is not target data information, and again read off above-mentioned data from equipment Information;
Otherwise, it is determined that above-mentioned data message is target data information, and exit digital independent flow process.
It is also preferred that the left before above-mentioned main equipment reads above-mentioned data message from equipment, farther include:
Above-mentioned main equipment to above-mentioned from equipment send assignment instructions, indicate above-mentioned from equipment in the first preset time range Complete corresponding task and generate the data message characterizing task action result.
It is also preferred that the left after above-mentioned main equipment reads above-mentioned data message from equipment, judging the above-mentioned IIC from equipment Interface whether meet pre-conditioned before, farther include:
Above-mentioned main equipment judges whether there are default the first data characterizing abnormal data information in above-mentioned data message Information, and determine above-mentioned data message exists above-mentioned first data message.
It is also preferred that the left above-mentioned pre-conditioned it is: the above-mentioned serial time clock line SCL corresponding from the IIC interface of equipment is in low electricity Level state.
It is also preferred that the left after above-mentioned main equipment judges that above-mentioned data message is target data information, farther include:
Above-mentioned main equipment carries out data check process to above-mentioned target data information, obtains corresponding check results;
The criteria check that the check value that above-mentioned check results is carried by above-mentioned main equipment carries with above-mentioned target data information Value is mated, and determines when the match is successful, it is determined that verify successfully;Determine when it fails to match, it is determined that verify unsuccessfully, and again read off Above-mentioned data message from equipment.
A kind of digital independent device, integrated for using the main control module of universal input output GPIO interface to read employing The data message from processing module of circuit bus IIC interface, above-mentioned main control module includes: reads unit and judges single Unit, wherein,
Above-mentioned reading unit, for reading above-mentioned data message from processing module;
Above-mentioned judging unit, for judging whether the above-mentioned IIC interface from processing module meets pre-conditioned;
The most then judge that above-mentioned data message is not target data information, and indicate above-mentioned reading unit to again read off State the data message from processing module;
Otherwise, it is determined that above-mentioned data message is target data information, and exit digital independent flow process.
It is also preferred that the left before reading above-mentioned data message from processing module, above-mentioned reading unit is further used for:
Above-mentioned main equipment to above-mentioned from processing module send assignment instructions, indicate above-mentioned from processing module when first presets Complete corresponding task in the range of between and generate the data message characterizing task action result.
It is also preferred that the left after reading above-mentioned data message from processing module, judging that the above-mentioned IIC from processing module connects Mouth whether meet pre-conditioned before, above-mentioned judging unit is further used for:
Judge whether above-mentioned data message exists default the first data message characterizing abnormal data information, and determine Above-mentioned data message exists above-mentioned first data message.
It is also preferred that the left above-mentioned judging unit pre-conditioned is defined as above-mentioned: above-mentioned corresponding from the IIC interface of processing module Serial time clock line SCL is in low level state.
It is also preferred that the left after judging that above-mentioned data message is target data information, above-mentioned judging unit is further used for:
Above-mentioned target data information is carried out data check process, obtains corresponding check results;
The criteria check value that the check value above-mentioned check results carried carries with above-mentioned target data information is mated, Determine when the match is successful, it is determined that verify successfully;Determine when it fails to match, it is determined that verify unsuccessfully, and again read off above-mentioned from process Data message in module.
Having the beneficial effect that of the embodiment of the present invention:
In the embodiment of the present invention, after main equipment reads the data message from equipment, can the automatic decision IIC from equipment It is pre-conditioned whether interface meets, and i.e. can automatically detect the current state of IIC interface from equipment, as long as determining from equipment IIC interface meets pre-conditioned, it is possible to judges that the data message read is not target data information, and re-reads from setting Data message in Bei, it is achieved thereby that IIC interface automatic detection function and Data Detection function, efficiently avoid due to master SOC cannot know the current state of the IIC interface from equipment, the problem causing reading data message mistake.
Accompanying drawing explanation
Fig. 1 is the overview schematic diagram of method for reading data in the embodiment of the present invention;
Fig. 2 is the idiographic flow schematic diagram of method for reading data in the embodiment of the present invention;
Fig. 3 is the illustrative view of functional configuration of digital independent device in the embodiment of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Describe, it is clear that described embodiment is only a part of embodiment of the present invention wholely, be not whole embodiments.Based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under not making creative work premise Embodiment, broadly falls into the scope of protection of the invention.
The data from equipment are read by GPIO interface simulation IIC interface in order to solve main equipment of the prior art Time, existing owing to main SOC cannot know the currently processed situation from equipment, the problem causing reading error in data, the present invention is real Executing in example, increase IIC interface testing mechanism and data checking mechanisms on the master, main equipment reads the data from equipment After information, can first judge whether above-mentioned data message exists abnormal data information, exist different in determining above-mentioned data message After regular data information, determine whether the above-mentioned serial time clock line corresponding from the IIC interface of equipment (Serial Clock Line, SCL) whether it is in low level state, after determining that the above-mentioned SCL corresponding from the IIC interface of equipment is in low level state, it is determined that Above-mentioned data message is not target data information, can re-read above-mentioned data message from equipment, it is achieved thereby that data Abnormality detection and data check.
Being described in detail the present invention program below by specific embodiment, certainly, the present invention is not limited to following reality Execute example.
Refering to shown in Fig. 1, in the embodiment of the present invention, main equipment simulates IIC interface by GPIO interface, reads and uses IIC The flow process of the method for reading data used during the data message from equipment of interface is as follows:
Step 100: above-mentioned main equipment reads above-mentioned data message from equipment.
In actual applications, when main equipment uses GPIO interface simulation IIC interface, by a GPIO interface simulation IIC The SDA of interface, the SCL of a GPIO interface simulation IIC interface.
Specifically, when performing step 100, can use but be not limited to following steps:
First, above-mentioned main equipment sends assignment instructions to above-mentioned from equipment, indicates above-mentioned default above-mentioned first from equipment Corresponding task is completed in time range.
It is also preferred that the left above-mentioned main equipment sends before assignment instructions from equipment to above-mentioned, in addition it is also necessary to simulate SCL's by being used for GPIO interface, and it is each configured to output mode for simulating the GPIO interface of SDA.
Then, after above-mentioned main equipment determines above-mentioned first preset time range of arrival, refer to from equipment transmission reading to above-mentioned Order, and read the data message of above-mentioned sign task action result from equipment.
It is also preferred that the left before above-mentioned main equipment reads above-mentioned data message from equipment, in addition it is also necessary to simulate SDA's by being used for GPIO interface is changed into input pattern by output mode, wherein, keeps output mode constant for simulating the GPIO interface of SCL.
Tellable, in the embodiment of the present invention, above-mentioned after equipment receives the reading instruction that above-mentioned main equipment sends, Determine when the data message of the sign task action result that above-mentioned main equipment is to be read is unripe, or, determine above-mentioned reading Instruction is not when responding, and above-mentioned SCL corresponding for IIC interface that self uses can be pulled low to low level state from equipment.
Such as: the most only with the main SOC in ultra high-definition intelligent TV set as main equipment, examine with ultra high-definition intelligence IIC interface Survey mechanism and data checking mechanisms.Assume that main SOC is by GPIO interface simulation IIC interface and the image procossing using IIC interface Chip communicates.
Main SOC receive user trigger for by after the assignment instructions 1 of current picture brightness adjustment to 80%, being used for Simulate the GPIO interface 1 of SCL and be each configured to output mode for simulating the GPIO interface 2 of SDA.
Assignment instructions 1 is sent to picture processing chip by main SOC, indicates picture processing chip by picture brightness in 3 seconds Adjust to 80%, and start intervalometer.
When main SOC determines timer expiry, i.e. determine arrival 3 seconds time, to picture processing chip send read instruction 1, and Read the data message 1 of the execution result characterizing assignment instructions 1 in picture processing chip.
After picture processing chip receives the reading instruction 1 that main SOC sends, determine when data message 1 is unripe, or Person, determines when reading instruction 1 does not responds, SCL corresponding for self IIC interface is pulled low to low level state.
Step 101: above-mentioned main equipment judges whether the above-mentioned IIC interface from equipment meets pre-conditioned.
The most then perform step 102: judge that above-mentioned data message is not target data information, and again read off above-mentioned from Data message in equipment.
Otherwise, step 103 is performed: judge that above-mentioned data message is target data information, and exit digital independent flow process.
It is also preferred that the left due to when equipment is not fully complete corresponding task in the first preset time range, by the IIC of self employing After the SCL that interface is corresponding is pulled low to low level state, the SDA that IIC interface is corresponding can keep constant, i.e. that IIC interface is corresponding SDA High level state can be constantly in or be constantly in low level state, so that main equipment is when determining that arrival first is preset Between the data message that reads after scope the abnormal data information such as continuous print 0XFF, 0X00 occur, so, above-mentioned main equipment reads After above-mentioned data message from equipment, before performing step 101, above-mentioned main equipment can also judge that above-mentioned data are believed Whether breath exists default the first data message characterizing abnormal data information.
Tellable, owing to above-mentioned first data message may be exactly the truthful data letter that above-mentioned data message comprises Breath, not abnormal data information, so, when above-mentioned main equipment exists the first data message in determining above-mentioned data message, also Cannot directly determine and above-mentioned in the first preset time range, be not fully complete corresponding task from equipment, in addition it is also necessary to perform step further 101: judge whether the above-mentioned IIC interface from equipment meets pre-conditioned, i.e. determine whether the above-mentioned IIC interface pair from equipment Whether the SCL answered is in low level state, with ensure above-mentioned data message exist above-mentioned first data message be due to above-mentioned from The SCL that the IIC interface of equipment is corresponding is in what low level state caused.
Further, if above-mentioned main equipment determines there is not above-mentioned first data message in above-mentioned data message, the most permissible Directly judge above-mentioned SCL corresponding for IIC interface not to be pulled low to low level state from equipment, i.e. can be determined that and above-mentioned exist from equipment Complete corresponding task in first preset time range, judged that above-mentioned data message is target data information further.
Specifically, after above-mentioned main equipment determines and there is the first data message in above-mentioned data message, determine whether above-mentioned When whether the IIC interface of equipment meets pre-conditioned, it is understood that there may be but it is not limited to following two situation:
The first situation: above-mentioned main equipment determines that when the above-mentioned IIC interface from equipment meets pre-conditioned, the most above-mentioned master sets Standby determine when the above-mentioned SCL corresponding from the IIC interface of equipment is in low level state, can judge further above-mentioned to exist from equipment It is not fully complete corresponding task in first preset time range, i.e. judges that above-mentioned data message is not target data information, and determining After arriving the second preset time range, or, determining that the above-mentioned SCL corresponding from the IIC interface of equipment is in high level state After, again read off above-mentioned data message from equipment, until determining that the data message read is target data information.
The second situation: above-mentioned main equipment determines when the above-mentioned IIC interface from equipment is unsatisfactory for pre-conditioned, i.e. determine on Stating when the SCL that the IIC interface of equipment is corresponding is in high level state, above-mentioned main equipment can judge above-mentioned from equipment further In the first preset time range, complete corresponding task, i.e. judge that the first data message that above-mentioned data message comprises is true Real data information, is not abnormal data information, judges that above-mentioned data message is target data information further.
Such as: continue to use the example above, after main SOC reads the data message 1 in picture processing chip, can judge that data are believed Whether breath 1 exists the abnormal data information such as continuous print 0XFF.
The most main SOC can determine whether whether the SCL that the IIC interface of picture processing chip is corresponding is in low level State, the most main SOC can be determined that picture processing chip is unsuccessful by current picture brightness adjustment to 80% in 3 seconds, enters One step judges that data message 1 is not the data message performing result that characterizes of assignment instructions 1 correspondence, and after determining arrival 5 seconds, Or, after the SCL that the IIC interface determining picture processing chip is corresponding is in high level state, re-read image procossing core Data message in sheet, until determining that the data message read is the data letter characterizing execution result of assignment instructions 1 correspondence Till breath;Otherwise, main SOC can be determined that the continuous print 0XFF that data message 1 comprises is not abnormal data information, i.e. can be determined that Picture processing chip by current picture brightness adjustment to 80%, judged that data message 1 was assignment instructions in 3 seconds further The data message characterizing execution result of 1 correspondence.
Otherwise, the most main SOC determines that when there is not the abnormal data information such as continuous print 0XFF in data message 1, main SOC is permissible Further determine that SCL corresponding for IIC interface is not pulled low to low level state by picture processing chip, i.e. may determine that picture processing Chip by current picture brightness adjustment to 80%, judged that data message 1 was assignment instructions 1 correspondence in 3 seconds further Characterize the data message performing result.
Further, due to reasons such as magnetic interference, data message may be caused to make a mistake, so, in order to ensure number It is believed that accuracy and the integrity of breath, after above-mentioned main equipment determines that the data message read is target data information, it is also possible to Above-mentioned target data information is carried out data check process, obtains corresponding check results, and above-mentioned check results is carried The criteria check value that check value carries with above-mentioned target data information is mated, and determines when the match is successful, it is determined that verify successfully, And preserve above-mentioned target data information, exit digital independent flow process;Determine when it fails to match, it is determined that verify unsuccessfully, i.e. judge to read There is mistake in the data message got, and re-reads above-mentioned data message from equipment, until determining the data read Information is target data information and till being proved to be successful.
It is also preferred that the left above-mentioned main equipment when carrying out data check and processing to target data information, can use but be not limited to Any one method of calibration below: even-odd check, cyclic redundancy check (CRC) (Cyclic Redundancy Check, CRC), etc..
Such as: continue to use the example above, main SOC determines that data message 1 is characterizing of assignment instructions 1 correspondence and performs result After data message, use CRC algorithm, data message 1 is carried out data check process, obtain check results 1.
The criteria check value 1 that the check value 1 that check results 1 is carried by main SOC carries with data message 1 is mated, really When the match is successful calmly, it is determined that verify successfully, and preserve data message 1;Determine when it fails to match, it is determined that verify unsuccessfully, i.e. judge Data message 1 makes a mistake, and after determining arrival 5 seconds, re-reads the data message in picture processing chip, until determining Till the data message read is the characterizing and perform the data message of result and be proved to be successful of assignment instructions 1 correspondence.
Below with the main SOC in ultra high-definition intelligent TV set as main equipment, read as a example by version number by main SOC, to main SOC The version number's situation that may be present read is described further.
Assume that, when the version number information that main SOC reads is accurate, version number information is: 0X36,0X38,0X39, 0X2e, 0X30,0X32,0X30,0X2e, 0X42,0X30,0X35,0X33,0X31,0X31,0X35,0X35,0X36,0X47.Its In, front 17 bytes are the data message that version number information is corresponding, and last 1 byte is criteria check value.
Main SOC sends reading instruction to from equipment, and reads the version number information from equipment, and wherein, above-mentioned reading refers to Order carries and reads the address of version number information and length, specifically, the version number information that main SOC reads there may be but It is not limited to following four situation:
The first situation: the version number information (i.e. data message) that main SOC reads is: 0Xff, 0Xff, 0Xff, 0Xff, 0Xff, 0Xff ....
This situation is: after equipment receives the reading instruction that main SOC sends, also do not respond the reading that main SOC sends Instruction, when SCL corresponding for the IIC of self is pulled low to low level, main SOC begins to read version number information (i.e. data letter Breath) so that the version number information that winner SOC reads (i.e. data message) is the first data characterizing abnormal data information Information.
The second situation: the version number information (i.e. data message) that main SOC reads is: 0X36,0X38,0X39,0X2e, 0Xff, 0Xff, 0Xff, 0Xff ....
This situation is: after equipment receives the reading instruction that main SOC sends, not also being fully prepared main SOC to read The version number information (i.e. data message) taken, when SCL corresponding for the IIC of self is pulled low to low level, main SOC begins to read Version number information (i.e. data message), so that the version number information that winner SOC reads (i.e. data message) comprises: version number The same data message that information is corresponding, and characterize the first data message of abnormal data information.
The third situation: the version number information (i.e. data message) that main SOC reads is: 0X36,0X38,0X39,0X2e, 0X30,0X32,0X30,0X2e, 0X42,0X30,0X35,0X33,0X31,0X31,0X35,0X35,0X30,0X45.
This situation is: due to reasons such as magnetic interference, causes version number information (i.e. data message) to make a mistake, this Time, the version number information (i.e. data message) that main SOC reads comprises: the most correct version number information, the version of partial error This number information, and the criteria check value of mistake.
Tellable, if the data message that main SOC reads is any one in above-mentioned three kinds of situations, the most main SOC Need to re-read the version number information (i.e. data message) from equipment.
4th kind of situation: the version number information (i.e. data message) that main SOC reads is: 0X36,0X38,0X39,0X2e, 0X30,0X32,0X30,0X2e, 0X42,0X30,0X35,0Xff, 0Xff, 0Xff, 0Xff, 0Xff, 0X36,0X8b.
This situation is: characterize abnormal data although existing in the version number information that main SOC reads (i.e. data message) First data message of information, but, after main SOC reads above-mentioned version number information (i.e. data message), determine from equipment The SCL that IIC interface is corresponding is in high level state, and front 17 words that main SOC is to above-mentioned version number information (i.e. data message) After joint carries out data check process, it is thus achieved that last 1 byte pair of check value and above-mentioned version number information (i.e. data message) The criteria check value answered matches, thus, main SOC may determine that and comprises in the version number information (i.e. data message) read " 0Xff, 0Xff, 0Xff, 0Xff, 0Xff " is not the first data message characterizing abnormal data information, but version number information Truthful data information, the most main SOC may determine that the version number information (i.e. data message) read is correct version number information.
Tellable, if the version number information that main SOC reads (i.e. data message) is above-mentioned 4th kind of situation, then lead SOC, without re-reading the version number information (i.e. data message) from equipment, can directly exit digital independent flow process.
Below with the main SOC in ultra high-definition intelligent TV set as main equipment, at the image in ultra high-definition intelligent TV set Reason chip is from equipment, and it is that above-described embodiment is made by concrete application scenarios that main SOC reads the data message in picture processing chip Further describing, refering to shown in Fig. 2, in the embodiment of the present invention, main SOC simulates IIC interface by GPIO interface, and reading is adopted Idiographic flow with the method for reading data used during data message on the picture processing chip of IIC interface is as follows:
Step 200: increase IIC interface testing mechanism and data checking mechanisms in advance on main SOC.
Step 201: main SOC receive user trigger for by the assignment instructions 1 of current picture brightness adjustment to 80% After, will be used for simulating the GPIO interface 1 of SCL and be used for simulating the GPIO interface 2 of SDA and be each configured to output mode.
Step 202: assignment instructions 1 is sent to picture processing chip by main SOC, and instruction picture processing chip will in 3 seconds Picture brightness adjusts to 80%, and starts intervalometer (timing is 3 seconds).
Step 203: when main SOC determines timer expiry, when i.e. determining arrival 3 seconds (the first preset time range), Xiang Tu Send reading instruction 1 as processing chip, and read the data letter of the execution result characterizing assignment instructions 1 in picture processing chip Breath.
Step 204: after picture processing chip receives the reading instruction 1 that main SOC sends, determine that data message is unripe Time, or, determine when reading instruction 1 does not responds, SCL corresponding for self IIC interface is pulled low to low level state.
Step 205: main SOC judges whether there is the abnormal datas such as continuous print 0XFF, 0X00 in the data message read Information, the most then perform step 206;Otherwise, step 210 is performed.
Step 206: main SOC determines whether whether the SCL that the IIC interface of picture processing chip is corresponding is in low level shape State, the most then perform step 207;Otherwise, step 209 is performed.
Step 207: main SOC can be determined that picture processing chip in 3 seconds unsuccessful by current picture brightness adjustment extremely 80%, judge that the data message read is not the data message characterizing execution result of assignment instructions 1 correspondence further.
Step 208: after main SOC determines arrival 5 seconds (the second preset time range), or, determining picture processing chip SCL corresponding to IIC interface be in high level state after, re-read the data message in picture processing chip, and return step Rapid 205.
Step 209: main SOC judges that the continuous print 0XFF comprised in the data message read is not abnormal data information, I.e. judgement picture processing chip is by current picture brightness adjustment to 80% in 3 seconds, judges the data letter read further Breath is the data message characterizing execution result of assignment instructions 1 correspondence, and continues executing with step 211.
Step 210: main SOC determines that SCL corresponding for IIC interface is not pulled low to low level state by picture processing chip, i.e. Determine picture processing chip in 3 seconds by current picture brightness adjustment to 80%, judge that further data message 1 is task Instruct 1 correspondence characterizes the data message performing result, and continues executing with step 211.
Step 211: main SOC uses CRC algorithm, the data message that assignment instructions 1 correspondence characterizes execution result is carried out Data check processes, and obtains corresponding check results.
A step 212: the criteria check value that the check value that check results is carried by main SOC and data message carry is carried out Join, and judge whether to be made into merit, the most then perform step 213;Otherwise, step 214 is performed.
Step 213: main SOC judges to verify successfully, and preserves data message 1, exits digital independent flow process.
Step 214: main SOC judges verify unsuccessfully, i.e. judgement data message 1 makes a mistake, and arrives 5 seconds (the determining Two preset time range) after, re-read the data message in picture processing chip, and return step 205.
Based on above-described embodiment, refering to shown in Fig. 3, the digital independent device in the embodiment of the present invention, it is used for using GPIO The main control module 300 of interface reads the data message from processing module 310 using IIC interface, above-mentioned main control module 300 at least include: reading unit 301 and judging unit 302, wherein,
Above-mentioned reading unit 301, for reading above-mentioned data message from processing module 310;
Above-mentioned judging unit 302, for judging whether the above-mentioned IIC interface from processing module 310 meets pre-conditioned;
The most then judge that above-mentioned data message is not target data information, and indicate above-mentioned reading unit 301 to again read off Above-mentioned data message from processing module 310;
Otherwise, it is determined that above-mentioned data message is target data information, and exit digital independent flow process.
It is also preferred that the left before reading above-mentioned data message from processing module 310, above-mentioned reading unit 301 is used further In:
Send assignment instructions to above-mentioned from processing module 310, indicate above-mentioned from processing module 310 at the first Preset Time model Complete corresponding task in enclosing and generate the data message characterizing task action result.
It is also preferred that the left after reading above-mentioned data message from processing module 310, judge above-mentioned from processing module 310 IIC interface whether meet pre-conditioned before, above-mentioned judging unit 302 is further used for:
Judge whether above-mentioned data message exists default the first data message characterizing abnormal data information, and determine Above-mentioned data message exists above-mentioned first data message.
It is also preferred that the left above-mentioned judging unit 302 pre-conditioned is defined as above-mentioned: the above-mentioned IIC interface from processing module 310 Corresponding SCL is in low level state.
It is also preferred that the left after judging that above-mentioned data message is target data information, above-mentioned judging unit 302 is further used for:
Above-mentioned target data information is carried out data check process, obtains corresponding check results;
The criteria check value that the check value above-mentioned check results carried carries with above-mentioned target data information is mated, Determine when the match is successful, it is determined that verify successfully;Determine when it fails to match, it is determined that verify unsuccessfully, and again read off above-mentioned from process Data message in module 310.
In sum, in the embodiment of the present invention, after main equipment reads the data message from equipment, it is judged that from equipment It is pre-conditioned whether IIC interface meets;The most then judge that above-mentioned data message is not target data information, and again read off from Data message in equipment;Otherwise, it is determined that above-mentioned data message is target data information, and exit digital independent flow process.So, After main equipment reads the data message from equipment, can whether meet pre-conditioned, i.e. from the IIC interface of equipment by automatic decision Can automatically detect the current state of IIC interface from equipment, as long as determining that the IIC interface from equipment meets pre-conditioned, so that it may It not target data information to judge the data message read, and re-read the data message from equipment, thus realize IIC interface automatic detection function and Data Detection function, efficiently avoid owing to main SOC cannot know the IIC from equipment The current state of interface, the problem causing reading data message mistake.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program Product.Therefore, the reality in terms of the present invention can use complete hardware embodiment, complete software implementation or combine software and hardware Execute the form of example.And, the present invention can use at one or more computers wherein including computer usable program code The upper computer program product implemented of usable storage medium (including but not limited to disk memory, CD-ROM, optical memory etc.) The form of product.
The present invention is with reference to method, equipment (system) and the flow process of computer program according to embodiments of the present invention Figure and/or block diagram describe.It should be understood that can the most first-class by computer program instructions flowchart and/or block diagram Flow process in journey and/or square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided Instruction arrives the processor of general purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce A raw machine so that the instruction performed by the processor of computer or other programmable data processing device is produced for real The device of the function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame now.
These computer program instructions may be alternatively stored in and computer or other programmable data processing device can be guided with spy Determine in the computer-readable memory that mode works so that the instruction being stored in this computer-readable memory produces and includes referring to Make the manufacture of device, this command device realize at one flow process of flow chart or multiple flow process and/or one square frame of block diagram or The function specified in multiple square frames.
These computer program instructions also can be loaded in computer or other programmable data processing device so that at meter Perform sequence of operations step on calculation machine or other programmable devices to produce computer implemented process, thus at computer or The instruction performed on other programmable devices provides for realizing at one flow process of flow chart or multiple flow process and/or block diagram one The step of the function specified in individual square frame or multiple square frame.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know basic creation Property concept, then can make other change and amendment to these embodiments.So, claims are intended to be construed to include excellent Select embodiment and fall into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification without deviating from this to the embodiment of the present invention The spirit and scope of bright embodiment.So, if these amendments of the embodiment of the present invention and modification belong to the claims in the present invention And within the scope of equivalent technologies, then the present invention is also intended to comprise these change and modification.

Claims (10)

1. a method for reading data, uses integrated circuit total for using the main equipment of universal input output GPIO interface to read The data message from equipment of line IIC interface, it is characterised in that including:
Described main equipment reads described data message from equipment;
Whether described main equipment meets pre-conditioned from the IIC interface of equipment described in judging;
The most then judge that described data message is not target data information, and again read off described data message from equipment;
Otherwise, it is determined that described data message is target data information, and exit digital independent flow process.
2. the method for claim 1, it is characterised in that described main equipment read described data message from equipment it Before, farther include:
Described main equipment sends assignment instructions to described from equipment, completes in the first preset time range from equipment described in instruction Corresponding task also generates the data message characterizing task action result.
3. method as claimed in claim 1 or 2, it is characterised in that described main equipment reads the described letter of data from equipment After breath, judge described from the IIC interface of equipment whether meet pre-conditioned before, farther include:
Described main equipment judges whether there is default the first data message characterizing abnormal data information in described data message, And determine described data message exists described first data message.
4. the method as described in claim 1,2 or 3, it is characterised in that described pre-conditioned be: the described IIC from equipment connects The serial time clock line SCL that mouth is corresponding is in low level state.
5. the method as described in any one of claim 1-4, it is characterised in that described main equipment judges that described data message is mesh After mark data message, farther include:
Described main equipment carries out data check process to described target data information, obtains corresponding check results;
The criteria check value that the check value that described check results is carried by described main equipment and described target data information carry is entered Row coupling, determines when the match is successful, it is determined that verify successfully;Determine when it fails to match, it is determined that verify unsuccessfully, and again read off described Data message from equipment.
6. a digital independent device, uses integrated electricity for using the main control module of universal input output GPIO interface to read The data message from processing module of road bus IIC interface, it is characterised in that described main control module includes: read unit And judging unit, wherein,
Described reading unit, for reading described data message from processing module;
Whether described judging unit, meet pre-conditioned from the IIC interface of processing module described in judging;
The most then judge that described data message is not target data information, and indicate described reading unit again read off described from Data message in processing module;
Otherwise, it is determined that described data message is target data information, and exit digital independent flow process.
7. device as claimed in claim 6, it is characterised in that before reading described data message from processing module, institute State reading unit to be further used for:
Described main equipment sends assignment instructions to described from processing module, from processing module at the first Preset Time model described in instruction Complete corresponding task in enclosing and generate the data message characterizing task action result.
Device the most as claimed in claims 6 or 7, it is characterised in that after reading described data message from processing module, Judge described from the IIC interface of processing module whether meet pre-conditioned before, described judging unit is further used for:
Judge whether described data message exists default the first data message characterizing abnormal data information, and determine described Data message exists described first data message.
9. the device as described in claim 6,7 or 8, it is characterised in that described judging unit pre-conditioned is defined as described: The described serial time clock line SCL corresponding from the IIC interface of processing module is in low level state.
10. the device as described in any one of claim 6-9, it is characterised in that judge that described data message is that number of targets it is believed that After breath, described judging unit is further used for:
Described target data information is carried out data check process, obtains corresponding check results;
The criteria check value that the check value described check results carried carries with described target data information is mated, and determines When the match is successful, it is determined that verify successfully;Determine when it fails to match, it is determined that verify unsuccessfully, and again read off described from processing module In data message.
CN201610562223.6A 2016-07-15 2016-07-15 A kind of method for reading data and device Pending CN106201984A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610562223.6A CN106201984A (en) 2016-07-15 2016-07-15 A kind of method for reading data and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610562223.6A CN106201984A (en) 2016-07-15 2016-07-15 A kind of method for reading data and device

Publications (1)

Publication Number Publication Date
CN106201984A true CN106201984A (en) 2016-12-07

Family

ID=57476192

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610562223.6A Pending CN106201984A (en) 2016-07-15 2016-07-15 A kind of method for reading data and device

Country Status (1)

Country Link
CN (1) CN106201984A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040165905A1 (en) * 2003-02-24 2004-08-26 Chang-Bok Lee Image formation device using an I2C bus and a control method thereof
CN1536918A (en) * 2003-04-12 2004-10-13 乐金电子(中国)研究开发中心有限公司 Directional sensor interface device of mobile communication terminal and its control method
CN1855083A (en) * 2005-04-29 2006-11-01 三星电子株式会社 Master device, control method thereof, and electronic device having master device
US20080071879A1 (en) * 2006-09-18 2008-03-20 Samsung Electronics Co., Ltd. Communication method for improving communication error and electronic device using the same
CN101770444A (en) * 2008-12-30 2010-07-07 东部高科股份有限公司 Slave and communication method between a master and the same
CN102073613A (en) * 2010-12-15 2011-05-25 创新科存储技术有限公司 Device and method for removing deadlock of I<2>C (Inter-Integrated Circuit) bus
CN102147778A (en) * 2010-02-05 2011-08-10 杭州华三通信技术有限公司 Data transmission system based on half-duplex serial bus and transmission control method
CN102279730A (en) * 2010-06-10 2011-12-14 阿里巴巴集团控股有限公司 Parallel data processing method, device and system
CN102693199A (en) * 2012-06-04 2012-09-26 钜泉光电科技(上海)股份有限公司 IDMA (Internal Direct Memory Access) interface and control method thereof
CN103581228A (en) * 2012-07-26 2014-02-12 深圳市生基科技有限公司 Method and system for device communication in Internet of Things
CN103645975A (en) * 2013-11-28 2014-03-19 华为技术有限公司 Abnormality recovery method and serial bus transmission device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040165905A1 (en) * 2003-02-24 2004-08-26 Chang-Bok Lee Image formation device using an I2C bus and a control method thereof
CN1536918A (en) * 2003-04-12 2004-10-13 乐金电子(中国)研究开发中心有限公司 Directional sensor interface device of mobile communication terminal and its control method
CN1855083A (en) * 2005-04-29 2006-11-01 三星电子株式会社 Master device, control method thereof, and electronic device having master device
US20080071879A1 (en) * 2006-09-18 2008-03-20 Samsung Electronics Co., Ltd. Communication method for improving communication error and electronic device using the same
CN101150386A (en) * 2006-09-18 2008-03-26 三星电子株式会社 Communication method for improving communication error and electronic device using the same
CN101770444A (en) * 2008-12-30 2010-07-07 东部高科股份有限公司 Slave and communication method between a master and the same
CN102147778A (en) * 2010-02-05 2011-08-10 杭州华三通信技术有限公司 Data transmission system based on half-duplex serial bus and transmission control method
CN102279730A (en) * 2010-06-10 2011-12-14 阿里巴巴集团控股有限公司 Parallel data processing method, device and system
CN102073613A (en) * 2010-12-15 2011-05-25 创新科存储技术有限公司 Device and method for removing deadlock of I<2>C (Inter-Integrated Circuit) bus
CN102693199A (en) * 2012-06-04 2012-09-26 钜泉光电科技(上海)股份有限公司 IDMA (Internal Direct Memory Access) interface and control method thereof
CN103581228A (en) * 2012-07-26 2014-02-12 深圳市生基科技有限公司 Method and system for device communication in Internet of Things
CN103645975A (en) * 2013-11-28 2014-03-19 华为技术有限公司 Abnormality recovery method and serial bus transmission device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
任润柏 等编著: "《TMS320F2802x DSC原理及源码解读:基于TI Piccolo系列》", 30 November 2013, 北京:北京航空航天大学出版社 *
彭志辉: "基于S3C2440的音视频采集系统设计及其应用研究", 《万方数据知识服务平台》 *
袁志勇 等主编: "《嵌入式系统原理与应用技术 第2版》", 31 January 2014 *

Similar Documents

Publication Publication Date Title
CN103345885B (en) The collocation method of casing trace configurations method and device and spliced display screen
US10284705B2 (en) Method and apparatus for controlling smart device, and computer storage medium
CN105259806B (en) Controller upgrade method and system and master controller and from controller
CN111372232B (en) Method and system for first connection pairing of electric energy meter and Bluetooth circuit breaker
CN110602854B (en) Topological structure recognition system and method for intelligent lighting system
CN105898490A (en) Upgrading method for remote controller, television and remote controller
CN109671388B (en) Method and device for acquiring correction data
CN106960646A (en) A kind of Mask Failure detection method and device
CN104023217A (en) Information processing method and electronic equipment
CN108572809B (en) Display layout adjusting method and device of spliced display screen
CN109272909A (en) Segment encode liquid crystal display detection method and device, computer installation and computer readable storage medium
CN109581104B (en) Method for testing touch screen of vehicle-mounted entertainment system
EP3296875A1 (en) Simulation reproduction device, simulation reproduction method, and simulation reproduction program
CN112995657B (en) Camera module testing method, device and system
CN113469109B (en) Traffic light identification result processing method and device, road side equipment and cloud control platform
CN106201984A (en) A kind of method for reading data and device
CN112309313B (en) Module controller configuration method, device and system and computer readable storage medium
CN107066564B (en) Data processing method and device based on android list
CN116405421B (en) Communication test method, system and storage medium of simulation chip test sorting machine
CN106951184A (en) A kind of Bluetooth address generation method
CN111915601A (en) Intelligent terminal abnormity testing method, device and system
CN105704467A (en) White balance adjustment method and device for large-screen LCM image
CN105869561A (en) Color corrector, color correction system and color correction method
CN113986600B (en) Test method and device for chip serial interface and chip
CN112859660B (en) Equipment synchronization control method, device, terminal 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
CB02 Change of applicant information

Address after: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant after: Hisense Video Technology Co., Ltd

Address before: 266100 Zhuzhou Road, Laoshan District, Shandong, No. 151, No.

Applicant before: HISENSE ELECTRIC Co.,Ltd.

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20161207

RJ01 Rejection of invention patent application after publication