Question
I have a button connected to STM32F405. I am using external interrupt with the button. Inside the callback of the external interrupt I am sending a command to retrieve some data from another microcontroller as a loop. But I am receving only data once
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
if(GPIO_Pin == GPIO_PIN_10)
{
for(volatile int j = 0; j<3000; j++)
{
char Txbuffer = "Read\n";
HAL_UART_Transmit_IT(&huart2, (uint8_t*)Txbuffer, strlen(Txbuffer));
for(volatile int i = 0; i < 1000; i++);
HAL_UART_Receive_IT(&huart2, Rxbuffer, 30);
for(volatile int i =0; i<1000; i++);
}
}
}