CN104142839A - Method for avoiding initialization failure of audio frequency chip - Google Patents
Method for avoiding initialization failure of audio frequency chip Download PDFInfo
- Publication number
- CN104142839A CN104142839A CN201410335523.1A CN201410335523A CN104142839A CN 104142839 A CN104142839 A CN 104142839A CN 201410335523 A CN201410335523 A CN 201410335523A CN 104142839 A CN104142839 A CN 104142839A
- Authority
- CN
- China
- Prior art keywords
- initialization
- audio chip
- audio frequency
- frequency chip
- voltage
- 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.)
- Granted
Links
Landscapes
- Retry When Errors Occur (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention provides a method for avoiding the initialization failure of an audio frequency chip. A pin of which the audio frequency chip can reflect an inner voltage level is subjected to voltage detection by an A/D detection function so as to judge whether the audio frequency chip can achieve a charging level for the audio frequency chip to normally work; after the audio frequency chip is guaranteed to achieve the normal charging level, initialization instruction sequences are sent to the audio frequency chip through IIC (Inter IC bus) or SPI (Serial Peripheral Interface) to cause an audio frequency sequence to begin to be initialized. The SVR (support vector regression)/CREF/VREF pin voltage of the audio frequency chip can be detected to determine a timing for initializing the audio frequency chip, and therefore the problem of the unsuccessful initialization of the audio frequency chip due to unstable peripheral power supply voltage and capacitance precision deviation can be effectively avoided. In addition, the sending result of each instruction sequence is checked, a process that all instruction sequences are initialized is carried out again once one sending result fails, so that the initialization instruction sequences can be guaranteed to be sent in an established time sequence, and the audio frequency chip can be guaranteed to enter a normal working state.
Description
Technical field
The present invention relates to audio electronics devices field, relate in particular to a kind of method that prevents that audio chip initialization was lost efficacy.
Background technology
Audio chip has a corresponding pin reflection charge inside level, as SVR pin, CREF pin, (function is identical for VREF pin, different chip call differences), the charging process of audio chip has direct relation with the capacitance size that the supply voltage of VDD is connected with SVR pin, supply voltage is less, the connected electric capacity of SVR pin is larger, and the charging deadline is longer.The common initialization mode of existing audio chip is, between development stage, using from MCU(microcontroller) be power-up to time span that audio chip SVR pin charged as to initialized time expand of audio chip, in the time that MCU brings into operation, after extending the set time, directly audio chip is carried out to initialization, and send and unsuccessfully only rely on the retransmission mechanism of IIC or SPI self to resend for initialization directive.
But the SVR pin electric capacity that is connected exists certain accuracy error in actual applications, the supply voltage of VDD also cannot ensure to immobilize because of environmental factor.For example, in the complex process starting at vehicle electronics device, on-vehicle battery voltage can produce along with the startup of certain some electron device fluctuation, supply voltage cannot remain on fixed voltage value always, add that electron device itself exists accuracy error, cannot ensure that audio chip charging process all keeps consistency.If now directly audio chip is carried out to initialization by extending after the set time, can because audio chip charge inside do not reach can duty, and cause initialization directive to send unsuccessfully or partly failed.And simply retransmit failure command by the retransmission mechanism of IIC or SPI self, and cannot ensure that audio chip carries out initialization according to set sequential, may cause voiceless sound output, afunction, adjusting audio to have the problems such as noise.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of method that prevents that audio chip initialization was lost efficacy, to avoid not determining whether audio chip reaches duty and just audio chip is started to initialization, causes the abnormal problem of audio chip function.
The present invention, for solving the problems of the technologies described above, provides a kind of method that prevents that audio chip initialization was lost efficacy, and the method comprises the steps:
Step 1: the AD mouth of microcontroller is connected to the pin that can reflect charge inside level on audio chip, and configuration enables the AD mouth of microcontroller, the communication module that initialization is corresponding;
Step 2: audio chip is resetted,
Step 3: time delay certain hour;
Step 4: read the AD mouth numerical value of microcontroller, and this numerical value is converted into the voltage data of the pin of reflection audio chip charge inside level;
Step 5: contrast charging normal magnitude of voltage in the magnitude of voltage of the pin of described reflection audio chip charge inside level and audio chip specification, if being more than or equal to audio chip specification chips, the magnitude of voltage of the pin of described reflection audio chip charge inside level charges normal voltage, enter step 6, otherwise be back to step 3;
Step 6: microcontroller sends corresponding initialization directive sequence to audio chip.
Preferably, in described step 6, also comprise: check that each initialization directive sends result, if sends successfully, carry out next instruction transmission, otherwise during any instruction transmission unsuccessful, be back to step 1.
Preferably, described in, prevent that the method that audio chip initialization was lost efficacy from also comprising:
Step 7: after all initialization directive sequences are successfully sent, initialization complement mark is set.
Preferably, described in, prevent that the method that audio chip initialization was lost efficacy from also comprising:
Step 8: after audio chip initialization completes, stop the detection to microcontroller AD mouth.
The present invention has the following advantages:
1, deciding by detecting the charge inside level of audio chip the initialization opportunity of starting, be not limited to the instability impact of electric capacity accuracy error and peripheral voltage, is the initialized important guarantee of audio chip success;
2, initialization procedure monitoring communication success or failure, and guarantee unsuccessfully to re-start afterwards initialization, but not only retransmit failed instruction, guarantee audio chip to carry out initialization by set sequential;
3, after initialization success, stop AD and detect, make, after the normal work of multimedia system, can not take the unnecessary resource of microcontroller.
Brief description of the drawings
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, in describing embodiment below, needed accompanying drawing does simple introduction, apparently, accompanying drawing described below is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is that the hardware that the present invention program designs connects block diagram.
Fig. 2 is the process flow diagram of method provided by the present invention.
Embodiment
By reference to the accompanying drawings technical scheme of the present invention is carried out to clear, complete description below by embodiment; obviously; described embodiment is only a part of embodiment of the present invention; instead of whole embodiment; based on embodiments of the invention; those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
One, precondition
As shown in Figure 1, after microcontroller starts, configuration enables AD mouth to the annexation of microcontroller and audio chip, initial
Change corresponding IIC or SPI communication module, configure corresponding I/O mouth.
Two, SVR pin voltage detecting
By the RST Pin Reset audio chip of audio chip, then require to reset at Reset(according to the sequential of chip specification) after audio chip time delay 50ms so that chip enters charging process.Then by reading the AD mouth numerical value of microcontroller, be converted into SVR pin voltage data according to circuit design, and with audio chip specification in charge normal magnitude of voltage and contrast, when judging that SVR pin magnitude of voltage reaches audio chip specification chips and charges normal after voltage, then start to send the corresponding initialization directive sequence of audio chip by IIC or SPI.If the voltage data of the AD mouth reading conversion reads judgement after still lower than charging normal magnitude of voltage in audio chip specification, delaying 50ms again again, with this repeatedly until reach and charge normal magnitude of voltage.
Three, communication monitoring and failure handling
Each initialization directive is sent to result and check, only having when sending result be successfully time, just carries out next instruction transmission, if during any instruction transmission unsuccessful, should reexamine charging voltage, and resend whole initialization directive sequences.After all initialization directive sequences are successfully sent, to audio chip, initialization finishes, and initialization complement mark is now set.
Four, stopping AD detecting
After audio chip initialization completes, stop the measuring ability to this AD mouth, to reduce the software resource of microcontroller.
The present invention detects the charge inside level of audio chip by AD measuring ability, thereby determines that audio chip starts initialization opportunity, has avoided the impact of the factor such as instability of electric capacity accuracy error and peripheral voltage; And check and adopt the mechanism of makeing mistakes and all reinitializing by the transmission result to each initialization directive, having ensured the correctness of initialization directive sequential.
The above embodiment has only expressed preferred embodiment of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.
Claims (4)
1. prevent the method that audio chip initialization was lost efficacy, it is characterized in that, the method comprises the steps:
Step 1: the AD mouth of microcontroller is connected to the pin that can reflect charge inside level on audio chip, and configuration enables the AD mouth of microcontroller, the communication module that initialization is corresponding;
Step 2: audio chip is resetted,
Step 3: time delay certain hour;
Step 4: read the AD mouth numerical value of microcontroller, and this numerical value is converted into the voltage data of the pin of reflection audio chip charge inside level;
Step 5: contrast charging normal magnitude of voltage in the magnitude of voltage of the pin of described reflection audio chip charge inside level and audio chip specification, if being more than or equal to audio chip specification chips, the magnitude of voltage of the pin of described reflection audio chip charge inside level charges normal voltage, enter step 6, otherwise be back to step 3;
Step 6: microcontroller sends corresponding initialization directive sequence to audio chip.
2. a kind of method that prevents that audio chip initialization was lost efficacy as claimed in claim 1, it is characterized in that, in described step 6, also comprise: check that each initialization directive sends result, if send successfully, carrying out next instruction sends, otherwise during any instruction send unsuccessfully, be back to step 1.
3. a kind of method that prevents that audio chip initialization was lost efficacy as claimed in claim 1 or 2, is characterized in that, the method also comprises:
Step 7: after all initialization directive sequences are successfully sent, initialization complement mark is set.
4. a kind of method that prevents that audio chip initialization was lost efficacy as claimed in claim 3, is characterized in that, the method also comprises:
Step 8: after audio chip initialization completes, stop the detection to microcontroller AD mouth.
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 true CN104142839A (en) | 2014-11-12 |
CN104142839B 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) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109144024A (en) * | 2017-06-27 | 2019-01-04 | 力晶科技股份有限公司 | 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 |
CN111506178A (en) * | 2020-06-16 | 2020-08-07 | 深圳市芯天下技术有限公司 | Chip power-on reset method and chip |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100017861A1 (en) * | 2008-07-17 | 2010-01-21 | Qualcomm Incorporated | Apparatus and method for mobile virtual network operator (mvno) hosting and pricing |
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 |
-
2014
- 2014-07-15 CN CN201410335523.1A patent/CN104142839B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100017861A1 (en) * | 2008-07-17 | 2010-01-21 | Qualcomm Incorporated | Apparatus and method for mobile virtual network operator (mvno) hosting and pricing |
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 |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109144024A (en) * | 2017-06-27 | 2019-01-04 | 力晶科技股份有限公司 | 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 |
CN111506178A (en) * | 2020-06-16 | 2020-08-07 | 深圳市芯天下技术有限公司 | Chip power-on reset method and chip |
CN111506178B (en) * | 2020-06-16 | 2020-10-23 | 深圳市芯天下技术有限公司 | Chip power-on reset method and chip |
Also Published As
Publication number | Publication date |
---|---|
CN104142839B (en) | 2018-01-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9128691B2 (en) | Method and terminal for selecting internal circuit according to USB interface status | |
US8015449B2 (en) | Computer, and method for error-detecting and booting of BIOS thereof | |
EP3537307A1 (en) | Method for handling i2c bus deadlock, electronic device, and communication system | |
CN107704067B (en) | SoC chip resetting method and resetting system | |
CN104103868A (en) | Charging method and system for charger of mobile terminal | |
CN105071484B (en) | A kind of charging method and device of the terminal with data exchanging function | |
US20130166958A1 (en) | Software burning system and burning control method | |
CN104142839A (en) | Method for avoiding initialization failure of audio frequency chip | |
CN103257922A (en) | Method for quickly testing reliability of BIOS (basic input output system) and OS (operating system) interface codes | |
CN104156289A (en) | Synchronous control method and system based on detection circuit | |
CN102043634A (en) | Embedded system and embedded software upgrading method | |
US20160378507A1 (en) | Firmware block dispatch based on fusing | |
CN105718416A (en) | Method for upgrading configuration file of FPGA (Field Programmable Gate Array) and upgrading device | |
CN109408099A (en) | Remote FPGA firmware code updating system, method and medium | |
CN113360161B (en) | Resource upgrading method and related products | |
CN105824732A (en) | USB detection method and detection system | |
WO2017080411A1 (en) | Method and apparatus for checking charging parameter and charger | |
CN101211268A (en) | System for loading starting procedure for mainboard startup through different interface and the method | |
US20140181496A1 (en) | Method, Apparatus and Processor for Reading Bios | |
US9772650B2 (en) | Solving unstable universal asynchronous receive transmit (UART) communication between a power manager and a universal serial bus (USB)-bridge device | |
CN105791514B (en) | Application starting monitoring method and device | |
CN115202949A (en) | Chip signal monitoring device and method, computer equipment and storage medium | |
CN115220923A (en) | Signal verification method, medium, electronic device, and program product | |
CN105373423A (en) | Apparatus, method and system for overcoming interruption port shortage of processor | |
CN104932921A (en) | Start control method and electronic equipment |
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 |