STM32F3 + GPS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-02-03 1:43 AM
Hello everyone,
I am the new one at programming stm32f3. I saw multiple examples here on the forum but I did not find what I want. I have stm32f3 discovery board and ublox GPS connected to PD8 (Tx) and PD9 (Rx) pins. I want to read data from pins and show it on pc on terminal. I have connected stm32f3 discovery to PC via USB. For programming I use Keil uVision. Has anybody of you some code for this or can help me how to do that please? Please help. Best regards Grega #nmea #c-basics #parser #fsm #design #state-machine #c-learning- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-02-03 4:59 AM
Hi
''I have connected stm32f3 discovery to PC via USB.'' So, does that mean you have the USB CDC device example working? ''I have stm32f3 discovery board and ublox GPS connected to PD8 (Tx) and PD9 (Rx) pins. I want to read data from pins and show it on pc on terminal.'' 1st be careful. Check if the Ublox serial is RS232 voltage level, the STM32 usart is not RS232 voltage level (it needs a Max232 converter). 2nd - Ublox GPS has a pripriatry serial comm protocol or it can talk the standard NEMA protocol. When I worked on it, I did not find any free NEMA protocol parsers so you may have to write it. Ublox will provide the protocol information to decode their serial protocol. You can find the NEMA protocol standard somewhere on the internet. Depending on what info you want from GPS, you request the right info. It can either continuously post info or you can poll it. Decode it and then send to the USB CDC.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-02-03 5:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-02-03 6:40 AM
You board appears to have it's own USB-to-serial connectivity, one method might be to configure the USART on the F3 for the GPS and USB-to-Serial, and then copy the data between the two. Alternatively you'd want to look at the USB firmware examples for the F3-DISCO, and build a VCP (Virtural COM Port), and have that connect to the USART attached to the GPS.
You could look through the various F3 firmware libraries for examples, and the forum. I know I've posted examples here. [DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/usart%20code&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=518]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2Fusart%20code&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=518Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-02-03 6:58 AM
Thanks for the replies,
clive1, do you maybe have an example how to configure the USART on the F3 for the GPS and USB-to-Serial, and then copy the data between the two? It means that I must configure one USART configuration for GPS and one for USB-to-Serial...how can I copy data between this two? I am the amateur and I really need this so please help me.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-02-03 9:05 AM
Hi
''Is this NMEA protocol standard?'' No it does not look like it. NEMA is a standard which all GPS modules should talk. I got my data from here : http://www.gpsinformation.org/dale/nmea.htm '' one method might be to configure the USART on the F3 for the GPS and USB-to-Serial, and then copy the data between the two.'' I had not considered doing it this way - definitely simpler to do this and then handle the decoding in the PC.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-02-03 9:28 AM
I am the amateur and I really need this so please help me.
Ok, so you're going to need to provide a cite for the board schematic so I don't have to go fishing for it. Describe the pins used by the GPS, and the USB-to-USART chip, and the expected baud rates for the two of them.Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-02-03 9:33 AM
''how can I copy data between this two? I am the amateur and I really need this so please help me.''
If I remember correctly, the USB CDC example pretty much just copies the USB CDC data to the USART and visa versa. Take a look at the example.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-02-03 9:44 AM
@clive1
GPS board shematic: http://www.mikroe.com/downloads/get/155/gps_click_manual_v100.pdf STM32f3discovery shield shematic: http://www.mikroe.com/downloads/get/2036/stm32f3_shield_user_manual.pdf Baud rates for both are 9600 Pins: PD9(Rx) ->gps Tx, PD8 (Tx) ->gps Rx- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-02-03 9:56 AM
Up vote any posts that you find helpful, it shows what's working..
