Skip to content

Commit 3645954

Browse files
committed
Merge pull request #36 from SenteraLLC/JRW-Documentation
Addition of doxygen project file and updating of Readme
2 parents 1062a1e + 246bd03 commit 3645954

File tree

4 files changed

+2574
-5
lines changed

4 files changed

+2574
-5
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ build/
77
debug/
88
disassembly/
99
dist/
10+
doxygen/html/
11+
doxygen/latex/
1012
nbproject/private/
1113
nbproject/Makefile-*
1214
nbproject/Package-*

README.md

+136-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,138 @@
1-
# pic32-fmu.X
2-
Microchip PIC32 flight management unit.
1+
# FMU Communications Board
32

4-
Recommended build tools:
3+
Initial development performed by partnership of [Sentera, LLC](https://sentera.com/) and [University of Minnesota](http://www.uav.aem.umn.edu/).
54

6-
* [MPLAB X IDE v3.00 Beta (integrated git support)](http://www.microchip.com/mplabx/)
7-
* [MPLAB XC32 Compiler v1.34 (free edition)](http://www.microchip.com/xc32/)
5+
## System Overview
6+
![System Diagram](/doc/System%20Diagram.png?raw=true "System Diagram")
7+
8+
The FMU Communications Board is designed as a component of the Flight Management System. The FMU Communications Board is a Microchip PIC32 based module with the primary function of managing communications between the FMU Processing Board and the rest of the Flight Management System. The Ethernet and CAN communication protocols are detailed in file [UMN FMU Communication Protocol](/doc/UMN%20FMU%20Communication%20Protocol.docx).
9+
10+
Besides the described primary function, the FMU Communications Board also:
11+
12+
* Monitors battery voltage.
13+
14+
* Monitors and annunciates status of Flight Management System components.
15+
16+
* Provides a Wi-Fi interface for:
17+
18+
* Configuration of CAN Servo-Nodes.
19+
20+
* Testing of CAN Servo-Nodes.
21+
22+
* Monitoring of CAN Servo-Nodes' status and connection to CAN bus.
23+
24+
The software design for the CAN Servo-Node can be found at GitHub repository: [https://github.com/SenteraLLC/dspic33-servo-can-node.X](https://github.com/SenteraLLC/dspic33-servo-can-node.X).
25+
26+
## Project Folder Structure
27+
The project includes the following folders:
28+
29+
>[doc](/doc) - documentation for the project.
30+
31+
>[doxygen](/doxygen) - project file for generating Doxygen documentation.
32+
33+
>[http](/http) - files for definition of http interface.
34+
35+
>[hw](/hw) - hardware design schematics.
36+
37+
>[inc](/inc) - include (i.e. header) code files.
38+
39+
>[ipe](/ipe) - instructions for a device programming method which maintains unique serial numbers.
40+
41+
>[nbproject](/nbproject) - MPLAB X IDE project files.
42+
43+
>[src](/src) – source code files.
44+
45+
## Hardware Overview
46+
The hardware contains the following physical interfaces:
47+
48+
>**Ethernet(x2)** - Communication with the FMU Processing Board and a Wi-Fi router. Note: the FMU Communications Board (IP: 192.168.143.130) communicates with the FMU Processing Board (required IP: 192.168.143.11) over port number 55455.
49+
50+
>**UART(x1)** - Communication with GPS module.
51+
52+
>**S-Bus(x1)** - Communication with radio receiver.
53+
54+
>**SPI(x1)** - Communication with IMU module.
55+
56+
>**CAN(x1)** - Communication with CAN Servo-Nodes.
57+
58+
>**High-Density Connectors** - Communication with Microhard wireless Ethernet gateway.
59+
60+
*Note: Power for the FMU Communications Board must be in the range of 3.6V to 36V.*
61+
62+
## Software Overview
63+
Source code is commented using Doxygen style formatting. Therefore, Doxygen can be used to generate an easily navigable document which provides greater detail into the software's operation than the overview which is provided here.
64+
65+
### Software Executive
66+
The software implements a preemptive, cyclic executive using eight threads. The software threads are:
67+
68+
1. **Reset**: Thread is executed following reset. Within the MPLAB environment this is implemented as "main" which provides C-environment control-flow entry.
69+
70+
2. **Core Timer**: Thread is executed every ~107s and provides a granular time reference for determining relative time.
71+
72+
3. **IMU SPI**: Thread is executed based on SPI operation to service the hardware.
73+
74+
4. **Wi-Fi SPI**: Thread is executed based on SPI operation to service communication with an internal Ethernet switch.
75+
76+
5. **Temp I2C**: Thread is executed based on I2C operation to service communication with an internal temperature sensor.
77+
78+
6. **GPS UART**: Thread is executed based on UART operation to service the hardware.
79+
80+
7. **S-Bus**: Thread is executed based on UART operation to service the hardware.
81+
82+
4. **Default**: Thread is executed if any unexpected interrupts occur.
83+
84+
All main software processing is performed in the 'Reset' thread. All other threads have a higher priority (i.e. can preempt the 'Reset' thread) and purely handle servicing of the hardware. The 'Reset' thread implement cooperative multitasking, where tasks are performed continuously, with the execution time of individual tasks being in the micro-second order of magnitude. This allows for immediate response to system inputs and a small jitter in system output timing.
85+
86+
### Software Modules
87+
The software is a modular design. The software modules are explained below, and map directly to [source code](/src) file names:
88+
89+
>**adc**: Analog to Digital Converter (ADC) driver.
90+
91+
>**can**: Controller Area Network (CAN) driver.
92+
93+
>**coretime**: Management of timer for granular relative time.
94+
95+
>**emc1412**: Temperature sensor driver.
96+
97+
>**exceptions**: 'Default' thread instantiation.
98+
99+
>**fmucomm**: Communication definition to/from the FMU Processing Board.
100+
101+
>**i2c**: Inter-Integrated Circuit (I2C) driver.
102+
103+
>**init**: Board initialization routines.
104+
105+
>**ksz8895**: Management of Ethernet switch.
106+
107+
>**oemstar**: Management of message forwarding between the GPS module and the FMU Processing Board.
108+
109+
>**pic32fmu**: Software executive and C-environment control-flow entry.
110+
111+
>**rc**: Radio controller decoding and message forwarding to the FMU Processing Board.
112+
113+
>**sbus**: S-Bus communication driver.
114+
115+
>**snode**: Management of communication and configuration to the CAN bus Servo-Node network.
116+
117+
>**softspi**: Bit-banged Serial Peripheral Interface (SPI) driver.
118+
119+
>**spi**: Serial Peripheral Interface (SPI) driver.
120+
121+
>**status**: Node identification and status annunciation.
122+
123+
>**system_config**: Definition of micro-controller's configuration registers.
124+
125+
>**tcpip**: Definition of HTTP interface and TCP/IP stack.
126+
127+
>**uart**: Universal Asynchronous Receiver Transmitter (UART) driver.
128+
129+
>**util**: Utility functions.
130+
131+
>**vn100**: VectorNav VN100 driver.
132+
133+
## Building the Software
134+
The recommended method for building the software is using tool [MPLAB X IDE](http://www.microchip.com/mplabx/) with compiler [MPLAB XC32](http://www.microchip.com/xc32/). The IDE and compiler are both free software provided by Microchip.
135+
136+
*Note: v3.0 of MPLAB X IDE was used during development.*
137+
138+
*Note: v1.34 of MPLAB XC32 was used during development.*

doc/System Diagram.png

127 KB
Loading

0 commit comments

Comments
 (0)