cancel
Showing results for 
Search instead for 
Did you mean: 

Is this the bug?

hukhongcongtu26111993
Associate II
Posted on December 04, 2017 at 03:51

  • I use STM32 Cube to config USART2 to transmit data to computer. I don't enable USART2 Interrupt. I use DMA for USART2 Tx only (DMA1 Stream 6).

uint8_t Data_to_send[5000];

__IO uint8_t Probe=0;

int main(void)

{

HAL_Init();

SystemClock_Config();

MX_GPIO_Init();

MX_DMA_Init();

MX_USART2_UART_Init();

HAL_UART_Transmit_DMA(&huart2,Data_to_send,5000);

while (1)

{

}

}

and I use two callback function :

void HAL_UART_TxHalfCpltCallback(UART_HandleTypeDef *huart)

{

Probe=1;

}

void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart)

{

Probe=2;

}

I observe Probe variable. It never is 2. This mean is 

HAL_UART_TxCpltCallback() never implement. 

I don't know does this is the bug? 

#stm32cube-hal
0 REPLIES 0