[ARM] STM32_Systick 사용 버튼 LED 동작
ARM/기타2024. 5. 9. 00:10[ARM] STM32_Systick 사용 버튼 LED 동작

내부 클럭(HSI) : 불안정 → Clock 주기가 외부의 영향으로 변할 수 있음외부 클럭(HSE) : 안정적 → 정확한 시간을 재야할 때 사용  전체 코드https://github.com/k1minseok/STM32_ButtonLED_0423 GitHub - k1minseok/STM32_ButtonPush_LEDON_0423Contribute to k1minseok/STM32_ButtonPush_LEDON_0423 development by creating an account on GitHub.github.com→ delay 함수를 사용하지 않음(non-blocking 방식 / delay 사용 : blocking 동작 방식)  static uint32_t prevTime = 0; uint32_t cur..

[ARM] STM32_버튼 이용 LED 조작
ARM/기타2024. 5. 9. 00:06[ARM] STM32_버튼 이용 LED 조작

더보기typedef struct{ volatile unsigned int MODER; volatile unsigned int OTYPER; volatile unsigned int OSPEEDR; volatile unsigned int PUPDR; volatile unsigned int IDR; volatile unsigned int ODR; volatile unsigned int BSRR; volatile unsigned int LCKR; volatile unsigned int AFRL; volatile unsigned int AFRH;}GPIO_TypeDef;#define AHB1_BASE 0x40020000#define RCC_BASE (AHB1_BASE + 0x3800)#define ..

image