cancel
Showing results for 
Search instead for 
Did you mean: 

Issues on Setting Parameter

PTsen
Associate III

Hi, I have tons of question about the command $PSTMSETPAR and some related command:

First of all, I would like to change the NMEA Baudrate to 38400, as the software manual said, I should transfer

"$PSTMSETPAR,1102,0x8"

"$PSTMSAVEPAR"

and NMEA gives me the result (no comma due to the way I'm processing the string):

$PSTMSETPAROK 1102*31

$PSTMSETPAR 1102 8

as the manual says, I should reset the system, so I've enter the command "$PSTMRR", and it returns "$GPTXT DEFAULT LIV CONFIGURATION*2B". But when I change my Baudrate from 9600 to 38400, I got scribbled message, only when I change back to 9600 will the message be shown properly. However, after I unpowered my stm32 and power it again, I ""sometime"" find it changes its Baudrate to 38400, vice versa. So here are my questions:

  1. How to reset X-NULCEO-GNSS1A1: As I dig into the example code from cubeMS, I found that reset is done by setting low on the reset pin, wait for a while, then setting it to high, then wait for a while, but doing so doesn't make any change to the setting. So I'm not sure how the resetting is done.
  2. Should I send the second command after the previous command got the return message? E.g. I should wait "$PSTMSETPAROK 1102*3" after sending the command "$PSTMSETPAR,1102,0x8" , then send the new command, or I can send "$PSTMSETPAR,1102,0x8" followed by "$PSTMSAVEPAR" immediately?

Next, I would like TESEO LIV3F to send to me only some certain message, say, $GPGGA, to do so, I need to use the command $PSTMCFGMSGL, and here is my next group of questions:

  1. From "Application note - AN5203 - Teseo-LIV3F - I2C Positioning Sensor", I found an example of setting the config is done as follow:

$PSTMCFGMSGL,3,1,0,0
$PSTMSETPAR,1227,1,2 
$PSTMSAVEPAR

I can't understand, from the software manual of Teseo-LIV3F, the syntax of $PSTMCFGMSGL is <listid>,<rate>,

<list_l>,<list_h>*<checksum><cr><lf>, where listid can only be 0 or 1, I don't even know what listid 1 is since I can't

find the CBD_ID 210 and 229 relevant to msg list in the user manual, not to mention the value 3 in the example

above, also, I don't know what does "rate" here mean.

​ 2. After reconfigure the message list by the command "$PSTMCFGMSGL,0,1,0,0" and "$PSTMSAVEPAR", nothing

changed, I'm expecting this since the Baudrate doesn't change immediately, as well. When I request the

message via command $PSTMNMEAREQUEST,100000,0 (GPGLL), I didn't get what I expected, instead, I get this

0690X000006DBGRQA4.jpg

​Which is totally different from the application note, and I don't know what to do, the manual is rather confusing to me.

Any advice would be great, since I'm literally having hard time getting this module to work. Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

> we should append checksum and cr, lf at the end of the string

Yes. correct.

> which has the wrong checksum, what is happening?

Really strange. I tryed all the commads and they work on my side.

Could you check your code?

Do you want share?

Just a note (sorry I forgot to say) but the whole C-Driver for Teseo-LIV3F is already online @

https://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-expansion-packages/x-cube-gnss1.html

in the package you will find binary for STM32 and all the C-Code. May be it could help your development.

Regards

Franceco

View solution in original post

8 REPLIES 8
Francesco Virlinzi
ST Employee

Hi

To change NMEA baudrate you can use the following script:

====

$PSTMCFGPORT,0,0,2,new_baud_value

$PSTMSAVEPAR

$PSTMSRR

====

  1. How to reset X-NULCEO-GNSS1A1

You can perform a software reset using the commands "$PSTMSRR" or an hardware reset toggling the pins Teseo-LIV3F.nReset (pins Connector-9_pin-8 on the X-Nucleo-GNSS1A1)

> I would like TESEO LIV3F to send to me only some certain message

I2C anc UART ports have separated message-list.

To change the UART-message-list you can use the following scripts:

==================

$PSTMCFGMSGL,0,1,<list_low>,<list_high>

$PSTMSAVEPAR

$PSTMSRR

==================

Let me know if this helps.

Regards

Francesco

Hi, thanks for your response

First of all

===

$PSTMCFGPORT,0,0,2,0x5

$PSTMSAVEPAR

$PSTMSRR

===

What I expected: As soon as I do the software reset, the baudrate of NMEA should be the new one.

What turns out to be: The baudrate of NMEA doesn't change since changing the USART baudrate to the new one result in scribbled message, but is normal when change to original baudrate

Additional question: what does '2' mean here? According to the manual, I see the first param is portnumb (UART GPIO ID), what ID?

Next,

==================

$PSTMCFGMSGL,0,1,0,0

$PSTMSAVEPAR

$PSTMSRR

==================

What I expected: As soon as the software reset, I should receive nothing

What turns out to be: The message keeps printing as if nothing happened.

Hi

> $PSTMCFGPORT,0,0,2,0x5

It should be:

$PSTMCFGPORT,0,0,2,115200

or

$PSTMCFGPORT,0,0,2,9600

to restore the default setting

>  what does '2' mean here?

Teseo-III has several UART port (The UART-2 is the one available on the module).

> What I expected: As soon as the software reset, I should receive nothing

Just tested and working on my side.

The periodic messages are no more sent from the module.

Could you check?

Thanks

Regards

Francesco

PTsen
Associate III

Hi, thanks for your immediate response

First:

====

$PSTMCFGPORT,0,0,2,38400

$PSTMSAVEPAR

$PSTMSRR

====

What I expected: The baudrate should be changed after software reset

What turns out to be: The baudrate doesn't change

Second:

==================

$PSTMCFGMSGL,0,1,0,0

$PSTMSAVEPAR

$PSTMSRR

==================

It turns out that the command works. It seems like the reason is that I send "$PSTMSRR" instead of "$PSTMSRR\r\n", and I'm not sure if this is the cause, but once I take way the cr and lf, the setup doesn't change, and it works if the line contains cr and lf.

Ciao

=====

$PSTMCFGPORT,0,0,2,38400

$PSTMSAVEPAR

$PSTMSRR

===

the scripts is correct. (just tested on my side)

Do you receive the 'OK' respond messages (i.e: $PSTMCFGPORTOK*45 and $PSTMSAVEPAROK*5C)

Moreover take into account they are NMEA message this means the correct syntax is:

$COMMAND, PARAMS,...*<checksum><cr><lf>

Therefore the scripts has to be:

$PSTMCFGPORT,0,0,2,38400*<checksum><cr><lf>

$PSTMSAVEPAR*<checksum><cr><lf>

$PSTMSRR*<checksum><cr><lf>

Teseo-Suite (if you are using it) internally appends "*<checksum><cr><lf>" on each commands

Let me know if this helps.

Regards

Francesco

PTsen
Associate III

Hi, the problem still persists

There are few questions I want to ask:

  1. All of the example in software manual is assuming the user is using Teseo-Suite, if not, we should append checksum and cr, lf at the end of the string
  2. Passing the command "$PSTMCFGPORT,0,0,2,38400*4c\r\n" gives me neither "$PSTMCFGPORTOK*45" nor "$PSTMCFGPORTERROR*19", instead, I receive "$PSTMCFGPORT,0,0,2,38400*6c", which has the wrong checksum, what is happening?

Thankyou

> we should append checksum and cr, lf at the end of the string

Yes. correct.

> which has the wrong checksum, what is happening?

Really strange. I tryed all the commads and they work on my side.

Could you check your code?

Do you want share?

Just a note (sorry I forgot to say) but the whole C-Driver for Teseo-LIV3F is already online @

https://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-expansion-packages/x-cube-gnss1.html

in the package you will find binary for STM32 and all the C-Code. May be it could help your development.

Regards

Franceco

PTsen
Associate III

Hi, I've checked my code, and there is some subtle mistake, resulting in the wrong checksum. Even though it works fine in online compiler.

Thank you really much, really appreciate it.