Question
USART INTERRUPT STRING READ ISSUE
Posted on March 06, 2017 at 14:21
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
#usart-string-receive-interrupt #stm32f103cb-usart