2020-12-16 05:27 AM
I am implementing the conversion complete callback function for the ADC and am trying to send a message over UART when this completes. However, it does not seem to want to work. I have independently verified that both the callback function is being called and the send_message function works correctly. I am using the CubeIDE to generate code for me. Take a look at the code below
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
{
send_message((uint8_t*)"Hello there");
}
void send_message(uint8_t* message)
{
HAL_UART_Transmit(&huart1, message, strlen((char*)message), 1000);
}
Any help is much appreciated. Thanks