News
>
>
>
Hangshun HK32MCU (Lesson 10) I HK32F103xC/D/E's ADC processing mechanism when the normal and injection channels are triggered at the same time Application Notes (10)
Check category

Hangshun HK32MCU (Lesson 10) I HK32F103xC/D/E's ADC processing mechanism when the normal and injection channels are triggered at the same time Application Notes (10)

  • Categories:Group news
  • Author:shaodong
  • Origin:Hangshun chip
  • 2022.03.03

(Summary description)The ADC module realizes the accurate perception of the external world by the MCU through accurate measurement of the voltage and current signals, thereby realizing precise control of the application.

Hangshun HK32MCU (Lesson 10) I HK32F103xC/D/E's ADC processing mechanism when the normal and injection channels are triggered at the same time Application Notes (10)

(Summary description)The ADC module realizes the accurate perception of the external world by the MCU through accurate measurement of the voltage and current signals, thereby realizing precise control of the application.

  • 2022-03-03
Information

HK32F103x/C/D/E is a medium and large capacity series MCU launched by Hangshun chip. As a commonly used ADC module for 32-bit MCUs, it has many applications in various products, such as key detection applications that save I/O pins, and various sensors, such as light sensors, humidity sensors, temperature sensors, etc. The analog signal of the MCU is converted into a voltage and current signal, and the ADC module realizes the accurate perception of the external world by the MCU through accurate measurement of the voltage and current signal, thereby realizing the precise control of the application.

 

>>>>
Function description of ADC of HK32F103x/C/D/E:
The 12-bit ADC is a successive approximation analog-to-digital converter. It has up to 18 channels and can measure 16 external and 2 internal sources. A/D conversion for each channel can be performed in single, continuous scan or discontinuous mode. The result of the ADC can be stored in a 16-bit data register either left-aligned or right-aligned.

An analog watchdog feature allows the application to detect if the input voltage exceeds a user-defined high/low threshold.

The input clock of the ADC must not exceed 14MHz, which is generated by dividing the frequency of PCLK2.

 

>>>>
Main features of ADC of HK32F103x/C/D/E:

 

● 12-bit resolution

● Interrupt on end of conversion, end of injected conversion and analog watchdog event

● Single and continuous conversion modes

● Auto scan mode from channel 0 to channel n

● Self-calibration

● Data alignment with embedded data consistency

● The sampling interval can be programmed separately by channel

● Both rule transitions and injection transitions have external trigger options

● Discontinuous mode

● Dual mode (devices with 2 or more ADCs)

● ADC conversion time:

HK32F103xx Enhanced Products: 1μs at 56MHz (1.17μs at 72MHz)

● ADC power supply requirements: 2V to 5.5V

● ADC input range: VREF- ≤ VIN ≤ VREF+

Note: If there is a VREF- pin (depending on the package), it must be connected to VSSA

 

 

>>>>
Channel selection of ADC of HK32F103x/C/D/E:

 

There are 16 multiplexed channels. Transformations can be divided into two groups: rule groups and injection groups. A series of transitions in any order on any number of channels constitutes a group transition. For example, the conversion can be done in the following order: channel 3, channel 8, channel 2, channel 2, channel 0, channel 2, channel 2, channel 15.

● Rule groups

Consists of up to 16 transitions. The regular channels and their conversion order are selected in the ADC_SQRx registers. The total number of conversions in the rule set should be written to the L[3:0] bits of the ADC_SQR1 register.

● Injection group

Consists of up to 4 transitions. The injection channels and their conversion order are selected in the ADC_JSQR register. The total number of conversions injected into the group should be written into the L[1:0] bits of the ADC_JSQR register.

If the ADC_SQRx or ADC_JSQR registers are changed during a conversion, the current conversion is cleared and a new start pulse will be sent to the ADC to convert the newly selected bank.

 

>>>>

Temperature Sensor / VREFINT Internal Channel

The temperature sensor is connected to the channel ADC1_IN16, and the internal reference voltage VREFINT is connected to ADC1_IN17. The two inner channels can be converted by injection or regular channel.

Note: The temperature sensor and VREFINT can only be present in the main ADC1.

 

>>>>
The HK32F103x/C/D/E need to pay attention to the use of ADC
Problem Description:

