kjj

Dependencies:   mbed-rtos mbed Xbus

Fork of MTi-1_example by Xsens

Revision:
54:2e9bb1390c9c
Parent:
53:3891f4259901
Child:
55:9a2d6f947f0d
--- a/main.cpp	Fri May 22 16:20:04 2015 +0200
+++ b/main.cpp	Fri May 22 16:20:29 2015 +0200
@@ -11,6 +11,52 @@
  * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  * PARTICULAR PURPOSE.
+
+ * \page Overview Firmware overview
+ *
+ * Example firmware for communicating with an Xsens MTi-1 series motion
+ * tracker (MT).
+ *
+ * The firmware uses the mbed-rtos library to provide RTOS features such as
+ * memory pools and queues. A single thread (main) is used with reception of
+ * data from the motion tracker via a UART handled by interrupts.
+ *
+ * \section Hardware setup
+ * The firmware has been tested with a ST Nucleo F302R8 development board.
+ * The Nucleo board should be connected to the MTi1 development board using the
+ * Arduino compatible headers on the Nucleo board as follows:
+ *
+ * | Nucleo pin | MTi1 func.  | MTi1 dev. pin |
+ * |------------|-------------|---------------|
+ * | IORef      | VDDIO_EXT   | P301-3        |
+ * | 5V         | VDD_EXT     | P301-1        |
+ * | GND        | GND         | P301-2        |
+ * | SCL/D15    | DEV_UART_TX | P301-9        |
+ * | SDA/D14    | DEV_UART_RX | P301-11       |
+ * | D2         | nRST        | P301-7        |
+ *
+ * Communication with the host PC is achieved using the built-in USB serial
+ * bridge of the Nucleo board.
+ *
+ * \subsection Porting
+ * To port to a different mbed platform only the serial Rx/Tx lines and the
+ * reset line pins should need to be updated.
+ *
+ * \section Firmware Operation
+ * The firmware starts by initializing the serial ports used to communicate
+ * with the host PC and with the MT. During the initialization the MT is held
+ * in reset using the nRST input.
+ *
+ * Once the firmware is ready to communicate with the MT the reset line is
+ * released and the firmware waits for a wakeup message from the MT. If this is
+ * not received within 1 second the firmware will try to restore communication
+ * with the MT using a special restore communication procedure.
+ *
+ * When the MT is ready for communication the firmware requests the device ID
+ * of the MT, and based on this determines which type of MTi is connected.
+ * If the MT is an MTi-1 then it will be configured to send inertial and
+ * magnetic measurement data. MTi2 and MTi3 devices have onboard orientation
+ * estimation and will therefore be configured to provide quaternion output.
  */
 
 #include "mbed.h"