introduction
Industrial environments are becoming increasingly challenging for developers of embedded control systems, mainly due to the increasing complexity of systems and communication stacks, the increasing real-time and safety requirements, and the direct impact on the characteristics and specifications of semiconductor components. PROFINET is the industrial Ethernet version of PROFIBUS, a technology that is widely recognized as extremely resource-intensive. STMicroelectronics and Port have developed a PROFINET software for the STM32 F-2 series that only requires 128KB of SRAM memory, allowing STMicroelectronics' microcontrollers to enter a new application area. The STM32 F-2 and Port PROFINET combination is not only suitable for industrial automation applications, such as industrial encoders (positioning), industrial drive accessories, but also for safety systems with built-in Ethernet control functions. The STM32 F-2 version of the PROFINET protocol stack provides users with all the service functions required for PROFINET IO-compatible communication in accordance with IEC 61158 and IEC 61784 standards, helping users to easily and quickly develop PROFINET IO devices. The solution is to access the hardware through a hardware abstraction layer and provide users with drivers that can connect to different STMicroelectronics microcontrollers, with or without an operating system. In order to quickly obtain bus usage rights and comply with PROFINET technical specifications, the solution optimizes the underlying Ethernet driver software. STM32 F-2 supports PROFINET Conformance Class A and can also support PROFINET Realtime Class 1. To help designers develop projects easily and quickly, Port also provides a PROFINET design tool.
To overcome these challenges, STMicroelectronics released the STM32-F2 series of microcontrollers earlier this year to help developers realize demanding industrial applications. The new series of products was born from the popular STM32 product family, with higher performance, larger storage capacity and peripherals optimized for industrial applications. The F2 series integrates multiple functions on a single chip, such as control/adjustment functions and complex communication protocol stacks. The advantage of high integration is that it reduces the space of the printed circuit board, avoids the connection circuits between different controllers that are susceptible to electromagnetic compatibility, and optimizes the application cost.
The industrial automation market is characterized by the coexistence of multiple communication protocols, and real-time applications require efficient operating systems. Therefore, software stacks and operating systems have become the primary parameters for selecting microcontrollers. STM32 microcontrollers are based on the widely supported Cortex M3 core, so there are more than 20 real-time operating system and communication protocol providers for users to choose from. To make the STM32 microcontroller more perfect, STMicroelectronics has also added a CMSIS-compatible hardware abstraction layer and other firmware libraries, for example, supporting field-oriented control (FOC) of permanent magnet synchronous motors (PMSM). This article will introduce two third-party factory automation software developed specifically for STM32F-2: the IEEE1588 protocol software package supporting PTP developed by IXXAT and the Profinet communication protocol stack developed by PORT.
STM32-F2 improved performance for factory automation
Compared with the previous generation product STM32-F1, STM32-F2 has been improved in many aspects, especially with better performance and richer peripheral interfaces. STM32-F2 uses 90nm lithography technology, with a processing speed of 120MHz and keeps the operating power consumption at a reasonable level (300uA/MHz). Another benefit of this lithography technology is higher integration, which helps reduce the system-level cost of applications.
In order to give full play to the excellent performance of the Cortex-M3 core, STMicroelectronics re-evaluated the product architecture. The new product releases a strong performance of 150DMIP at 120MHz (Dhrystone 2.1), and the CoreMark test score is 254 (2.120 CoreMark/MHz passed EEMBC certification). STM32F-2 has thus entered the first camp of Cortex-M microcontrollers. This achievement is attributed to the Adaptive Real-Time Memory Accelerator (ARTTM). After adopting this flash memory access management technology, the application code execution is no longer affected by the inherent wait state of the flash memory itself. Although the speed of the flash memory is three times slower than the core itself, there will be no wait state during the code execution process, even when the processing speed reaches 120MHz, there is zero wait state. Therefore, the new series of products can significantly reduce the design size, reduce power consumption and the EMC impact of flash memory, and ensure the highest product performance.
The main features of STM32-F2 are as follows: up to 1MB of flash memory, 128kB RAM, 6 UARTs (7.5Mbps), 3 SPI interfaces (30Mbps), Ethernet media access controller (MAC) supporting IEE1588 PTP V2, 4kB backup RAM, and 512 bytes of one-time programmable memory (OTP).
Bus Matrix
In addition to the pure core computing power, microcontroller designers must also consider bus design to achieve parallel memory access and data transmission between different units of the microcontroller. For example, the core and communication peripherals need to access different memories at the same time. Therefore, the main bus is finally designed as a multi-layer AHB bus matrix that supports up to 6 simultaneous data streams.
The STM32-F2 series microcontrollers have a total of 5 bus master controllers:
●ARM Cortex-M3 core with 3 core buses
●2 DMA controllers
●High-speed USB host controller
●10/100 Ethernet MAC controller
The black dots in the figure above represent all the interfaces between the bus master and slave controllers in this 7-layer bus structure. To improve the energy efficiency of the system, the SRAM memory is divided into two storage areas, SRAM1 and SRAM2. SRAM1 is used to store the basic protocol stack and variables, while SRAM2 is used as a frame buffer for communication peripherals. Ethernet and USB peripherals each occupy several kilobytes of FIFO storage space and each has its own dedicated DMA controller.
In addition to multiple SRAM partitions, the system has two AHB bus slave controllers. Again, this configuration allows different bus masters to process in parallel and access different high-speed peripherals simultaneously, such as cryptographic processors and general purpose input and output ports. Both the AHB slave controller and the DMA controller are dual-ported, which allows the DMA controller to connect high-speed peripherals directly on the AHB bus, avoiding performance degradation due to delays in the bus matrix and the secondary high-speed to low-speed bridge.
The external memory interface, also known as the "static memory controller", can directly connect to different asynchronous and synchronous memories, NOR/NAND flash memory, SRAM, pseudo SRAM, and even a LCD display controller. The external memory interface bus frequency is up to 60MHz, and it can also obtain CPU core instructions through the instruction bus (I-bus).
Memory Accelerator
STMicroelectronics’ Adaptive Real-Time (ART) memory accelerator (shown below) allows the Cortex-M3 core to unleash the highest processing performance. Although the flash memory itself requires wait states, after the introduction of this technology, the STM32-F2 can execute code from flash memory at a speed of 120 MHz without wait states.
The memory interface is 128 bits wide and can fetch 4-8 THUMB2 instructions at a time. If linear code is executed, due to the prefetch function, even if the flash speed is only one-fourth of the core, the code execution will not have a wait state.
However, if a branch or jump instruction is executed, the data for the branch or jump target address needs to be fetched immediately, so the memory wait state adds overhead to the system, which is where the ART and its 64-entry instruction cache come into play. If a non-sequential instruction appears for the first time, the instruction is fetched from memory and stored in a storage entry of the 64-entry cache. The next time it appears, the instruction is fetched directly from the cache without a wait state.
This instruction cache also has a LRU (least recently used) mechanism, so if an application software has more than 64 branch instructions, the most recently used new instructions will replace the least recently used instructions. The advantage of this architecture is that even if the interrupt service handler is overwritten by the accelerator, this mechanism can still support various branch instructions.
The most frequently used 8 lines of data items are like a high-speed instruction cache, but are used to temporarily store the most frequently used databases, allowing the D-bus to be filled with data immediately.
Industrial Protocol Stack and Firmware
IEEE 1588 PTP protocol developed by IXXAT for STM32
Distributed application devices such as measurement systems, telecommunications equipment, automation systems or automotive systems have increasingly higher requirements for precise timing mechanisms. The IEEE 1588 Precision Timing Protocol (PTP) enables distributed devices to achieve nanosecond-level timing synchronization accuracy through Ethernet, thus meeting the requirements of distributed application systems.
The IEEE 1588 protocol software developed by IXXAT Automation Technology Co., Ltd. enables device manufacturers to easily and quickly develop IEEE 1588-compatible devices. The source code of this software is in C language and can be implemented on any platform.
In order to implement the IEEE 1588 protocol on STMicroelectronics' STM32-F2 series microcontrollers, IXXAT provides STM32-F2 users with a customized version of the protocol software. This solution greatly simplifies and speeds up the protocol implementation process. The STM32-F2 dedicated protocol software needs to be used in conjunction with a TCP/IP protocol stack with multicast capabilities, with or without an operating system.
Because of its rich functions, continuous upgrades and high market share, IXXAT's IEEE 1588 protocol software has become the main reference standard in the 1588 protocol software market. The latest version 1.03 of IEEE 1588 already supports the new IPv6 standard, which will gradually be adopted by new systems. The modular software structure of this solution includes basic packages and optional extension files, such as files for IPv6, IEEE 802.3 and Unicast, so that the package can be optimally matched with specialized applications and their resources.
Users can dynamically set multiple features, such as latency mechanisms (peer/end-to-end) and communication technologies (IPv4, IPv6, 802.3), so designers do not need to consider network structures when developing devices, and users do not need to modify firmware when using devices. This design can reduce development costs and allow customers to offer more attractive value propositions.
The STM32-F2 series microcontroller integrates hardware supporting IEEE 1588 (PTP V2) in the Ethernet media access controller MAC, and has all the resources required to implement a high-precision timing synchronization protocol. We conducted a long-term back-to-back connection synchronization test using an accurate master controller (2ppm crystal oscillator) with a 0.125 second synchronization interval. The test results showed that the maximum synchronization deviation of the platform was ±70 nanoseconds, and the standard synchronization deviation was about 15 nanoseconds. After power-on, IXXAT's IEEE 1588 protocol software synchronization requires an average of about 20 synchronization intervals.
The IEEE 1588 software implemented on an STM32 microcontroller to achieve a typical function with IPv4, end-to-end (E2E) and peer-to-peer (P2P) delay mechanisms and a common clock for the main controller requires 47KB of space for program code, 7KB of space for read-only data, and 23KB of space for read-write data.
In addition to the IEEE 1588 protocol software, IXXAT's services include custom hardware and software development and system design, as well as technical seminars and code presentations. STM3210C-EVAL evaluation board users can download the free version of the IEEE 1588 software developed by IXXAT and STMicroelectronics from the following URL: http://www.ixxat.de/evaluation_kit_stm3210c_de.html.
PORT Profinet Software Stack
Port, a market-leading provider of CAN/CANopen and DeviceNet fieldbus solutions, has expanded its hardware and firmware development capabilities and business portfolio, strengthening its portfolio of protocol stacks and development tools for POWERLINK, PROFINET, EtherNet/IP and EtherCAT.
[page]
PROFINET is the industrial Ethernet version of PROFIBUS, a technology that is widely acknowledged to be extremely resource-intensive. STMicroelectronics and Port have collaborated to develop a PROFINET software for the STM32 F-2 series that requires only 128KB of SRAM, opening up a new application area for STMicroelectronics’ microcontrollers. The STM32 F-2 and Port PROFINET combination is not only suitable for industrial automation applications, such as industrial encoders (positioning), industrial drive accessories, but also for safety systems with built-in Ethernet control functions. The PROFINET STM32 F-2 version of the protocol stack provides users with all the service functions required for PROFINET IO-compatible communication in accordance with the IEC 61158 and IEC 61784 standards, helping users to easily and quickly develop PROFINET IO devices. The solution is to access the hardware through a hardware abstraction layer and provide users with drivers that can connect to different STMicroelectronics microcontrollers, with or without an operating system. The solution optimizes the underlying Ethernet driver software to quickly obtain bus access rights and comply with the PROFINET technical specifications. The STM32 F-2 supports PROFINET Conformance Class A and can also support PROFINET Realtime Class 1. To help designers develop projects quickly and easily, Port also provides a PROFINET design tool.
STMicroelectronics' motor vector control library
Because it integrates two advanced timer peripherals, three fast digital-to-analog converters (0.5MSps) and DMA direct memory access, the STM32F2x is particularly suitable for applications that require 1 or 2 motor control drivers. Even when driving two motors, the performance of 150DMIPS gives the STM32F2x enough backup power to drive other complex application tasks.
The STM32F-2 is equipped with the STM32 PMSM FOC software development tool, which implements field-oriented control (FOC) to drive 3-phase permanent magnet synchronous surface-mounted motors (SM-PMSM) and internally mounted motors (I-PMSM). The latest version 3.1 of the STM32 PMSM FOC development tool kit includes the STM32F-2 microcontroller and is expected to be available in July 2011.
The STM32 PMSM FOC Development Tool Kit can be used to quickly evaluate various applications and complete application platforms of STM32 microcontrollers. When developing motor control algorithms running on ST microcontrollers, this set of development tools helps to shorten the application development cycle. The source code of the PMSM FOC firmware is in C language, which implements the motor control core algorithm (reference frame conversion, current adjustment, speed adjustment, space vector modulation, energy efficiency optimization) as well as sensor detection algorithm, decoding algorithm (3 parallel resistors, ST patented single DC link parallel resistor, isolated current sensor, incremental encoder, Hall sensor) and rotor position reconstruction sensorless algorithm.
In order to let everyone understand the excellent computing performance of STM32F-2, we have done a performance test. In a sensorless configuration using two parallel resistors to detect motor current, one STM32F-2 is used to drive two PMSM motors. According to the standard dual vector control performance (FOC algorithm running at 10kHz), the CPU load is within 35%; according to the advanced dual vector control performance (FOC algorithm running at 16kHz), the CPU load is within 50%. These performances open up a wide range of application space for STM32F-2 series microcontrollers in the field of factory automation.
Conclusion
The demanding industrial communication protocol software stack can obviously make full use of the superior performance of the STM32F-2 series microcontrollers over its peers. When executing high-performance application software and algorithms, the STM32F-2 performs more than twice as fast as the previous generation STM32F-1.
The STM32-F2 series has been verified by customers and is currently increasing production. Most firmware and protocol stacks are already available, and those that are not available are also ready for release this summer. The upgraded products of the STM32-F2 series are currently in the design stage. The new generation of products includes microcontrollers based on the Cortex-M4 core, which can better support applications that require digital signal processors.
Previous article:Design of smart home monitoring prototype system
Next article:Online ARM simulator knowledge--essential for embedded system designers
Recommended ReadingLatest update time:2024-11-16 20:22
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- A comprehensive look at the entire family of MSP430 microcontrollers
- CircuitPython upgraded to 5.2.0
- TI shared power bank design experience sharing, if you like it, please read it
- Installation and sound source localization algorithm of a diamond microphone array
- How to start the design of adjustable voltage regulated power supply application
- Has anyone used the AT32F403 microcontroller? Is there any example program or something?
- A detail of MSP430 interrupt
- The upper limit for each mobile phone is US$2.5. How much 5G patent fees can Huawei collect?
- Schematic diagram of one-input and eight-output terminal block
- IEEE Top Programming Language Rankings 2021