USART3 Interrupt not being fired
Hey guys,
I'm using a serial terminal to communicate with USART3 on an STM32F1 via an FTDI USB-UART converter cable. I am successfully receiving data from USART3 in my serial terminal but when I try to send data to it the RX interrupt I have configured is not being fired. Here is my code:
void USART3_IRQHandler(void)
{ if(USART_GetITStatus(USART3, USART_IT_RXNE) != RESET){ // Read one byte from data register RxBuffer[RxCounter++] = USART_ReceiveData(USART3); if(RxCounter == 15){ // Disable interrupt USART_ITConfig(USART3, USART_IT_RXNE, DISABLE); } }}
, where RxBuffer is a u8 array[16] and RxCounter is u8 initially set to zero. I have configured USART3 like so:
USART_ITConfig(USART3, USART_IT_RXNE, ENABLE);
I'm using RealTerm as my serial terminal and can see that the TXD status light goes yellow when I type in some characters and click 'Send ASCII', i.e. the transmission is good. I've also checked the RXNE flag and it is not being set.
Can anyone help me with this? Have I left out some code?
Cheers,
Tony
#usart3 #stm32f1 #no-interrupt