Olimex Support Forum

DUINO => MAPLE => Topic started by: BMWMPower on June 08, 2013, 11:03:36 PM

Title: GPS 20Hz and analogue data
Post by: BMWMPower on June 08, 2013, 11:03:36 PM
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)
Title: Re: GPS 20Hz and analogue data
Post by: farlane on August 14, 2013, 09:02:42 AM
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.