Skip to content

Commit

Permalink
added Communication ports and operation section
Browse files Browse the repository at this point in the history
  • Loading branch information
dongzhihua8023 committed Aug 11, 2020
1 parent aa540b2 commit 79dfd19
Show file tree
Hide file tree
Showing 11 changed files with 552 additions and 52 deletions.
1 change: 1 addition & 0 deletions Base_Station.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ OpenRTK as Base Station
.. image:: media/clipboard.png
:align: center

Connect openrtk module and serial port, 'input' select serial port, fill in the parameters.
16 changes: 16 additions & 0 deletions Communication_ports.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Communication Ports and Operation
---------------------------------

USER UART has serial port IAP (program firmware APP) function, ST UART PROG serial port is
the serial port for SDK firmware programming, users must connect. BT UART and ETH can pull
base rtcm3 for RTK operation, users need to choose at least one connection. Other interface
users can connect according to their needs. The hardware design can refer to OpenRTK330 EVK.


.. toctree::
:maxdepth: 1
:hidden:

ports/User_port
ports/ST_GNSS_UART1

55 changes: 3 additions & 52 deletions OpenRTK330.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
OpenRTK330 Module
=================

The Aceinna OpenRTK330 module integrates a ST Teseo V automotive grade
multi-constellation, multi-frequency Global Navigation Satellite System
(**GNSS**) chipset (supports GPS, GALILEO, GLONASS, Beidou, QZSS and SBAS), a
Expand All @@ -19,7 +16,7 @@ market that requires a reliable, high-precision and yet cost effective
- UART / SPI / CAN / Ethernet Interfaces

Technical characteristics
-------------------------
=========================

