Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPS module UART baud mismatch in code and TimeCard on sale? #113

Open
regymm opened this issue Oct 6, 2024 · 1 comment
Open

GPS module UART baud mismatch in code and TimeCard on sale? #113

regymm opened this issue Oct 6, 2024 · 1 comment

Comments

@regymm
Copy link

regymm commented Oct 6, 2024

Please forgive me if this has already been issued. I'm kinda new to this project, and is working on a Verilog (instead of VHDL) version of the Time Card's FPGA codebase.

In the current open-source version, the GNSS baud rate is 19200 as specified in the block design (the parameter 4):

  set TC_TodSlave_0 [ create_bd_cell -type ip -vlnv nettimelogic.com:TimeCardLib:TC_TodSlave TC_TodSlave_0 ]
  set_property -dict [ list \
   CONFIG.UartDefaultBaudRate_Gen {4} \
 ] $TC_TodSlave_0

But on the time card I purchased (https://www.makerfabs.com/ocp-tap-time-card.html), the baud rate is 115200, and this parameter to 7 in order to function properly.

@regymm
Copy link
Author

regymm commented Oct 6, 2024

However, after the baud rate config change, the ToDSlave registers are still different from the stock v1.2.0 firmware ones.

On stock firmware:

todslave: enablecontrol: 10000001
todslave: errorstatus: 00000000
todslave: uartpolarity: 00000001
todslave: version: 02020001
todslave: correction: 00000000
todslave: uartbaudrate: 00000007
todslave: utcstatus: 00000025 (was 00000125 for a short moment)
todslave: attennastatus: 32000442
todslave: satellitenumber: 00010206

On open source firmware:

todslave: enablecontrol: 10000001
todslave: errorstatus: 00000001 (00000000 then quickly becomes 00000001)
todslave: uartpolarity: 00000001 
todslave: version: 00020003
todslave: correction: 00000000
todslave: uartbaudrate: 00000007
todslave: utcstatus: 00000000
todslave: attennastatus: 32070422
todslave: satellitenumber: 00011b2e

A UART parse error seems to occur, and utcstatus is always zero.
With this open-source firmware, if I run phc2sys like sudo phc2sys -c CLOCK_REALTIME -s /dev/ptp4 -O0 -m, I can still see the time from GPS be updated to the system clock and the 37s difference between TAI and UTC. No difference is visible between the stock firmware.

I wonder if this will affect something or if it's OK to ignore it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant