The ARM Cortex-M0 processor is the smallest ARM processor currently available. M0 makes full use of ARM Thumb technology, multi-stage pipeline technology, low-power optimization design technology and the latest high-density silicon flash memory technology. It is the smallest, lowest energy consumption and most energy-efficient ARM processor currently available on the market. The processing power consumption is very low, the number of gates is small, and the code occupies a small space, allowing MCU developers to obtain the performance of a 32-bit processor at the price of an 8-bit processor. Chip manufacturers develop M0 products for certain special applications, including highly integrated 32-bit microcontrollers, USB microcontrollers, CAN bus microcontrollers, controllers with USB ports and CAN bus, etc., which are widely used in various fields.
With the rapid development of smart phones, mobile Internet, and cloud storage technology, people's lives have also changed. From information acquisition to shopping, entertainment, and life, including food, clothing, housing, transportation, travel, shopping, and entertainment, a simple and easy-to-use docking speaker has gradually entered people's lives. To design a cost-effective speaker, the USB microcontroller with M0 as the core is a good choice as the main control chip of this type of circuit system.
The audio flow of the base speaker is:
Taking the iPhone base speaker as an example, the use of digital audio transmission can ensure that the sound source is not distorted by external interference , and say goodbye to the problems of poor sound quality and easy interference of traditional base speakers. The MCU must obtain digital audio through USB, and the endpoint requirements of its USB transmission are: the protocol occupies 3 USB endpoints, another 2 control endpoints and 2 audio endpoints. In this way, more than 7 endpoints of USB interface are basically required to meet the design requirements of this type of solution. The audio decoder is received through I2S, so the MCU must have an I2S interface at the same time, and it must also be controlled through the I2C interface.
In addition to audio transmission, in order to achieve rich product functions, corresponding functions can be added according to people's needs. For example, LCD screens, infrared remote control panels, various function buttons, etc. are people's most basic choices, or designers can use their imagination to design the base speakers into remote-controlled car models, cute dolls, powerful Transformers... This puts more demands on the MCU. Chip manufacturers may have anticipated that they will face various types of requirements in the application of M0. Then MCUs with M0 as the core basically have rich peripheral interfaces prepared. As shown in the block diagram:
In addition to being able to run at up to 72 MHz Cortex ?-M0 core, the above also has built-in 36K/68K bytes of Flash memory , 12K/20K bytes of SRAM, and 4K bytes of ROM for storing ISP boot code to ensure smooth operation of the system.
The USB 2.0 full-speed device controller and transceiver comply with the USB 2.0 full-speed device specification and support control/block/interrupt/isochronous transfer types. The USB device controller has a total of 8 configurable endpoints. Each endpoint can be configured as input or output type. All operations including control transfer, bulk transfer, interrupt transfer and isochronous transfer are supported. The endpoint control module can also be used to manage data sequence synchronization, endpoint status, current start address, current transaction status and data cache status of each endpoint. It just meets the needs of the basic 7 configuration endpoints of the base speaker.
The I2S controller consists of the I2S protocol and the external audio CODEC interface. Two 8-byte FIFOs are used for read and write channels respectively, which can handle word sizes from 8 to 32 bits. The DMA controller handles the transfer of data between the FIFO and the memory.
Two sets of I2C controllers, I2C is a two-wire, bidirectional serial bus that implements data exchange between devices through a simple and effective connection method. The I2C standard is a multi-host bus, including conflict detection and arbitration to prevent data corruption when two or more hosts try to control the bus at the same time. In this way, the MCU controls external devices such as audio decoders and encryption chips. The SPI interface can be connected to external devices such as LCD screens that require SPI communication. The integration of UART, PS/2, GPIO and other interfaces enriches user needs.
The clock controller integrated in the MUC provides the clock source for the entire chip, including the system clock and all peripheral device clocks. One of the external 4~24 MHz high-speed crystal oscillators can provide the clock source for interfaces such as USB, and a 22.1184MHz internal clock can be applied to the clock transmitted by the UART interface. There is also an internal 10 KHz low-speed oscillator. Therefore, the MCU provides great flexibility in setting the working clock.
The controller also controls power consumption through separate clock on/off, clock source selection and frequency divider. After the CPU enables the PWR_DOWN_EN bit, the Cortex-M0 core executes the WFI instruction and the chip enters power-down mode. When a wake-up interrupt occurs, the chip exits power-down mode. In power-down mode, the clock controller turns off the external 4~24 MHz high-speed crystal oscillator and the internal 22.1184 MHz high-speed oscillator to reduce the power consumption of the entire system.
Based on the resources of this MCU, we can build a basic base speaker system.
First, the protocol is authenticated. The protocol data is input through the USB of the MCU and transferred to the I2C to be decrypted by the decoding chip and then sent back to the host computer via USB for authentication. Once the authentication is passed, the next step of audio transmission can be carried out.
The PCM code of the digital audio data input from the USB is sent to the 512-byte SRAM of the NUC123 USB, and then moved to the system's SRAM through PDMA 1. The PCM code is then moved to the I2S cache through PDMA2, and then transmitted to the audio decoder through I2S for playback. The system SRAM reaches 20K bytes, which has enough space for audio synchronization or audio data calculations, etc. Since the system integrates a 6-channel PDMA, the efficiency of audio synchronization transmission is greatly improved. Through the HID protocol specified by the host computer, the relevant buttons are designed using the GPIO interface of the MCU, and the command characters specified by the host computer are sent to the host computer to realize functions such as player control.
Such a low-power and cost-effective docking audio platform has been built. Different audio decoders, amplifiers , cabinets and speakers can be selected according to different needs, and a simple docking audio design is completed. MCU has many idle interfaces, and related functions can be added according to different requirements, such as Bluetooth communication, LCD display, infrared remote control... This requires the imagination of consumers and designers.
Previous article:Calculation of the timing time of the general timer of the STM32 microcontroller
Next article:Design of terminal hardware and software platform based on AT91SAM9260
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- Huawei_Large-Scale Logic Design Guide.rar
- MSP430 clock frequency configuration process
- [RTT & Renesas high performance CPK-RA6M4 development board review] - Serial and USB communication
- During the epidemic, how to use UWB technology to ensure the prevention and control of enterprises?
- My childhood fantasy has finally come true! OLED pen!
- 555 classic circuit diagram: 555 test circuit
- Last day! TI live broadcast with prizes, ACI motor actual control evaluation example, in-depth understanding of TI C2000
- Here is a Tai Chi Bagua diagram of the radio frequency industry
- [Chuanglong TL570x-EVM] Example project running
- How to download KEIL DFP package experience sharing