Vehicle-mounted power amplifier system based on Bluetooth chip
By replacing MCU and DSP chips with Bluetooth chips in the vehicle amplifier system, and utilizing the ADC pins and DMA channels of the Bluetooth chip to implement button and tuning functions, and by implementing over-the-air upgrades, the circuit complexity and upgrade difficulty of the vehicle amplifier system are solved, thereby reducing costs and simplifying upgrades.
Patent Information
- Application Number
- CN202510850943.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-06-24
AI Technical Summary
Existing vehicle amplifier systems use MCU chips, DSP chips, and Bluetooth chips, resulting in complex circuits, high costs, and difficulties in chip upgrades and maintenance, requiring multiple specific upgrade interfaces.
A Bluetooth chip is used to replace the MCU chip and DSP chip. The Bluetooth chip enables button, tuning and upgrade functions. The ADC pin and DMA channel of the Bluetooth chip are used to identify button status and tuning data, and the chip function can be upgraded through over-the-air upgrade.
It simplifies the circuit structure of the vehicle amplifier, reduces the complexity and cost of the chip's peripheral circuitry, reduces the difficulty of chip upgrades, and enables the Bluetooth chip to perfectly replace the MCU chip and DSP chip, thus reducing the hassle of upgrades for users.
Smart Images

Figure CN120692503B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of vehicle-mounted equipment, and particularly relates to a vehicle-mounted power amplifier system based on a Bluetooth chip. BACKGROUND
[0002] The vehicle-mounted power amplifier is a power amplifier arranged on a vehicle, which is used for amplifying the sound of a microphone or an audio player and effectively propagating the sound in a vehicle cabin. The existing vehicle-mounted power amplifier is composed of an MCU chip, a DSP chip, a Bluetooth chip and an operational amplifier chip. The Bluetooth chip can be used for Bluetooth playing of external music or Bluetooth talking. The DSP chip is used for tone adjustment. The MCU chip is used for scheduling and distribution of various chips through the panel buttons of the vehicle-mounted power amplifier. However, each chip corresponds to a large number of peripheral circuits, and the circuit is complex and the cost is high. In addition, it is very difficult to upgrade and maintain multiple chips, and a plurality of specific upgrade interfaces need to be inserted for program upgrade. SUMMARY
[0003] The application provides a vehicle-mounted power amplifier system based on a Bluetooth chip to solve the technical problem of chip maintenance and upgrade difficulty of the vehicle-mounted power amplifier.
[0004] In order to solve the above technical problem, in a first aspect, the application provides a vehicle-mounted power amplifier system based on a Bluetooth chip, comprising:
[0005] A key function module is configured to continuously collect key voltages based on ADC pins of the Bluetooth chip, calculate a first voltage average value of the key voltages, and determine a target key state corresponding to the first voltage average value, wherein the key voltage ranges corresponding to different keys are different.
[0006] A tone adjustment function module is configured to calculate a second voltage average value of voltage values continuously collected by the ADC pins based on a DMA channel of the Bluetooth chip, determine target tone adjustment data corresponding to the second voltage average value, and copy the target tone adjustment data to a DSP interface function to realize tone adjustment function.
[0007] An upgrade function module is configured to perform over-the-air upgrade based on the Bluetooth chip.
[0008] In some embodiments, the key function module is specifically configured to:
[0009] The key voltages are continuously collected based on the ADC pins of the Bluetooth chip.
[0010] The first voltage average value of the key voltages is calculated based on the DMA function of the Bluetooth chip.
[0011] The target key voltage judgment range includes a corresponding relationship between key voltage judgment ranges corresponding to a plurality of keys and key states.
[0012] In some embodiments, before the target key voltage judgment range is used to identify the target key state corresponding to the first voltage average value, the method further includes:
[0013] Based on the current environment temperature collected by the temperature sensor received by the Bluetooth chip;
[0014] According to a preset adjustment strategy, the key voltage judgment range of the plurality of keys is adjusted based on the current environment temperature to obtain the target key voltage judgment range.
[0015] In some embodiments, the power adjustment module is further configured to:
[0016] Based on a preset corresponding relationship between the environment temperature and the output power of the vehicle-mounted power amplifier, the output power of the vehicle-mounted power amplifier corresponding to the current environment temperature is adjusted.
[0017] In some embodiments, the tuning function module is specifically configured to:
[0018] The DMA function of the Bluetooth chip is started, and the DMA channel is configured to automatically obtain the voltage values continuously collected by the ADC pin;
[0019] Based on the DMA channel, discrete analysis and mean operation are performed on the continuous preset number of voltage values to obtain the second voltage average value.
[0020] Based on a preset corresponding relationship between the voltage values and the tuning data, the target tuning data corresponding to the second voltage average value is determined.
[0021] The target tuning data is copied to the DSP interface function to realize the tuning function.
[0022] In some embodiments, the upgrade function module is specifically configured to:
[0023] After the Bluetooth chip is powered on, the official boot program of the Bluetooth chip is loaded, and based on the official boot program, it is detected whether there is a first upgrade file, the first upgrade file being a U disk upgrade file or a debug upgrade file;
[0024] If there is no first upgrade file, jump to a preset boot program, and based on the preset boot program, it is detected whether there is a second upgrade file in a preset upgrade buffer area, the second upgrade file being an over-the-air upgrade file;
[0025] If the preset upgrade buffer has the second upgrade file, machine code of the second upgrade file is overwritten into the flash space of the executing machine code to realize over-the-air upgrade.
[0026] In some embodiments, the detecting whether the preset upgrade buffer has the second upgrade file comprises:
[0027] detecting whether a target flag bit of the preset upgrade buffer is a first preset value, and if the target flag bit is the first preset value, determining that the preset upgrade buffer has the second upgrade file;
[0028] Furthermore, after the overwriting of the machine code of the second upgrade file into the flash space of the executing machine code, the method further comprises:
[0029] resetting the target flag bit of the preset upgrade buffer to a second preset value.
[0030] In some embodiments, after the detecting whether the preset upgrade buffer has the second upgrade file, the method further comprises:
[0031] if the second upgrade file is not present, jumping to a first line of executing machine code in an application program of the Bluetooth chip and reading an interrupt function of the Bluetooth peripheral device;
[0032] when the interrupt function has preset data content, performing protocol handshake between the application program of the Bluetooth chip and the Bluetooth peripheral device;
[0033] after the protocol handshake succeeds, obtaining the second upgrade file, copying the second upgrade file to the preset upgrade buffer, and verifying the second upgrade file in the preset upgrade buffer;
[0034] after the verification of the second upgrade file succeeds, restarting the Bluetooth chip and returning to the step of loading the official bootloader of the Bluetooth chip.
[0035] In some embodiments, the obtaining the second upgrade file comprises:
[0036] sending code obtaining requests to the Bluetooth peripheral device in batches, receiving application program execution codes returned by the Bluetooth peripheral device in response to the code obtaining requests, and obtaining the second upgrade file.
[0037] In some embodiments, before the restarting the Bluetooth chip, the method further comprises:
[0038] changing the target flag bit of the preset upgrade buffer to the first preset value.
[0039] Compared with the prior art, the application has the following beneficial effects:
[0040] The functions of the MCU chip and the DSP chip are realized through the Bluetooth chip, so that the vehicle-mounted power amplifier does not need MCU chips and DSP chips, reduces the chip peripheral circuit, and can realize over-the-air upgrade of the Bluetooth chip function, the MCU chip function and the DSP chip function based on the Bluetooth chip, greatly reducing the upgrade difficulty; meanwhile, the problem of insufficient IO pin number of the Bluetooth chip to replace the MCU chip function pin and the DSP chip function pin is solved through the key function module and the tuning function module, realizing perfect replacement of the MCU chip function and the DSP chip function in the vehicle-mounted power amplifier by the Bluetooth chip. BRIEF DESCRIPTION OF DRAWINGS
[0041] Figure 1 A structural block diagram of a vehicle-mounted power amplifier system based on a Bluetooth chip is shown in the embodiments of the present application;
[0042] Figure 2 A circuit connection schematic diagram of a Bluetooth chip is shown in the embodiments of the present application;
[0043] Figure 3 A circuit connection schematic diagram of an ADC pin is shown in the embodiments of the present application;
[0044] Figure 4 An upgrade flowchart of an upgrade function module is shown in the embodiments of the present application. DETAILED DESCRIPTION
[0045] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0046] As described in the background, the traditional vehicle-mounted power amplifier needs MCU chips, DSP chips and Bluetooth chips, etc. When multiple chips need to be upgraded, a USB upgrade interface needs to be introduced for each chip, which leads to extremely troublesome post-upgrade maintenance. Therefore, the present application uses a Bluetooth chip to replace the functions of MCU chips and DSP chips, removes the MCU chips and DSP chips of the vehicle-mounted power amplifier, and saves the peripheral circuit.
[0047] However, the IO pins of the Bluetooth chip are limited, and the number of IO pins is insufficient to replace the functions of the MCU chip and the DSP chip. Taking the BP1048 or BP1548 of Shanjing as an example, the package has 48 pins, most of which are occupied by conventional functions (for example, 36 IO pins are required for basic functions such as power supply and ground, crystal oscillator, USB, SD card, debug interface, etc.), and only 4 IO pins are left unused. Among the 4 unused IO pins, 2 are required for CAN communication of the car amplifier (CAN_TX and CAN_RX). In addition, the car amplifier has 5-12 keys, 3-5 volume adjustment knobs (volume adjustment, treble adjustment, bass adjustment, and reverb adjustment), and a digital tube or liquid crystal screen, so that the Bluetooth chip itself cannot carry the functions of the MCU chip and the DSP chip of the car amplifier.
[0048] Therefore, the embodiment of the present application provides a car amplifier system based on a Bluetooth chip, which realizes the functions of the MCU chip and the DSP chip through the Bluetooth chip, so that the car amplifier does not need the MCU chip and the DSP chip, reduces the peripheral circuit of the chip, and can realize over-the-air upgrade of the functions of the Bluetooth chip, the MCU chip and the DSP chip based on the Bluetooth chip, greatly reducing the upgrade difficulty; at the same time, the key function module and the tuning function module solve the problem that the number of IO pins of the Bluetooth chip is insufficient to replace the IO pins of the MCU chip and the DSP chip, and perfectly replace the functions of the MCU chip and the DSP chip in the car amplifier.
[0049] Please refer to Figure 1 , Figure 1 The structure block diagram of the car amplifier system based on the Bluetooth chip provided by the embodiment of the present application is shown in the figure. The car amplifier system based on the Bluetooth chip of the embodiment of the present application can be applied to a car amplifier, which is provided with a Bluetooth chip and an operational amplifier chip, and optionally further includes keys, a display unit, a microphone, a loudspeaker and the like. As shown in Figure 1 The car amplifier system based on the Bluetooth chip of the embodiment of the present application includes:
[0050] The key function module 11 is used for continuously collecting key voltages based on the ADC pins of the Bluetooth chip, calculating a first voltage average value of the key voltages, and determining a target key state corresponding to the first voltage average value, wherein the key voltage ranges corresponding to different keys are different.
[0051] The tuning function module 12 is used for calculating a second voltage average value of the voltage values continuously collected by the ADC pins based on the DMA channel of the Bluetooth chip, determining a target tuning data corresponding to the second voltage average value, and copying the target tuning data to a DSP interface function to realize the tuning function.
[0052] The upgrading function module 13 is used for over-the-air upgrading based on the Bluetooth chip.
[0053] In the embodiment, for the key function module, multiple key states are detected based on one ADC pin of the Bluetooth chip, so as to solve the problem that the Bluetooth chip pin is not enough to realize the function of 5-12 keys. Specifically, as shown in Figure 2 and Figure 3 Since the voltage of each key is low and different (such as 2.6V, 2.2V, 1.8V, 1.4V, 1.0V, and 0.6V), multiple keys use the same ADC pin to identify the key voltage, so as to identify the target key triggered according to the key voltage. Since there are problems such as external power supply fluctuation and pulse interference in the vehicle-mounted device environment, a multi-filtering voltage capacitor is used in the detection circuit as shown in Figure 3 to filter the noise, and the ADC pin collects multiple key voltages for numerical averaging, so as to obtain more accurate key input states.
[0054] For the tuning function module, the DMA channel of the Bluetooth chip is used as a sub-thread to process the response of the DSP tuning function action. For example, the adjustment of the volume size, bass, treble, and reverb does not go through the thread of the Bluetooth chip, but only needs to run in the background of the DMA, so as to realize the DSP tuning function.
[0055] For the lifting function module, multiple chips (MCU chip, DSP chip, and Bluetooth chip) are needed in the traditional vehicle-mounted power amplifier scheme to form a complete power amplifier system, and a specific burner needs to be inserted into the burning interface for program upgrading, which causes difficulty and complexity for users to upgrade. In the embodiment, the Bluetooth chip is used to replace the functions of the MCU chip and the DSP chip, so that only the Bluetooth chip needs to be upgraded. The Bluetooth chip can be linked to the user terminal (such as a mobile phone) through Bluetooth, and the remote upgrading of the Bluetooth chip can be realized through the operation of the user terminal, which greatly reduces the upgrading difficulty.
[0056] In some embodiments, the key function module 11 is specifically used for:
[0057] The ADC pin of the Bluetooth chip is used to continuously collect the key voltage.
[0058] The DMA function of the Bluetooth chip is used to calculate the first voltage average value of the key voltage.
[0059] The first voltage average value is used to identify the target key state corresponding to the target key voltage judgment range, and the target key voltage judgment range includes the corresponding relationship between the key voltage judgment range and the key state of multiple keys.
[0060] In the embodiment, since the multiple acquisition of the key voltage by the ADC pin occupies a large amount of MCU operation resources, and the Bluetooth chip itself is a common MCU chip, it is difficult to perform a large amount of calculation in the main thread, so the embodiment uses the DMA (Direct Memory Access) function of the Bluetooth chip to automatically listen to the ADC state in the background multiple times, without the participation of the chip thread. When the preset number (such as 100 times) of ADC states are listened to, the average value of the voltage collected by the ADC is automatically calculated, thereby greatly saving the operation resources of the Bluetooth chip.
[0061] In some embodiments, before the target key voltage judgment range is determined based on the target key voltage, the method further comprises:
[0062] receiving, by the Bluetooth chip, a current environment temperature collected by a temperature sensor;
[0063] adjusting, according to a preset adjustment strategy, the key voltage judgment range of the plurality of keys based on the current environment temperature, to obtain the target key voltage judgment range.
[0064] In the embodiment, the temperature sensor can use a thermally sensitive resistance with relatively balanced cost and function. The key voltage judgment range is adjusted according to the current environment temperature, so as to more accurately determine the state of the plurality of keys using the same ADC pin, and avoid false judgment of the key being pressed.
[0065] In some embodiments, the method further comprises a power adjustment module, configured to:
[0066] adjusting, according to a preset corresponding relationship between the environment temperature and the output power of the vehicle-mounted power amplifier, the output power of the vehicle-mounted power amplifier corresponding to the current environment temperature.
[0067] In the embodiment, for desert areas or southern areas, when the sun is shining at noon in summer, the vehicle-mounted equipment inside the vehicle is prone to have a temperature as high as 80℃, which causes the traditional vehicle-mounted power amplifier to be prone to burnout in summer. Therefore, the embodiment dynamically controls the output power of the vehicle-mounted power amplifier according to the change of the environment temperature, so as to realize the maximum output function in a normal temperature environment, and prevent the vehicle-mounted power amplifier from burning out in a high temperature environment.
[0068] For example, the heat temperature data of the vehicle-mounted power amplifier under different environment temperatures is tested in the laboratory. The test method is as follows: the constant temperature is maintained for 2 hours in the high and low temperature chamber of the laboratory, and the surface temperature of the chip is tested by using a contact temperature probe after being powered on for 1 hour. The test results are shown in Table 1. It can be understood that different prototypes have different heat dissipation effects, and the actual measurement will have temperature differences,
[0069] Table 1 Heat temperature data of vehicle-mounted power amplifier under different environment temperatures
[0070]
[0071] Optionally, since the chip is very easy to be damaged when the chip triggers the overheat protection too many times, resulting in the probability of frequent failure of the vehicle-mounted power amplifier greatly increasing, the output of 100% below the chip overheat protection can be used. For example, when the environmental temperature is 65℃ and the output power is 100%, the chip will trigger the overheat protection, so 80% output power is used instead of 100% output power.
[0072] In some embodiments, the tuning function module 12 is specifically configured to:
[0073] start the DMA function of the Bluetooth chip, and configure the DMA channel to automatically obtain the voltage values continuously collected by the ADC pin;
[0074] based on the DMA channel, perform discrete analysis and mean operation on the continuous preset number of voltage values to obtain the second voltage average value;
[0075] based on a preset corresponding relationship between the voltage values and the tuning data, determine the target tuning data corresponding to the second voltage average value;
[0076] copy the target tuning data to the DSP interface function to realize the tuning function.
[0077] In the embodiment, the application app of the vehicle-mounted power amplifier is run and initialized to configure and start the DMA function. The DMA is configured to automatically collect the voltage values of the ADC pin, and after collecting the preset number (such as 20 times) of voltage values, the voltage values are analyzed for discreteness, that is, the maximum voltage value and the minimum voltage value are removed, and then the mean operation is performed on the remaining voltage values to obtain more accurate ADC voltage values. After the DMA obtains the accurate ADC voltage values, the accurate ADC voltage values are automatically converted into the tuning data such as volume value, bass value, treble value, or reverb value required by the chip, and then the tuning data are copied to the DSP interface function to trigger the effect and realize the real-time tuning function of the DSP function.
[0078] wherein the voltage values collected by the ADC have a relationship with the reference voltage. For example, when the ADC reference voltage is 3.3V and the ADC is set to 12-bit precision, the range of the collected voltage values is 2 12 =4096. When the ADC collects 0V voltage, the ADC value obtained is 0, when the ADC collects 1.65V voltage, the ADC value obtained is 2048, and when the ADC collects 3.3V voltage, the ADC value obtained is 4096. The specific correspondence relationship is shown in Table 2:
[0079] Table 2: Corresponding relationship between ADC value and reference voltage
[0080]
[0081]
[0082] It can be seen that the reference voltage has a close linear relationship with the ADC value, and above 3V, the gain coefficient a can be used to fine-tune the ADC value to obtain a more accurate voltage value.
[0083] In some embodiments, the upgrade function module 13 is specifically used for:
[0084] When the Bluetooth chip is powered on, the official bootloader of the Bluetooth chip is loaded, and whether there is a first upgrade file is detected based on the official bootloader, the first upgrade file being a U disk upgrade file or a debug upgrade file;
[0085] If there is no first upgrade file, jump to a preset bootloader, and whether there is a second upgrade file in a preset upgrade buffer is detected based on the preset bootloader, the second upgrade file being an over-the-air upgrade file;
[0086] If the preset upgrade buffer has the second upgrade file, machine code of the second upgrade file is overwritten into a flash space of an execution machine code to realize over-the-air upgrade.
[0087] In the embodiment, as shown in Figure 4 The official bootloader of the Bluetooth chip is bootloader, which only has U disk upgrade or debug dedicated interface upgrade. The available flash space of the Bluetooth chip is divided into three program parts, which are user boot (i.e. preset bootloader), regular application program (i.e. application program of the Bluetooth chip) and to-be-upgraded buffer (i.e. preset upgrade buffer). When it is detected that the preset upgrade buffer has the second upgrade file, the second upgrade file is overwritten into the flash space of the application program (i.e. the flash space of the execution machine code), which is equivalent to upgrading the original application program.
[0088] In some embodiments, the detection of whether the preset upgrade buffer has the second upgrade file comprises:
[0089] Detecting whether a target flag bit of the preset upgrade buffer is a first preset value, if the target flag bit is the first preset value, it is determined that the preset upgrade buffer has the second upgrade file;
[0090] And after the machine code of the second upgrade file is overwritten into the flash space of the execution machine code, it further comprises:
[0091] resetting the target flag of the preset upgrade buffer to a second preset value.
[0092] In the embodiment, the first preset value and the second preset value are different values, for example, the first preset value can be 1 and the second preset value can be 0. When the target flag of the preset upgrade buffer is 1, it indicates that the preset upgrade buffer has a new upgrade package (i.e., a second upgrade file). After the machine code is overwritten, the target flag is reset to 0 to avoid the case that the Bluetooth chip is overwritten again next time.
[0093] In some embodiments, after the detection of whether the preset upgrade buffer has the second upgrade file, the method further includes:
[0094] If the second upgrade file is not present, the method jumps to the first line of the machine code in the application program of the Bluetooth chip and reads the interrupt function of the Bluetooth peripheral device.
[0095] When the interrupt function has preset data content, the method performs protocol handshake based on the application program of the Bluetooth chip and the Bluetooth peripheral device.
[0096] When the protocol handshake is successful, the method acquires the second upgrade file, copies the second upgrade file to the preset upgrade buffer, and checks the second upgrade file in the preset upgrade buffer.
[0097] When the second upgrade file is checked successfully, the method restarts the Bluetooth chip and returns to the step of loading the official bootloader of the Bluetooth chip.
[0098] In the embodiment, the boot program jumps to the first line of the machine code in the application program, which is equivalent to handing over the control of the chip to the application program. After the application program of the Bluetooth chip is run, the application program is divided into multiple threads. The main thread is responsible for regular key, knob, and output power amplifier power adjustment operations, and the secondary thread is responsible for continuously reading the interrupt function of the Bluetooth peripheral device. When the interrupt function of the data interaction of the Bluetooth peripheral device or the networked device receives preset data content (for example, 0xa5 0x5a 0x55 0x00 0xbb 0xcc 0xaa data stream), it is determined that the external device wants to perform over-the-air upgrade on the Bluetooth chip through the Bluetooth or the networked device. At this time, the application program of the Bluetooth chip performs protocol handshake with the external device (steps of informing the Bluetooth chip of the app version number to be upgraded, size (number of bytes), and CRC check code). After the second upgrade file is copied and checked to be correct, the Bluetooth chip is restarted, and the method returns to the first step to form a perfect closed loop.
[0099] In some embodiments, the acquisition of the second upgrade file includes:
[0100] The code obtaining request is sent to the Bluetooth peripheral in batches, and the application execution code returned by the Bluetooth peripheral in response to the code obtaining request is received, so as to obtain the second upgrade file.
[0101] In the embodiment, after the protocol handshake between the application of the Bluetooth chip and the external device, the execution code of the app to be upgraded is requested in batches (1024 bytes (1 KB) of data is requested each time, and the app to be upgraded is divided into N times according to the size of the app to be upgraded), and then the execution code is copied to the upgrade buffer.
[0102] In some embodiments, before the Bluetooth chip is restarted, the method further comprises:
[0103] The target flag of the preset upgrade buffer is changed to a first preset value.
[0104] In the embodiment, the second upgrade file is copied to the preset upgrade buffer, so that the Bluetooth chip can be restarted to detect the over-the-air upgrade, and the target flag of the preset upgrade buffer is changed to 1.
[0105] In several embodiments provided in the present application, it can be understood that each block in the flowchart or block diagram can represent a module, a program segment or a part of code, and the module, the program segment or the part of code include one or more executable instructions for implementing a specified logic function. It should also be noted that in some alternative implementation manners, the functions annotated in the blocks can also occur in an order different from that annotated in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the functions involved.
[0106] The above-described specific embodiments further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above-described specific embodiments are merely for the purpose of the present application, and are not intended to limit the protection scope of the present application. It is particularly pointed out that any modification, equivalent replacement, improvement, etc. made by those skilled in the art within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A Bluetooth chip-based vehicle-mounted power amplifier system, characterized in that, The application comprises: A key function module is configured to continuously collect key voltages based on an ADC pin of the Bluetooth chip, calculate a first voltage average of the key voltages, and determine a target key state corresponding to the first voltage average, wherein the key voltage ranges corresponding to different keys are different. A tuning function module is configured to calculate a second voltage average of voltage values continuously collected by the ADC pin based on a DMA channel of the Bluetooth chip, determine target tuning data corresponding to the second voltage average, and copy the target tuning data to a DSP interface function to realize a tuning function. An upgrade function module is configured to perform over-the-air upgrade based on the Bluetooth chip. The tuning function module is specifically configured to start the DMA function of the Bluetooth chip, configure the DMA channel to automatically obtain voltage values continuously collected by the ADC pin, perform discrete analysis and mean operation on a preset number of continuous voltage values based on the DMA channel to obtain the second voltage average, determine target tuning data corresponding to the second voltage average based on a preset correspondence between voltage values and tuning data, and copy the target tuning data to the DSP interface function to realize a tuning function. The DMA function of the Bluetooth chip is used to automatically listen to the ADC state in the background multiple times without the participation of a chip thread.
2. The Bluetooth chip-based vehicle-mounted power amplifier system according to claim 1, wherein, The key function module is specifically configured to: Determine a target key state corresponding to the first voltage average based on a target key voltage judgment range, wherein the target key voltage judgment range comprises a correspondence between key voltage judgment ranges corresponding to different keys and key states.
3. The Bluetooth chip-based vehicle-mounted power amplifier system according to claim 2, wherein, Before determining the target key state corresponding to the first voltage average based on the target key voltage judgment range, the method further comprises: Receiving a current environment temperature collected by a temperature sensor based on the Bluetooth chip. Adjusting key voltage judgment ranges of different keys based on the current environment temperature according to a preset adjustment strategy to obtain the target key voltage judgment range.
4. The Bluetooth chip-based vehicle-mounted power amplifier system according to claim 1, wherein, The application further comprises a power adjustment module configured to: Adjust an output power of a vehicle-mounted power amplifier corresponding to a current environment temperature based on a preset correspondence between environment temperatures and output powers of vehicle-mounted power amplifiers.
5. The Bluetooth chip-based vehicle-mounted power amplifier system according to claim 1, wherein, The upgrade function module is specifically configured to: Load an official boot program of the Bluetooth chip after the Bluetooth chip is powered on, and detect whether there is a first upgrade file based on the official boot program, wherein the first upgrade file is a U disk upgrade file or a debug upgrade file. If there is no first upgrade file, jump to a preset boot program, and detect whether there is a second upgrade file in a preset upgrade buffer based on the preset boot program, wherein the second upgrade file is an over-the-air upgrade file. If there is the second upgrade file in the preset upgrade buffer, overwrite machine code of the second upgrade file into a flash space of an execution machine code to realize over-the-air upgrade.
6. The Bluetooth chip-based vehicle-mounted power amplifier system according to claim 5, wherein, The detection of whether there is the second upgrade file in the preset upgrade buffer comprises: detecting whether a target flag bit of the preset upgrade buffer is a first preset value, and if the target flag bit is the first preset value, determining that the preset upgrade buffer has the second upgrade file; and after the machine code of the second upgrade file is overwritten into the flash space of the execution machine code, further comprising: resetting the target flag bit of the preset upgrade buffer to a second preset value.
7. The vehicle-mounted power amplifier system based on a Bluetooth chip as described in claim 5, characterized in that, after the detection of whether the preset upgrade buffer has the second upgrade file, further comprising: if there is no second upgrade file, jumping to a first line of execution machine code in an application program of the Bluetooth chip, and reading an interrupt function of the Bluetooth peripheral device; when the interrupt function has preset data content, performing protocol handshake based on the application program of the Bluetooth chip and the Bluetooth peripheral device; after the protocol handshake is successful, obtaining the second upgrade file, copying the second upgrade file to the preset upgrade buffer, and verifying the second upgrade file in the preset upgrade buffer; after the second upgrade file is verified successfully, restarting the Bluetooth chip, and returning to the step of loading the official boot program of the Bluetooth chip.
8. The Bluetooth chip-based vehicle-mounted power amplifier system according to claim 7, wherein, the obtaining of the second upgrade file comprises: sending code obtaining requests to the Bluetooth peripheral device in batches, receiving application program execution codes returned by the Bluetooth peripheral device in response to the code obtaining requests, and obtaining the second upgrade file.
9. The Bluetooth chip-based vehicle-mounted power amplifier system according to claim 7, wherein, before the restarting of the Bluetooth chip, further comprising: changing the target flag bit of the preset upgrade buffer to the first preset value.
Citation Information
Patent Citations
Car machine, intelligent mobile terminal, and corresponding connection control method and system
CN106027808A
Rotary key, control method thereof and wearable equipment
CN112565966A