CN104142839B - A kind of method for preventing audio chip initialization failure - Google Patents
A kind of method for preventing audio chip initialization failure Download PDFInfo
- Publication number
- CN104142839B CN104142839B CN201410335523.1A CN201410335523A CN104142839B CN 104142839 B CN104142839 B CN 104142839B CN 201410335523 A CN201410335523 A CN 201410335523A CN 104142839 B CN104142839 B CN 104142839B
- Authority
- CN
- China
- Prior art keywords
- audio chip
- initialization
- audio
- pin
- microcontroller
- 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
Links
Landscapes
- Retry When Errors Occur (AREA)
- Debugging And Monitoring (AREA)
Abstract
The present invention provides a kind of method for preventing audio chip initialization failure, this method can reflect that the pin of internal voltage levels carries out voltage detecting by AD detection functions to audio chip, it is capable of the charge level of normal work to judge whether audio chip reaches, after ensuring that audio chip reaches the level of charging normal, initialization directive sequence is sent to audio chip by IIC or SPI again, so that the tonic train starts to initialize.I.e. the invention determines the opportunity initialized to audio chip by the detection of the SVR/CREF/VREF pin voltages to audio chip, effectively prevent because the unstable and capacitance accuracy deviation of peripheral supply voltage and caused by the unsuccessful problem of audio chip initialization;Secondly, the present invention is checked the transmission result of each command sequence, and whole initialization procedures are re-started if error, ensures that initialization directive sequence can be transmitted according to set sequential, it is ensured that audio chip can enter normal operating conditions.
Description
Technical field
The present invention relates to audio electronics devices field, more particularly to a kind of method for preventing audio chip initialization failure.
Background technology
Audio chip has a corresponding pin reflection charge inside horizontal, such as SVR pin, CREF pin, VREF pin(Function
Identical, different chip calls are different), the capacitance that the charging process of audio chip is connected with VDD supply voltage and SVR pin is big
Small to have direct relation, supply voltage is smaller, and SVR pin connected capacitors are bigger, and charge completion time is longer.Existing audio chip is normal
The initialization mode seen is, during exploitation, with from MCU(Microcontroller)Be power-up to audio chip SVR pin charging completes when
Between length as the extension time initialized to audio chip, i.e., when MCU brings into operation, extend after the set time directly to sound
Frequency chip is initialized, and the retransmission mechanism that IIC or SPI itself is unsuccessfully only relied on for initialization directive transmission is carried out again
Send.
But SVR pin connected capacitors have certain accuracy error in actual applications, VDD supply voltage is because of environmental factor
Also can not ensure to immobilize.For example, in the complex process that vehicle electronics device starts, on-vehicle battery voltage can be with a certain
The startup of a little electronic devices and produce fluctuation, supply voltage can not be always held on fixed voltage value, plus electronic device sheet
There is accuracy error in body, can not ensure audio chip charging process all being consistent property.If now by straight after extending the set time
Connect and audio chip initialized, can because audio chip charge inside not up to can working condition, and cause initialization to refer to
Order sends failure or part failure.And by IIC or SPI, the retransmission mechanism of itself simply retransmits failure command, can not ensure
Audio chip is initialized according to set sequential, and voiceless sound output, afunction, regulation audio may be caused to have noise etc.
Problem.
The content of the invention
The technical problem to be solved in the present invention is to provide a kind of method for preventing audio chip initialization failure, to avoid
Do not determine whether audio chip reaches working condition and just audio chip is started to initialize, cause audio chip function abnormal
The problem of.
The present invention is in order to solve the above technical problems, provide a kind of method for preventing audio chip initialization failure, this method
Comprise the following steps:
Step 1:The AD mouths of microcontroller are connected to the pin that can reflect that charge inside is horizontal on audio chip, configuration
The AD mouths of enabled microcontroller, communication module corresponding to initialization;
Step 2:Audio chip is resetted,
Step 3:It is delayed certain time;
Step 4:The AD mouth numerical value of microcontroller is read, and the numerical value is converted into reflection audio chip charge inside level
Pin voltage data;
Step 5:By the magnitude of voltage of the horizontal pin of the reflection audio chip charge inside with audio chip specification just
Normal charging voltage value is contrasted, if the magnitude of voltage of the pin of the reflection audio chip charge inside level is more than or equal to sound
Frequency chip specification chips nominal charging voltage, then into step 6, be otherwise back to step 3;
Step 6:Microcontroller sends corresponding initialization directive sequence to audio chip.
Preferably, also include in the step 6:Check that each initialization directive sends result, if sending successfully, enter
Next instruction of row is sent, and otherwise period any instruction is sent unsuccessful, then is back to step 1.
Preferably, the method for preventing audio chip initialization failure also includes:
Step 7:After all initialization directive sequences are successfully sent, initialization complement mark is set.
Preferably, the method for preventing audio chip initialization failure also includes:
Step 8:After the completion of audio chip initialization, stop the detection to microcontroller AD mouths.
The present invention has advantages below:
1st, determine to start initialization opportunity by detecting the charge inside level of audio chip, be not only restricted to capacitance accuracy
Deviation and the unstability of peripheral voltage influence, and are the important guarantees of audio chip successful initialization;
2nd, initialization procedure monitoring communication success or failure, and ensure unsuccessfully to re-start initialization afterwards, rather than only retransmit failure
Instruction, it is ensured that initialized to audio chip by set sequential;
3rd, after initializing successfully, AD detections are stopped so that after multimedia system normal work, it is more microcontroller will not to be taken
Remaining resource.
Brief description of the drawings
It is in order to illustrate the technical solution of the embodiments of the present invention more clearly, attached required in being described below to embodiment
Figure does simple introduction, it should be apparent that, drawings discussed below is only some embodiments of the present invention, general for this area
For logical technical staff, on the premise of not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is the hardware connection block diagram of the present invention program design.
Fig. 2 is the flow chart of method provided by the present invention.
Embodiment
Clear, complete description is carried out to technical scheme below by embodiment combination accompanying drawing, is shown
So, described embodiment is only the part of the embodiment of the present invention, rather than whole embodiments, the reality based on the present invention
Example is applied, the every other embodiment that those of ordinary skill in the art are obtained under the premise of creative work is not made, is all belonged to
In the scope of protection of the invention.
First, precondition
The annexation of microcontroller and audio chip configures enabled AD mouths, just as shown in figure 1, after microcontroller startup
Begin
Change corresponding IIC or SPI communication modules, configure corresponding I/O mouths.
2nd, SVR pin voltage detecting
By the RST Pin Reset audio chips of audio chip, further according to chip specification timing requirements in Reset
(Reset)50ms is delayed after audio chip so that chip enters charging process.Then by reading the AD mouth numerical value of microcontroller,
SVR pin voltage datas are converted into according to circuit design, and contrasted with nominal charging voltage value in audio chip specification, when sentencing
After disconnected SVR pin magnitudes of voltage reach audio chip specification chips nominal charging voltage, then begin through IIC or SPI and send audio
The corresponding initialization directive sequence of chip.If the voltage data of the AD mouths conversion read is still below in audio chip specification normally
Charging voltage value, then judgement is re-read after delaying 50ms again, with this repeatedly untill nominal charging voltage value is reached.
3rd, communication monitoring and failure handling
Result is sent to each initialization directive to check, only when it is successfully to send result, is just carried out next
Bar instruction is sent, if period any instruction transmission is unsuccessful, it should reexamine charging voltage, and resend all just
Beginningization command sequence.After all initialization directive sequences are successfully sent, audio chip initialization is terminated, now set just
Beginningization complement mark.
4th, AD detections are stopped
After the completion of audio chip initialization, stop the detection function to the AD mouths, to reduce the software of microcontroller money
Source.
The present invention is detected by AD detection functions to the charge inside level of audio chip, so as to determine audio chip
Start initialization opportunity, avoid the influence of the factor such as capacitance accuracy deviation and the unstability of peripheral voltage;And by every
The mechanism that the transmission result of one initialization directive is checked and all reinitialized using error, ensure that initialization refers to
Make the correctness of sequential.
Embodiment described above only expresses the preferred embodiment of the present invention, and its description is more specific and detailed, but
Therefore the limitation to the scope of the claims of the present invention can not be interpreted as.It should be pointed out that the ordinary skill people for this area
For member, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the present invention's
Protection domain.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.
Claims (1)
- A kind of 1. method for preventing audio chip initialization failure, it is characterised in that this method comprises the following steps:Step 1:The AD mouths of microcontroller are connected to the pin that can reflect that charge inside is horizontal on audio chip, configuration is enabled The AD mouths of microcontroller, communication module corresponding to initialization;Step 2:Audio chip is resetted,Step 3:It is delayed certain time;Step 4:The AD mouth numerical value of microcontroller is read, and the numerical value is converted into drawing for reflection audio chip charge inside level The voltage data of pin;Step 5:By the magnitude of voltage of the horizontal pin of the reflection audio chip charge inside with normally being filled in audio chip specification Piezoelectric voltage value is contrasted, if the magnitude of voltage of the pin of the reflection audio chip charge inside level is more than or equal to audio core Piece specification chips nominal charging voltage, then into step 6, be otherwise back to step 3;Step 6:Microcontroller sends corresponding initialization directive sequence to audio chip;Step 7:After all initialization directive sequences are successfully sent, initialization complement mark is set;Step 8:After the completion of audio chip initialization, stop the detection to microcontroller AD mouths;Also include in the step 6:Check that each initialization directive sends result, if sending successfully, carry out next finger Order is sent, and otherwise period any instruction is sent unsuccessful, then is back to step 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410335523.1A CN104142839B (en) | 2014-07-15 | 2014-07-15 | A kind of method for preventing audio chip initialization failure |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410335523.1A CN104142839B (en) | 2014-07-15 | 2014-07-15 | A kind of method for preventing audio chip initialization failure |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104142839A CN104142839A (en) | 2014-11-12 |
CN104142839B true CN104142839B (en) | 2018-01-12 |
Family
ID=51852021
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410335523.1A Active CN104142839B (en) | 2014-07-15 | 2014-07-15 | A kind of method for preventing audio chip initialization failure |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104142839B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI639847B (en) * | 2017-06-27 | 2018-11-01 | Powerchip Technology Corporation | Integrated circuit chip and inspection method thereof |
CN109725941A (en) * | 2018-12-18 | 2019-05-07 | 深圳吉迪思电子科技有限公司 | A kind of programmable initial method and system for display driver chip |
CN111506178B (en) * | 2020-06-16 | 2020-10-23 | 深圳市芯天下技术有限公司 | Chip power-on reset method and chip |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102684777A (en) * | 2012-06-14 | 2012-09-19 | 青岛海信宽带多媒体技术有限公司 | Optical module and initialization method and device thereof |
CN102711312A (en) * | 2011-03-28 | 2012-10-03 | 海洋王照明科技股份有限公司 | Multi-power module electrification control method and system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8825876B2 (en) * | 2008-07-17 | 2014-09-02 | Qualcomm Incorporated | Apparatus and method for mobile virtual network operator (MVNO) hosting and pricing |
-
2014
- 2014-07-15 CN CN201410335523.1A patent/CN104142839B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102711312A (en) * | 2011-03-28 | 2012-10-03 | 海洋王照明科技股份有限公司 | Multi-power module electrification control method and system |
CN102684777A (en) * | 2012-06-14 | 2012-09-19 | 青岛海信宽带多媒体技术有限公司 | Optical module and initialization method and device thereof |
Also Published As
Publication number | Publication date |
---|---|
CN104142839A (en) | 2014-11-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8656208B2 (en) | Communication system with automatic restoring function against faulty operation and restoring method thereof | |
CN108197042B (en) | Universal asynchronous serial port based on FPGA and response method thereof | |
EP3537307A1 (en) | Method for handling i2c bus deadlock, electronic device, and communication system | |
CN104142839B (en) | A kind of method for preventing audio chip initialization failure | |
WO2016205142A1 (en) | Test for 50 nanosecond spike filter | |
JP6841828B2 (en) | Single-line PMIC host low-level control interface | |
WO2003096036A1 (en) | Single-wire communication bus for miniature low-power systems | |
CN102820970B (en) | Electronic installation and the authentication method of battery module thereof | |
CN103699509A (en) | Timer waveform recording based serial communication method | |
CN103544994B (en) | Flash memory controller and flash memory debugging method | |
CN1462014A (en) | Integral circuit device with multiple communication model and its operation method | |
CN113419926B (en) | Method, system and device for monitoring server BIOS starting process | |
US8874989B2 (en) | Memory system capable of increasing data transfer efficiency | |
JP2002042085A (en) | Card system, and ic card and card reader/writer for use therein | |
CN105354157A (en) | Method, device and system for configuring IIC (Inter-Integrated Circuit) device | |
CN103294837A (en) | Method and system for verifying and debugging integrated circuit | |
CN107368439B (en) | Master control element and data transmission method | |
CN102955545A (en) | Computer | |
CN112231155B (en) | Communication module interface testing method, device, computer equipment and storage medium | |
CN109960672B (en) | Digital communication method based on GPIO interface | |
CN103186753B (en) | A kind of detection method of initial rate of PSAM card and device | |
CN109739709A (en) | A kind of I2C wireline inspection method, system and device | |
US7165127B2 (en) | Flow control for interfaces providing retransmission | |
US7437448B1 (en) | Method and device for function selection of a control unit | |
CN106970891B (en) | Method, device and system for interaction between microprocessor and peripheral |
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: 516006 Guangdong province Huizhou City Zhongkai high tech Zone and five West Road No. 103 Applicant after: HUIZHOU DESAY SV AUTOMOTIVE CO., LTD. Address before: 516006 Guangdong province Huizhou City Zhongkai high tech Zone and five West Road No. 103 Applicant before: Huizhou Desay SV Auto. Electronics Co., Ltd. |
|
COR | Change of bibliographic data | ||
GR01 | Patent grant | ||
GR01 | Patent grant |