FW

DMA

DMA Exercises : GPIO Polling and Interrupt DMA를 사용하기 위한 절차는 다음과 같다. ① Polling mode polling mode에서는 ② Interrupt mode Interrupt mode에서는 LED Toggling using DMA 다음은 Bus matrix…

Read more

CAN

Controller Area Network (CAN) Fundamentals 이번 장에서는 CAN의 다음과 같은 내용들을 다룬다. CAN protocol의 개요 CAN의 특징 MCU의 Single-ended 신호 CAN_Tx, CAN_Rx은 바로 CAN bus에 연결할 수 없는데, CAN Bus에…

Read more

Timers

Timer에 대한 기본적인 설명 Count값이 설정한 최대값에서 0으로 다시 돌아올 때, Update event가 발생한다. Update event는 Timer Interrupt를 발생시키는데 사용할 수 있다. Timer의 종류와 기능 STM32의 Timer에는 3가지 종류가 있다.…

Read more

Clocks and PLL Programming

SYSCLK (System Clock) ystem Clock은 HSI 오실레이터, HSE 오실레이터, PLL로부터 얻을 수 있다. LSI/LSE Clock은 RTC나 Watchdog 등에 사용된다. 별도의 Clock을 설정하지 않으면, HSI(16MHz)가 System Clock source로 사용된다. 다음은 HSI를…

Read more

Understanding STM32 HAL program flow with UART exercise

“UART를 예시로 STM32 HAL Program Flow를 알아보자.” CubeMx에서 UART2를 Asynchronous로 설정하고 프로젝트를 생성한다. 우리는 바닥에서부터 프로그램을 작성할 것이기 때문에, 생성된 프로젝트의 Src 폴더에서 ‘msp.c’와 ‘it.c’ 를 delete하고 새로 만든다. 그리고…

Read more

STM32 HAL and Project Architecture

STM32 Cube 프로젝트 아키텍쳐의 개요 HAL layer는 다양한 peripheral들에 대한 APIs를 제공한다. CMSIS-Core layer는 Processor 내부의 peripheral register에 접근할 수 있는 APIs를 제공한다. (NVIC, SysTick, MPU, SCB) HAL driver를 사용하는…

Read more

ARM Cortex-M Processor – UART

UART UART와 USART UART는 Asynchronous mode만 지원하고, USART는 Asynchronous mode와 Synchronous mode 모두를 지원한다. Synchronous transmission의 경우에 Clock은 data stream과 분리되어 있고, Start/Stop bit는 사용되지 않는다. Asynchronous transmission의 경우에 Clock은…

Read more

ARM Cortex-M Processor – I2C

I2C I2C Introduction I2C는 SPI 보다 상당히 복잡한 통신 프로토콜이다. I2C의 Specification은 NXP에서 디자인하였다. (global spec) SPI는 Spec이 각각 따로 논다. I2C는 multi-master 가능하다. SPI는 multi-master에 대한 guide line이 없어서,…

Read more

ARM Cortex-M Processor – SPI

SPI (Serial Peripheral Interface) SPI (Serial Peripheral Interface) Maximum speed, typical use, maximum distance of various communication protocols 거리가 가까운 주변장치들(MCU<->Flash memory, Display, SRAM, etc.)과 통신할 때는 SPI/I2C를 사용하지만 거리가…

Read more