STM32CubeIDE의 경우 ioc 파일을 수정하면 코드를 재성성하는데
소스내의 헤더들도 당연히(?) 재생성 되니 계속 원복 되어서 분노 폭발(!)
열심히 뒤적여 보니 uart callback 관련해서는
stm32f1xx_hal_conf.h 의 아래 부분 설정은
/* ########################### System Configuration ######################### */
/**
* @brief This is the HAL system configuration section
*/
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
#define TICK_INT_PRIORITY 0U /*!< tick interrupt priority (lowest by default) */
#define USE_RTOS 0U
#define PREFETCH_ENABLE 1U
#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */
#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */
#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */
#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */
#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */
#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */
#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */
#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */
#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */
#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */
#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */
#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */
#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */
#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */
#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */
#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */
#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */
#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */
#define USE_HAL_UART_REGISTER_CALLBACKS 1U /* UART register callback enabled */
#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
STM32CubeIDE의 ioc / Project Manager - Advanced Settings - Register Callbacks
(오른쪽 구석탱이...)을 Enable로 바꾸어 주면 된다.
연관이 있는 링크인진 모르겠음 ㅋㅋ
+
나도 어느걸 보다가 저걸 발견했는진 모르겠다 -_-
소스 뒤적여서 추적하다가 발견한건가..
[링크 : https://mul-ku.tistory.com/entry/STM32-UART-수신-인터럽트-사용법-및-간단한-예제HAL-DRIVER]
[링크 : https://community.st.com/s/question/0D53W000000bRmkSAE/stm32-uart-call-back-function]
'embeded > Cortex-M3 STM' 카테고리의 다른 글
STM32 RDP(ReaD Protection) (0) | 2021.07.02 |
---|---|
stm32 uart echo (0) | 2021.02.04 |
STM32CubeIDE 주의사항(?) (0) | 2021.02.02 |
STM32F103 관련 용어 (0) | 2021.02.02 |
CMSIS for stm32 (0) | 2018.02.12 |