Added M484-based hardware

This commit is contained in:
Alex Taradov 2022-08-05 16:48:28 -07:00
parent cd75a36c65
commit 2f73d7cbee
11 changed files with 11635 additions and 21 deletions

5
hardware/m484-dap/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
output/*
!output/*.pdf
!output/*.zip
fp-info-cache

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,75 @@
{
"board": {
"active_layer": 0,
"active_layer_preset": "",
"auto_track_width": true,
"hidden_nets": [],
"high_contrast_mode": 0,
"net_color_mode": 1,
"opacity": {
"pads": 1.0,
"tracks": 1.0,
"vias": 1.0,
"zones": 0.3100000023841858
},
"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": "7fcffff_80000001",
"zone_display_mode": 0
},
"meta": {
"filename": "m484-dap.kicad_prl",
"version": 3
},
"project": {
"files": []
}
}

View File

@ -0,0 +1,433 @@
{
"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.762,
"height": 1.524,
"width": 1.524
},
"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.1905
}
},
"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": "ignore",
"silk_overlap": "ignore",
"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.0050799999999999994,
"min_clearance": 0.0,
"min_copper_edge_clearance": 0.0,
"min_hole_clearance": 0.0,
"min_hole_to_hole": 0.254,
"min_microvia_diameter": 0.127,
"min_microvia_drill": 0.1016,
"min_silk_clearance": 0.0,
"min_through_hole_diameter": 0.3302,
"min_track_width": 0.1905,
"min_via_annular_width": 0.17779999999999999,
"min_via_diameter": 0.3302,
"solder_mask_clearance": 0.0,
"solder_mask_min_width": 0.0,
"use_height_for_length_calcs": true
},
"track_widths": [
0.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": "ignore",
"pin_not_driven": "error",
"pin_to_pin": "error",
"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": "m484-dap.kicad_pro",
"version": 1
},
"net_settings": {
"classes": [
{
"bus_width": 12.0,
"clearance": 0.1778,
"diff_pair_gap": 0.254,
"diff_pair_via_gap": 0.25,
"diff_pair_width": 0.254,
"line_style": 0,
"microvia_diameter": 0.254,
"microvia_drill": 0.1016,
"name": "Default",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.1905,
"via_diameter": 0.6858,
"via_drill": 0.3302,
"wire_width": 6.0
}
],
"meta": {
"version": 2
},
"net_colors": null
},
"pcbnew": {
"last_paths": {
"gencad": "",
"idf": "",
"netlist": "",
"specctra_dsn": "",
"step": "",
"vrml": ""
},
"page_layout_descr_file": "pcb.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": true,
"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": "sch.kicad_wks",
"plot_directory": "output/",
"spice_adjust_passive_values": false,
"spice_external_command": "spice \"%I\"",
"subpart_first_id": 65,
"subpart_id_separator": 0
},
"sheets": [
[
"9538e4ed-27e6-4c37-b989-9859dc0d49e8",
""
]
],
"text_variables": {}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,5 @@
(kicad_wks (version 20210606) (generator pl_editor)
(setup (textsize 1.5 1.5)(linewidth 0.15)(textlinewidth 0.15)
(left_margin 10)(right_margin 10)(top_margin 10)(bottom_margin 10))
(line (name "segm1:Line") (start 0 0) (end 0 0))
)

View File

@ -0,0 +1,15 @@
(kicad_wks (version 20210606) (generator pl_editor)
(setup (textsize 1.5 1.5)(linewidth 0.15)(textlinewidth 0.15)
(left_margin 10)(right_margin 10)(top_margin 10)(bottom_margin 10))
(rect (name "") (start 0 0 ltcorner) (end 0 0) (repeat 2) (incrx 2) (incry 2))
(line (name "") (start 50 2 ltcorner) (end 50 0 ltcorner) (repeat 30) (incrx 50))
(tbtext "1" (name "") (pos 25 1 ltcorner) (font (size 1.3 1.3)) (repeat 100) (incrx 50))
(line (name "") (start 50 2 lbcorner) (end 50 0 lbcorner) (repeat 30) (incrx 50))
(tbtext "1" (name "") (pos 25 1 lbcorner) (font (size 1.3 1.3)) (repeat 100) (incrx 50))
(line (name "") (start 0 50 ltcorner) (end 2 50 ltcorner) (repeat 30) (incry 50))
(tbtext "A" (name "") (pos 1 25 ltcorner) (font (size 1.3 1.3)) (justify center) (repeat 100) (incry 50))
(line (name "") (start 0 50 rtcorner) (end 2 50 rtcorner) (repeat 30) (incry 50))
(tbtext "A" (name "") (pos 1 25 rtcorner) (font (size 1.3 1.3)) (justify center) (repeat 100) (incry 50))
(tbtext "${TITLE}${SHEETNAME} ${FILENAME}, rev ${REVISION} (${ISSUE_DATE}), page ${#} of ${##}" (name "") (pos 3 4) (justify right) (comment "Sheet id")
)
)

View File

@ -9,32 +9,51 @@
#include "hal_gpio.h"
/*- Definitions -------------------------------------------------------------*/
#define HAL_CONFIG_ENABLE_VCP
//#define HAL_BOARD_GENERIC
#define HAL_BOARD_M484_DAP
HAL_GPIO_PIN(SWCLK_TCK, B, 0)
HAL_GPIO_PIN(SWDIO_TMS, B, 1)
HAL_GPIO_PIN(TDI, B, 2)
HAL_GPIO_PIN(TDO, B, 3)
HAL_GPIO_PIN(nRESET, B, 4)
#if defined(HAL_BOARD_GENERIC)
#define HAL_CONFIG_ENABLE_VCP
HAL_GPIO_PIN(VCP_STATUS, A, 5);
HAL_GPIO_PIN(DAP_STATUS, C, 14);
HAL_GPIO_PIN(SWCLK_TCK, B, 0)
HAL_GPIO_PIN(SWDIO_TMS, B, 1)
HAL_GPIO_PIN(TDI, B, 2)
HAL_GPIO_PIN(TDO, B, 3)
HAL_GPIO_PIN(nRESET, B, 4)
HAL_GPIO_PIN(BOOT_ENTER, A, 7);
HAL_GPIO_PIN(VCP_STATUS, A, 5);
HAL_GPIO_PIN(DAP_STATUS, C, 14);
HAL_GPIO_PIN(UART_RX, A, 0)
HAL_GPIO_PIN(UART_TX, A, 1)
HAL_GPIO_PIN(BOOT_ENTER, A, 7);
#define UART_PER UART0
#define UART_RX_MPF 7
#define UART_TX_MPF 7
#define UART_APBCLK_EN CLK_APBCLK0_UART0CKEN_Msk
#define UART_CLKSEL_REG CLKSEL1
#define UART_CLKSEL_POS CLK_CLKSEL1_UART0SEL_Pos
#define UART_CLKSEL_MSK CLK_CLKSEL1_UART0SEL_Msk
#define UART_IRQ_INDEX UART0_IRQn
#define UART_IRQ_HANDLER irq_handler_uart0
#define UART_CLOCK 192000000
HAL_GPIO_PIN(UART_RX, A, 0)
HAL_GPIO_PIN(UART_TX, A, 1)
#define UART_PER UART0
#define UART_RX_MPF 7
#define UART_TX_MPF 7
#define UART_APBCLK_EN CLK_APBCLK0_UART0CKEN_Msk
#define UART_CLKSEL_REG CLKSEL1
#define UART_CLKSEL_POS CLK_CLKSEL1_UART0SEL_Pos
#define UART_CLKSEL_MSK CLK_CLKSEL1_UART0SEL_Msk
#define UART_IRQ_INDEX UART0_IRQn
#define UART_IRQ_HANDLER irq_handler_uart0
#define UART_CLOCK 192000000
#elif defined(HAL_BOARD_M484_DAP)
HAL_GPIO_PIN(SWCLK_TCK, B, 2)
HAL_GPIO_PIN(SWDIO_TMS, B, 5)
HAL_GPIO_PIN(TDI, A, 8)
HAL_GPIO_PIN(TDO, A, 11)
HAL_GPIO_PIN(nRESET, F, 5)
HAL_GPIO_PIN(DAP_STATUS, B, 7);
HAL_GPIO_PIN(BOOT_ENTER, A, 6);
#else
#error No board defined
#endif
#endif // _HAL_CONFIG_H_