April 20, 2024, 05:22:58 PM

GPS 20Hz and analogue data

Started by BMWMPower, June 08, 2013, 11:03:36 PM

Previous topic - Next topic

BMWMPower

I just bought an Olimexino-STM32 and now I want to collect GPS data (10-20Hz) and some analogue data. I think when i loop then I can collect the analogue pins 1 by 1 and after each other. When i reach the 10 or 20Hz I will log the NMEA string.

What do you think? Is this the way to do it? Or is there a parallel option? (parallel task)

farlane

No idea if this is still relevant, but i would rather have the ADC channels use the DMA feature of the STM32 which then automatically pulls in the ADC channels you want. The ADC is very versatile and configurable.
GPS data would normally be received on a UART; there is would probably use interrupt based UART handling and fire a callback any time a complete string was received ( or something along those lines ).

In the end you would not need to poll anything anymore, except perhaps a supervisory function that checks if everything is still running and resets/restart stuff if not.