Question
Need Clarification on USART's in STM32f0
Posted on June 03, 2015 at 09:16
Hello,
I working on USART in stm32f0-discovery board, in that USART keeps on sending a character 'c'..But i intended to write a code it sends the character 'c' whenever it receives 'a' ....Why it is happening like tat, my code isvoid usart_access(void){ unsigned char ab=USART_ReceiveData(USART2); if(ab == 'a') { while (USART_GetFlagStatus(USART2, USART_FLAG_RXNE) == RESET); USART_SendData(USART2,'c'); } }The USART_access function called in the while(1) loop. #stm32f0-usart