In this project, time and location data were obtained via U-Blox NEO-M8N type GPS with STM32. GPS configurations were made via the u-Center application.
The data from the GPS was received over the serial port with a DMA structure. Then, these data were interpreted with the state machine algorithm and converted into location and time data.
You can check the detailed information on this project from the link above.