CN111131896A - Method and device for controlling flickering of indicator light of set top box - Google Patents

Method and device for controlling flickering of indicator light of set top box Download PDF

Info

Publication number
CN111131896A
CN111131896A CN202010117067.9A CN202010117067A CN111131896A CN 111131896 A CN111131896 A CN 111131896A CN 202010117067 A CN202010117067 A CN 202010117067A CN 111131896 A CN111131896 A CN 111131896A
Authority
CN
China
Prior art keywords
indicator light
frequency
flicker
flash
processor
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.)
Withdrawn
Application number
CN202010117067.9A
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.)
Hisense Broadband Multimedia Technology Co Ltd
Original Assignee
Hisense Broadband Multimedia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Broadband Multimedia Technology Co Ltd filed Critical Hisense Broadband Multimedia Technology Co Ltd
Publication of CN111131896A publication Critical patent/CN111131896A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4403Processor initialisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

The invention discloses a method and a device for controlling flickering of an indicator light of a set-top box, wherein the method comprises the steps that an auxiliary processor receives starting information sent by a main processor, the starting information comprises configuration parameters for starting the auxiliary processor and flickering parameters of the indicator light in the starting process of the main processor, the starting information is sent when the main processor loads and runs a boot code, and after the configuration parameters for starting the auxiliary processor are loaded, the indicator light is controlled to flicker according to the flickering parameters of the indicator light. The auxiliary processor is used for controlling the flickering of the indicator light in the starting process of the main processor, so that the problems of interruption and discontinuity of the flickering of the indicator light controlled by the main processor can be solved.

Description

