10 Commits

1356 changed files with 134895 additions and 47748 deletions

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "resources/Camera_driver/alohal"]
path = resources/Camera_driver/alohal
url = git@github.com:TheColonelYoung/ALOHAL.git

4
modules/FC/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
FC-backups/
*.bak
.kiri/
gerbers/

Binary file not shown.

1075
modules/FC/Camera.kicad_sch Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

70468
modules/FC/FC.kicad_pcb Normal file

File diff suppressed because it is too large Load Diff

75
modules/FC/FC.kicad_prl Normal file
View File

@ -0,0 +1,75 @@
{
"board": {
"active_layer": 0,
"active_layer_preset": "",
"auto_track_width": false,
"hidden_nets": [],
"high_contrast_mode": 0,
"net_color_mode": 1,
"opacity": {
"pads": 1.0,
"tracks": 1.0,
"vias": 1.0,
"zones": 0.6
},
"ratsnest_display_mode": 0,
"selection_filter": {
"dimensions": true,
"footprints": true,
"graphics": true,
"keepouts": true,
"lockedItems": true,
"otherItems": true,
"pads": true,
"text": true,
"tracks": true,
"vias": true,
"zones": true
},
"visible_items": [
0,
1,
2,
3,
4,
5,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
32,
33,
34,
35,
36
],
"visible_layers": "000fdf0_80000001",
"zone_display_mode": 0
},
"meta": {
"filename": "FC.kicad_prl",
"version": 3
},
"project": {
"files": []
}
}

467
modules/FC/FC.kicad_pro Normal file
View File

@ -0,0 +1,467 @@
{
"board": {
"design_settings": {
"defaults": {
"board_outline_line_width": 0.09999999999999999,
"copper_line_width": 0.19999999999999998,
"copper_text_italic": false,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"copper_text_upright": false,
"courtyard_line_width": 0.049999999999999996,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
"arrow_length": 1270000,
"extension_offset": 500000,
"keep_text_aligned": true,
"suppress_zeroes": false,
"text_position": 0,
"units_format": 1
},
"fab_line_width": 0.09999999999999999,
"fab_text_italic": false,
"fab_text_size_h": 1.0,
"fab_text_size_v": 1.0,
"fab_text_thickness": 0.15,
"fab_text_upright": false,
"other_line_width": 0.15,
"other_text_italic": false,
"other_text_size_h": 1.0,
"other_text_size_v": 1.0,
"other_text_thickness": 0.15,
"other_text_upright": false,
"pads": {
"drill": 0.0,
"height": 0.3,
"width": 0.625
},
"silk_line_width": 0.15,
"silk_text_italic": false,
"silk_text_size_h": 1.0,
"silk_text_size_v": 1.0,
"silk_text_thickness": 0.15,
"silk_text_upright": false,
"zones": {
"45_degree_only": false,
"min_clearance": 0.19999999999999998
}
},
"diff_pair_dimensions": [
{
"gap": 0.0,
"via_gap": 0.0,
"width": 0.0
}
],
"drc_exclusions": [],
"meta": {
"version": 2
},
"rule_severities": {
"annular_width": "error",
"clearance": "error",
"copper_edge_clearance": "error",
"courtyards_overlap": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint_type_mismatch": "error",
"hole_clearance": "error",
"hole_near_hole": "error",
"invalid_outline": "error",
"item_on_disabled_layer": "error",
"items_not_allowed": "error",
"length_out_of_range": "error",
"malformed_courtyard": "error",
"microvia_drill_out_of_range": "error",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "error",
"pth_inside_courtyard": "ignore",
"shorting_items": "error",
"silk_over_copper": "warning",
"silk_overlap": "warning",
"skew_out_of_range": "error",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_dangling": "warning",
"track_width": "error",
"tracks_crossing": "error",
"unconnected_items": "error",
"unresolved_variable": "error",
"via_dangling": "warning",
"zone_has_empty_net": "error",
"zones_intersect": "error"
},
"rules": {
"allow_blind_buried_vias": false,
"allow_microvias": false,
"max_error": 0.005,
"min_clearance": 0.15,
"min_copper_edge_clearance": 0.19999999999999998,
"min_hole_clearance": 0.19999999999999998,
"min_hole_to_hole": 0.3,
"min_microvia_diameter": 0.19999999999999998,
"min_microvia_drill": 0.09999999999999999,
"min_silk_clearance": 0.0,
"min_through_hole_diameter": 0.19999999999999998,
"min_track_width": 0.15,
"min_via_annular_width": 0.125,
"min_via_diameter": 0.44999999999999996,
"solder_mask_clearance": 0.0,
"solder_mask_min_width": 0.0,
"use_height_for_length_calcs": true
},
"track_widths": [
0.0,
0.15,
0.25,
0.5,
1.0,
1.5,
2.0
],
"via_dimensions": [
{
"diameter": 0.0,
"drill": 0.0
}
],
"zones_allow_external_fillets": false,
"zones_use_no_outline": true
},
"layer_presets": []
},
"boards": [],
"cvpcb": {
"equivalence_files": []
},
"erc": {
"erc_exclusions": [],
"meta": {
"version": 0
},
"pin_map": [
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
2
],
[
0,
1,
0,
0,
0,
0,
1,
1,
2,
1,
1,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2
],
[
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
2
],
[
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
1,
2,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
0,
2,
1,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
]
],
"rule_severities": {
"bus_definition_conflict": "error",
"bus_entry_needed": "error",
"bus_label_syntax": "error",
"bus_to_bus_conflict": "error",
"bus_to_net_conflict": "error",
"different_unit_footprint": "error",
"different_unit_net": "error",
"duplicate_reference": "error",
"duplicate_sheet_names": "error",
"extra_units": "error",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"lib_symbol_issues": "warning",
"multiple_net_names": "warning",
"net_not_bus_member": "warning",
"no_connect_connected": "warning",
"no_connect_dangling": "warning",
"pin_not_connected": "error",
"pin_not_driven": "error",
"pin_to_pin": "warning",
"power_pin_not_driven": "error",
"similar_labels": "warning",
"unannotated": "error",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
}
},
"libraries": {
"pinned_footprint_libs": [],
"pinned_symbol_libs": []
},
"meta": {
"filename": "FC.kicad_pro",
"version": 1
},
"net_settings": {
"classes": [
{
"bus_width": 12.0,
"clearance": 0.2,
"diff_pair_gap": 0.25,
"diff_pair_via_gap": 0.25,
"diff_pair_width": 0.2,
"line_style": 0,
"microvia_diameter": 0.3,
"microvia_drill": 0.1,
"name": "Default",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.25,
"via_diameter": 0.45,
"via_drill": 0.2,
"wire_width": 6.0
}
],
"meta": {
"version": 2
},
"net_colors": null
},
"pcbnew": {
"last_paths": {
"gencad": "",
"idf": "",
"netlist": "",
"specctra_dsn": "",
"step": "",
"vrml": ""
},
"page_layout_descr_file": "/home/petr/work/butcube/resources/kicad_page_layout.kicad_wks"
},
"schematic": {
"annotate_start_num": 0,
"drawing": {
"default_line_thickness": 6.0,
"default_text_size": 50.0,
"field_names": [],
"intersheets_ref_own_page": false,
"intersheets_ref_prefix": "",
"intersheets_ref_short": false,
"intersheets_ref_show": false,
"intersheets_ref_suffix": "",
"junction_size_choice": 3,
"label_size_ratio": 0.375,
"pin_symbol_size": 25.0,
"text_offset_ratio": 0.15
},
"legacy_lib_dir": "",
"legacy_lib_list": [],
"meta": {
"version": 1
},
"net_format_name": "",
"ngspice": {
"fix_include_paths": true,
"fix_passive_vals": false,
"meta": {
"version": 0
},
"model_mode": 0,
"workbook_filename": ""
},
"page_layout_descr_file": "/home/petr/work/butcube/resources/kicad_page_layout.kicad_wks",
"plot_directory": "",
"spice_adjust_passive_values": false,
"spice_external_command": "spice \"%I\"",
"subpart_first_id": 65,
"subpart_id_separator": 0
},
"sheets": [
[
"e63e39d7-6ac0-4ffd-8aa3-1841a4541b55",
""
],
[
"89c18b9c-1cb9-45ef-bf7e-879d882b206b",
"MCU"
],
[
"24115169-fbaf-42f8-8ea2-50b53559acae",
"Camera"
],
[
"e4664c1b-a4cd-4eed-8c0f-efff7b6d7960",
"External_sensors"
],
[
"5f4fd338-1c9e-4638-abf9-b24cce2a1173",
"IMU"
],
[
"2505c719-4f81-44f4-a7a9-014d02ea119f",
"Memory"
],
[
"edeb4030-7f14-49fb-9462-99707ceae37e",
"Power"
],
[
"2db60271-e8e5-4def-ae3d-d6e19678f4e1",
"Flash"
]
],
"text_variables": {}
}

