-
STM32F103C6 기본 입출력 속도Arduino, nRF52, STM32, ESP32 2022. 5. 5. 16:39
아두이노 IDE 를 사용하여 STM32F103C6 보드의 기본 IO 속도를 측정해 본다.
기본 Blink 소스를 사용하되 delay 함수 없이 바로 ON/OFF 를 반복하게 하고 시간 간격을 오실로스코프로 측정한다.
아두이노 IDE 이용한 기본 소스
void setup() { pinMode(PC13, OUTPUT); } void loop() { digitalWrite(PC13, HIGH); // turn the LED on (HIGH is the voltage level) digitalWrite(PC13, LOW); // turn the LED off by making the voltage LOW }
기본소스는 delay 없는 blink 이고 이때의 오실로스코트 기록은 다음과 같다.
코드의 기본 구조는
- 반복
- PC13 - HIGH
- PC13- LOW
이고, 이때의 시간은 830 nS + 690 ns 가 된다. 즉 PC13 포트에 HIGH, LOW 를 주는 시간은 690 ns * 2 이고, 기타 처리 시간이 140 ns 가 된다.
다음번 실험은 digitalWrite() 가 아닌 STM32 에서 바로 IO 를 다루는 방법으로 실험해볼 예정이다.
실험결과
STM32F103C6 보드에서 아두이노 IDE 에서 digitalWrite() 함수를 사용한 결과
포트에 HIGH, LOW 를 출력하는 시간은 690ns 로 확인됨
'Arduino, nRF52, STM32, ESP32' 카테고리의 다른 글
Cirkit Designer (0) 2024.08.13 MultiFunctionShield 다기능실드 라이브러리 (0) 2022.08.08 로직 아날라이저 사용방법 (0) 2022.05.26 STM32F103C6 사용법 (0) 2022.05.05 STM32 보드에 아두이노 IDE 를 사용하기 (0) 2022.04.25