Method and device for controlling flickering of indicator light of set top box
The present application claims priority from the chinese patent office filed on 28/05/2019, chinese patent application No. 201910449957.7, the entire contents of which are incorporated herein by reference.
Technical Field
The embodiment of the invention relates to the technical field of set top boxes, in particular to a method and a device for controlling flickering of an indicator light of a set top box.
Background
The set-top box is mainly divided into three stages in the starting process: a boot phase, a kernel phase and an APP application phase. The boot stage is operated by an independent code, the boot stage is only operated in the initial stage of starting, after the boot loads the kernel, the system jumps to the kernel to execute the code, the kernel can reinitialize the hardware of the set top box, at the moment, the operating space of the boot code does not exist any more, and the boot cannot control the indicator light to flash any more. The kernel can control the indicator light to flash only after necessary hardware is initialized, and the indicator light is in an uncontrolled state within a period of several seconds, so that the flashing of the indicator light is discontinuous.
Disclosure of Invention
The embodiment of the invention provides a method and a device for controlling flickering of an indicator light of a set top box, which are used for realizing the continuity of the flickering of the indicator light in the starting process of the set top box.
In a first aspect, an embodiment of the present invention provides a method for controlling a set top box indicator light to blink, including:
the method comprises the steps that an auxiliary processor receives starting information sent by a main processor, wherein the starting information comprises configuration parameters for starting the auxiliary processor and parameters for indicating lamp flickering in the starting process of the main processor; the starting information is sent when the main processor loads and runs boot codes;
and after the auxiliary processor loads the started configuration parameters, controlling the indicator light to flicker according to the parameter of the indicator light to flicker.
In the technical scheme, the auxiliary processor is used for controlling the indicator light to flicker in the starting process of the main processor, so that the problems of interruption and discontinuity of the main processor in controlling the indicator light to flicker can be solved.
Optionally, the parameters of the blinking of the indicator light include a frequency of the blinking of the indicator light, a number of times of the blinking, and an initial state.
Optionally, the frequency of the blinking of the indicator light includes at least a first frequency and a second frequency.
Optionally, the auxiliary processor controls the indicator light to flash according to the parameter of the indicator light flashing, including:
and the auxiliary processor controls the indicator light to flash in an interruption mode according to the parameter of the indicator light to flash.
Optionally, the auxiliary processor controls the indicator light to flash according to the parameter of the indicator light flashing, including:
the auxiliary processor determines the time delay duration according to the clock frequency of the auxiliary processor and the flickering frequency of the indicator light;
and the auxiliary processor controls the indicator light to flash according to the delay time length, the flashing times of the indicator light and the initial state.
Optionally, after controlling the indicator light to blink, the secondary processor further includes:
and when the auxiliary processor determines that the main processor is dormant, the auxiliary processor starts the main processor after receiving a wake-up instruction.
In a second aspect, an embodiment of the present invention provides a method for controlling a set top box indicator light to blink, including:
when the main processor loads and runs the boot code, the auxiliary processor code is loaded;
the main processor configures starting information of the auxiliary processor, wherein the starting information comprises configuration parameters for starting the auxiliary processor and parameters of indicator lamp flickering in the starting process of the main processor;
and the main processor sends the starting information to the auxiliary processor so that the auxiliary processor controls the indicator lamp to flash in the starting process of the main processor according to the parameter of the flash of the indicator lamp.
Optionally, the parameters of the blinking of the indicator light include a frequency of the blinking of the indicator light, a number of times of the blinking, and an initial state.
Optionally, the frequency of the blinking of the indicator light includes at least a first frequency and a second frequency.
In a third aspect, an embodiment of the present invention provides a device for controlling a set top box indicator light to blink, including:
the receiving unit is used for receiving starting information sent by the main processor, wherein the starting information comprises configuration parameters for starting the auxiliary processor and parameters for indicating lamp flickering in the starting process of the main processor; the starting information is sent when the main processor loads and runs boot codes;
and the processing unit is used for controlling the indicator light to flash according to the flash parameter of the indicator light after the started configuration parameters are loaded.
Optionally, the parameters of the blinking of the indicator light received by the receiving unit include a frequency of the blinking of the indicator light, a number of times of the blinking, and an initial state.
Optionally, the frequency of the blinking of the indicator light received by the receiving unit at least includes a first frequency and a second frequency.
Optionally, the processing unit is specifically configured to:
and controlling the indicator light to flash in an interruption mode according to the flashing parameter of the indicator light.
Optionally, the processing unit is specifically configured to:
determining the time delay duration according to the clock frequency of the auxiliary processor and the flickering frequency of the indicator light;
and controlling the indicator light to flicker according to the delay time, the flickering frequency of the indicator light and the initial state.
Optionally, the processing unit is further configured to:
after the indicator light is controlled to flash, when the main processor is determined to be dormant, the main processor is started after a wake-up instruction is received.
In a fourth aspect, an embodiment of the present invention provides an apparatus for controlling a set top box indicator light to blink, including:
the processing unit is used for loading the auxiliary processor codes when the boot codes are loaded and run; configuring starting information of the auxiliary processor, wherein the starting information comprises configuration parameters for starting the auxiliary processor and parameters of indicator lamp flickering in the starting process of the main processor;
and the sending unit is used for sending the starting information to the auxiliary processor so as to enable the auxiliary processor to control the indicator lamp to flash in the starting process of the main processor according to the parameter of the indicator lamp to flash.
Optionally, the parameters of the blinking of the indicator light configured by the processing unit include a frequency of the blinking of the indicator light, a number of times of the blinking, and an initial state.
Optionally, the frequency of the blinking of the indicator light configured by the processing unit includes at least a first frequency and a second frequency.
In a fifth aspect, an embodiment of the present invention further provides a computing device, including:
a memory for storing program instructions;
and the processor is used for calling the program instruction stored in the memory and executing the method for controlling the flickering of the indicator light of the set top box according to the obtained program.
In a sixth aspect, an embodiment of the present invention further provides a computer-readable non-volatile storage medium, which includes computer-readable instructions, and when the computer reads and executes the computer-readable instructions, the computer is caused to execute the method for controlling the blinking of the set top box indicator light.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of a system architecture according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for controlling a set-top box indicator light to blink according to an embodiment of the present invention;
fig. 3 is a schematic flowchart illustrating a process of controlling the indicator light to flash by the auxiliary processor according to the timer interrupt manner according to the embodiment of the present invention;
FIG. 4 is a flowchart illustrating a timer interrupt service routine in a secondary processor according to an embodiment of the present invention;
FIG. 5 is a second flowchart illustrating a timer interrupt service routine in a secondary processor according to an embodiment of the present invention;
FIG. 6 is a third flowchart illustrating a timer interrupt service routine in an auxiliary processor according to an embodiment of the present invention;
fig. 7 is a schematic flowchart illustrating a process of controlling the indicator light to flash by the auxiliary processor according to a delay manner according to an embodiment of the present invention;
fig. 8 is a second schematic flowchart of a process of controlling the indicator light to flash by the auxiliary processor according to the time delay method according to the embodiment of the present invention;
fig. 9 is a third schematic flowchart of a process of controlling the indicator light to flash by the auxiliary processor according to a time-delay manner according to the embodiment of the present invention;
fig. 10 is a schematic flowchart of a method for controlling a set-top box indicator light to blink according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of an apparatus for controlling flickering of an indicator light of a set top box according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of an apparatus for controlling a set-top box indicator light to blink according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 illustrates an exemplary system architecture, which may be a set-top box 100, including a main processor 110 and a secondary processor 120, to which embodiments of the present invention are applicable. The primary processor 110 and the secondary processor 120 may communicate.
The main processor 110 mainly controls the operation of the set-top box 100, and the auxiliary processor 120 mainly takes charge of power management of each module of the set-top box 100 and wake-up after sleep. Since front panel key wake-up is supported, the secondary processor 120 can control a set of General Purpose Input Output (GPIO) ports to implement data Input and Output. For example, the secondary processor 120 may be an 8051 processor.
It should be noted that the main processor 110 and the auxiliary processor 120 are interactions between two processors inside a single chip.
Based on the above description, fig. 2 exemplarily shows a flow of a method for controlling a blinking of an indicator light of a set-top box according to an embodiment of the present invention, where the flow may be executed by a device for controlling a blinking of an indicator light of a set-top box, and the device may be located in the set-top box 100 shown in fig. 1, or may be the set-top box 100.
As shown in fig. 2, the process specifically includes:
step 201, when a main processor loads and runs boot codes, auxiliary processor codes are loaded; configuring starting information of the auxiliary processor.
The main processor starting process, namely the set top box starting process, is divided into a boot phase, a kernel phase and an APP application phase. The secondary processor operates without the stages described above. When the boot code is loaded and run by the main processor, the auxiliary processor code is loaded, and meanwhile, the starting information of the auxiliary processor can be configured, wherein the starting information can comprise configuration parameters for starting the auxiliary processor and parameters of flashing of an indicator light during the starting process of the main processor. The configuration parameters of the auxiliary processor startup are used for the startup of the auxiliary processor. The parameter of the indicator light flashing is used for enabling the auxiliary processor to control the indicator light flashing according to the parameter, namely, the indicator light flashing of the set-top box is controlled.
The operation code and working state of the auxiliary processor are controlled by the main processor. The main processor writes the running code and data into the instruction memory space of the auxiliary processor in a binary mode, and controls the execution of the auxiliary processor. The communication between the main processor and the auxiliary processor can be realized by accessing a fixed instruction memory space through a private protocol.
In one possible embodiment, the parameters of the blinking of the indicator light include the frequency of the blinking of the indicator light, the number of times of the blinking and the initial state.
In a possible implementation, the start-up process of the set-top box may not be subdivided, i.e. the boot phase, kernel phase and APP application phase indicator light flashes all use the same frequency.
In one possible embodiment, the power-on process of the set-top box may be subdivided, for example, into two phases, or alternatively, three phases. At this time, the frequency at which the indicator lamp blinks includes at least a first frequency and a second frequency.
Specifically, if the boot starting process of the set top box is divided into two phases, the boot phase and the main program system phase can be divided, wherein the main program system phase includes a kernel phase and an APP application phase. At this time, the frequency at which the indicator lamp blinks includes a first frequency and a second frequency.
Specifically, if the boot-up process of the set-top box is divided into three phases, the boot phase, the kernel phase and the APP application phase may be divided. At this time, the frequency at which the indicator lamp blinks includes at least a first frequency and a second frequency.
Step 202, the main processor sends the starting information to the auxiliary processor.
After the main processor is configured with the starting information, the starting information can be sent to the auxiliary processor, so that the auxiliary processor can be started and the indicator lamp can be controlled to flash. The main processor can send the configured starting information to the auxiliary processor through a private protocol agreed with the auxiliary processor, so that the information security can be enhanced.
And 203, after the auxiliary processor loads the started configuration parameters, controlling the indicator light to flash according to the flash parameters of the indicator light.
After receiving the starting information, the auxiliary processor can load the starting configuration parameters and then control the indicator light to flash according to the flash parameters of the indicator light.
The auxiliary processor can control a group of GPIO ports, so that the control of the flickering of the indicator light of the set-top box can be realized by controlling one GPIO port, and the flickering of the indicator light can be controlled in the following two ways.
The first mode is as follows:
and the auxiliary processor controls the indicator light to flash in an interrupt mode according to the parameter of the indicator light to flash.
Alternatively, the secondary processor may be implemented using a timer interrupt.
Example 1:
in this embodiment, the indicator light of the set-top box will flash at the same frequency, i.e., the boot phase, kernel phase and APP application phase all use the same indicator light flashing frequency.
Fig. 3 is a schematic flowchart of a process of controlling the blinking of the indicator light by the auxiliary processor according to the timer interrupt manner, where the process includes the following steps:
in step 301, parameters of the indicator light are loaded.
After receiving the starting information sent by the main processor, the auxiliary processor loads configuration parameters and flashing parameters of the indicator light in the starting information, wherein the flashing parameters of the indicator light comprise: the flicker frequency (flicker _ freq), the flicker frequency (flicker _ cnt), the starting state (flicker _ status) of the indicator lamp and other parameters.
Step 302, determine the starting status of the indicator light.
The auxiliary processor determines the starting state of the indicator lamp in its main program according to the value of the starting state flicker _ status of the parameter indicator lamp. The initial state of the indicator light includes: the states are on and off, and the value of the initial state flicker _ status of the parameter indicator lamp corresponding to each state can be preset.
For example, when the value of the start state parameter flicker _ status is 1, it indicates that the start state of the indicator lamp is on, and when the value of the start state parameter flicker _ status is 0, it indicates that the start state of the indicator lamp is off.
It should be understood that the above corresponding relationship between the value of the start state parameter flicker _ status and the start state of the indicator light is only shown as an example, and may be set according to specific situations in practice, and the present disclosure is not limited thereto.
And the auxiliary processor determines the initial state of the indicator lamp according to the value of the initial state parameter flicker _ status sent by the main processor and the preset corresponding rule of the value and the state of the indicator lamp. For example, in this embodiment, according to the correspondence rule in the above example, if the flicker _ status =1 is received, it is determined that the initial state of the indicator light is on; if flicker _ status =0 is received, the initial status of the indicator light is determined to be off.
In step 303, a timer interrupt is enabled.
Step 304, let flag Led _ flicker = 1.
The flag Led _ flicker is used to indicate whether the timer interrupt is turned off. For example, let Led _ flicker =1, indicating that the timer interrupt is not turned off; let Led _ flicker =0, indicate that the timer interrupt is turned off.
It should be understood that the above corresponding relationship between the flag Led _ flicker and the timer interrupt is shown as an example, and may be set according to specific situations, and the present disclosure is not limited thereto.
Step 305, judging whether the flag Led _ flicker is 1, if so, continuing to execute the step 305; if not, go to step 306.
When the program detects that the flag bit Led _ flicker =0, the program jumps out of the current cycle and turns off the timer interrupt.
In step 306, the timer interrupt is turned off.
How the trigger time for the timer interrupt is determined is described below.
In the embodiment of the present invention, the triggering time of the timer interrupt is expressed by a unit of millisecond, and it should be understood that the unit of millisecond used as the triggering time is only an example and is not a specific limitation.
The triggering time of the timer interrupt refers to the number of milliseconds corresponding to the triggering time of each interval, and the timer enters an interrupt service routine. The triggering time of the timer interrupt is related to the flicker frequency (flicker _ freq) parameter of the indicator light, in this embodiment, let N denote the triggering time of the timer, and then N =1/flicker _ freq.
For example, if the flicker frequency flicker _ freq =5 times/second, the timer interrupt trigger time N is 200ms, that is, the timer interrupt is triggered once every 200ms, and after the trigger interrupt, the code in the interrupt service routine is executed.
Fig. 4 is a schematic flowchart of a timer interrupt service routine in a secondary processor according to an embodiment of the present invention, and as shown in fig. 4, the timer interrupt service routine mainly includes the following steps:
step 401, judging whether the value of the flicker _ cnt of the indicator light is 0, if so, executing step 404, and if not, executing step 402.
The value of flicker _ cnt is not 0, which indicates that the flashing process of the indicator light is not finished; the flicker _ cnt has a value of 0, indicating that the blinking process of the indicator light has ended.
In step 402, the value of the number of blinks flicker _ cnt of the indicator light is reduced by 1.
In step 403, the status of the indicator light is inverted.
The status of the indicator light includes on and off, and the inversion indicates that if the current status of the indicator light is on, the status of the indicator light is off after step 403 is executed; if the status of the indicator light is off, the status of the indicator light is turned on after step 403 is executed. The flashing of the indicator light is actually a process in which the indicator light is alternately turned on and off at certain time intervals.
In step 404, let flag Led _ flicker = 0.
After the indicator light has flickered for the preset number of times, the blinking process of the indicator light is finished, and the off timer is required to be interrupted, so that the flag Led _ flicker = 0. When the program detects the flag Led _ flicker =0, the current cycle is skipped and the timer interrupt is turned off.
The above uses a frequency flashing for the auxiliary processor to control the flashing of the indicator light in a timer-interrupted manner.
It should be understood that the above parameters of the blinking of the indicator light are only used for illustration, and in practical applications, the blinking frequency and the blinking times of the indicator light may be set empirically, or may be set after being measured in advance. The parameters of the flashing of the indicator light are not unique and can be specifically set according to actual conditions.
Example 2:
the embodiment divides the starting process of the set-top box into a boot stage and a main program system stage, namely, the boot stage and the main program system stage indicate that the lights flash to use different frequencies.
Similar to embodiment 1, the parameters of the blinking of the indicator light include: the frequency of the flashing, the number of times of the flashing and the initial state of the indicator light.
Wherein, the frequency that the pilot lamp glimmered includes: a flicker frequency (flicker _ freq [0 ]) in the boot phase and a flicker frequency (flicker _ freq [1 ]) in the main program system phase.
Wherein, the number of times that the pilot lamp flickers includes: the flash number of the boot phase (flicker _ cnt [0 ]) and the flash number of the main program system phase (flicker _ cnt [1 ]).
The process of controlling the blinking of the indicator light by the auxiliary processor using the timer interrupt is similar to that of embodiment 1, and can be described with reference to fig. 3 and the flowchart corresponding to fig. 3, except that in step 301, the parameters of the indicator light are loaded more than in embodiment 1, specifically, flicker _ cnt [0], flicker _ cnt [1], flicker _ freq [0], flicker _ freq [1], and flicker _ status.
This embodiment is different from embodiment 1 in that the trigger time and the number of triggers of the timer are changed.
How the trigger time of the timer interrupt is determined in the present embodiment will be described below.
Because the boot stage and the main program system stage both use the same timer interrupt, the trigger time N of the timer interrupt has a relationship with both the flicker _ freq [0] and the flicker _ freq [1], and the specific relationship is that the trigger time N is the greatest common divisor of the corresponding times of the flicker _ freq [0] and the flicker _ freq [1 ].
How the number of times the timer interrupt is triggered in this embodiment is determined will be described below.
As can be seen from the above, since the boot stage and the main program system stage both use the same timer interrupt, the triggering times may vary, and specifically need to be recalculated according to the triggering time, the flashing frequency, and the flashing times, that is, the triggering times of the timer interrupt of the boot stage C0= (flicker _ cnt [0] (N0/N)) times, and the triggering times of the timer interrupt of the main program system stage C1= (flicker _ cnt [1] (N1/N)) times.
When the trigger time and the trigger frequency of the timer interruption no longer correspond to the time and the flash frequency corresponding to the flash frequency, in order to ensure that the indicator lamp can flash according to the originally set frequency, the flash interval of the indicator lamp needs to be calculated, namely, the state of the indicator lamp is inverted once every time the timer interruption is started.
The flicker interval is calculated according to the flicker frequency and the triggering time of the timer interrupt, namely the flicker interval T0= 1/(flicker _ freq [0 ]. times.N) of the boot stage indicator lamp, and the flicker interval T1= 1/(flicker _ freq [1 ]. times.N) of the main program system stage indicator lamp.
The following illustrates how the trigger time, the number of triggers, and the flashing interval of the timer interrupt are determined in this embodiment, such that
flicker_freq[0]=2,flicker_freq[1]=1;
flicker_cnt[0]=16,flicker_cnt[1]=13;
flicker_status=1;
Obtaining the corresponding time N0 of 500ms according to flicker _ freq [0 ];
obtaining the corresponding time N1 of 1000ms according to flicker _ freq [1 ];
obtaining the trigger time N of 500ms according to the greatest common divisor between N0 and N1;
obtaining the triggering times C0 of the timer in the boot stage as 16 times according to the triggering time N;
obtaining the triggering times C1 of the timer of the main program system stage as 26 times according to the triggering time N;
obtaining a flash interval T0 of the boot stage indicator light as 1 according to the flicker _ freq [0] and the N, wherein the flash interval is 1, which means that the state of the indicator light is reversed once every time the timer is interrupted;
and obtaining that the flicker interval T1 of the indicator light of the stage of the main program system is 2 according to the flicker _ freq [1] and the N, wherein the flicker interval is 2, which means that the state of the indicator light is reversed once every two times of timer interruption is entered.
Fig. 5 is a second flowchart illustrating a timer interrupt service procedure in a secondary processor according to an embodiment of the present invention.
In this embodiment, please refer to fig. 5 for a schematic flow chart of the timer interrupt service routine, wherein:
let the boot _ timer _ cnt represent the number of times of timer interrupt triggering in the boot phase;
let kernelApp _ timer _ cnt represent the number of times of timer interrupt triggering in the main program system stage;
let the boot _ flicker _ interval represent the flash interval of the indicator light in the boot stage;
let kernelApp _ flicker _ interval denote the indicator light flashing interval in the main program system phase.
As can be seen from fig. 5, the timer interrupt service routine mainly includes the following steps:
in step 501, it is determined whether the value of the number of times of triggering the timer interrupt in the boot stage, boot _ timer _ cnt, is 0, if yes, step 506 is executed, otherwise, step 502 is executed.
The value of the boot _ timer _ cnt is not 0, which indicates that the flash of the indicator light in the boot stage is not finished; the value of boot _ timer _ cnt is 0, indicating that the flashing of the pilot light during the boot phase has ended.
In step 502, the value of boot _ timer _ cnt is decremented by 1.
Step 503, judging whether the remainder of the timer interrupt trigger time boot _ timer _ cnt in the boot stage to the pilot lamp flickering interval boot _ flicker _ interval in the boot stage is 0, if so, executing step 504, and if not, executing step 505.
In step 504, the status of the indicator light is inverted.
This step is similar to step 403 in the previous paragraph and is not described in detail here.
Step 505, the interrupt service routine is exited.
Step 506, determining whether the timer interrupt trigger time kernel _ app _ timer _ cnt in the main program system stage is 0, if yes, executing step 510, and if not, executing step 507.
In step 507, the value of kernel App _ timer _ cnt is decremented by 1.
Step 508, judging whether the remainder of the timer interrupt trigger time kernel _ app _ timer _ cnt in the main program system stage to the pilot lamp flashing interval kernel _ app _ flicker _ interval in the main program system stage is 0, if so, executing step 509, and if not, executing step 505.
In step 509, the status of the indicator light is inverted.
Step 510, let flag Led _ flicker = 0.
When the timer interrupt triggering time kernel _ app _ timer _ cnt in the main program system phase is 0, it indicates that the indicator lamp flashing in the main program system phase is finished, which means that the indicator lamp flashing process of the set-top box in the boot starting process is finished, and therefore, the timer interrupt needs to be turned off, as described above, Led _ flicker =0 indicates that the timer interrupt is turned off.
In this embodiment, the flashing process of the indicator light is as follows:
firstly, judging whether the flash is in the boot stage or not by judging whether the boot _ timer _ cnt is 0 or not, if not, indicating that the flash is still in the boot stage, and if so, indicating that the flash in the boot stage is finished; and judging whether the kernel App _ timer _ cnt is 0 or not to judge whether the flash is currently in the main program system stage or not, if not, indicating that the flash is still currently in the main program system stage, and if so, indicating that the flash of the main program system stage is finished, namely, indicating that the flash of an indicator lamp of the set top box in the starting stage is finished, so that a flag Led _ flicker =0 is made to indicate that the timer is turned off for interruption.
When the main program of the auxiliary processor detects that Led _ flicker is 0, the loop shown in step 305 is skipped, the timer interrupt is closed, and the subsequent code is executed.
The flow chart shown in fig. 5 is combined with specific parameter values, and the process of controlling the indicator light to flash through the timer interrupt by the auxiliary processor in this embodiment is further analyzed, so as to make the auxiliary processor control the indicator light to flash
flicker_freq[0]=2,flicker_freq[1]=1;
flicker_cnt[0]=16,flicker_cnt[1]=13;
flicker_status=1;
From the above-described calculation methods of the respective parameters, it can be known that:
the triggering time of timer interruption is 500 ms; the triggering time C0 of the interrupt of the boot stage timer is 16 times; the triggering time C1 of the interruption of the main program system stage timer is 26 times; the flash interval T0 of the boot stage indicator light is 1; the main program system stage indicator light flashing interval T1 is 2, and the indicator light is on initially.
When step 501 is executed for the first time, the boot _ timer _ cnt is 16, the boot _ timer _ cnt is determined not to be 0, step 502 is executed, that is, the value of the boot _ timer _ cnt is decreased by 1, at this time, the boot _ timer _ cnt is changed to 15, step 503 is executed, the boot _ timer _ cnt (value of 15) takes the remainder of the boot _ flicker _ interval (value of 1) to be 0, step 504 is executed, the status of the indicator lamp is inverted, that is, flicker _ status =0 is enabled, the status of the indicator lamp is changed from on to off, and then the timer interrupt service routine is exited.
And so on, until the value of the boot _ timer _ cnt is 0, indicating that the boot stage blinking is finished, step 506 is executed.
When step 506 is executed for the first time, the kernel app _ timer _ cnt is 26, the kernel app _ timer _ cnt is determined not to be 0, step 507 is executed, namely, the value of the kernel app _ timer _ cnt is decreased by 1, at this time, the kernel app _ timer _ cnt becomes 25, step 508 is executed, the kernel app _ timer _ cnt (value of 25) is left over the kernel app _ flicker _ interval (value of 2) and then becomes 1, step 505 is executed, namely, the timer interrupt service routine is exited, at this time, the state of the indicator lamp is not changed.
When step 506 is executed again, the kernel app _ timer _ cnt is 25, it is determined that the kernel app _ timer _ cnt is not 0, step 507 is executed, that is, the value of the kernel app _ timer _ cnt is decreased by 1, at this time, the kernel app _ timer _ cnt becomes 24, step 508 is executed, the kernel app _ timer _ cnt (the value is 24) is left over to the kernel app _ flicker _ interval (the value is 2) and then becomes 0, step 509 is executed, the state of the indicator light is inverted, and then the timer interrupt service routine is exited.
And repeating the steps until the value of the kernel App _ timer _ cnt is 0, which indicates that the flashing of the indicator light of the main program system stage is finished, and ending the flashing process of the indicator light of the set-top box. Let flag Led flicker =0,
when the program detects flag Led _ flicker =0, the loop of step 305 is skipped and the timer interrupt is turned off.
The auxiliary processor controls the indicating lamp to flash at different frequencies in a mode of timer interruption.
It should be understood that the above parameters of the blinking of the indicator light are only used for illustration, and in practical applications, the blinking frequency and the blinking times of the indicator light in the boot stage and the main program system stage may be set empirically or may be set after being measured in advance. The parameters of the flashing of the indicator light are not unique and can be specifically set according to actual conditions.
Example 3:
the embodiment divides the starting process of the set top box into a boot phase, a kernel phase and an APP application phase, namely, the boot phase, the kernel phase and the APP application phase indicate that lamp flickering is to use at least two different frequencies.
Similar to embodiment 1, the parameters of the blinking of the indicator light include: the frequency of the flashing, the number of times of the flashing and the initial state of the indicator light.
Wherein, the frequency that the pilot lamp glimmered includes: a flicker frequency (flicker _ freq [0 ]) at the boot stage, a flicker frequency (flicker _ freq [1 ]) at the kernel stage, and a flicker frequency (flicker _ freq [2 ]) at the APP application stage.
Wherein, the number of times that the pilot lamp flickers includes: the number of blinks in the boot phase (flicker _ cnt [0 ]), the blink frequency in the kernel phase (flicker _ cnt [1 ]), and the blink frequency in the APP application phase (flicker _ cnt [2 ]).
The process of controlling the blinking of the indicator light by the auxiliary processor using the timer interrupt is similar to that of embodiment 1, and can be described with reference to fig. 3 and the flowchart corresponding to fig. 3, except that in step 301, the parameters of the indicator light are loaded more than in embodiment 1, specifically, flicker _ cnt [0], flicker _ cnt [1], flicker _ cnt [2], flicker _ freq [0], flicker _ freq [1], flicker _ freq [2], and flicker _ status.
In this embodiment, the determination of the trigger time, the number of triggers, and the blinking interval of the timer interrupt is similar to that of embodiment 2, for example, let
flicker_freq[0]=5,flicker_freq[1]=2,flicker_freq[2]=1;
flicker_cnt[0]=40,flicker_cnt[1]=10,flicker_cnt[2]=8;
flicker_status=1;
Obtaining the corresponding time N0 of 200ms according to flicker _ freq [0 ];
obtaining the corresponding time N1 of 500ms according to flicker _ freq [1 ];
obtaining the corresponding time N2 of 1000ms according to flicker _ freq [2 ];
obtaining the trigger time N to be 100ms according to the greatest common divisor among N0, N1 and N2;
obtaining the triggering times C0 of the timer in the boot stage as 80 times according to the triggering time N;
obtaining the triggering times C1 of the timer at the kernel stage as 50 times according to the triggering time N;
obtaining the triggering times C2 of the APP application stage timer according to the triggering time N as 80 times;
obtaining a flash interval T0 of the boot stage indicator light as 2 according to the flicker _ freq [0] and the N, wherein the flash interval is 2, which means that the state of the indicator light is reversed once every two times of timer interruption is entered;
obtaining a kernel core stage indicator lamp flicker interval T1 of 5 according to flicker _ freq [1] and N, wherein the flicker interval of 5 means that the state of the indicator lamp is inverted once every five times of timer interruption;
and obtaining that the flicker interval T2 of the indicator light in the APP application stage is 10 according to flicker _ freq [2] and N, wherein the flicker interval is 10, which means that the state of the indicator light is reversed every time the timer interruption enters ten times.
Fig. 6 is a third flowchart illustrating a timer interrupt service procedure in an auxiliary processor according to an embodiment of the present invention.
In this embodiment, please refer to fig. 6 for a flow diagram of the timer interrupt service routine, wherein:
let the boot _ timer _ cnt represent the number of times of timer interrupt triggering in the boot phase;
let kernel _ timer _ cnt represent the number of times of timer interrupt triggering in the kernel phase;
let App _ timer _ cnt represent the number of times of timer interrupt triggers in the App application stage;
let the boot _ flicker _ interval represent the flash interval of the indicator light in the boot stage;
let the kernel _ flicker _ interval represent the flash interval of the indicator lamp in the kernel phase;
let App _ flicker _ interval represent the indicator light blinking interval in the App application phase.
As can be seen from fig. 6, the timer interrupt service routine mainly includes the following steps:
step 601, judging whether the number of times of timer interrupt triggering boot _ timer _ cnt in the boot stage is 0, if yes, executing step 606, and if not, executing step 602.
In step 602, the value of boot _ timer _ cnt is decremented by 1.
Step 603, judging whether the remainder of the timer interrupt trigger time boot _ timer _ cnt in the boot stage to the pilot lamp flickering interval boot _ flicker _ interval in the boot stage is 0, if so, executing step 604, and if not, executing step 605.
In step 604, the status of the indicator light is inverted.
This step is similar to step 403 in the previous paragraph and is not described in detail here.
At step 605, the interrupt service routine is exited.
Step 606, determining whether the number of times of timer interrupt triggering kernel _ timer _ cnt in the kernel phase is 0, if yes, executing step 610, and if not, executing step 607.
In step 607, the value of kernel _ timer _ cnt is decremented by 1.
Step 608, judging whether the remainder of the timer interrupt triggering times kernel _ timer _ cnt in the kernel phase on the indicator light flicker interval kernel _ flicker _ interval in the kernel core phase is 0, if so, executing step 609, and if not, executing step 605.
In step 609, the status of the indicator light is inverted.
Step 610, determining whether the timer interrupt trigger time APP _ timer _ cnt in the APP application stage is 0, if yes, executing step 614, and if not, executing step 611.
In step 611, the value of APP _ timer _ cnt is decremented by 1.
Step 612, judging whether the remainder of the timer interrupt trigger time APP _ timer _ cnt in the APP application stage to the indicator light flicker interval APP _ flicker _ interval in the APP application stage is 0, if so, executing step 613, and if not, executing step 605.
In step 613, the status of the indicator light is inverted.
In step 614, let flag Led _ flicker = 0.
When the number of times of triggering the timer interrupt APP _ timer _ cnt in the APP application phase is 0, it indicates that the blinking of the indicator light in the APP application phase has ended, which means that the blinking process of the indicator light in the boot process of the set-top box has ended, and therefore the timer interrupt needs to be turned off, as described above, Led _ flicker =0 indicates that the timer interrupt is turned off.
In this embodiment, the flashing process of the indicator light is as follows:
firstly, judging whether the flash is in the boot stage or not according to whether the boot _ timer _ cnt is 0 or not, if not, indicating that the flash is still in the boot stage, and if so, indicating that the flash in the boot stage is finished; judging whether the kernel core stage flickers currently exists or not according to whether the kernel _ timer _ cnt is 0 or not, if not, indicating that the kernel core stage flickers currently still exists, and if so, indicating that the kernel core stage flickers are finished; and finally, judging whether the current state is in the APP application stage flickering or not through whether the APP _ timer _ cnt is 0 or not, if not, indicating that the current state is still in the APP application stage flickering, and if so, indicating that the APP application stage flickering is finished, namely, indicating that the indicator lamp flickering of the set-top box in the starting stage is finished, so that the flag Led _ flicker =0 indicates that the timer is turned off to be interrupted.
When the main program of the auxiliary processor detects that Led _ flicker is 0, the loop shown in step 305 is skipped, the timer interrupt is closed, and the subsequent code is executed.
Next, the flow chart shown in fig. 6 is combined with specific parameter values, and the process of the auxiliary processor controlling the indicator light to flash through the timer interrupt in this embodiment is further analyzed, so as to enable the auxiliary processor to control the indicator light to flash through the timer interrupt
flicker_freq[0]=5,flicker_freq[1]=2,flicker_freq[2]=1;
flicker_cnt[0]=40,flicker_cnt[1]=10,flicker_cnt[2]=8;
flicker_status=1;
The triggering time of timer interruption is 100 ms; the interrupt triggering time C0 of the boot stage timer is 80 times; the number of times C1 of interrupt triggering of the kernel phase timer is 50; the interruption triggering time C2 of the APP application stage timer is 80 times; the flash interval T0 of the boot stage indicator light is 2; the kernel phase indicator light flashing interval T1 is 5; the APP application phase indicator light flashing interval T2 is 10; the initial state of the indicator light is on.
When step 601 is executed for the first time, the boot _ timer _ cnt is 80, the boot _ timer _ cnt is determined not to be 0, step 602 is executed, that is, the value of the boot _ timer _ cnt is decreased by 1, at this time, the boot _ timer _ cnt becomes 79, step 603 is executed, the boot _ timer _ cnt (value 79) takes the remainder of the boot _ flicker _ interval (value 2) to be 1, step 605 is executed, that is, the timer interrupt service routine is exited, at this time, the status of the indicator light is not changed.
When step 601 is executed again, the boot _ timer _ cnt is 79 and is not 0, step 602 is executed, i.e., the value of the boot _ timer _ cnt is decremented by 1, and then the boot _ timer _ cnt becomes 78; step 603 is executed, the remainder of the boot _ timer _ cnt (value 78) to the boot _ flicker _ interval (value 2) is set to 0, step 604 is executed, the state of the indicator light is inverted, and then the timer interrupt service routine is exited.
And so on, until the value of the boot _ timer _ cnt is 0, which indicates that the boot stage blinking is over, step 606 is executed.
The kernel phase flashing process is similar to the boot phase flashing process, and is not described herein again.
Until the value of kernel _ timer _ cnt is 0, indicating that the kernel phase blinking is over, step 610 is performed.
The APP application stage flashing process is similar to the boot stage flashing process, and is not described herein again.
Until the value of APP _ timer _ cnt is 0, indicating that the APP application stage flickers, i.e. the blinking of the indicator light of the set-top box is ended, step 614 is executed to make flag Led _ flicker =0, and when the program detects that the flag Led _ flicker =0, the loop of step 305 is skipped, and the timer interrupt is turned off.
The auxiliary processor controls the indicating lamp to flash at different frequencies in a mode of timer interruption.
It should be understood that the above parameters of the blinking of the indicator light are only used for illustration, and in practical applications, the blinking frequency and the blinking number of the indicator light in the boot stage, the kernel stage and the APP application stage may be set empirically or may be set after being measured in advance. The parameters of the flashing of the indicator light are not unique and can be specifically set according to actual conditions.
It should be understood that the number of blinking times is not specifically limited herein, and the number of blinking times may be the same or different for each stage, as long as the blinking frequency of the indicator light at least includes the first frequency and the second frequency.
Optionally, if the boot process is divided into a boot phase and a main program system phase, the flashing frequency of the indicator light includes a first frequency and a second frequency, as in embodiment 2. In this case, the first frequency corresponds to the first number of flashes, the second frequency corresponds to the second number of flashes, and the first number of flashes and the second number of flashes may be the same or different and may be set according to actual conditions.
Optionally, if the boot process is divided into a boot phase, a kernel phase and an APP application phase, the flashing frequency of the indicator light includes a first frequency, a second frequency and a third frequency, as in embodiment 3. In this case, the first frequency corresponds to a first flashing frequency, the second frequency corresponds to a second flashing frequency, and the third frequency corresponds to a third flashing frequency, and the first flashing frequency, the second flashing frequency, and the third flashing frequency may be the same or different, and may be set according to actual conditions.
Optionally, if the boot process is divided into a boot phase, a kernel phase and an APP application phase, the flashing frequency of the indicator light includes a first frequency and a second frequency, for example, the boot phase and the APP application phase are made to correspond to the first frequency, and the kernel phase is made to correspond to the second frequency. In this case, as described above, the first frequency corresponds to the first number of times of flashing, the second frequency corresponds to the second number of times of flashing, and the first number of times of flashing and the second number of times of flashing may be the same or different, and may be set according to actual circumstances.
The second mode is as follows:
the auxiliary processor determines the time delay duration according to the clock frequency of the auxiliary processor and the flickering frequency of the indicator light, and controls the indicator light to flicker according to the time delay duration, the flickering frequency of the indicator light and the initial state.
Optionally, when determining the delay time, the auxiliary processor may determine a delay fixed time, such as a delay fixed function with a delay of 1ms, according to the clock frequency of the auxiliary processor, and then determine the delay time according to the delay fixed time and the frequency of flashing of the indicator light.
For example, if the flashing frequency (flicker _ freq) of the indicator light is 5 times/second and the delay time is 200ms, the auxiliary processor can directly and really delay the function of 200ms according to the clock frequency of the auxiliary processor, so that the delay effect of delaying 200ms is realized; or determining a delay function delaying for 1ms, and then executing the delay function delaying for 1ms 200 times in a circulating manner, so as to realize the delay effect delaying for 200 ms.
Example 4:
in this embodiment, the indicator light of the set-top box will flash at the same frequency, i.e., the boot phase, kernel phase and APP application phase all use the same indicator light flashing frequency.
Fig. 7 is a schematic flowchart of a process of controlling the indicator light to flash by the auxiliary processor according to the time delay method, where the process includes the following steps:
and step 701, loading parameters of the indicator light.
This step is similar to step 301 in the foregoing, and is not described herein again.
At step 702, the start status of the indicator light is determined.
This step is similar to step 302 above and will not be described here.
In step 703, it is determined whether the number of blinks (flicker _ cnt) of the indicator light is 0, if yes, step 706 is executed, and if no, step 704 is executed.
This step is similar to step 401 above and will not be described here again.
Step 704, delay time (1/flicker _ cnt).
The delay time (1/flicker _ freq) is determined according to the flicker frequency (flicker _ freq) of the indicator light, which can be referred to the foregoing description and is not described herein again.
Step 705, the status of the indicator light is inverted.
This step is similar to step 403 in the previous paragraph and is not described in detail here.
At step 706, other programs are executed.
After the step 705 is executed, the process returns to the step 703 to continue the execution until the number of flickers — cnt =0, which indicates that the blinking process of the indicator light is finished, and the process executes a step 706, i.e., exits the indicator light blinking process, and executes other processes.
The auxiliary processor controls the indicator light to flash in a time-delay mode by using a frequency flash.
It should be understood that the above parameters of the blinking of the indicator light are only used for illustration, and in practical applications, the blinking frequency and the blinking times of the indicator light may be set empirically, or may be set after being measured in advance. The parameters of the flashing of the indicator light are not unique and can be specifically set according to actual conditions.
Example 5:
the embodiment divides the starting process of the set-top box into a boot stage and a main program system stage, namely, the boot stage and the main program system stage indicate that the lights flash to use different frequencies.
Fig. 8 is a second schematic flowchart of a process for controlling the indicator light to flash by the auxiliary processor according to the time delay method according to the embodiment of the present invention, where the process includes the following steps:
in step 801, parameters of an indicator light are loaded.
This step is similar to step 301 above, with the auxiliary processor loading the parameters for the flashing of the indicator lights: flicker _ cnt [0], flicker _ cnt [1], flicker _ freq [0], flicker _ freq [1], and flicker _ status.
At step 802, the starting state of the indicator light is determined.
This step is similar to step 302 above and will not be described here.
Step 803, judging whether the flash frequency flicker _ cnt [0] of the boot stage is 0, if so, executing step 806, and if not, executing step 804.
This step is similar to step 401 above and will not be described here again.
Step 804, delaying the time (1/flicker _ freq [0 ]).
The delay time (1/flicker _ freq [0 ]) is determined according to the flicker frequency (flicker _ freq [0 ]) in the boot stage.
In step 805, the status of the indicator light is negated.
This step is similar to step 404 above and will not be described here.
Step 806, determine whether the flicker number flicker _ cnt [1] of the main program system stage is 0, if yes, execute step 809, otherwise execute step 807.
Step 807, delay time (1/flicker _ cnt [1 ]).
This step is similar to step 804 described above and will not be described here.
Step 808, the status of the indicator light is negated.
Step 809, other programs are executed.
After the step 805 is completed, the process returns to the step 803 to continue the execution until the number of flickers flicker _ cnt [0] =0, which indicates that the flicking of the boot stage indicator light is finished, and the process proceeds to a step 806.
After the step 808 is executed, the process returns to the step 806 to continue executing until the number of flickers flicker _ cnt [1] =0, which indicates that the flickering of the main program system stage indicator light is finished, i.e., the flickering of the power-on start stage indicator light of the set-top box is finished, and then the process executes the step 809, i.e., exits the indicator light flickering process and executes other processes.
The auxiliary processor controls the indicating lamp to flash at different frequencies in a time delay mode.
It should be understood that the above parameters of the blinking of the indicator light are only used for illustration, and in practical applications, the blinking frequency and the blinking times of the indicator light may be set empirically, or may be set after being measured in advance. The parameters of the flashing of the indicator light are not unique and can be specifically set according to actual conditions.
Example 6:
the embodiment divides the starting process of the set top box into a boot phase, a kernel phase and an APP application phase, namely, the boot phase, the kernel phase and the APP application phase indicate that lamp flickering is to use at least two different frequencies.
Fig. 9 is a third schematic flowchart of a process for controlling the indicator light to flash by the auxiliary processor according to the time delay method according to the embodiment of the present invention, where the process includes the following steps:
and step 901, loading parameters of the indicator lamp.
This step is similar to step 301 above, with the auxiliary processor loading the parameters for the flashing of the indicator lights: flicker _ cnt [0], flicker _ cnt [1], flicker _ cnt [2], flicker _ freq [0], flicker _ freq [1], flicker _ freq [2], and flicker _ status.
In step 902, the start state of the indicator light is determined.
This step is similar to step 302 above and will not be described here.
Step 903, judging whether the flash frequency flicker _ cnt [0] of the boot stage is 0, if so, executing step 906, and if not, executing step 904.
This step is similar to step 401 above and will not be described here again.
Step 904, delay time (1/flicker _ freq [0 ]).
The delay time (1/flicker _ freq [0 ]) is determined according to the flicker frequency (flicker _ freq [0 ]) in the boot stage.
Step 905, the state of the indicator light is inverted.
This step is similar to step 404 above and will not be described here.
Step 906, judging whether the flicker frequency flicker _ cnt [1] of the kernel phase is 0, if so, executing step 909, and if not, executing step 907.
Step 907, delay time (1/flicker _ freq [1 ]).
Determining a delay time (1/flicker _ freq [1 ]) according to the flicker frequency (flicker _ freq [1 ]) of the kernel stage.
In step 908, the status of the indicator light is negated.
In step 909, it is determined whether the flicker _ cnt [2] of the APP application stage is 0, if yes, step 912 is executed, and if not, step 910 is executed.
Step 910, delay time (1/flicker _ freq [2 ]).
The delay time (1/flicker _ freq [2 ]) is determined according to the flicker frequency (flicker _ freq [2 ]) of kernel phase.
Step 911, the status of the indicator light is inverted.
At step 912, other programs are executed.
After the step 905 is completed, the process returns to the step 903 to continue the process until the number of flickers flicker _ cnt [0] =0, which indicates that the flicking of the boot stage indicator light is finished, and the process proceeds to a step 906.
After the step 908 is executed, the process returns to the step 906 to continue the execution until the number of flickers flicker _ cnt [1] =0, which indicates that the flickering of the kernel phase indicator light is finished, and the process goes to the step 909.
After the step 911 is executed, the process returns to the step 909 to continue the execution until the number of flickers — cnt [2] =0, which indicates that the flickers of the APP application stage indicator light are finished, i.e., the flickers of the start-up stage indicator light of the set-top box are finished, and then the step 912 is executed, i.e., the indicator light flickers program is exited, and other programs are executed.
The auxiliary processor controls the indicating lamp to flash at different frequencies in a time delay mode.
It should be understood that the above parameters of the blinking of the indicator light are only used for illustration, and in practical applications, the blinking frequency and the blinking number of the indicator light in the boot stage, the kernel stage and the APP application stage may be set empirically or may be set after being measured in advance. The parameters of the flashing of the indicator light are not unique and can be specifically set according to actual conditions.
It should be understood that the number of blinking times is not specifically limited herein, and the number of blinking times may be the same or different for each stage, as long as the blinking frequency of the indicator light at least includes the first frequency and the second frequency.
Optionally, if the boot process is divided into a boot phase and a main program system phase, the flashing frequency of the indicator light includes a first frequency and a second frequency, as in embodiment 5. In this case, the first frequency corresponds to the first number of flashes, the second frequency corresponds to the second number of flashes, and the first number of flashes and the second number of flashes may be the same or different and may be set according to actual conditions.
Optionally, if the boot process is divided into a boot phase, a kernel phase and an APP application phase, the blinking frequency of the indicator light includes a first frequency, a second frequency and a third frequency, as in embodiment 6. In this case, the first frequency corresponds to a first flashing frequency, the second frequency corresponds to a second flashing frequency, and the third frequency corresponds to a third flashing frequency, and the first flashing frequency, the second flashing frequency, and the third flashing frequency may be the same or different, and may be set according to actual conditions.
Optionally, if the boot process is divided into a boot phase, a kernel phase and an APP application phase, the flashing frequency of the indicator light includes a first frequency and a second frequency, for example, the boot phase and the APP application phase are made to correspond to the first frequency, and the kernel phase is made to correspond to the second frequency. In this case, as described above, the first frequency corresponds to the first number of times of flashing, the second frequency corresponds to the second number of times of flashing, and the first number of times of flashing and the second number of times of flashing may be the same or different, and may be set according to actual circumstances.
And when the indicator light flashing process is finished, the auxiliary processor executes other program instructions. For example, after the auxiliary processor controls the indicator light to flash, it may further determine whether the main processor is in a sleep state, and after determining that the main processor is in the sleep state, the main processor of the set top box may be controlled to start after receiving the wake-up instruction, which is equivalent to controlling the set top box to start, or waking up the main processor. The wake-up command may be generated by pressing a key on the front panel of the set-top box.
In order to better explain the embodiment of the present invention, the following describes a process of controlling the blinking of the set-top box indicator light in a specific implementation process. The main processor may be referred to as a main CPU, and the auxiliary processor may be exemplified by an 8051 CPU.
As shown in fig. 10, the process specifically includes:
in step 1001, the host CPU loads and runs boot code.
Step 1002, the main CPU loads and runs the kernel code.
Step 1003, the main CPU loads and runs the APP code.
At step 1004, the main CPU loads the 8051CPU code.
In step 1005, the main CPU configures 8051 parameters.
In step 1006, the main CPU configures the frequency, number, and initial state of the flash.
Step 1007, the main CPU sets 8051 the CPU starts.
Step 1008, the 8051CPU loads the configuration parameters.
In step 1009, the 8051CPU controls the indicator light to flash.
In step 1010, the 8051CPU determines whether the main CPU is dormant, if so, the process goes to step 1011, and if not, the process goes to step 1010.
In step 1011, the 8051CPU determines whether there is a device wake-up command, if so, proceeds to step 1012, and if not, proceeds to step 1011.
At step 1012, the device is restarted.
The specific implementation process of the above steps has been described in the above embodiments, and is not described in detail.
The above embodiment shows that the auxiliary processor receives start information sent by the main processor, where the start information includes configuration parameters for starting the auxiliary processor and flashing parameters of the indicator light during the start of the main processor, and the start information is sent when the main processor loads and runs the boot code, and after the boot configuration parameters are loaded, the indicator light is controlled to flash according to the flashing parameters of the indicator light. The auxiliary processor is used for controlling the flickering of the indicator light in the starting process of the main processor, so that the problems of interruption and discontinuity of the flickering of the indicator light controlled by the main processor can be solved.
Based on the same technical concept, fig. 11 exemplarily shows a structure of an apparatus for controlling a blinking of an indicator light of a set-top box according to an embodiment of the present invention, where the apparatus may execute a process for controlling a blinking of an indicator light of a set-top box, and the apparatus may be located in the auxiliary processor 120 of the set-top box 100 shown in fig. 1, or may be the auxiliary processor 120 of the set-top box 100.
As shown in fig. 11, the apparatus specifically includes:
a receiving unit 1101, configured to receive start information sent by a main processor, where the start information includes configuration parameters of starting the auxiliary processor and parameters of flashing of an indicator light in a start process of the main processor; the starting information is sent when the main processor loads and runs boot codes;
and the processing unit 1102 is configured to control the indicator light to flash according to the flashing parameter of the indicator light after the started configuration parameter is loaded.
Optionally, the parameters of the blinking of the indicator light received by the receiving unit 1101 include a frequency of the blinking of the indicator light, a number of times of the blinking, and an initial state.
Optionally, the frequency of the blinking of the indicator light received by the receiving unit 1101 at least includes a first frequency and a second frequency.
Optionally, the processing unit 1102 is specifically configured to:
and controlling the indicator light to flash in an interruption mode according to the flashing parameter of the indicator light.
Optionally, the processing unit 1102 is specifically configured to:
determining the time delay duration according to the clock frequency of the auxiliary processor and the flickering frequency of the indicator light;
and controlling the indicator light to flicker according to the delay time, the flickering frequency of the indicator light and the initial state.
Optionally, the processing unit 1102 is further configured to:
after the indicator light is controlled to flash, when the main processor is determined to be dormant, the main processor is started after a wake-up instruction is received.
Based on the same technical concept, fig. 12 exemplarily shows a structure of an apparatus for controlling blinking of an indicator light of a set-top box according to an embodiment of the present invention, where the apparatus may execute a process for controlling blinking of an indicator light of a set-top box, and the apparatus may be located in the main processor 110 of the set-top box 100 shown in fig. 1, or may be the main processor 110 of the set-top box 100.
As shown in fig. 12, the apparatus specifically includes:
a processing unit 1201, configured to load an auxiliary processor code when loading and running a boot code; configuring starting information of the auxiliary processor, wherein the starting information comprises configuration parameters for starting the auxiliary processor and parameters of indicator lamp flickering in the starting process of the main processor;
a sending unit 1202, configured to send the starting information to the auxiliary processor, so that the auxiliary processor controls the indicator to flash in the starting process of the main processor according to the parameter of the indicator flashing.
Optionally, the parameters of the blinking of the indicator light configured by the processing unit 1201 include a frequency of the blinking of the indicator light, a number of times of the blinking, and an initial state.
Optionally, the frequency of the blinking of the indicator light configured by the processing unit 1201 at least includes a first frequency and a second frequency.
Based on the same technical concept, an embodiment of the present invention further provides a computing device, including:
a memory for storing program instructions;
and the processor is used for calling the program instruction stored in the memory and executing the method for controlling the flickering of the indicator light of the set top box according to the obtained program.
Based on the same technical concept, the embodiment of the invention also provides a computer-readable non-volatile storage medium, which comprises computer-readable instructions, and when the computer reads and executes the computer-readable instructions, the computer is enabled to execute the method for controlling the flickering of the indicator light of the set top box.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (18)

