DOI QR코드

DOI QR Code

Clock Pulse Synchronization of MCU Timers in Embedded Systems

임베디드 시스템 MCU 타이머 클록 펄스 동기화

  • Lee, Hyung-Bong (Dept. of Computer Science & Engineering, Gangneung-Wonju National University) ;
  • Kwon, Ki-Hyeon (Dept. of Electronics, Information & Communication Engineering, Kangwon National University)
  • 이형봉 (강릉원주대학교 컴퓨터공학과) ;
  • 권기현 (강원대학교 전자정보통신공학부)
  • Received : 2013.05.21
  • Accepted : 2013.06.27
  • Published : 2013.07.31

Abstract

Most of the applications implemented in embedded systems use timers equipped in MCU. The purposes of timer usage of the applications lie in a wide range of areas such as implementing software timers of real-time operating systems to measuring processing time of sensors. The elapsed times measured by the applications are various in length as well as in precision ranging from several us to several hundreds of ms. The paper analyzes the timing error factors caused by un- synchronizing timer clock pulse when timers are manipulated, and proposes a method of how to synchronize timer clock pulse to reduce the timing errors. As a result of an experiment, this paper shows that an error of 230us is reduced within 10us in case of appling the proposed method to a 4096Hz timer prescaled from 32768Hz by 8.

임베디드 시스템에 구현되는 대부분의 어플리케이션들은 MCU가 제공하는 타이머를 사용한다. 타이머 사용의 목적은 실시간 운영체제의 소프트웨어 타이머 구현에서부터 센서의 워밍업이나 처리의 경과 시간 측정 등에 이르기까지 다양하다. 이들어플리케이션들이의시간측정은그길이뿐만아니라정밀도측면에서수us~수백ms 정도로 그 범위가 다양하다. 이 논문에서는 타이머를 활용하는 과정에서 클록 펄스 비동기화로 인해 발생할 수 있는 오차 요인을 분석하고, 이러한 오차를 감소시키기 위한 타이머 클록 펄스 동기화 방안을 제시한다. 실험 결과, 32768Hz의 타이머를 8 분주한 4096Hz 타이머의 경우 약 230us까지의 편차가 발생하지만, 제안된 방법을 적용하면 타이머로 인한 편차를 10us 이내로 유지할 수 있다.

Keywords

References

  1. SungHak Chung, "A Study on the Improvement Alternatives using USN Technology on Bicycle and Infrastructures", Journal of The Korea Society of Computer and Information, Vol. 15, No. 8, pp. 173-180, Aug. 2010. https://doi.org/10.9708/jksci.2010.15.8.173
  2. Hyung Bong Lee, Lae-Jeong Park, Jung-Ho Moon, Tae-Yun Chung, "Design and Implementation of a TDMA-based Bidirectional Linear Wireless Sensor Network", Journal of KIISE : Computing Practices and Letters, Vol. 14, No. 4, pp. 341-351, Jun. 2008.
  3. Hyung-Bong Lee, Jung-Ho Moon, and Tae-Yun Chung, "An Image-based Remote Snow Height Measurement System using a USN", Journal of IEMEK, Vol 2, No. 2, pp. 76-85, Nov. 2010.
  4. C. Hallinan, "Embedded Linux Primer, Second Edition" PRENTICE HALL, pp. 9-35, 2011.
  5. Hyung-Bong Lee, Ki-Hyeon Kwon, Lae-Jeong Park, Tae-Yun Chung, and Qishi Wuo, "A Lightweight Lap Time Measurement System for Alpine Ski Sport using a TDMA-based Linear-Wireless Sensor Network", International Journal of Distributed Sensor Network(IJDSN), Vol. 2012, pp. 1-15, Mar. 2012.
  6. Hyung-Bong Lee, Lae-Jeong Park, Sung-Wook Park, Tae-Yun Chung, and Jung-Ho Moon, "Interactive Remote Control of Legacy Home Appliances through a Virtually Wired Sensor Network", IEEE Transactions on Consumer Electronics, Vol. 56, Issue 4, pp. 2241-2248, Dec. 2010. https://doi.org/10.1109/TCE.2010.5681096
  7. Hyung-Bong Lee, "Synchronization of Timers in Embedded Systems", Proceedings of the 39th KIPS Spring Conference 2013, Vol. 20, No. 1, pp. 13-14, May 2013.
  8. Atmel Corporation, "8-bit Microcontroller with 64K/128K/256K Bytes In-System Programmable Flash", Atmel Documents, 2012. (http://www.atmel.com/Images/doc2549.pdf, accessed May. 2013)
  9. WinAvr Projects, http://winavr.sourceforge.net/, accessed May 2013.
  10. Atmel Corporation, "AVR Studio 4.19", Atmel Tools, 2012. (http://www.atmel.com/tools/STUDIOARCHIVE.aspx, accessed May. 2013)