AnsweredAssumed Answered

USART INTERRUPT STRING READ ISSUE

Question asked by David.Don on Mar 6, 2017
Latest reply on May 29, 2017 by blake.tony

Hi All,

 

I am working on STM32f103 CB and i am trying to read the RFID tag EM18 using USART1.Whenever the card is waved  on the Reader, i will receive a interrupt on USART receive pin PA10. Can anybody tell how to copy the received tag in the uart interrupt handler. I am able to copy only the first byte. i want to copy the entire 12 byte in the UART receive interrupt handler .

 

Below is my code snippet to read the RFID TAG

 

void USART1_IRQHandler(void)
{
    u8 i;
    char *t;
    RxBuffer[12] ='/0';
    
    {
  if(USART_GetITStatus(USART1, USART_IT_RXNE) != RESET)
         
     
      /* Read one byte from the receive data register */
        for(i=0;i<12;i++)

 

        {    
      *t  = (USART_ReceiveData(USART1) & 0xFF);  
        
    RxBuffer[i] =*t++;    
        }
            
//        USART1_TX_Byte(RxBuffer[WriteDataCounter]);
        //Uart3Timeout = 10000;
        
    
        
    }
    
    USART_ClearITPendingBit(USART1, USART_IT_RXNE);    
}
 

 

 

 

Can anybody tell how to implement this

 

 

 

Kind Regards

Don

Outcomes