1. A method for controlling flickering of an indicator light of a set top box is characterized by comprising the following steps:
the method comprises the steps that an auxiliary processor receives starting information sent by a main processor, wherein the starting information comprises configuration parameters for starting the auxiliary processor and parameters for indicating lamp flickering in the starting process of the main processor; the starting information is sent when the main processor loads and runs boot codes;
and after the auxiliary processor loads the started configuration parameters, controlling the indicator light to flicker according to the parameter of the indicator light to flicker.
2. The method of claim 1, wherein the parameters of the indicator light flashing include a frequency of the indicator light flashing, a number of flashes, and an initial status.
3. The method of claim 2, wherein the frequency at which the indicator light flashes comprises at least a first frequency and a second frequency.
4. The method of any of claims 1 to 3, wherein the secondary processor controls the indicator light to flash based on the parameter of the indicator light to flash, comprising:
and the auxiliary processor controls the indicator light to flash in an interruption mode according to the parameter of the indicator light to flash.
5. The method of any of claims 1 to 3, wherein the secondary processor controls the indicator light to flash based on the parameter of the indicator light to flash, comprising:
the auxiliary processor determines the time delay duration according to the clock frequency of the auxiliary processor and the flickering frequency of the indicator light;
and the auxiliary processor controls the indicator light to flash according to the delay time length, the flashing times of the indicator light and the initial state.
6. The method of any of claims 1 to 3, wherein the secondary processor, after controlling the indicator light to flash, further comprises:
and when the auxiliary processor determines that the main processor is dormant, the auxiliary processor starts the main processor after receiving a wake-up instruction.
7. A method for controlling flickering of an indicator light of a set top box is characterized by comprising the following steps:
when the main processor loads and runs the boot code, the auxiliary processor code is loaded;
the main processor configures starting information of the auxiliary processor, wherein the starting information comprises configuration parameters for starting the auxiliary processor and parameters of indicator lamp flickering in the starting process of the main processor;
and the main processor sends the starting information to the auxiliary processor so that the auxiliary processor controls the indicator lamp to flash in the starting process of the main processor according to the parameter of the flash of the indicator lamp.
8. The method of claim 7, wherein the parameters of the indicator light flashing include a frequency of the indicator light flashing, a number of flashes, and an initial status.
9. The method of claim 8, wherein the frequency at which the indicator light flashes comprises at least a first frequency and a second frequency.
10. An apparatus for controlling flickering of an indicator light of a set top box, comprising:
the receiving unit is used for receiving starting information sent by the main processor, wherein the starting information comprises configuration parameters for starting the auxiliary processor and parameters for indicating lamp flickering in the starting process of the main processor; the starting information is sent when the main processor loads and runs boot codes;
and the processing unit is used for controlling the indicator light to flash according to the flash parameter of the indicator light after the started configuration parameters are loaded.
11. The apparatus of claim 10, wherein the parameters of the indicator light blinking received by the receiving unit include a frequency of the indicator light blinking, a number of times of the blinking, and an initial status.
12. The apparatus of claim 11, wherein the frequency at which the indicator light flashes received by the receiving unit includes at least a first frequency and a second frequency.
13. The apparatus according to any one of claims 10 to 12, wherein the processing unit is specifically configured to:
and controlling the indicator light to flash in an interruption mode according to the flashing parameter of the indicator light.
14. The apparatus according to any one of claims 10 to 12, wherein the processing unit is specifically configured to:
determining the time delay duration according to the clock frequency of the auxiliary processor and the flickering frequency of the indicator light;
and controlling the indicator light to flicker according to the delay time, the flickering frequency of the indicator light and the initial state.
15. The apparatus of any of claims 10 to 12, wherein the processing unit is further to:
after the indicator light is controlled to flash, when the main processor is determined to be dormant, the main processor is started after a wake-up instruction is received.
16. An apparatus for controlling flickering of an indicator light of a set top box, comprising:
the processing unit is used for loading the auxiliary processor codes when the boot codes are loaded and run; configuring starting information of the auxiliary processor, wherein the starting information comprises configuration parameters of starting the auxiliary processor and parameters of indicator lamp flickering in the starting process of the main processor;
and the sending unit is used for sending the starting information to the auxiliary processor so as to enable the auxiliary processor to control the indicator lamp to flash in the starting process of the main processor according to the parameter of the indicator lamp to flash.
17. The apparatus of claim 16, wherein the parameters of the indicator light flash configured by the processing unit include a frequency of the indicator light flash, a number of flashes, and a start status.
18. The apparatus of claim 17, wherein the frequency at which the indicator light of the processing unit configuration blinks comprises at least a first frequency and a second frequency.
CN202010117067.9A 2019-05-28 2020-02-25 Method and device for controlling flickering of indicator light of set top box Withdrawn CN111131896A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2019104499577 2019-05-28
CN201910449957 2019-05-28