When the working mode of the ADC is the combination sampling of the regular channel and the injection channel, they need to trigger sampling at the same time, that is, when the signal triggering sampling occurs at the same time, the regular channel sampling trigger signal of HK32F103 will be ignored, and the S** In this case, the T chip will first trigger the injection channel, and then trigger the regular channel to work. The following is an example of the case of Fail:

Set the bits 21 and 22 of the register ADC2->CR2 at the same time as above, that is, trigger the sampling of the regular channel and the injection channel at the same time, and the sampling trigger signal of the regular channel will be ignored.

Root cause:

The transition triggering mechanism is different in this case.

Solution:

Adjust the software so that the trigger signal does not trigger at the same time (same 1 clock cycle). Here is an example solution:

That is, the time-sharing trigger is used for sampling, and it is only necessary to ensure that the trigger is not triggered at the same time.

Keyword:

返回列表
A solution for automotive gear shift switch based on Hangshun chip automotive grade MCU HK32A040C8T3
2024.04.07
A solution for automotive gear shift switch based on Hangshun chip automotive grade MCU HK32A040C8T3
Throughout the global development of passenger cars, automatic transmission has been widely adopted. Its simple and easy to learn, convenient and intelligent characteristics bring drivers a more comfortable driving experience, and also better adapt to urban traffic. The implementation of the automatic shift function actually uses a gear shift switch instead of manual operation. The gear shift switch will control the shift fork and gear shift based on different engine speeds, vehicle speeds, and the driver's intention to press the accelerator. To achieve these automated operations, a shift switch requires a brain. The Hangshun chip M0 series automotive grade MCU HK32A040C8T3 is such a "brain", applied in gear shift switch schemes. Its main function is to receive signals from the gear shift switch and convert these signals into electrical signals that can control the car's engine, transmission, and other parts, thereby simplifying driving operations and providing great convenience for the driver. In the process of developing its new generation of electric vehicles, in order to ensure that the vehicle's performance, reliability, and safety reach the optimal level, after in-depth technical evaluation and multiple rounds of screening, Selis New Energy Vehicles finally chose a gear shift switch scheme based on the Hangshun chip HK32A040C8T3. The Selis engineering team has conducted a rigorous review of the functional characteristics, processing speed, power consumption performance, environmental adaptability, and cost-effectiveness of the Hangshun HK32A040C8T3 MCU in multiple dimensions. Hangshun's MCU has successfully conquered the engineering team with its outstanding performance, especially in high reliability and strong anti-interference ability. In addition, HK32A040C8T3 has high integration and flexible peripheral interfaces, providing engineers with greater design freedom and optimization space, making the entire electronic control system more compact and efficient. HK32A040 using ARM ®  Cortex ®- M0 core, with a maximum operating frequency of 96MHz, built-in up to 124 Kbyte Flash and 10 Kbyte SRAM. By configuring the Flash controller registers, the remapping of interrupt vectors within the main Flash area can be achieved. And it supports traditional Flash Level 0/1/2 read-write protection and Flash code encryption (patented by Hangshun). Strong scalability 32-bit ARM CPU architecture, good ecological environment Rich peripheral resources to meet platform expansion Multiple packaging options available for LQFP64, LQFP48, QFN32, and QFN28 high reliability Car specification quality, compliant with AEC-Q100 Grade 1 Complies with ISO 9001 and IATFT 16949 quality management systems Supports -40 ℃~125 ℃ High cost performance ratio Equal performance/resources, with higher cost-effectiveness Quality service Complete ecological supporting facilities 15 years of design life, with a supply chain guarantee of over 15 years The gear shift switch scheme based on the Hangshun Vehicle Class MCU HK32A040C8T3 has been successfully applied in the Sailis new energy vehicle, which not only improves the electronic control efficiency of the entire vehicle, but also achieves lower energy consumption and better user experience. The Hangshun chip series vehicle grade MCU HK32A040 can be widely used in vehicle domain controllers, such as doors and windows, tail lights, wipers, anti-theft alarms, car keys, air conditioning, electric seats, etc. Hangshun Chip adheres to the strategy of SoC+32-bit high-end MCU in automotive standards. In recent years, it has invested a large amount of research and development resources in the field of automotive electronics, committed to providing the market with higher reliability and more cost-effective automotive chip solutions, helping customers achieve a win-win situation in cost control and user experience.
More >
Hangshun chip has obtained the highest ASIL D certification in ISO 26262, and the automotive functional safety management system has been further upgraded
2023.10.10
Hangshun chip has obtained the highest ASIL D certification in ISO 26262, and the automotive functional safety management system has been further upgraded
Recently, the international independent third-party testing, inspection, and certification agency SGS has issued the ISO 26262:2018 ASIL D process certification certificate for the highest level of automotive functional safety to Shenzhen Hangshun Chip Technology Research and Development Co., Ltd. (hereinafter referred to as "Hangshun Chip"). This marks that Hangshun Chip has established a comprehensive chip product software and hardware development process management system that meets the highest level of automotive functional safety requirements. It also confirms that Hangshun Chip's automotive MCU products and services can fully meet the automotive functional safety requirements of top automotive manufacturers in the product design and integration stage, greatly reducing the workload of customer self verification and certification, and accelerating product launch. With the development of electrification and intelligence in automobiles, safety is becoming increasingly important. These new technologies have introduced more electronic control systems and sensors, thus increasing the risk of system failures. The ISO 26262 standard is currently recognized globally as the functional safety process standard for automobiles. It is aimed at automotive OEMs and their global suppliers, covering the entire product lifecycle, including functional safety management, system stage development, software and hardware stage development, supporting all aspects such as processes, safety analysis, and product release. Through the guidance and application of standardized technical specifications, the risk of automotive electrical or electronic system failures is minimized, ultimately reducing related traffic accidents. During this certification process, SGS highly recognizes that the development process and quality management system of Hangshun chips fully comply with the requirements of ISO26262:2018 standard. At the same time, through this process, Hangshun Chip further sorted out the development process of functional standards throughout the entire lifecycle, improved the management ability of the functional safety team, and comprehensively forged a vehicle specification MCU chip team with both soft and hard strength, professional skills, and management capabilities. Starting from 2021, multiple families such as Hang Shun Chip SoC HK32AUTO39A and HK32A04AA have passed the AEC-Q100 standard certification, providing cost-effective and reliable development options for various automotive scenarios such as body control, automotive lighting, entertainment systems, and in car navigation. These products have been widely used in mainstream products of multiple top automotive brands. As a leading "automotive SoC+high-end MCU" design enterprise, Hangshun Chip always adheres to the product design concept of high performance and high safety, and actively establishes a quality management system that meets international standards. At present, Hangshun chip is accelerating the development of high-end automotive MCU to meet the ASIL-D level functional security and hardware encryption network security requirements, and new products will gradually serve automotive customers. About Hangshun chips Shenzhen Hangshun Chip Technology R&D Co., Ltd. was established in 2013, with branches and offices in Chengdu and Shanghai. It is committed to the dual strategy of "vehicle standard SoC+high-end MCU supermarket, making everything more intelligent and a better smart life", and realizing the great vision of "HK32MCU as the core, creating a boundaryless ecological platform level enterprise for Hangshun". The Hangshun HK32MCU is divided into economy type, mainstream type, low energy consumption type, high-performance type, specialized type, and innovative type, and is mass-produced and applied to thousands of customers in automotive, industrial, household appliances, IoT, and other industries. A total of eight rounds of strategic financing totaling hundreds of millions of yuan have been completed, and have successively won titles such as Forbes/Hurun Global Unicorn, China IC Unicorn, National Specialized and New Key "Little Giant" Enterprise, National Key Integrated Circuit Design Enterprise, and National High tech Enterprise. About SGS Global Functional Safety Technology Center SGS is an internationally recognized inspection, appraisal, testing, and certification agency, serving as a benchmark for quality and integrity. The SGS Global Functional Safety Technology Center is an automotive functional safety training, consulting, and certification organization authorized by DaKKS in Germany. It is a functional safety partner for many well-known domestic and foreign automotive companies and component suppliers. Martin Schimt, the head of the technical center, is the initiator and drafter of ISO 26262. Currently, SGS has over 80 automotive functional safety experts and has issued over 335 ISO 26262 functional safety certification certificate
More >

推荐新闻

×

Product Center

Solution

About Us

Technical Support

Please let us know your contact details

Contact us

No. 159, North Pingji Avenue, Pinghu Street, Longgang District, Shenzhen

Heng Road E Times Hangshun Chip Headquarters Building 22nd Floor

86-0755-88917820(Shenzhen)

2880948126

Copyright © 2021 Shenzhen Hangshun Chip Technology R&D Co., Ltd.  粤ICP备13075796号-2