cancel
Showing results for 
Search instead for 
Did you mean: 

X-NUCLEO-GNSS2A1 - how to make it work without RTOS - initialisation and reading the NMEA data?

PDobr.1
Associate III

Hallo.

I have NUCLEO-L476 and X-NUCLEO-GNSS2A1 (with Teseo-VIC3DA). Of course, the only one present example, in "en.x-cube-gnss1" package for both boards (GetPos) works great, but all examples (including GetPos) available in package, work with RTOS. Unfortunatly, I am no familiar with RTOS, I will also not use RTOS in my project. I spent lot of hours to analyse the code and documentation, to find the way to use VIC3DA without RTOS without succes. I know also, that many GPS modules (for example from Origin GPS...) work just after powering it, the only problem is to efficiently parse the data from NMEA frames - there will be no problem with it.

And now is the question. How to:

  • initialise Teseo-VIC3DA module (without RTOS),
  • get NMEA data from it (after init), using I2C or USART?

It should be simple, but it is not. 

14 REPLIES 14
Saurabh.Rawat
ST Employee

Hello @PDobr.1  ,

Thanks for trying out this package.

For Package without RTOS I suggest you start by generating the new ioc for NucleoL476RG using STM32CubeMX tool and using the settings of  Virtual_COM_Port.ioc placed in X-CUBE-GNSS1\6.0.0\Projects\NUCLEO-F401RE\Applications\Virtual_COM_Port .

Generate the code and use the function  TeseoConsumerTask for getting the GNSS NMEA Message and ConsoleParseTask for parsing the message. Right now they are associated with thread but you can comment that and use above functions directly.

USART1 Baud rate you can make 115200.

Let me know !

Regards,

Saurabh

Hello,

thank you for the answer. Regarding the settings - I must copy ports, interfaces settings and middelware package settings (X-CUBE-GNSS1 - change for VIC3DA, without using RTOS - RTOS disabled), according to set pictures below?

- pionout and port settings for connection with X-NUCLEO-GNSS2A1 board:

0_1.JPG

- interrupts (USART):

0_2.JPG

- USART1, change BR to 115200:

0_3.JPG

- settings of GNSS1 package, we are disabing RTOS (here is still enabled, thig to change):

0_4.JPG

And the last needed thing - to use two mentioned functions (Consumer and ParseTask) - I must comment these lines marked as red in main.c --> main(), as placed below (if I want to use/modify ready example for L476 0 GetPos - from package, it has RTOS inside) :

0_5.JPG

If something is missing, please correct me.

regards, Paul

Saurabh.Rawat
ST Employee

Hello @PDobr.1  , 

Yes please go ahead. Let me know.

Regards,

Saurabh

Few more things, can you explain mi how to use these two functions (TeseoConsumerTask, ConsoleParseTask)? Where put them, in main()? They are associated with thread, so where should I put a comment to make the unassociated? And the last thing, which extensions should be chosen:

0_4A.jpg

- all?

Hope it is all, what I will need t know, I will try to make it work on the weekend...

Saurabh.Rawat
ST Employee

Hello , 

Since you are not using RTOS you have to devise your own way to simultaneously receive and parse the NMEA data.

You may call TeseoConsumerTask and ConsoleParseTask  inside MX_GNSS_PostOSInit or in a main while loop.

Dont call _init ( where above two functions are associated with the thread) .

You can pass a const parameter in above two functions soemthing like :  TeseoConsumerTask("GNSS Fetching the NMEA Data..!"); and  ConsoleParseTask("GNSS Parsing the NMEA Data..!"); .

We haven't tried without RTOS but above sequence should work. Please try.

Regards,

Saurabh

There are osthread handlers which are . 

Thanks for an answer. The best way, I think, the fastest one, is:

  • take NUCLEO-F401 (for which originally Virtual_COM_Port.ioc is dedicated - so there will be no need to change settings), 
  • download the code for Virtual_COM_Port,
  • make changes you mentioned earlier (described at the photos below):

__app_gnss.JPG

 (above - commented _init functions and added TeseoConsumerTask("GNSS Fetching the NMEA Data..!"); and  ConsoleParseTask("GNSS Parsing the NMEA Data..!"); )

__main.JPG

 (above - main() with added while(1); 

  • and run it. 

It compiles without errors, I'll try it in the evening and send fedback - if it works or not. 

Hallo. Unfortunatly the solution you adviced doesn't work with NUCLEO-L476 and NUCLEO-F401 - I took code from X-CUBE-GNSS1 examples with RTOS (so, the configuration was good), there are these functions implemented, so I disabled _init and added TeseoConsumerTask and TeseoParserTask - without success.

 

Hello , 

Can you please attach your project or zip file here.

Regards,

Saurabh

SSri.1
Associate II

@PDobr.1 I'm a beginner for the X-NUCLEO-GNSS2A1 module. I could not get the basic outputs even using the example application codes. Could you assist me? I have Nucleo64 - g491Re board as well.