Publications (1)

Publication Number Publication Date
CN111131896A true CN111131896A (en) 2020-05-08

Family

ID=70493081

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010117067.9A Withdrawn CN111131896A (en) 2019-05-28 2020-02-25 Method and device for controlling flickering of indicator light of set top box

Country Status (1)

Country Link
CN (1) CN111131896A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000375A (en) * 2020-07-13 2020-11-27 深圳市智微智能软件开发有限公司 Starting stage judgment method, device, equipment and storage medium of android system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101175345A (en) * 2006-10-30 2008-05-07 青岛海信电器股份有限公司 Indicating circuit twinkling at start-up
CN106980569A (en) * 2017-04-18 2017-07-25 深圳市同泰怡信息技术有限公司 A kind of method that utilization USB keyboard lamp represents BIOS POST progresses
US9805562B1 (en) * 2014-02-21 2017-10-31 Google Inc. Configurable colored indicator on computing device
CN109121245A (en) * 2018-07-06 2019-01-01 青岛海信电器股份有限公司 The method and apparatus that lamp in a kind of pair of equipment is controlled

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101175345A (en) * 2006-10-30 2008-05-07 青岛海信电器股份有限公司 Indicating circuit twinkling at start-up
US9805562B1 (en) * 2014-02-21 2017-10-31 Google Inc. Configurable colored indicator on computing device
CN106980569A (en) * 2017-04-18 2017-07-25 深圳市同泰怡信息技术有限公司 A kind of method that utilization USB keyboard lamp represents BIOS POST progresses
CN109121245A (en) * 2018-07-06 2019-01-01 青岛海信电器股份有限公司 The method and apparatus that lamp in a kind of pair of equipment is controlled

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000375A (en) * 2020-07-13 2020-11-27 深圳市智微智能软件开发有限公司 Starting stage judgment method, device, equipment and storage medium of android system
CN112000375B (en) * 2020-07-13 2023-12-26 深圳市智微智能软件开发有限公司 Method, device, equipment and storage medium for judging startup stage of android system

