Development of typical "state" software patterns for CortexM microcontrollers in real time
DOI:
https://doi.org/10.15587/1729-4061.2020.205377Keywords:
real time, master controller, finite state machine, Cortex-M microcontroller, State design patternAbstract
There are real-time technical systems that require high speed of software solutions. At the same time, it is necessary to ensure the unification of the source code, the quality of software maintenance, and mathematical modeling at a relatively low cost of software and hardware solution. Such hardware can be implemented on the basis of mass microcontrollers of the Cortex-M architecture.
The software part of these microcontrollers data could be implemented on the basis of a real-time operating system (RTOS). This study has found that the application of RTOS leads to a speed-related constraint. Simple software solutions are complex at unification, support, and have difficulties with mathematical modeling.
To address these shortcomings, typical State software patterns have been developed for an auxiliary controller within a circuit of controlling mechanisms or sensors based on the Cortex-M architecture microcontroller in real time, in a procedural paradigm. A feature of these patterns is the higher speed of the software solution compared to the solutions based on RTOS.
The developed patterns make it possible to unify the source code for the Cortex-M architecture microcontrollers from different manufacturers, improve maintenance, and adapt it to the mathematical model of the finite state machine.
The study results were tested using the STM32F103 microcontroller employing the Cortex microcontroller software interface system (CMSIS) library. This allows the result obtained to be extended to MCs made by other manufacturers, which ensures the practical value of the developed patterns.
References
- Real Time Operating Systems Lecture (2001). MIT. Available at: http://web.mit.edu/16.070/www/year2001/RTOS27.pdf
- Real Time Operating Systems. Part II (2001). MIT. Available at: http://web.mit.edu/16.070/www/year2001/RTOS28.pdf
- Saini, P., Bansal, A., Sharma, A. (2015). Time Critical Multitasking For Multicore Microcontroller Using Xmos® Kit. International Journal of Embedded Systems and Applications, 5 (1), 01–18. doi: https://doi.org/10.5121/ijesa.2015.5101
- Sadgrove, M. (2011). Microcontroller interrupts for flexible control of time critical tasks in experiments with laser cooled atoms. Available at: https://arxiv.org/pdf/1104.0064.pdf
- Execution time analysis. Rapita Systems. Available at: https://www.rapitasystems.com/products/features/execution-time-analysis
- Chen, Z., Chen, J., Zhou, S. (2019). Embedded electronic scale measuring system based on STM32 single chip microcomputer. 2019 Chinese Automation Congress (CAC). doi: https://doi.org/10.1109/cac48633.2019.8997317
- Bessmertnyy, R. S., Katin, P. Y. (2019). Use of high-performance microcontroller for improving economic efficiency of jem production. Standartyzatsiya. Sertyfikatsiya. Yakist, 3 (115), 69–77.
- Zhu, W., Wang, Z., Zhang, Z. (2020). Renovation of Automation System Based on Industrial Internet of Things: A Case Study of a Sewage Treatment Plant. Sensors, 20 (8), 2175. doi: https://doi.org/10.3390/s20082175
- Kasthuri Arachchi, S. P., Shih, T. K., Hakim, N. L. (2020). Modelling a Spatial-Motion Deep Learning Framework to Classify Dynamic Patterns of Videos. Applied Sciences, 10 (4), 1479. doi: https://doi.org/10.3390/app10041479
- Gamma, E., Helm, R., Johnson, R., Vlissides, J., Booch, G. (1994). Design Patterns: Elements of Reusable Object-Oriented Software. Published by Addison-Wesley Professional, 416. Available at: http://www.uml.org.cn/c++/pdf/DesignPatterns.pdf
- Katin, P. (2017). Development of variant of software architecture implementation for low-power general purpose microcontrollers by finite state machines. EUREKA: Physics and Engineering, 3, 49–54. doi: https://doi.org/10.21303/2461-4262.2017.00361
- Solodovnikov, A. (2016). Developing method for assessing functional complexity of software information system. EUREKA: Physics and Engineering, 5, 3–9. doi: https://doi.org/10.21303/2461-4262.2016.00157
- Dietrich, С., Hoffmann, M., Lohmann, D. (2015). Back to the Roots: Implementing the RTOS as a Specialized State Machine. The 11th Annual Workshop on Operating Systems Platforms for Embedded Real-Time Applications, 7–12. Available at: https://people.mpi-sws.org/~bbb/events/ospert15/pdf/ospert15-p7.pdf
- Beynon, W. M. (1980). On the structure of free finite state machines. Theoretical Computer Science, 11 (2), 167–180. doi: https://doi.org/10.1016/0304-3975(80)90044-4
- Adamczyk, P. The Anthology of the Finite State Machine Design Patterns. Available at: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.838&rep=rep1&type=pdf
- Andresen, K., Møller-Pedersen, B., Runde, R. K. (2015). Combined Modelling and Programming Support for Composite States and Extensible State Machines. Proceedings of the 3rd International Conference on Model-Driven Engineering and Software Development. doi: https://doi.org/10.5220/0005237302310238
- Prasanna, Ch. S. L., Venkateswara Rao, M. (2012). Implementation of a Scalable µC/OS-II Based Multitasking Monitoring System. International Journal of Computer Science And Technology, 3 (2), 86–89. Available at: http://ijcst.com/vol32/1/prasanna.pdf
- RM0008 Reference manual STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and STM32F107xx advanced Arm®-based 32-bit MCUs. Available at: https://www.st.com/resource/en/reference_manual/cd00171190-stm32f101xx-stm32f102xx-stm32f103xx-stm32f105xx-and-stm32f107xx-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf
- Bloh, A. Sh. (1975). Graf shemy i ih primenenie. Minsk: Visheyshaya shkola, 294.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2020 Pavlo Katin, Viacheslav Chmelov, Vladimir Shemaev
This work is licensed under a Creative Commons Attribution 4.0 International License.
The consolidation and conditions for the transfer of copyright (identification of authorship) is carried out in the License Agreement. In particular, the authors reserve the right to the authorship of their manuscript and transfer the first publication of this work to the journal under the terms of the Creative Commons CC BY license. At the same time, they have the right to conclude on their own additional agreements concerning the non-exclusive distribution of the work in the form in which it was published by this journal, but provided that the link to the first publication of the article in this journal is preserved.
A license agreement is a document in which the author warrants that he/she owns all copyright for the work (manuscript, article, etc.).
The authors, signing the License Agreement with TECHNOLOGY CENTER PC, have all rights to the further use of their work, provided that they link to our edition in which the work was published.
According to the terms of the License Agreement, the Publisher TECHNOLOGY CENTER PC does not take away your copyrights and receives permission from the authors to use and dissemination of the publication through the world's scientific resources (own electronic resources, scientometric databases, repositories, libraries, etc.).
In the absence of a signed License Agreement or in the absence of this agreement of identifiers allowing to identify the identity of the author, the editors have no right to work with the manuscript.
It is important to remember that there is another type of agreement between authors and publishers – when copyright is transferred from the authors to the publisher. In this case, the authors lose ownership of their work and may not use it in any way.