1. stm32CubeMx
2. 회로도
3. main.c
int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration----------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_TIM1_Init(); /* USER CODE BEGIN 2 */ HAL_TIM_OC_Start(&htim1,TIM_CHANNEL_1); /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ } /* USER CODE END 3 */ } |
4. 결과
3V->5V 로 레벨 시프트 되는 것을 볼 수 있다.
'공부 > STM32F4' 카테고리의 다른 글
7.[STM32F429] TFT LCD -LTDC 사용 (2) | 2019.04.19 |
---|---|
[TrueSTUDIO]#error "Define according the used Cortex core ARM_MATH_CM7, ARM_MATH_CM4, ARM_MATH_CM3, ARM_MATH_CM0PLUS or ARM_MATH_CM0" arm_math.h (0) | 2019.04.17 |
5.[stm32f429] HID USB Host - Mouse (1) | 2018.06.08 |
4.[stm32f429][hal] DAC 로 삼각파 만들기 (2) | 2018.03.08 |
3.[stm32f429][hal] USART1_인터럽트 (1) | 2018.03.07 |