Similar Documents

Publication Publication Date Title
US10592254B2 (en) Technologies for fast low-power startup of a computing device
CN105632414B (en) Method for controlling backlight thereof, device and equipment in a kind of terminal device start process
CN106528097B (en) A kind of the version synchronization method and electronic equipment of double BIOS/firmwares
CN110277069B (en) Television screen backlight control method and device and television
CN110704090B (en) FPGA (field programmable Gate array) and upgrading method and upgrading system thereof
CN108828966B (en) Method and device for displaying equipment information in smart home system
CN106980597B (en) System-on-chip verification method and system
CN114056134A (en) Vehicle wake-up method, device and storage medium
CN111332224B (en) Control method and device of vehicle-mounted multimedia system
CN111131896A (en) Method and device for controlling flickering of indicator light of set top box
CN107509274B (en) LED display control method and intelligent equipment
CN116243996A (en) Service operation switching method and device, storage medium and electronic device
US20160274647A1 (en) Micro Controller Unit
US11604635B2 (en) Online program updating method
JP2004338883A (en) Elevator controller
CN106339166A (en) Method and device for displaying time on mobile terminal in powered-off state
CN110908706B (en) Multi-version software management method
US20120047358A1 (en) Method and system for accelerating booting process
CN109121245B (en) Method and equipment for controlling lamp on equipment
JP2010097427A (en) Processing apparatus, processing method and computer program
CN115092071A (en) Function control method and device, electronic equipment and storage medium
CN111123781B (en) Parameter correction control method, device, small household appliance and storage medium
EP3176674A1 (en) Method for power control of a control unit and control unit
JP3901230B2 (en) Pachinko game machine
JP2012230637A (en) Program group

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20200508

WW01 Invention patent application withdrawn after publication