Development of typical "state" software patterns for Cortex­M microcontrollers in real time

Authors

DOI:

https://doi.org/10.15587/1729-4061.2020.205377

Keywords:

real time, master controller, finite state machine, Cortex-M microcontroller, State design pattern

Abstract

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.

Author Biographies

Pavlo Katin, National Technical University of Ukraine "Igor Sikorsky Kyiv Polytechnic Institute" Peremohy ave., 37, Kyiv, Ukraine, 03056

PhD, Associate Professor

Department of Automation and Control in Technical Systems

Viacheslav Chmelov, National Technical University of Ukraine "Igor Sikorsky Kyiv Polytechnic Institute" Peremohy ave., 37, Kyiv, Ukraine, 03056

PhD, Associate Professor

Department of Radio Engineering Devices and Systems

Vladimir Shemaev, National Technical University of Ukraine "Igor Sikorsky Kyiv Polytechnic Institute" Peremohy ave., 37, Kyiv, Ukraine, 03056

Doctor Military Sciences, Professor

Department of Automation and Control in Technical Systems

References

  1. Real Time Operating Systems Lecture (2001). MIT. Available at: http://web.mit.edu/16.070/www/year2001/RTOS27.pdf
  2. Real Time Operating Systems. Part II (2001). MIT. Available at: http://web.mit.edu/16.070/www/year2001/RTOS28.pdf
  3. 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
  4. 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
  5. Execution time analysis. Rapita Systems. Available at: https://www.rapitasystems.com/products/features/execution-time-analysis
  6. 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
  7. 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.
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. Bloh, A. Sh. (1975). Graf shemy i ih primenenie. Minsk: Visheyshaya shkola, 294.

Downloads

Published

2020-06-30

How to Cite

Katin, P., Chmelov, V., & Shemaev, V. (2020). Development of typical "state" software patterns for Cortex­M microcontrollers in real time. Eastern-European Journal of Enterprise Technologies, 3(9 (105), 29–38. https://doi.org/10.15587/1729-4061.2020.205377

Issue

Section

Information and controlling system