본문 바로가기

baremetal_stm32_f411

(7)
SysTick 시간기기(timer) (2/2), 1초 이상 SysTick 시간기기(timer) 편 강의 입니다. 전체 보기 : https://makershackers.tistory.com/tag/baremetal_stm32_f411 전체 보기 : https://makershackers.tistory.com/tag/baremetal_stm32_f411 tick ① 째깍거리다, 똑딱거리다 ② 똑딱거리는 소리, 재깍거리는 소리 timing ① 시기 선택, 속도를 맞추는, 적절한 시기를 찾아내는 기술, 시간을 잘 맞춤 ② 박자, 박자 감각 time 어떤 시각에서 어떤 시각까지의 사이 #include "stm32f4xx.h" void delay_milliseconds_using_system_tick(int mills); int main (void) { (*RCC).AHB..
SysTick 시간기기(timer) (1/2) 전체 보기 : https://makershackers.tistory.com/tag/baremetal_stm32_f411 아가야 물한잔만 가져오렴!! tick ① 째깍거리다, 똑딱거리다 ② 똑딱거리는 소리, 재깍거리는 소리 timing ① 시기 선택, 속도를 맞추는, 적절한 시기를 찾아내는 기술, 시간을 잘 맞춤 ② 박자, 박자 감각 time 어떤 시각에서 어떤 시각까지의 사이 Time, 우리는 이렇게 저렇게 시간을 재려고 노력해왔습니다. 이런것이 대표적인 시간을 재는 것이었죠. 그런데 시간의 결정적인 변화는 이런 발견에서 확 바뀌게 되었죠. 아래와 같은 주기적으로 떨리는 현상을 발견하게 되죠. 그때 사용된 것이 크리스탈이었습니다. 나중에 이렇게 확인할 수 있죠. SysTick 시간기기(계시기, timer..
Text LCD, Baremetal, STM32F103 전체 보기 : https://makershackers.tistory.com/tag/baremetal_stm32_f411 // PB0 - PB7 --> D0 - D7 // PA5 5번핀 -> Register_Select, PA7 7번핀 -> Enable_Func // RW, GROUND // ==== GPIO 박자계의 초기화 ==== // GPIOA, GPIOB 박자계(clock)의 설정 -- RCC_APB2ENR 2번핀, 3번핀 // GPIOB 0번에서 7번까지를 출력으로, GPIOA의 5번, 7번을 출력으로 설정 #include #include "stm32f1xx.h" #define Register_Select 0x0020; // RS pin GPIOA 5번핀 (0010 0000) #define Ena..
Nucleo-F103RB 내장 LED 깜빡이기 - BSRR 전체 보기 : https://makershackers.tistory.com/tag/baremetal_stm32_f411 #include "stm32f1xx.h" void DelayMilliseconds (int delay); int main(void) { RCC->APB2ENR |= 4; // user guide 66p, 내장LED PA5, data sheet 11p GPIOA->CRL &= 0xFF0FFFFF; // ref. 159p, 171p Reset value: 0x4444 4444 여서 필요부분만 0으로 초기화 함 GPIOA->CRL |= 0x00300000; // ref. 159p, 171p, 1~3은 Hz의 차이만 남 01-10, 10-2, 11-50 MHz while (1) { GPIOA ..
Nucleo-F411RE 내장 LED 깜빡이기 - BSRR 전체 보기 : https://makershackers.tistory.com/tag/baremetal_stm32_f411 #include "stm32f4xx.h" void DelayMilliseconds (int delay); int main(void) { RCC->AHB1ENR |= 1; GPIOA-> MODER |= 0x400; while (1) { GPIOA -> BSRR |= 0x20; // GPIOA -> ODR |= 0x20; // set PA5 high DelayMilliseconds(100); GPIOA -> BSRR = 0x00200000; // 0b 00000 0000 0010 0000 0000 0000 0000 0000 DelayMilliseconds(100); } } // Taking..
Nucleo-F411RE 내장 LED 깜빡이기 전체 보기 : https://makershackers.tistory.com/tag/baremetal_stm32_f411 #include "stm32f4xx.h" void DelayMilliseconds (int delay); int main(void) { RCC->AHB1ENR |= 1; GPIOA-> MODER |= 0x400; while (1) { GPIOA -> ODR |= 0x20; DelayMilliseconds(100); GPIOA -> ODR &=~0x20; DelayMilliseconds(100); } } void DelayMilliseconds (int delay) { int i; for(;delay>0;delay--) { for (i=0;i
Nucleo-F103RB 내장 LED 깜빡이기 전체 보기 : https://makershackers.tistory.com/tag/baremetal_stm32_f411 #include "stm32f1xx.h" void DelayMilliseconds (int delay); int main(void) { RCC->APB2ENR |= 4; // user guide 66p, 내장LED PA5, data sheet 11p GPIOA->CRL &= 0xFF0FFFFF; // ref. 159p, 171p Reset value: 0x4444 4444 여서 필요부분만 0으로 초기화 함 GPIOA->CRL |= 0x00300000; // ref. 159p, 171p, 1~3은 Hz의 차이만 남 01-10, 10-2, 11-50 MHz while (1) { GPIOA ..