+-------------------------------------------------------------------+
| **Accuracy** [#f1]_ |
Expand Down Expand Up @@ -133,7 +130,7 @@ Technical characteristics
OpenRTK330 Module Pin Definitions
----------------------------------
=================================


.. image:: media/OpenRTK330LI_pin_n.png
Expand Down Expand Up @@ -279,50 +276,4 @@ OpenRTK330 Module Pin Definitions
| 68 | AGND | P | Internal GNSS RF path ground |
+---------+-------------------+----------+-----------------------------------------------------------------+


Communication ports definitions
--------------------------------
There are six serial communicatoins ports available on the OpenRTK330 module, including four configurable UART ports, one SPI port and one CAN port.

UART PORTS
~~~~~~~~~~
The default configuration of the four UART ports is listed as follows

- User port

- Pin: USER_UART_RX (#55), USER_UART_TX (#56)
- Default baud rate: 460800 b/s
- Default messages: output INS PVA packet ('pS'), satellite SNR, elevation and azimuth packet ('sK'),plus raw IMU data packet ('s1')
- GNSS chipset firmware programming port

- Pin: ST_UART_PROG_TX (#49), ST_UART_PROG_RX (#50)
- Default baud rate: 460800 b/s
- Reserved for programming GNSS chipset, not applicable for output
- Debug port

- Pin: DEBUG_TX (#51), DEBUG_RX (#52)
- Default baud rate: 460800 b/s
- Default message: output extended INS PVA packets ('p1')
- GNSS Data port

- Pin: ST_UART1_TX (#59), ST_UART1_RX (#60)
- Default baud rate: 460800 b/s
- Default message: output RTCMv3 GNSS data stream (10 Hz)

SPI PORT
~~~~~~~~

- Pin: USER_MOSI (#29), USER_SCK (#30), USER_NSS (#31), USER_MISO (#32)
- Default Configuration

- Frame format: Motorola
- Data size: 8 bits
- First bit: MSB first
- CPOL: High
- CPHA: 2Edge

CAN PORT
~~~~~~~~

- Pin: CAN_RX (#53), CAN_TX (#54)
- Default message: output SAE J1939 messages

328 changes: 328 additions & 0 deletions OpenRTK330_o.rst

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ including custom data structures and packets very simple.
:caption: OpenRTK330 Modules
:maxdepth: 1
:hidden:
:titlesonly:

OpenRTK330
Communication_ports.rst
ST_GNSS_UART1.rst

.. raw:: latex

Expand Down
Binary file added media/Fig_27_Micro_USB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/Fig_32_user_parameter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/Setting_parameters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/case_2_Configuration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
117 changes: 117 additions & 0 deletions ports/ST_GNSS_UART1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
ST GNSS UART1
~~~~~~~~~~~~~

- **Pin**: ST_UART1_TX(#59), ST_UART1_RX(#60)
- **Default configuration**

- Baud tare: 460800 b/s
- Stop bit: 1
- Data bits: 8
- Check Digit: None

- **Data formation**: RTCM3 format
- **Main function**: Send raw data of GNSS receiver satellite signal

DEBUG UART1
~~~~~~~~~~~

- **Pin**: DEBUG_TX(#51), DEBUG_RX(#52)
- **Default configuration**

- Baud tare: 460800 b/s
- Stop bit: 1
- Data bits: 8
- Check Digit: None

- **Data formation**: ASSIC format, "P1" packet format
- **Main function**:

- Send "p1" packet data (more detailed than user serial port data), not sending by default
- Get user parameters (only basic parameters are included, user serial port can get all parameters)
- Control "p1" packet data on or off

ST UART PROG
~~~~~~~~~~~~

- **Pin**: ST_UART_PROG_TX(#49), ST_UART1_PROG_RX(#50)
- **Default configuration**

- Baud tare: 460800 b/s
- Stop bit: 1
- Data bits: 8
- Check Digit: None

- **Main function**: ST GNSS chip firmware download interface (SDK download port)

BT UART
~~~~~~~

- **Pin**: BT_UART2_RX(#35), BT_UART2_TX(#36)
- **Default configuration**

- Baud tare: 460800 b/s
- Stop bit: 1
- Data bits: 8
- Check Digit: None

- **Main function**

- Receive RTCM3 data from GNSS base station
- Send module position data in NMEA GPGGA format

SPI Pin Definition
~~~~~~~~~~~~~~~~~~

- **Pin**: USER_MOSI(#29), USER_SCK(#30), USER_NSS(#31), USER_MISO(#32)
- **Default configuration**

- Frame format: Motorola
- Data length: 8 bits
- First bit: 1
- CPOL: High
- CPHA: 2Edge

- **Main function**

- Send "p1" data, "p1" packet format (see 4.3 for details)

CAN Pin Definition
~~~~~~~~~~~~~~~~~~

- **Pin**: CAN_RX(#53), CAN_TX(#54)
- **Default configuration**

- ECU address: 128 (automatically match, add 1 to this address, maximum 247)
- Baud rate: 250K

- **Data format**: can communication protocol, which can be divided into the following 3 categories
according to functions:

- Setting parameters: the user sends a setting parameter command, the module does not return
- Get parameters: the user sends a get parameter command, the content of the command is the PF number
and PS number of the data required by the user, and the module returns the corresponding data frame
- Data packet: The module continuously sends data packets according to the data type and frequency
configured by the user

- **Main function**

- Support SAE J1939 protocol
- Configure CAN interface parameters
- Send user data packet

RMII Pin Definition
~~~~~~~~~~~~~~~~~~~

- **Pin**: ETH_RESET(#8), RMII_TXD0(#9), RMII_TXD1(#10), RMII_TX_EN(#11), VDD_CORE(#12), VIN(#13), RMII_RXD1(#14),
ETH_MDC(#15),RMII_RXD0(#16),RMII_REF_CLK(#17),ETH_MDIO(#18),RMII_CRS_DV(#19)

- **Default configuration**

- DHCP mode
- Hostname: openrtk, you can access the Web Interface through http://openrtk in the LAN

- **Main function**

- Support static IP mode and DHCP mode
- Access to Web Interface configuration parameters (including Ethernet, NTRIP, etc.)
- Establish NTRIP CLIENT to pull base rtcm3 data
84 changes: 84 additions & 0 deletions ports/User_port.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
User Port
~~~~~~~~~

- **Pin**: USER_UART_RX(#55), USER_UART_TX(#56)
- **Default configuration**

- Baud tare: 460800 b/s
- Stop bit: 1
- Data bits: 8
- Check Digit: None

- **Data format**: ACEINNA format, NMEA format
- **The main function**

- Obtain module information: hardware version number, software version number;
- Obtain and configure module user parameters;
- Send data packets: IMU raw data, positioning data, satellite data;
- Send NMEA format data;

- **Function details**
The following takes configuration parameters as an example to introduce how to use the ACEINNA format:

1) Send the "gA" command to the module to obtain all current user parameters:
**gA command**: [0x55, 0x55, 0x67, 0x41, 0, 0x31, 0x0A]
2) Use the "uP" command to modify the parameters:
**uP command**: [0x55, 0x55, 0x75, 0x50, data length, parameter number, parameter value, CRC_L, CRC_H]

For example: configure the three parameters of leverArmBx, leverArmBy, leverArmBz to
[0.5, -0.5, 1] ​​(unit m), you need to send the "uP" command three times, and the setting result will
be returned each time. After the last setting result is returned, send again Set the command next time.

- **Configure leverArmBx**: [0x55, 0x55, 0x75, 0x50, 0x08, 0x04, 0, 0, 0, 0, 0, 0, 0x3F, 0x1D, 0x32]
- **Configure leverArmBy**: [0x55, 0x55, 0x75, 0x50, 0x08, 0x05, 0, 0, 0, 0, 0, 0, 0xBF, 0xCB, 0x69]
- **Configure leverArmBz**: [0x55, 0x55, 0x75, 0x50, 0x08, 0x06, 0, 0, 0, 0, 0, 0x80, 0x3F, 0x89, 0x0C]

3) Use the "sC" command to save the parameter value:
**sC command**: [0x55, 0x55, 0x73, 0x43, 0, 0xC8, 0xCB]

Special Note
""""""""""""

.. image:: ../media/Fig_32_user_parameter.png

The user serial port is the serial port connected by the python driver. If the user needs to enable the
data log function or automatically configure user parameters when the python driver is started, first
configure the "initial" field in openrtk.json as shown in Figure above.

**Use OpenRTK/OpenIMU python driver operation**

1) Set the log serial port

When the python driver is started with the "-r" suffix, the log function will be enabled and the data of
the three serial ports of USER, GNSS and DEBUG will be recorded at the same time. The USER serial port
number can be automatically identified by the python driver, but GNSS and DEBUG cannot. The user must
set these two serial port numbers.

*Case 1*: The GNSS/DEBUG of OpenRTK330 EVK is the USER serial port number plus 1 and 2 respectively.
Just configure the "useDefaultUart" field to 1, and the "uart" field does not work at this time.

.. image:: ../media/Fig_27_Micro_USB.png

*Case 2*: If the user needs to specify the GNSS/DEBUG serial port number, or does not use the GNSS/DEBUG
serial port (the user has not made a hardware connection), the "useDefaultUart" needs to be configured
to 0, and the "uart" field is valid at this time, the GNSS/DEBUG When "enable" is 1, it means to use
this serial port. When not in use, configure it to 0. "Value" should be the serial port name of the
serial port in the system. For example: under windos, open the device manager, as shown in Figure above,
find the connected GNSS and DEBUG serial numbers are COM10 and COM11 respectively, the configuration
should be as follows:

.. image:: ../media/case_2_Configuration.png

2) Setting parameters

When starting the python driver with the "-s" suffix, the "userParameters" parameters can be automatically
configured to the OpenRTK device and saved after power off. Find "userParameters" as shown in Figure 2,
and configure fields for user parameters. All configurable fields are in "userConfiguration", except for
"Data CRC" and "Data Size" whose paramId is 0 or 1 are not configurable, the others can be added to
"userParameters". Among them, "paramId" and "value" are mandatory fields, the value of paramId must be
consistent with that in "userConfiguration", and the type of value must be consistent with "type".

For example: to configure Ethernet and NTRIP services, the following configuration is required, where the
Ethnet mode value is 1 to use static IP mode, and the value is 0 to use DHCP mode.

.. image:: ../media/Setting_parameters.png

0 comments on commit 79dfd19

Please sign in to comment.