I am trying to read in serial data using scanf through USART. The serial data is being sent by MATLAB. Here's the code that I have so far. printf works just fine. Scanning is the problem. Any suggestions are greatly appreciated!
int USART2_Write(int ch){ //wait for TX buffer empty while (!(USART2->SR & USART_SR_TXE)) {} USART2->DR = ch; return 0; } int USART2_Read(void) { while (!(USART2->SR & USART_SR_RXNE)) {} return USART2->DR; } #ifdef __GNUC__ #define PUTCHAR...