cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_UART_TxHalfCpltCallback works, but HAL_UART_TxCpltCallback is never triggered

TMich.1
Associate III

I'm using an STM32 H7 and CubeIDE, 

As the title states, When placing a breakpoint at HAL_UART_TxHalfCpltCallback, it is triggered.

But when placing it at HAL_UART_TxCpltCallback it is never triggered, it used to work, but I don't know where it went wrong. Is there a setting for this in Cube IDE? 

I don't use the halfcplt function, but it was now just added to search for the error.

I'm using normal DMA at highest priority. (I'm running multiple uart's and SAI with DMA)

 

void sendGPSdata(){
	if(1){//gps_out[gpsoutpointer-gps_data_size+15] =='A'){
		uart_tx_state = 1;
		set_header(gps_data_size,gps);
		set_payload(gps);
		set_footer(gps);
		HAL_UART_Transmit_DMA(&huart4,&uart_out[0],GPS_packet_size);
	}
	gps_data_behind--;
}

void HAL_UART_TxHalfCpltCallback(UART_HandleTypeDef *uart){
	if(uart == &huart4){
			//4g
	}
}
void HAL_UART_TxCpltCallback(UART_HandleTypeDef *uart){
	if(uart == &huart4){
		//4g

		uart_tx_state = 0;
		if(audio_to_uart_data_behind>=1){
			send_audio();
		}
		else if(gps_data_behind >=1) sendGPSdata();
		else if(can_data_behind >=1) sendCANdata();
	}
	else if(uart == &huart3){
		//BLE1
	}
	else if(uart == &huart7){
		//BLE2
	}
}

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
TMich.1
Associate III

It turned out I forgot to check the UART global interrupt checkbox.

View solution in original post

1 REPLY 1
TMich.1
Associate III

It turned out I forgot to check the UART global interrupt checkbox.