diff --git a/board/ALIENTEK_EXPLORER_STM32F407ZGT6/BSP/Src/stm32f4xx_it.c b/board/ALIENTEK_EXPLORER_STM32F407ZGT6/BSP/Src/stm32f4xx_it.c
index b003ac77..9a6afb45 100644
--- a/board/ALIENTEK_EXPLORER_STM32F407ZGT6/BSP/Src/stm32f4xx_it.c
+++ b/board/ALIENTEK_EXPLORER_STM32F407ZGT6/BSP/Src/stm32f4xx_it.c
@@ -236,13 +236,13 @@ void USART2_IRQHandler(void)
/* USER CODE END USART2_IRQn 1 */
- /* USER CODE BEGIN USART1_IRQn 0 */
+ /* USER CODE BEGIN USART1_IRQn 0 */
uint8_t tmp;
if(__HAL_UART_GET_FLAG(&huart2,UART_FLAG_PE))//???????
{
HAL_UART_Receive(&huart2,&tmp,1,1);
}
-
+ #if defined (USE_MODBUS)
else if(__HAL_UART_GET_FLAG(&huart2,UART_FLAG_RXNE)&&__HAL_UART_GET_IT_SOURCE(&huart2,UART_IT_RXNE))
{
prvvUARTRxISR();
@@ -253,6 +253,7 @@ void USART2_IRQHandler(void)
prvvUARTTxReadyISR();
}
+ #endif /* USE_MODBUS */
}
/**
@@ -275,7 +276,9 @@ void USART3_IRQHandler(void)
void TIM6_DAC_IRQHandler(void)
{
/* USER CODE BEGIN TIM6_DAC_IRQn 0 */
- prvvTIMERExpiredISR();
+ #if defined (USE_MODBUS)
+ prvvTIMERExpiredISR();
+ #endif/* USE_MODBUS */
/* USER CODE END TIM6_DAC_IRQn 0 */
HAL_TIM_IRQHandler(&htim6);
/* USER CODE BEGIN TIM6_DAC_IRQn 1 */
diff --git a/board/ALIENTEK_EXPLORER_STM32F407ZGT6/KEIL/modbus/ALIENTEK_EXPLORER_STM32F407ZGT6.uvprojx b/board/ALIENTEK_EXPLORER_STM32F407ZGT6/KEIL/modbus/ALIENTEK_EXPLORER_STM32F407ZGT6.uvprojx
index a325a930..b6d05544 100644
--- a/board/ALIENTEK_EXPLORER_STM32F407ZGT6/KEIL/modbus/ALIENTEK_EXPLORER_STM32F407ZGT6.uvprojx
+++ b/board/ALIENTEK_EXPLORER_STM32F407ZGT6/KEIL/modbus/ALIENTEK_EXPLORER_STM32F407ZGT6.uvprojx
@@ -336,7 +336,7 @@
0
- USE_HAL_DRIVER,STM32F407xx,USE_HAL_DRIVER,STM32F407xx
+ USE_HAL_DRIVER,STM32F407xx,USE_HAL_DRIVER,STM32F407xx,USE_MODBUS
..\..\BSP\Inc;..\..\..\..\platform\vendor_bsp\st\STM32F4xx_HAL_Driver\Inc;..\..\..\..\platform\vendor_bsp\st\STM32F4xx_HAL_Driver\Inc\Legacy;..\..\..\..\platform\vendor_bsp\st\CMSIS\Device\ST\STM32F4xx\Include;..\..\..\..\platform\vendor_bsp\st\CMSIS\Include;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\TOS_CONFIG;..\..\..\..\components\connectivity\Modbus\3rdparty\freemodbus-v1.6\modbus\ascii;..\..\..\..\components\connectivity\Modbus\3rdparty\freemodbus-v1.6\modbus\functions;..\..\..\..\components\connectivity\Modbus\3rdparty\freemodbus-v1.6\modbus\include;..\..\..\..\components\connectivity\Modbus\3rdparty\freemodbus-v1.6\modbus\rtu;..\..\..\..\components\connectivity\Modbus\3rdparty\freemodbus-v1.6\modbus\tcp;..\..\..\..\components\connectivity\Modbus\porting\TencentOS_Tiny