1681
modules/FC/FC.kicad_sch Normal file

File diff suppressed because it is too large Load Diff

898
modules/FC/Flash.kicad_sch Normal file
View File

@ -0,0 +1,898 @@
(kicad_sch (version 20211123) (generator eeschema)
(uuid 2545c40d-c5a0-44b7-87db-18f60adb5bad)
(paper "A4")
(title_block
(title "BUTCube - Flight controller")
(date "2022-03-11")
(rev "v1.0")
(comment 1 "Author: Petr Malaník")
)
(lib_symbols
(symbol "Device:C" (pin_numbers hide) (pin_names (offset 0.254)) (in_bom yes) (on_board yes)
(property "Reference" "C" (id 0) (at 0.635 2.54 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Value" "C" (id 1) (at 0.635 -2.54 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "" (id 2) (at 0.9652 -3.81 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "~" (id 3) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_keywords" "cap capacitor" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "Unpolarized capacitor" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_fp_filters" "C_*" (id 6) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "C_0_1"
(polyline
(pts
(xy -2.032 -0.762)
(xy 2.032 -0.762)
)
(stroke (width 0.508) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy -2.032 0.762)
(xy 2.032 0.762)
)
(stroke (width 0.508) (type default) (color 0 0 0 0))
(fill (type none))
)
)
(symbol "C_1_1"
(pin passive line (at 0 3.81 270) (length 2.794)
(name "~" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin passive line (at 0 -3.81 90) (length 2.794)
(name "~" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
)
)
(symbol "Device:R" (pin_numbers hide) (pin_names (offset 0)) (in_bom yes) (on_board yes)
(property "Reference" "R" (id 0) (at 2.032 0 90)
(effects (font (size 1.27 1.27)))
)
(property "Value" "R" (id 1) (at 0 0 90)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "" (id 2) (at -1.778 0 90)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "~" (id 3) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_keywords" "R res resistor" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "Resistor" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_fp_filters" "R_*" (id 6) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "R_0_1"
(rectangle (start -1.016 -2.54) (end 1.016 2.54)
(stroke (width 0.254) (type default) (color 0 0 0 0))
(fill (type none))
)
)
(symbol "R_1_1"
(pin passive line (at 0 3.81 270) (length 1.27)
(name "~" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin passive line (at 0 -3.81 90) (length 1.27)
(name "~" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
)
)
(symbol "MT29F1G01ABAFDSF_1" (in_bom yes) (on_board yes)
(property "Reference" "U" (id 0) (at -10.16 15.24 0)
(effects (font (size 1.27 1.27)))
)
(property "Value" "MT29F1G01ABAFDSF_1" (id 1) (at 12.7 15.24 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "TCY_IC:DFN-8_8x6mm_P1.27mm" (id 2) (at 0 -30.48 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "https://www.micron.com/-/media/client/global/documents/products/data-sheet/nand-flash/70-series/m78a_1gb_3v_nand_spi.pdf?rev=7270128474b44126bb737f0f07976723" (id 3) (at 0 -27.94 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_keywords" "SPI 32Mbit 1.65V-3.6V" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "32-Mbit, Wide Range Voltage SPI Serial Flash Memory, SOP-8" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_fp_filters" "SOP*5.28x5.23mm*P1.27mm*" (id 6) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "MT29F1G01ABAFDSF_1_1_1"
(rectangle (start -10.16 10.16) (end 10.16 -10.16)
(stroke (width 0.254) (type default) (color 0 0 0 0))
(fill (type background))
)
(pin input line (at -12.7 -7.62 0) (length 2.54)
(name "~{CS}" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at -12.7 2.54 0) (length 2.54)
(name "SO/IO1" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at 12.7 2.54 180) (length 2.54)
(name "~{WP}/IO2" (effects (font (size 1.27 1.27))))
(number "3" (effects (font (size 1.27 1.27))))
)
(pin power_in line (at 0 -12.7 90) (length 2.54)
(name "GND" (effects (font (size 1.27 1.27))))
(number "4" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at -12.7 7.62 0) (length 2.54)
(name "SI/IO0" (effects (font (size 1.27 1.27))))
(number "5" (effects (font (size 1.27 1.27))))
)
(pin input line (at -12.7 -2.54 0) (length 2.54)
(name "SCLK" (effects (font (size 1.27 1.27))))
(number "6" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at 12.7 -2.54 180) (length 2.54)
(name "~{HOLD}/IO3" (effects (font (size 1.27 1.27))))
(number "7" (effects (font (size 1.27 1.27))))
)
(pin power_in line (at 0 12.7 270) (length 2.54)
(name "VCC" (effects (font (size 1.27 1.27))))
(number "8" (effects (font (size 1.27 1.27))))
)
)
)
(symbol "TCY_memory:MT29F1G01ABAFDSF" (in_bom yes) (on_board yes)
(property "Reference" "U" (id 0) (at -10.16 15.24 0)
(effects (font (size 1.27 1.27)))
)
(property "Value" "MT29F1G01ABAFDSF" (id 1) (at 12.7 15.24 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "TCY_IC:DFN-8_8x6mm_P1.27mm" (id 2) (at 0 -30.48 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "https://www.micron.com/-/media/client/global/documents/products/data-sheet/nand-flash/70-series/m78a_1gb_3v_nand_spi.pdf?rev=7270128474b44126bb737f0f07976723" (id 3) (at 0 -27.94 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_keywords" "SPI 32Mbit 1.65V-3.6V" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "32-Mbit, Wide Range Voltage SPI Serial Flash Memory, SOP-8" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_fp_filters" "SOP*5.28x5.23mm*P1.27mm*" (id 6) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "MT29F1G01ABAFDSF_1_1"
(rectangle (start -10.16 10.16) (end 10.16 -10.16)
(stroke (width 0.254) (type default) (color 0 0 0 0))
(fill (type background))
)
(pin input line (at -12.7 -7.62 0) (length 2.54)
(name "~{CS}" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at -12.7 2.54 0) (length 2.54)
(name "SO/IO1" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at 12.7 2.54 180) (length 2.54)
(name "~{WP}/IO2" (effects (font (size 1.27 1.27))))
(number "3" (effects (font (size 1.27 1.27))))
)
(pin power_in line (at 0 -12.7 90) (length 2.54)
(name "GND" (effects (font (size 1.27 1.27))))
(number "4" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at -12.7 7.62 0) (length 2.54)
(name "SI/IO0" (effects (font (size 1.27 1.27))))
(number "5" (effects (font (size 1.27 1.27))))
)
(pin input line (at -12.7 -2.54 0) (length 2.54)
(name "SCLK" (effects (font (size 1.27 1.27))))
(number "6" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at 12.7 -2.54 180) (length 2.54)
(name "~{HOLD}/IO3" (effects (font (size 1.27 1.27))))
(number "7" (effects (font (size 1.27 1.27))))
)
(pin power_in line (at 0 12.7 270) (length 2.54)
(name "VCC" (effects (font (size 1.27 1.27))))
(number "8" (effects (font (size 1.27 1.27))))
)
)
)
(symbol "power:+3.3V" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes)
(property "Reference" "#PWR" (id 0) (at 0 -3.81 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "+3.3V" (id 1) (at 0 3.556 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "" (id 2) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_keywords" "power-flag" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "Power symbol creates a global label with name \"+3.3V\"" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "+3.3V_0_1"
(polyline
(pts
(xy -0.762 1.27)
(xy 0 2.54)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 0 0)
(xy 0 2.54)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 0 2.54)
(xy 0.762 1.27)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
)
(symbol "+3.3V_1_1"
(pin power_in line (at 0 0 90) (length 0) hide
(name "+3V3" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
)
)
(symbol "power:+3V3" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes)
(property "Reference" "#PWR" (id 0) (at 0 -3.81 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "+3V3" (id 1) (at 0 3.556 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "" (id 2) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_keywords" "power-flag" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "Power symbol creates a global label with name \"+3V3\"" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "+3V3_0_1"
(polyline
(pts
(xy -0.762 1.27)
(xy 0 2.54)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 0 0)
(xy 0 2.54)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 0 2.54)
(xy 0.762 1.27)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
)
(symbol "+3V3_1_1"
(pin power_in line (at 0 0 90) (length 0) hide
(name "+3V3" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
)
)
(symbol "power:GND" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes)
(property "Reference" "#PWR" (id 0) (at 0 -6.35 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "GND" (id 1) (at 0 -3.81 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "" (id 2) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_keywords" "power-flag" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "Power symbol creates a global label with name \"GND\" , ground" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "GND_0_1"
(polyline
(pts
(xy 0 0)
(xy 0 -1.27)
(xy 1.27 -1.27)
(xy 0 -2.54)
(xy -1.27 -1.27)
(xy 0 -1.27)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
)
(symbol "GND_1_1"
(pin power_in line (at 0 0 270) (length 0) hide
(name "GND" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
)
)
)
(junction (at 129.54 78.74) (diameter 0) (color 0 0 0 0)
(uuid 3f1d7446-1899-4571-9fce-3d77f5b9adaa)
)
(junction (at 125.73 88.9) (diameter 0) (color 0 0 0 0)
(uuid 45bf8be3-f9ed-44e5-9a12-ef5835e8d9cb)
)
(junction (at 133.35 83.82) (diameter 0) (color 0 0 0 0)
(uuid 97bdbcb4-ab8e-44a7-aea5-e7e48220827a)
)
(bus_entry (at 127 60.96) (size 2.54 2.54)
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 0dfa9be6-3d47-46c6-b4ea-1d19f007b026)
)
(bus_entry (at 123.19 60.96) (size 2.54 2.54)
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 3551af07-6011-4122-9520-63b091fab687)
)
(bus_entry (at 130.81 60.96) (size 2.54 2.54)
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid c7d5b86b-37f7-4be8-9c6d-f24337192088)
)
(wire (pts (xy 166.37 83.82) (xy 168.91 83.82))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 118be321-218d-4a0b-a038-db654fcf6032)
)
(wire (pts (xy 176.53 88.9) (xy 179.07 88.9))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 17e0dbf4-8f97-44ef-904b-302fc3b7f556)
)
(wire (pts (xy 133.35 121.92) (xy 140.97 121.92))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 216dc44c-ceef-4d91-9cc5-f60b3122b7c2)
)
(wire (pts (xy 129.54 63.5) (xy 129.54 78.74))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 3f359ce4-9700-4ef3-8893-4237e856b67d)
)
(wire (pts (xy 123.19 93.98) (xy 140.97 93.98))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 4963f3bb-d724-4411-b5e1-fb95a751d717)
)
(wire (pts (xy 125.73 63.5) (xy 125.73 88.9))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 67a4c257-a2d6-4738-96d3-46761fb3cf21)
)
(bus (pts (xy 127 60.96) (xy 130.81 60.96))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 71b2e27f-ffa1-4030-b749-cfbc08746372)
)
(wire (pts (xy 184.15 64.77) (xy 184.15 67.31))
(stroke (width 0) (type solid) (color 0 0 0 0))
(uuid 82dc1468-1f4c-4e27-b820-1979bd25b96b)
)
(wire (pts (xy 129.54 78.74) (xy 129.54 116.84))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 969b8f3a-063c-429d-b737-5a43b4c317a2)
)
(wire (pts (xy 140.97 88.9) (xy 125.73 88.9))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 97e476bf-9bac-4bab-92eb-3b355303cb30)
)
(wire (pts (xy 129.54 78.74) (xy 140.97 78.74))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 9b3f73dd-006b-4254-8515-50a22eaf2ab1)
)
(bus (pts (xy 123.19 60.96) (xy 127 60.96))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid b1c0ca22-a1f4-47c7-8546-c1cdc9cf421f)
)
(wire (pts (xy 176.53 83.82) (xy 179.07 83.82))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid b30c52fc-9ba7-41b1-93e4-4a9f154df05e)
)
(wire (pts (xy 176.53 127) (xy 179.07 127))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid b48c85ab-4896-4b01-a9be-8fdc7a3bdaf5)
)
(wire (pts (xy 133.35 63.5) (xy 133.35 83.82))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid b6536e9e-f88c-4d8a-9e05-6e5ada68005e)
)
(wire (pts (xy 133.35 83.82) (xy 133.35 121.92))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid c1c7e22b-a9cc-4902-a876-fb1745ecc2fe)
)
(bus (pts (xy 101.6 60.96) (xy 123.19 60.96))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid c4d35355-2773-45be-a90c-e147d0dfed12)
)
(wire (pts (xy 166.37 127) (xy 168.91 127))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid c5af75f5-7399-48fb-ac6f-e9bb559ee9dc)
)
(wire (pts (xy 176.53 121.92) (xy 179.07 121.92))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid c70d69f1-3b7a-4a76-82e5-ec681cb6cf38)
)
(wire (pts (xy 166.37 121.92) (xy 168.91 121.92))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid c72f7200-3451-497e-8edd-a14219d1b134)
)
(wire (pts (xy 123.19 132.08) (xy 140.97 132.08))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid c7db8adf-3d05-416e-8f90-ce9add900935)
)
(wire (pts (xy 184.15 102.87) (xy 184.15 105.41))
(stroke (width 0) (type solid) (color 0 0 0 0))
(uuid cabc8a3a-9343-4628-80f3-b84ac4a515fd)
)
(wire (pts (xy 140.97 127) (xy 125.73 127))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid cee1ed4e-a053-4e56-ad4a-f0bedff6c9e9)
)
(wire (pts (xy 140.97 116.84) (xy 129.54 116.84))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid cf758c50-061d-443a-a5da-e82229d0ad3e)
)
(wire (pts (xy 166.37 88.9) (xy 168.91 88.9))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid d2cf0bb5-d43f-49b2-84ee-760b00fda0a3)
)
(wire (pts (xy 133.35 83.82) (xy 140.97 83.82))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid f2071bac-7d0a-4aaf-b652-0fb9d8dc04db)
)
(wire (pts (xy 125.73 127) (xy 125.73 88.9))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid f2d64d22-0ba7-4e5d-8132-67b9ef8e45ad)
)
(text "Decoupling" (at 181.61 76.2 90)
(effects (font (size 1.27 1.27)) (justify left bottom))
(uuid 53bbb41a-1c98-4f59-925a-7091705c5b2e)
)
(text "Decoupling" (at 181.61 114.3 90)
(effects (font (size 1.27 1.27)) (justify left bottom))
(uuid 72af2a2b-fe7e-46b4-a8dd-682563695b3c)
)
(label "SPI_MEM.SCK" (at 125.73 76.2 90)
(effects (font (size 1.27 1.27)) (justify left bottom))
(uuid 10669c58-1676-467f-a8b9-e4f609420323)
)
(label "SPI_MEM.MISO" (at 133.35 76.2 90)
(effects (font (size 1.27 1.27)) (justify left bottom))
(uuid 1503c24a-56a9-46e1-903e-caef72cd56b5)
)
(label "SPI_MEM.MOSI" (at 129.54 76.2 90)
(effects (font (size 1.27 1.27)) (justify left bottom))
(uuid 8dcb70d1-0e8f-4d4f-8e75-d63ba0eb7283)
)
(hierarchical_label "SPI_MEM{MISO,MOSI,SCK}" (shape input) (at 101.6 60.96 180)
(effects (font (size 1.27 1.27)) (justify right))
(uuid 1a3b789f-b0ff-415d-be3f-2616c7e31449)
)
(hierarchical_label "BANK_2_~{CS}" (shape input) (at 123.19 132.08 180)
(effects (font (size 1.27 1.27)) (justify right))
(uuid 359abbf2-054f-4436-b577-0d74439eced3)
)
(hierarchical_label "BANK_1_~{CS}" (shape input) (at 123.19 93.98 180)
(effects (font (size 1.27 1.27)) (justify right))
(uuid 7f81a0e1-0950-40d5-9288-69c74d0b5cc1)
)
(symbol (lib_id "power:+3V3") (at 179.07 121.92 270) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid 0ab84bb4-fb9e-4037-abb2-05ad3e5a7f68)
(property "Reference" "#PWR0152" (id 0) (at 175.26 121.92 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "+3V3" (id 1) (at 182.245 122.3538 90)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "" (id 2) (at 179.07 121.92 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 179.07 121.92 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 2f3eb9c3-e92c-4076-adcd-bb03b8b168bd))
)
(symbol (lib_id "power:GND") (at 184.15 113.03 0) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid 0cdc071b-80d3-45e3-b772-b3a3ee7db92e)
(property "Reference" "#PWR0157" (id 0) (at 184.15 119.38 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "GND" (id 1) (at 184.15 117.5926 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Footprint" "" (id 2) (at 184.15 113.03 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 184.15 113.03 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid f1f3d503-c692-4751-8c4b-fa767445d80b))
)
(symbol (lib_id "power:GND") (at 153.67 137.16 0) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid 10b5f89e-99c3-46d5-9391-6afd1a310295)
(property "Reference" "#PWR0149" (id 0) (at 153.67 143.51 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "GND" (id 1) (at 153.67 141.6034 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Footprint" "" (id 2) (at 153.67 137.16 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 153.67 137.16 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 87c8c607-9307-4315-ae63-34aa772517d2))
)
(symbol (lib_name "MT29F1G01ABAFDSF_1") (lib_id "TCY_memory:MT29F1G01ABAFDSF") (at 153.67 86.36 0) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid 33a53d3b-ff2f-4382-9da7-886c44c6babf)
(property "Reference" "U20" (id 0) (at 155.6894 72.5002 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Value" "MT29F1G01ABAFDSF" (id 1) (at 155.6894 75.0371 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "TCY_IC:DFN-8_8x6mm_P1.27mm" (id 2) (at 153.67 116.84 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "https://www.micron.com/-/media/client/global/documents/products/data-sheet/nand-flash/70-series/m78a_1gb_3v_nand_spi.pdf?rev=7270128474b44126bb737f0f07976723" (id 3) (at 153.67 114.3 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 049500a4-f03d-4889-99f9-7de493410cb0))
(pin "2" (uuid d4985372-2271-4382-ab5f-57123202a983))
(pin "3" (uuid cfd9449d-7074-4682-b3f8-ca7b594c991f))
(pin "4" (uuid b7a814ec-19f0-42dd-b6c0-5a0a09d6da19))
(pin "5" (uuid 44ab5ff6-f9d6-489b-b3f2-180c492c7ccc))
(pin "6" (uuid 1ba23e72-ff83-40ff-810a-00eb6037fec8))
(pin "7" (uuid 21aa46c9-d094-49fb-b1f6-98ed60f97e19))
(pin "8" (uuid b2e33e73-9039-425f-beba-25a1b9f14c52))
)
(symbol (lib_id "Device:C") (at 184.15 109.22 0) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid 37d36d0d-3ceb-4a21-a8dd-7dc60e7ddee0)
(property "Reference" "C37" (id 0) (at 187.0711 108.3115 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Value" "100nF" (id 1) (at 187.0711 111.0866 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "TCY_passives:C_0603_1608Metric" (id 2) (at 185.1152 113.03 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "~" (id 3) (at 184.15 109.22 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 1b88e297-b89d-47b2-a512-524e1aa98dae))
(pin "2" (uuid cf86d761-01ac-4ea9-a193-ecc37b6def96))
)
(symbol (lib_id "power:+3.3V") (at 184.15 64.77 0) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid 3ed76fcc-bce1-457f-a5d6-efb42ce04110)
(property "Reference" "#PWR0154" (id 0) (at 184.15 68.58 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "+3.3V" (id 1) (at 184.15 61.1655 0))
(property "Footprint" "" (id 2) (at 184.15 64.77 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 184.15 64.77 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 49edce68-cca0-473a-9f15-91f28d8ea3ab))
)
(symbol (lib_id "power:+3.3V") (at 184.15 102.87 0) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid 43c7e56d-a203-4b6b-a9d6-6c03f5575d6d)
(property "Reference" "#PWR0156" (id 0) (at 184.15 106.68 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "+3.3V" (id 1) (at 184.15 99.2655 0))
(property "Footprint" "" (id 2) (at 184.15 102.87 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 184.15 102.87 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid ab420eff-c0a3-4e1f-a28a-e20823670513))
)
(symbol (lib_id "power:GND") (at 184.15 74.93 0) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid 4918732b-1fe9-451f-a468-33950d0821c2)
(property "Reference" "#PWR0155" (id 0) (at 184.15 81.28 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "GND" (id 1) (at 184.15 79.4926 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Footprint" "" (id 2) (at 184.15 74.93 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 184.15 74.93 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 471ba557-4d1c-4a07-86cf-86a47b2b85e3))
)
(symbol (lib_id "power:+3V3") (at 153.67 73.66 0) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid 4d21504f-3827-43b3-8eeb-7ad1cd213a20)
(property "Reference" "#PWR0146" (id 0) (at 153.67 77.47 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "+3V3" (id 1) (at 153.67 70.0842 0))
(property "Footprint" "" (id 2) (at 153.67 73.66 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 153.67 73.66 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 1520224b-19e9-46b3-a85b-4dfb511ada02))
)
(symbol (lib_id "Device:R") (at 172.72 127 90) (unit 1)
(in_bom yes) (on_board yes)
(uuid 504e70ec-15ab-463e-adc4-d377a2d11ac9)
(property "Reference" "R34" (id 0) (at 170.18 124.46 90))
(property "Value" "0R" (id 1) (at 175.26 124.46 90))
(property "Footprint" "TCY_passives:R_0603_1608Metric" (id 2) (at 172.72 128.778 90)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "~" (id 3) (at 172.72 127 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid e48b80b5-7f9c-49e3-b747-9efd3217d314))
(pin "2" (uuid c014afb9-87ea-4242-861a-b3e0590ea68b))
)
(symbol (lib_id "power:+3V3") (at 153.67 111.76 0) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid 71deb0e4-e8a7-4cb3-b7a5-f3eb9ac99e5c)
(property "Reference" "#PWR0148" (id 0) (at 153.67 115.57 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "+3V3" (id 1) (at 153.67 108.1842 0))
(property "Footprint" "" (id 2) (at 153.67 111.76 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 153.67 111.76 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 70e5fa6f-d198-4932-9e06-2f82e3c627d9))
)
(symbol (lib_id "power:+3V3") (at 179.07 83.82 270) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid 73dc1946-7990-44c9-b595-a9540cae5f13)
(property "Reference" "#PWR0150" (id 0) (at 175.26 83.82 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "+3V3" (id 1) (at 182.245 84.2538 90)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "" (id 2) (at 179.07 83.82 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 179.07 83.82 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 087232cb-fc7d-40fb-9764-c9e4abafc914))
)
(symbol (lib_id "Device:R") (at 172.72 88.9 90) (unit 1)
(in_bom yes) (on_board yes)
(uuid 96f42c2b-3faf-4f52-bb9f-cdc6bbb29d56)
(property "Reference" "R32" (id 0) (at 170.18 86.36 90))
(property "Value" "0R" (id 1) (at 175.26 86.36 90))
(property "Footprint" "TCY_passives:R_0603_1608Metric" (id 2) (at 172.72 90.678 90)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "~" (id 3) (at 172.72 88.9 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 0670e08e-520f-4d32-8352-529e47fe6db9))
(pin "2" (uuid 3318874f-a19f-4ac8-95a3-5cb572fdaab4))
)
(symbol (lib_id "power:+3V3") (at 179.07 88.9 270) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid 9b875d9a-bdc9-41a7-a632-fa3cdb8998b9)
(property "Reference" "#PWR0151" (id 0) (at 175.26 88.9 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "+3V3" (id 1) (at 182.245 89.3338 90)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "" (id 2) (at 179.07 88.9 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 179.07 88.9 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid b89c3b0d-f3b8-4118-b900-e4b450517240))
)
(symbol (lib_id "Device:R") (at 172.72 121.92 90) (unit 1)
(in_bom yes) (on_board yes)
(uuid a45808ca-e5e1-4425-8e91-11a1b8468ecd)
(property "Reference" "R33" (id 0) (at 170.18 119.38 90))
(property "Value" "0R" (id 1) (at 175.26 119.38 90))
(property "Footprint" "TCY_passives:R_0603_1608Metric" (id 2) (at 172.72 123.698 90)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "~" (id 3) (at 172.72 121.92 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid f3b03709-9ae9-4693-8e5c-2d033cc6438d))
(pin "2" (uuid 22c40849-526f-41a8-8491-f80b6ea00a70))
)
(symbol (lib_id "Device:R") (at 172.72 83.82 90) (unit 1)
(in_bom yes) (on_board yes)
(uuid e0b66169-5029-402b-9b16-8ec4f0cff19b)
(property "Reference" "R31" (id 0) (at 170.18 81.28 90))
(property "Value" "0R" (id 1) (at 175.26 81.28 90))
(property "Footprint" "TCY_passives:R_0603_1608Metric" (id 2) (at 172.72 85.598 90)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "~" (id 3) (at 172.72 83.82 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid c859d017-10c1-40ed-93bf-e12b3ef17052))
(pin "2" (uuid 32293d93-b56b-4021-8658-40534f1a6130))
)
(symbol (lib_id "power:+3V3") (at 179.07 127 270) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid e6d7e1bd-4b19-45dd-97c8-dd3d180ade81)
(property "Reference" "#PWR0153" (id 0) (at 175.26 127 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "+3V3" (id 1) (at 182.245 127.4338 90)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "" (id 2) (at 179.07 127 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 179.07 127 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid ef666c94-1f02-4b1c-959c-4e9c65899f81))
)
(symbol (lib_id "TCY_memory:MT29F1G01ABAFDSF") (at 153.67 124.46 0) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid f7d84e3f-f667-4649-b074-3c85ea256b8a)
(property "Reference" "U21" (id 0) (at 155.6894 110.6002 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Value" "MT29F1G01ABAFDSF" (id 1) (at 155.6894 113.1371 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "TCY_IC:DFN-8_8x6mm_P1.27mm" (id 2) (at 153.67 154.94 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "https://www.micron.com/-/media/client/global/documents/products/data-sheet/nand-flash/70-series/m78a_1gb_3v_nand_spi.pdf?rev=7270128474b44126bb737f0f07976723" (id 3) (at 153.67 152.4 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid e753b840-67f3-489e-9f9e-9f24a613e978))
(pin "2" (uuid c00c3d16-ff1b-4667-8c1a-e89564548068))
(pin "3" (uuid c1a5108b-f59e-4cb8-bdc5-c79b8f1be77b))
(pin "4" (uuid f18d308d-be58-4128-890c-3df0044b44fa))
(pin "5" (uuid 67e65f34-630f-4ece-8177-851864edb272))
(pin "6" (uuid 6f8a0e94-501d-4fdf-8e73-cfcb70c37432))
(pin "7" (uuid 52c52128-60ce-4bdd-a458-759388b98e0f))
(pin "8" (uuid 8a6f90f7-1fba-4c82-8672-2a1150026469))
)
(symbol (lib_id "power:GND") (at 153.67 99.06 0) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid f7ded48a-3462-4eed-9700-a9900ab3fb3b)
(property "Reference" "#PWR0147" (id 0) (at 153.67 105.41 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "GND" (id 1) (at 153.67 103.5034 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Footprint" "" (id 2) (at 153.67 99.06 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 153.67 99.06 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 8e1420c9-3be0-4faf-b09b-0ae88e1e1d10))
)
(symbol (lib_id "Device:C") (at 184.15 71.12 0) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid ff7520c4-64bd-4f84-9461-bde3e199c7fe)
(property "Reference" "C36" (id 0) (at 187.0711 70.2115 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Value" "100nF" (id 1) (at 187.0711 72.9866 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "TCY_passives:C_0603_1608Metric" (id 2) (at 185.1152 74.93 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "~" (id 3) (at 184.15 71.12 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid adbd4734-30c7-4b53-a21a-efcd65b6f6b3))
(pin "2" (uuid 4730dbc3-3b5e-4c61-994f-a147f57c1af8))
)
)

1204
modules/FC/IMU.kicad_sch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
(kicad_sch (version 20211123) (generator eeschema)
(uuid 2545c40d-c5a0-44b7-87db-18f60adb5bad)
(paper "A4")
(lib_symbols
)
)

4990
modules/FC/MCU.kicad_sch Normal file

File diff suppressed because it is too large Load Diff

1060
modules/FC/Memory.kicad_sch Normal file

File diff suppressed because it is too large Load Diff

1691
modules/FC/Power.kicad_sch Normal file

File diff suppressed because it is too large Load Diff

10
modules/FC/RAM.kicad_sch Normal file
View File

@ -0,0 +1,10 @@
(kicad_sch (version 20211123) (generator eeschema)
(uuid 2545c40d-c5a0-44b7-87db-18f60adb5bad)
(paper "A4")
(lib_symbols
)
)

View File

@ -0,0 +1,10 @@
(kicad_sch (version 20211123) (generator eeschema)
(uuid 2545c40d-c5a0-44b7-87db-18f60adb5bad)
(paper "A4")
(lib_symbols
)
)

File diff suppressed because one or more lines are too long

1
modules/FC/fp-info-cache Normal file
View File

@ -0,0 +1 @@
0

1
modules/FC/fw/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
build/

42
modules/FC/fw/.mxproject Normal file

File diff suppressed because one or more lines are too long

View File

@ -57,14 +57,66 @@ void Error_Handler(void);
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
#define WDG_RESET_Pin GPIO_PIN_13
#define WDG_RESET_GPIO_Port GPIOC
#define LSE_Pin GPIO_PIN_14
#define LSE_GPIO_Port GPIOC
#define I2C_MUX_2_Pin GPIO_PIN_15
#define I2C_MUX_2_GPIO_Port GPIOC
#define HSE_Pin GPIO_PIN_0
#define HSE_GPIO_Port GPIOH
#define I2C_MUX_1_Pin GPIO_PIN_1
#define I2C_MUX_1_GPIO_Port GPIOH
#define EEPROM_CS_Pin GPIO_PIN_0
#define EEPROM_CS_GPIO_Port GPIOA
#define MRAM_CS_Pin GPIO_PIN_1
#define MRAM_CS_GPIO_Port GPIOA
#define FRAM_CS_Pin GPIO_PIN_2
#define FRAM_CS_GPIO_Port GPIOA
#define I2C_FAULT_Pin GPIO_PIN_3
#define I2C_FAULT_GPIO_Port GPIOA
#define CAMERA_EN_Pin GPIO_PIN_4
#define CAMERA_EN_GPIO_Port GPIOA
#define SPI_PER_SCK_Pin GPIO_PIN_5
#define SPI_PER_SCK_GPIO_Port GPIOA
#define SPI_PER_MISO_Pin GPIO_PIN_6
#define SPI_PER_MISO_GPIO_Port GPIOA
#define SPI_PER_MOSI_Pin GPIO_PIN_7
#define SPI_PER_MOSI_GPIO_Port GPIOA
#define CAMERA_CS_Pin GPIO_PIN_0
#define CAMERA_CS_GPIO_Port GPIOB
#define RS_485_T_EN_Pin GPIO_PIN_1
#define RS_485_T_EN_GPIO_Port GPIOB
#define RS_485_R_EN_Pin GPIO_PIN_2
#define RS_485_R_EN_GPIO_Port GPIOB
#define UART_RS_485_R_Pin GPIO_PIN_10
#define UART_RS_485_R_GPIO_Port GPIOB
#define UART_RS_485_T_Pin GPIO_PIN_11
#define UART_RS_485_T_GPIO_Port GPIOB
#define CAN1_RS_Pin GPIO_PIN_14
#define CAN1_RS_GPIO_Port GPIOB
#define LED1_Pin GPIO_PIN_15
#define LED1_GPIO_Port GPIOB
#define LED2_Pin GPIO_PIN_8
#define LED2_GPIO_Port GPIOA
#define UART_DBG_Pin GPIO_PIN_9
#define UART_DBG_GPIO_Port GPIOA
#define UART_DBGA10_Pin GPIO_PIN_10
#define UART_DBGA10_GPIO_Port GPIOA
#define GYRO_ACC_CS_Pin GPIO_PIN_15
#define GYRO_ACC_CS_GPIO_Port GPIOA
#define SPI_MEM_SCK_Pin GPIO_PIN_3
#define SPI_MEM_SCK_GPIO_Port GPIOB
#define SPI_MEM_MISO_Pin GPIO_PIN_4
#define SPI_MEM_MISO_GPIO_Port GPIOB
#define SPI_MEM_MOSI_Pin GPIO_PIN_5
#define SPI_MEM_MOSI_GPIO_Port GPIOB
#define BANK_1_CS_Pin GPIO_PIN_6
#define BANK_1_CS_GPIO_Port GPIOB
#define BANK_2_CS_Pin GPIO_PIN_7
#define BANK_2_CS_GPIO_Port GPIOB
#define MAGNETO_CS_Pin GPIO_PIN_3
#define MAGNETO_CS_GPIO_Port GPIOH
/* USER CODE BEGIN Private defines */

View File

@ -38,7 +38,7 @@
#define HAL_MODULE_ENABLED
/*#define HAL_ADC_MODULE_ENABLED */
/*#define HAL_CRYP_MODULE_ENABLED */
/*#define HAL_CAN_MODULE_ENABLED */
#define HAL_CAN_MODULE_ENABLED
/*#define HAL_COMP_MODULE_ENABLED */
/*#define HAL_CRC_MODULE_ENABLED */
/*#define HAL_CRYP_MODULE_ENABLED */
@ -63,7 +63,7 @@
/*#define HAL_OPAMP_MODULE_ENABLED */
/*#define HAL_OSPI_MODULE_ENABLED */
/*#define HAL_OSPI_MODULE_ENABLED */
/*#define HAL_PCD_MODULE_ENABLED */
#define HAL_PCD_MODULE_ENABLED
/*#define HAL_PKA_MODULE_ENABLED */
/*#define HAL_QSPI_MODULE_ENABLED */
/*#define HAL_QSPI_MODULE_ENABLED */
@ -182,7 +182,7 @@
*/
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
#define TICK_INT_PRIORITY 15U /*!< tick interrupt priority */
#define TICK_INT_PRIORITY 0U /*!< tick interrupt priority */
#define USE_RTOS 0U
#define PREFETCH_ENABLE 0U
#define INSTRUCTION_CACHE_ENABLE 1U

View File

@ -55,8 +55,7 @@ void SVC_Handler(void);
void DebugMon_Handler(void);
void PendSV_Handler(void);
void SysTick_Handler(void);
void DMA1_Channel2_IRQHandler(void);
void DMA1_Channel3_IRQHandler(void);
void USB_IRQHandler(void);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */

View File

@ -0,0 +1,523 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "usb_device.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
CAN_HandleTypeDef hcan1;
I2C_HandleTypeDef hi2c1;
SPI_HandleTypeDef hspi1;
SPI_HandleTypeDef hspi3;
UART_HandleTypeDef huart1;
UART_HandleTypeDef huart3;
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_CAN1_Init(void);
static void MX_I2C1_Init(void);
static void MX_SPI1_Init(void);
static void MX_SPI3_Init(void);
static void MX_USART1_UART_Init(void);
static void MX_USART3_UART_Init(void);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_CAN1_Init();
MX_I2C1_Init();
MX_SPI1_Init();
MX_SPI3_Init();
MX_USART1_UART_Init();
MX_USART3_UART_Init();
MX_USB_DEVICE_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
HAL_Delay(500);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_15, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_SET);
HAL_Delay(500);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_15, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET);
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** Configure the main internal regulator output voltage
*/
if (HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1) != HAL_OK)
{
Error_Handler();
}
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSE|RCC_OSCILLATORTYPE_MSI;
RCC_OscInitStruct.LSEState = RCC_LSE_BYPASS;
RCC_OscInitStruct.MSIState = RCC_MSI_ON;
RCC_OscInitStruct.MSICalibrationValue = 0;
RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_6;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_MSI;
RCC_OscInitStruct.PLL.PLLM = 1;
RCC_OscInitStruct.PLL.PLLN = 40;
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV7;
RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;
RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4) != HAL_OK)
{
Error_Handler();
}
/** Enable MSI Auto calibration
*/
HAL_RCCEx_EnableMSIPLLMode();
}
/**
* @brief CAN1 Initialization Function
* @param None
* @retval None
*/
static void MX_CAN1_Init(void)
{
/* USER CODE BEGIN CAN1_Init 0 */
/* USER CODE END CAN1_Init 0 */
/* USER CODE BEGIN CAN1_Init 1 */
/* USER CODE END CAN1_Init 1 */
hcan1.Instance = CAN1;
hcan1.Init.Prescaler = 80;
hcan1.Init.Mode = CAN_MODE_NORMAL;
hcan1.Init.SyncJumpWidth = CAN_SJW_1TQ;
hcan1.Init.TimeSeg1 = CAN_BS1_1TQ;
hcan1.Init.TimeSeg2 = CAN_BS2_1TQ;
hcan1.Init.TimeTriggeredMode = DISABLE;
hcan1.Init.AutoBusOff = DISABLE;
hcan1.Init.AutoWakeUp = DISABLE;
hcan1.Init.AutoRetransmission = DISABLE;
hcan1.Init.ReceiveFifoLocked = DISABLE;
hcan1.Init.TransmitFifoPriority = DISABLE;
if (HAL_CAN_Init(&hcan1) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN CAN1_Init 2 */
/* USER CODE END CAN1_Init 2 */
}
/**
* @brief I2C1 Initialization Function
* @param None
* @retval None
*/
static void MX_I2C1_Init(void)
{
/* USER CODE BEGIN I2C1_Init 0 */
/* USER CODE END I2C1_Init 0 */
/* USER CODE BEGIN I2C1_Init 1 */
/* USER CODE END I2C1_Init 1 */
hi2c1.Instance = I2C1;
hi2c1.Init.Timing = 0x10909CEC;
hi2c1.Init.OwnAddress1 = 0;
hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
hi2c1.Init.OwnAddress2 = 0;
hi2c1.Init.OwnAddress2Masks = I2C_OA2_NOMASK;
hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
if (HAL_I2C_Init(&hi2c1) != HAL_OK)
{
Error_Handler();
}
/** Configure Analogue filter
*/
if (HAL_I2CEx_ConfigAnalogFilter(&hi2c1, I2C_ANALOGFILTER_ENABLE) != HAL_OK)
{
Error_Handler();
}
/** Configure Digital filter
*/
if (HAL_I2CEx_ConfigDigitalFilter(&hi2c1, 0) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN I2C1_Init 2 */
/* USER CODE END I2C1_Init 2 */
}
/**
* @brief SPI1 Initialization Function
* @param None
* @retval None
*/
static void MX_SPI1_Init(void)
{
/* USER CODE BEGIN SPI1_Init 0 */
/* USER CODE END SPI1_Init 0 */
/* USER CODE BEGIN SPI1_Init 1 */
/* USER CODE END SPI1_Init 1 */
/* SPI1 parameter configuration*/
hspi1.Instance = SPI1;
hspi1.Init.Mode = SPI_MODE_MASTER;
hspi1.Init.Direction = SPI_DIRECTION_2LINES;
hspi1.Init.DataSize = SPI_DATASIZE_4BIT;
hspi1.Init.CLKPolarity = SPI_POLARITY_LOW;
hspi1.Init.CLKPhase = SPI_PHASE_1EDGE;
hspi1.Init.NSS = SPI_NSS_SOFT;
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
hspi1.Init.CRCPolynomial = 7;
hspi1.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE;
hspi1.Init.NSSPMode = SPI_NSS_PULSE_ENABLE;
if (HAL_SPI_Init(&hspi1) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN SPI1_Init 2 */
/* USER CODE END SPI1_Init 2 */
}
/**
* @brief SPI3 Initialization Function
* @param None
* @retval None
*/
static void MX_SPI3_Init(void)
{
/* USER CODE BEGIN SPI3_Init 0 */
/* USER CODE END SPI3_Init 0 */
/* USER CODE BEGIN SPI3_Init 1 */
/* USER CODE END SPI3_Init 1 */
/* SPI3 parameter configuration*/
hspi3.Instance = SPI3;
hspi3.Init.Mode = SPI_MODE_MASTER;
hspi3.Init.Direction = SPI_DIRECTION_2LINES;
hspi3.Init.DataSize = SPI_DATASIZE_4BIT;
hspi3.Init.CLKPolarity = SPI_POLARITY_LOW;
hspi3.Init.CLKPhase = SPI_PHASE_1EDGE;
hspi3.Init.NSS = SPI_NSS_SOFT;
hspi3.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
hspi3.Init.FirstBit = SPI_FIRSTBIT_MSB;
hspi3.Init.TIMode = SPI_TIMODE_DISABLE;
hspi3.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
hspi3.Init.CRCPolynomial = 7;
hspi3.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE;
hspi3.Init.NSSPMode = SPI_NSS_PULSE_ENABLE;
if (HAL_SPI_Init(&hspi3) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN SPI3_Init 2 */
/* USER CODE END SPI3_Init 2 */
}
/**
* @brief USART1 Initialization Function
* @param None
* @retval None
*/
static void MX_USART1_UART_Init(void)
{
/* USER CODE BEGIN USART1_Init 0 */
/* USER CODE END USART1_Init 0 */
/* USER CODE BEGIN USART1_Init 1 */
/* USER CODE END USART1_Init 1 */
huart1.Instance = USART1;
huart1.Init.BaudRate = 115200;
huart1.Init.WordLength = UART_WORDLENGTH_8B;
huart1.Init.StopBits = UART_STOPBITS_1;
huart1.Init.Parity = UART_PARITY_NONE;
huart1.Init.Mode = UART_MODE_TX_RX;
huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart1.Init.OverSampling = UART_OVERSAMPLING_16;
huart1.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
huart1.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
if (HAL_UART_Init(&huart1) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN USART1_Init 2 */
/* USER CODE END USART1_Init 2 */
}
/**
* @brief USART3 Initialization Function
* @param None
* @retval None
*/
static void MX_USART3_UART_Init(void)
{
/* USER CODE BEGIN USART3_Init 0 */
/* USER CODE END USART3_Init 0 */
/* USER CODE BEGIN USART3_Init 1 */
/* USER CODE END USART3_Init 1 */
huart3.Instance = USART3;
huart3.Init.BaudRate = 115200;
huart3.Init.WordLength = UART_WORDLENGTH_8B;
huart3.Init.StopBits = UART_STOPBITS_1;
huart3.Init.Parity = UART_PARITY_NONE;
huart3.Init.Mode = UART_MODE_TX_RX;
huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart3.Init.OverSampling = UART_OVERSAMPLING_16;
huart3.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
huart3.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
if (HAL_UART_Init(&huart3) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN USART3_Init 2 */
/* USER CODE END USART3_Init 2 */
}
/**
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOH_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOC, WDG_RESET_Pin|I2C_MUX_2_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOH, I2C_MUX_1_Pin|MAGNETO_CS_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOA, EEPROM_CS_Pin|MRAM_CS_Pin|FRAM_CS_Pin|CAMERA_EN_Pin
|LED2_Pin|GYRO_ACC_CS_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOB, CAMERA_CS_Pin|RS_485_T_EN_Pin|RS_485_R_EN_Pin|CAN1_RS_Pin
|LED1_Pin|BANK_1_CS_Pin|BANK_2_CS_Pin, GPIO_PIN_RESET);
/*Configure GPIO pins : WDG_RESET_Pin I2C_MUX_2_Pin */
GPIO_InitStruct.Pin = WDG_RESET_Pin|I2C_MUX_2_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
/*Configure GPIO pins : I2C_MUX_1_Pin MAGNETO_CS_Pin */
GPIO_InitStruct.Pin = I2C_MUX_1_Pin|MAGNETO_CS_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOH, &GPIO_InitStruct);
/*Configure GPIO pins : EEPROM_CS_Pin MRAM_CS_Pin FRAM_CS_Pin CAMERA_EN_Pin
LED2_Pin GYRO_ACC_CS_Pin */
GPIO_InitStruct.Pin = EEPROM_CS_Pin|MRAM_CS_Pin|FRAM_CS_Pin|CAMERA_EN_Pin
|LED2_Pin|GYRO_ACC_CS_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/*Configure GPIO pin : I2C_FAULT_Pin */
GPIO_InitStruct.Pin = I2C_FAULT_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(I2C_FAULT_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : CAMERA_CS_Pin RS_485_T_EN_Pin RS_485_R_EN_Pin CAN1_RS_Pin
LED1_Pin BANK_1_CS_Pin BANK_2_CS_Pin */
GPIO_InitStruct.Pin = CAMERA_CS_Pin|RS_485_T_EN_Pin|RS_485_R_EN_Pin|CAN1_RS_Pin
|LED1_Pin|BANK_1_CS_Pin|BANK_2_CS_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
}
/* USER CODE BEGIN 4 */
/* USER CODE END 4 */
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t *file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */

View File

@ -23,9 +23,6 @@
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
extern DMA_HandleTypeDef hdma_spi1_rx;
extern DMA_HandleTypeDef hdma_spi1_tx;
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN TD */
@ -79,6 +76,71 @@ void HAL_MspInit(void)
/* USER CODE END MspInit 1 */
}
/**
* @brief CAN MSP Initialization
* This function configures the hardware resources used in this example
* @param hcan: CAN handle pointer
* @retval None
*/
void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
if(hcan->Instance==CAN1)
{
/* USER CODE BEGIN CAN1_MspInit 0 */
/* USER CODE END CAN1_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_CAN1_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
/**CAN1 GPIO Configuration
PB12 ------> CAN1_RX
PB13 ------> CAN1_TX
*/
GPIO_InitStruct.Pin = GPIO_PIN_12|GPIO_PIN_13;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF10_CAN1;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/* USER CODE BEGIN CAN1_MspInit 1 */
/* USER CODE END CAN1_MspInit 1 */
}
}
/**
* @brief CAN MSP De-Initialization
* This function freeze the hardware resources used in this example
* @param hcan: CAN handle pointer
* @retval None
*/
void HAL_CAN_MspDeInit(CAN_HandleTypeDef* hcan)
{
if(hcan->Instance==CAN1)
{
/* USER CODE BEGIN CAN1_MspDeInit 0 */
/* USER CODE END CAN1_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_CAN1_CLK_DISABLE();
/**CAN1 GPIO Configuration
PB12 ------> CAN1_RX
PB13 ------> CAN1_TX
*/
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_12|GPIO_PIN_13);
/* USER CODE BEGIN CAN1_MspDeInit 1 */
/* USER CODE END CAN1_MspDeInit 1 */
}
}
/**
* @brief I2C MSP Initialization
* This function configures the hardware resources used in this example
@ -111,7 +173,7 @@ void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c)
*/
GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF4_I2C1;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
@ -179,52 +241,42 @@ void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
PA6 ------> SPI1_MISO
PA7 ------> SPI1_MOSI
*/
GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7;
GPIO_InitStruct.Pin = SPI_PER_SCK_Pin|SPI_PER_MISO_Pin|SPI_PER_MOSI_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/* SPI1 DMA Init */
/* SPI1_RX Init */
hdma_spi1_rx.Instance = DMA1_Channel2;
hdma_spi1_rx.Init.Request = DMA_REQUEST_1;
hdma_spi1_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
hdma_spi1_rx.Init.PeriphInc = DMA_PINC_DISABLE;
hdma_spi1_rx.Init.MemInc = DMA_MINC_ENABLE;
hdma_spi1_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
hdma_spi1_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
hdma_spi1_rx.Init.Mode = DMA_NORMAL;
hdma_spi1_rx.Init.Priority = DMA_PRIORITY_HIGH;
if (HAL_DMA_Init(&hdma_spi1_rx) != HAL_OK)
{
Error_Handler();
}
__HAL_LINKDMA(hspi,hdmarx,hdma_spi1_rx);
/* SPI1_TX Init */
hdma_spi1_tx.Instance = DMA1_Channel3;
hdma_spi1_tx.Init.Request = DMA_REQUEST_1;
hdma_spi1_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
hdma_spi1_tx.Init.PeriphInc = DMA_PINC_DISABLE;
hdma_spi1_tx.Init.MemInc = DMA_MINC_ENABLE;
hdma_spi1_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
hdma_spi1_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
hdma_spi1_tx.Init.Mode = DMA_NORMAL;
hdma_spi1_tx.Init.Priority = DMA_PRIORITY_MEDIUM;
if (HAL_DMA_Init(&hdma_spi1_tx) != HAL_OK)
{
Error_Handler();
}
__HAL_LINKDMA(hspi,hdmatx,hdma_spi1_tx);
/* USER CODE BEGIN SPI1_MspInit 1 */
/* USER CODE END SPI1_MspInit 1 */
}
else if(hspi->Instance==SPI3)
{
/* USER CODE BEGIN SPI3_MspInit 0 */
/* USER CODE END SPI3_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_SPI3_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
/**SPI3 GPIO Configuration
PB3 (JTDO/TRACESWO) ------> SPI3_SCK
PB4 (NJTRST) ------> SPI3_MISO
PB5 ------> SPI3_MOSI
*/
GPIO_InitStruct.Pin = SPI_MEM_SCK_Pin|SPI_MEM_MISO_Pin|SPI_MEM_MOSI_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF6_SPI3;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/* USER CODE BEGIN SPI3_MspInit 1 */
/* USER CODE END SPI3_MspInit 1 */
}
}
@ -249,15 +301,31 @@ void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi)
PA6 ------> SPI1_MISO
PA7 ------> SPI1_MOSI
*/
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7);
HAL_GPIO_DeInit(GPIOA, SPI_PER_SCK_Pin|SPI_PER_MISO_Pin|SPI_PER_MOSI_Pin);
/* SPI1 DMA DeInit */
HAL_DMA_DeInit(hspi->hdmarx);
HAL_DMA_DeInit(hspi->hdmatx);
/* USER CODE BEGIN SPI1_MspDeInit 1 */
/* USER CODE END SPI1_MspDeInit 1 */
}
else if(hspi->Instance==SPI3)
{
/* USER CODE BEGIN SPI3_MspDeInit 0 */
/* USER CODE END SPI3_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_SPI3_CLK_DISABLE();
/**SPI3 GPIO Configuration
PB3 (JTDO/TRACESWO) ------> SPI3_SCK
PB4 (NJTRST) ------> SPI3_MISO
PB5 ------> SPI3_MOSI
*/
HAL_GPIO_DeInit(GPIOB, SPI_MEM_SCK_Pin|SPI_MEM_MISO_Pin|SPI_MEM_MOSI_Pin);
/* USER CODE BEGIN SPI3_MspDeInit 1 */
/* USER CODE END SPI3_MspDeInit 1 */
}
}
@ -294,7 +362,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
PA9 ------> USART1_TX
PA10 ------> USART1_RX
*/
GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10;
GPIO_InitStruct.Pin = UART_DBG_Pin|UART_DBGA10_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
@ -328,7 +396,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
PB10 ------> USART3_TX
PB11 ------> USART3_RX
*/
GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_11;
GPIO_InitStruct.Pin = UART_RS_485_R_Pin|UART_RS_485_T_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
@ -362,7 +430,7 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
PA9 ------> USART1_TX
PA10 ------> USART1_RX
*/
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9|GPIO_PIN_10);
HAL_GPIO_DeInit(GPIOA, UART_DBG_Pin|UART_DBGA10_Pin);
/* USER CODE BEGIN USART1_MspDeInit 1 */
@ -380,7 +448,7 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
PB10 ------> USART3_TX
PB11 ------> USART3_RX
*/
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_10|GPIO_PIN_11);
HAL_GPIO_DeInit(GPIOB, UART_RS_485_R_Pin|UART_RS_485_T_Pin);
/* USER CODE BEGIN USART3_MspDeInit 1 */

