STM32
-
STM32Cube Programmer 설치STM32 2022. 12. 29. 13:07
ST-LINK/V2 나 V3 등을 사용하여 flash에 program하는 프로그램 1. 설치 파일 찾기 - st.com 에서 stm32cubeprog 찾기. - List에 나온 것 click 하고 download 화면으로 이동. (https://www.st.com/en/development-tools/stm32cubeprog.html) - [Get Last] click 하여 최종 version 선택. 2. 다운로드와 설치하기 - Download 를 누르면 license agreement 확인하고 - 이름과 email 주소를 입력한다. - 적은 email 주소로 download link 가 전달되니까 email 주소는 정확하게 해야됨. - Download 받은 압축파일을 풀어서 실행하면 설치 완료.
-
STM32CubeIDE 설치STM32 2022. 12. 29. 12:58
1. 설치 파일 찾기 - st.com 에서 stm32cubeide 로 찾기해서 나온 것 click. (https://www.st.com/en/development-tools/stm32cubeide.html) - STM32CubeIDE-Win 에서 version 선택. - 잘 모를 경우에는 마지막 버젼으로. 2. 다운로드와 설치하기 - Download 를 누르면 license agreement 확인하고 - 이름과 email 주소를 입력한다. - 적은 email 주소로 download link 가 전달되니까 email 주소는 정확하게 해야됨. - Download 받은 압축파일을 풀어서 실행하면 설치 완료.
-
SWV로 printf 나오게 하기. (STM32CubeIDE 사용)STM32 2021. 11. 29. 15:41
0. Hardware에서 TRACESWO를 ST-Link에 연결. 1. Trace and Debug 에서 "Trace Asynchronous Sw"를 선택. 2. main.c 에 다음 내용을 추가. int __io_putchar(int ch) { ITM_SendChar((uint8_t)ch); return ch; } int _write(int32_t file, uint8_t *ptr, int32_t len) { /* Implement your write code here, this is used by puts and printf for example */ /* return len; */ int i; for(i=0; i
-
USART 레지스터 ISRSTM32 2021. 9. 29. 04:34
Interrupt and status register (USART_ISR) Bit 19 RWU: Receiver wakeup from Mute mode Bit 18 SBKF: Send break flag Bit 17 CMF: Character match flag Bit 16 BUSY: Busy flag Bit 15 ABRF: Auto baud rate flag Bit 14 ABRE: Auto baud rate error Bit 11 RTOF: Receiver timeout Bit 10 CTS: CTS flag Bit 9 CTSIF: CTS interrupt flag Bit 7 TXE: Transmit data register empty Bit 6 TC: Transmission complete Bit 5 ..
-
USART 레지스터 CR3STM32 2021. 9. 29. 04:25
Control register 3 (USART_CR3) Bit 15 DEP: Driver enable polarity selection Bit 14 DEM: Driver enable mode Bit 13 DDRE: DMA Disable on Reception Error Bit 12 OVRDIS: Overrun Disable Bit 11 ONEBIT: One sample bit method enable 0: Three sample bit method 1: One sample bit method Bit 10 CTSIE: CTS interrupt enable Bit 9 CTSE: CTS enable Bit 8 RTSE: RTS enable Bit 7 DMAT: DMA enable transmitter Bit..
-
UASRT 레지스터 CR2STM32 2021. 9. 29. 04:20
Control register 2 (USART_CR2) Bits 31:28 ADD[7:4]: Address of the USART node Bits 27:24 ADD[3:0]: Address of the USART node Bit 23 RTOEN: Receiver timeout enable Bits 22:21 ABRMOD[1:0]: Auto baud rate mode 00: Measurement of the start bit is used to detect the baud rate. 01: Falling edge to falling edge measurement. 10: 0x7F frame detection. 11: 0x55 frame detection Bit 20 ABREN: Auto baud rate..
-
USART 레지스터 CR1STM32 2021. 9. 29. 04:13
Control register 1 (USART_CR1) Bits 31:29 Reserved, must be kept at reset value Bit 28 M1: Word length M[1:0] = 00: 1 Start bit, 8 data bits, n stop bits M[1:0] = 01: 1 Start bit, 9 data bits, n stop bits M[1:0] = 10: 1 Start bit, 7 data bits, n stop bits This bit can only be written when the USART is disabled (UE=0). Bit 27 Reserved, must be kept at reset value Bit 26 RTOIE: Receiver timeout in..