How to receive UART data STM32F103 using interrupt mode?
I am using STM32CubeIDE with a STM32F103 and have UART1 setup in interrupt mode. Is there a working code example anywhere that tells how to implement UART interrupt mode? I have been unable to find via g~~gle. I have worked with multiple other processors other than STM32 and have never had a problem with UARTs. Apparently with all the posts online asking for help anything other than polling is a problem with the STM32 line.
Basically I am trying to do something really simple. I have a GPS unit that I have programmed to send the single $GPRMC message. All I want to do is read the incoming message 1 character at a time and copy it to a buffer until the '\n' character is received. I will read the character in the interrupt routine and copy it to the buffer. I will check the character in the interrupt routine for a '\n'. When that character is received I will set a flag that will be picked up in my main while loop and the string data will be processed. I have approximately 800 msecs to process the data before the next NEMA transmission starts. The baud rate is only 9600 which the STM32 UART should be able to easily process since the CPU is running at 72 MHz. The problem is the interrupt never happens. I will never transmit any data so the UART transmit function is not needed.
I saw a post that indicated user Tesla DeLorean had a working NEMA example. But apparently that code is no longer available. I have seen examples online where an echo server is implemented without using the STM32CubeIde MX environment. Is it better to do it that way and just ignore all the CubeMX mess?
Any help is appreciated.