View File

@ -55,8 +55,7 @@
/* USER CODE END 0 */
/* External variables --------------------------------------------------------*/
extern DMA_HandleTypeDef hdma_spi1_rx;
extern DMA_HandleTypeDef hdma_spi1_tx;
extern PCD_HandleTypeDef hpcd_USB_FS;
/* USER CODE BEGIN EV */
/* USER CODE END EV */
@ -200,31 +199,17 @@ void SysTick_Handler(void)
/******************************************************************************/
/**
* @brief This function handles DMA1 channel2 global interrupt.
* @brief This function handles USB event interrupt through EXTI line 17.
*/
void DMA1_Channel2_IRQHandler(void)
void USB_IRQHandler(void)
{
/* USER CODE BEGIN DMA1_Channel2_IRQn 0 */
/* USER CODE BEGIN USB_IRQn 0 */
/* USER CODE END DMA1_Channel2_IRQn 0 */
HAL_DMA_IRQHandler(&hdma_spi1_rx);
/* USER CODE BEGIN DMA1_Channel2_IRQn 1 */
/* USER CODE END USB_IRQn 0 */
HAL_PCD_IRQHandler(&hpcd_USB_FS);
/* USER CODE BEGIN USB_IRQn 1 */
/* USER CODE END DMA1_Channel2_IRQn 1 */
}
/**
* @brief This function handles DMA1 channel3 global interrupt.
*/
void DMA1_Channel3_IRQHandler(void)
{
/* USER CODE BEGIN DMA1_Channel3_IRQn 0 */
/* USER CODE END DMA1_Channel3_IRQn 0 */
HAL_DMA_IRQHandler(&hdma_spi1_tx);
/* USER CODE BEGIN DMA1_Channel3_IRQn 1 */
/* USER CODE END DMA1_Channel3_IRQn 1 */
/* USER CODE END USB_IRQn 1 */
}
/* USER CODE BEGIN 1 */

Some files were not shown because too many files have changed in this diff Show More