Question
STM32Cube UART1 receive interrupt issues: Interrupt handler not linked (using IAR)
Posted on September 18, 2014 at 18:08
Hello Friends,
Can you please advise me on an issue (which is most likely to be due to an error I am making). Using STM32Cube version 4.3.1, I put together a project for a Cortex M4 that will use USART1 in asynchronous bidirectional mode. I am using IAR (not that that should matter but just in case). I am able to send strings of data out of UART using the HAL_UART_Transmit() function, no problems. However I want to obtain and process an interrupt every time a single character gets received by the UART. (I have my own input string handler.) To move in this direction, I added a line of code to USART1_IRQHandler() as follows: void USART1_IRQHandler(void) { HAL_NVIC_ClearPendingIRQ(USART1_IRQn); HAL_UART_IRQHandler(&huart1); cin = huart1.Instance->DR & 0x00FF; // this is a uint8_t declared elsewhere } I will eventually do something else. Well, that interrupt never gets generated when I send data to the processor. More telling though, when I try to set a breakpoint withint he USART1_IRQHandler() function, I am unable to do so. I can set a breakpoint in SysTick_Handler() so I know that file is being included. In the STM32Cube project under the Configuration tab, I did configure the USART1 so that USART1 global interrupt is enabled. The Preemption Priority and Sub Priority are both set to zero. When I click on the NVIC button, I see again that USART1 global interrupt is enabled. Thank You for reading this. GeofEdit: I modified the title of this thread to clarify it's contents. #stm32cube-working-now?