Interrupt doesn't work when UART received on STM32F469I DISCO.
I configured the UART: huart6. I set the global interrupt and I use touchgfx designer (so RTOS as well), maybe that is the reason I can't set the preemption priority lower than 5 for the UART interrupt. The problem is that I can send messages to ESP8266, but I can't receive the messages from the ESP... Here is the code form the interrupt uart receiving and the callback function:
/* USER CODE BEGIN 2 */
HAL_UART_Receive_IT(&huart6, buff_Rx, 13);
/* USER CODE END 2 */
.
.
.
/* USER CODE BEGIN 4 */
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
CpltDone = 1;
HAL_UART_Receive_IT(&huart6, buff_Rx, 13);
HAL_GPIO_WritePin(GPIOG, GPIO_PIN_11, GPIO_PIN_RESET);
}
/* USER CODE END 4 */
If I put a breakpoint into the callback function the code never stops and if I use breakpoint at another place I can't see values in "buff_Rx" buffer. I examined the line with logic analyzer and the values are correct on the line... but I never get them...
What can be the problem?
- ESP IO voltage is 3v3 and the STM's Arduino compatible pins are 5V and that could be the reason?? (but if I use the SPI communication it works well..)
- Or the problem is the priority of UART interrupt?
- Or something else?
Can anybody help me?
Thanks a lot!