Enabling Interrupt for UART stops HAL_Delay
Hi everyone,
I'm new to the ST world so I apologise if I am asking a simple question.
I have a NUCLEO-L4R5ZI-P, I made a new project and cleared the pin outs and started fresh.
I have enabled USART2 and can send and receive data in polling mode.
If I go back into the Device Configuration Tool and enable USART2 Global Interrupt, then go to the NVIC settings and give it a lower priority than the "Timebase: System Tick Timer" everything stops working.
The uwTick variable no longer increments and so the following code hangs on HAL_Delay.
uint8_t data[10];
uint8_t data2[] = "Hello, World!\r\n";
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
HAL_Delay(1000);
HAL_UART_Transmit (&huart2, data2, sizeof (data2), 1000);
HAL_UART_Receive(&huart2, data, sizeof (data), 1000);
}
/* USER CODE END 3 */
}Does anyone have any ideas why just enabling interrupts breaks this?
Cheers,
James
