summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.gitmodules3
-rw-r--r--CMakeLists.txt9
-rw-r--r--README.md52
-rw-r--r--RELEASE.md10
-rw-r--r--artifacts/meson.build23
-rw-r--r--cmake/hugo.cmake21
-rw-r--r--cmake/kicad.cmake50
l---------compile_commands.json1
-rw-r--r--fw/CMakeLists.txt37
-rw-r--r--fw/README.md6
-rw-r--r--fw/app/CMakeLists.txt8
-rw-r--r--fw/app/boards/nucleo_f767zi.conf1
-rw-r--r--fw/app/meson.build60
-rw-r--r--fw/app/prj.conf18
-rw-r--r--fw/app/src/http.c67
-rw-r--r--fw/app/src/index.html17
-rw-r--r--fw/app/src/settings.c77
-rw-r--r--fw/app/src/settings.h33
l---------fw/app/src/simple.css1
-rw-r--r--fw/app/src/syslog.c79
-rw-r--r--fw/btl/meson.build25
-rw-r--r--fw/meson.build23
-rwxr-xr-xfw/nucleo.sh38
-rw-r--r--fw/rtos/CMakeLists.txt16
-rw-r--r--fw/rtos/meson.build3
-rw-r--r--fw/rtos/modules/meson.build10
-rw-r--r--fw/sim/meson.build24
-rw-r--r--meson.build13
-rw-r--r--pcb/.gitignore1
-rw-r--r--pcb/CMakeLists.txt21
-rw-r--r--pcb/iot-contact.kicad_sch1447
-rw-r--r--pcb/meson.build41
-rw-r--r--pcb/processor.kicad_sch2754
-rw-r--r--pcb/versions.tsv120
m---------simple.css0
-rw-r--r--tools/LICENSE.txt (renamed from cmake/LICENSE.txt)0
-rwxr-xr-xtools/build_zephyr.py45
-rwxr-xr-xtools/configure_zephyr.py52
-rwxr-xr-xtools/deploy.py58
-rwxr-xr-xtools/make_factory_image.py95
-rw-r--r--tools/meson.build3
-rwxr-xr-xtools/resistor_selector.py327
-rw-r--r--web/CMakeLists.txt9
-rw-r--r--web/hugo.toml2
-rw-r--r--web/index.html28
-rw-r--r--web/layouts/baseof.html11
-rw-r--r--web/layouts/home.html3
-rw-r--r--web/meson.build1
49 files changed, 4680 insertions, 1064 deletions
diff --git a/.gitignore b/.gitignore
index 60fd437..14f1e78 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
.cache
build
log.txt
+compile_commands.json
diff --git a/.gitmodules b/.gitmodules
index 755d4f6..8fcd4bb 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -13,3 +13,6 @@
[submodule "fw/zephyrproject/bootloader/mcuboot"]
path = fw/rtos/modules/mcuboot
url = https://github.com/zephyrproject-rtos/mcuboot.git
+[submodule "simple.css"]
+ path = simple.css
+ url = https://github.com/kevquirk/simple.css.git
diff --git a/CMakeLists.txt b/CMakeLists.txt
deleted file mode 100644
index 90eac62..0000000
--- a/CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-cmake_minimum_required(VERSION 3.10)
-
-project(iot-contact LANGUAGES NONE)
-
-set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
-
-add_subdirectory(fw)
-add_subdirectory(pcb)
-add_subdirectory(web)
diff --git a/README.md b/README.md
index 8b39597..a6dfe0a 100644
--- a/README.md
+++ b/README.md
@@ -3,61 +3,39 @@
iot-contact is an IoT device to check if doors and windows are closed or open.
Furthermore roller shutter motors should be controlled.
-Currently two boards are supported:
-
-- `native_sim/native/64` without bootloader
-- `nucleo_f767zi` with bootloader
-
## Usage
-To build the device repository a firmware signing key is required. It is
-generated with the `imgtool.py`.
-
-```
-mkdir ~/mcuboot
-./imgtool.py keygen --key ~/mcuboot/key.pem --type ed25519
-```
-
-The content of this repository can be build with CMake and Ninja. The
-application firmware will be built for the simulation board to easily use it
-without special hardware.
-
-The bootloader is built for `nucleo_f767zi` since the simulation board is
-currently not supported.
+The source code can be retrieved with `git`.
```
-cmake -Bbuild -GNinja
-ninja -C build
+git clone https://cgit.xengineering.eu/iot-contact
+cd iot-contact
+git submodule update --init
```
-A custom key location can be set by providing `-DKEY=/path/to/key` to the CMake
-call.
-
-To run the simulated firmware a virtual network interface `zeth` and a router
-advertisement daemon have to be provided with an embedded script. Root rights
-are required for that (prefix e.g. with `sudo`).
+To sign the application firmware and thus to build the project a cryptographic
+signing key is required. It can be generated with `imgtool.py`.
```
-./fw/simulate-network.sh
+mkdir ~/mcuboot
+./imgtool.py keygen --key ~/mcuboot/key.pem --type ed25519
```
-With the firmware built and the network being prepared the simulated firmware
-can be run.
+The project is built with the Meson build system.
```
-./build/fw/app/zephyr/zephyr.exe
+meson setup build
+ninja -C build
```
-To build the firmware in a clean `nucleo` build folder, flash it and open a
-serial interface another script can be used for convenience.
+The resulting artifacts can be listed with `tree`.
```
-./fw/nucleo.sh
+tree build/artifacts
```
-Next to the firmware artifacts the exported files related to the printed
-circuit board (PCB) can be found in the build folder.
+These artifacts are organized as static website. It can be opened with Firefox.
```
-tree build/pcb
+firefox build/artifacts/index.html
```
diff --git a/RELEASE.md b/RELEASE.md
new file mode 100644
index 0000000..80f0879
--- /dev/null
+++ b/RELEASE.md
@@ -0,0 +1,10 @@
+This is a mandatory release checklist.
+
+- select a version string with pattern `v<major>.<minor>.<patch>` optionally
+ with a `-pre<count>` suffix (e.g. `v1.2.45-pre67`)
+- reserve resistor combination in `pcb/versions.tsv` by adding version string
+- set values of `R1` and `R2` in root schematic according to `pcb/versions.tsv`
+- write version string to PCB silk screen
+- commit all changes
+- execute all automated and manual tests
+- create release tag
diff --git a/artifacts/meson.build b/artifacts/meson.build
new file mode 100644
index 0000000..ac15661
--- /dev/null
+++ b/artifacts/meson.build
@@ -0,0 +1,23 @@
+artifacts = [
+ index_html,
+ css,
+ schematic,
+ bom,
+ simulation,
+ update_image,
+ factory_image,
+ kicad_pcb,
+]
+
+foreach artifact : artifacts
+ custom_target(
+ output: [fs.name(artifact.full_path())],
+ command: [
+ cp,
+ artifact.full_path(),
+ meson.current_build_dir(),
+ ],
+ depends: artifact,
+ build_by_default: true,
+ )
+endforeach
diff --git a/cmake/hugo.cmake b/cmake/hugo.cmake
deleted file mode 100644
index e065f8b..0000000
--- a/cmake/hugo.cmake
+++ /dev/null
@@ -1,21 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at https://mozilla.org/MPL/2.0/.
-
-function(hugo_site target source sink)
- add_custom_target(
- "${target}"
- ALL
- DEPENDS
- ${sink}
- )
-
- add_custom_command(
- OUTPUT
- ${sink}
- COMMAND
- hugo --source ${source} --destination ${sink}
- DEPENDS
- ${source}
- )
-endfunction()
diff --git a/cmake/kicad.cmake b/cmake/kicad.cmake
deleted file mode 100644
index 0feac80..0000000
--- a/cmake/kicad.cmake
+++ /dev/null
@@ -1,50 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at https://mozilla.org/MPL/2.0/.
-
-function(kicad_schematic_pdf target sink source)
- add_custom_target(
- "${target}"
- ALL
- DEPENDS
- ${sink}
- )
-
- add_custom_command(
- OUTPUT
- ${sink}
- COMMAND
- kicad-cli sch export pdf --output ${sink} ${source}
- COMMAND
- echo "Exported schematic: ${sink}"
- DEPENDS
- ${source}
- JOB_POOL
- kicad
- )
-endfunction()
-
-function(kicad_bom_csv target sink source)
- add_custom_target(
- "${target}"
- ALL
- DEPENDS
- ${sink}
- )
-
- add_custom_command(
- OUTPUT
- ${sink}
- COMMAND
- kicad-cli sch export bom
- --fields 'Reference,Description,Value,Footprint,Manufacturer,MPN,Datasheet'
- --output ${sink}
- ${source}
- COMMAND
- echo "Exported BOM: ${sink}"
- DEPENDS
- ${source}
- JOB_POOL
- kicad
- )
-endfunction()
diff --git a/compile_commands.json b/compile_commands.json
deleted file mode 120000
index 25eb4b2..0000000
--- a/compile_commands.json
+++ /dev/null
@@ -1 +0,0 @@
-build/compile_commands.json \ No newline at end of file
diff --git a/fw/CMakeLists.txt b/fw/CMakeLists.txt
deleted file mode 100644
index 2affe92..0000000
--- a/fw/CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public License,
-# v. 2.0. If a copy of the MPL was not distributed with this file, You can
-# obtain one at https://mozilla.org/MPL/2.0/.
-
-cmake_minimum_required(VERSION 3.20.0)
-
-include(ExternalProject)
-
-set(KEY_DEFAULT "$ENV{HOME}/mcuboot/key.pem")
-set(KEY ${KEY_DEFAULT} CACHE STRING "Firmware signing key path")
-message(STATUS "Firmware signing key path: ${KEY}")
-
-set(BOARD_DEFAULT "native_sim/native/64")
-set(BOARD ${BOARD_DEFAULT} CACHE STRING "Zephyr board identifier")
-message(STATUS "Selected board: ${BOARD}")
-
-add_subdirectory(rtos)
-string(REPLACE ";" "," ZEPHYR_MODULES_COMMA "${ZEPHYR_MODULES}")
-
-if(BOARD STREQUAL "nucleo_f767zi")
- ExternalProject_Add(
- btl
- PREFIX btl
- SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/rtos/modules/mcuboot/boot/zephyr"
- BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/btl"
- INSTALL_COMMAND ""
- LIST_SEPARATOR ","
- CMAKE_ARGS
- "-DBOARD=${BOARD}"
- "-DZEPHYR_BASE=${ZEPHYR_BASE}"
- "-DZEPHYR_MODULES=${ZEPHYR_MODULES_COMMA}"
- "-DEXTRA_CONF_FILE=${CMAKE_CURRENT_SOURCE_DIR}/btl/bootloader.conf"
- -DCONFIG_BOOT_SIGNATURE_KEY_FILE="${KEY}"
- )
-endif()
-
-add_subdirectory(app)
diff --git a/fw/README.md b/fw/README.md
deleted file mode 100644
index 9883b2d..0000000
--- a/fw/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# iot-contact Firmware
-
-This is the firmware for iot-contact. It is based on the Zephyr real time
-operating system [1].
-
-[1]: https://zephyrproject.org
diff --git a/fw/app/CMakeLists.txt b/fw/app/CMakeLists.txt
index 1a9d1cf..de1c418 100644
--- a/fw/app/CMakeLists.txt
+++ b/fw/app/CMakeLists.txt
@@ -19,6 +19,7 @@ target_sources(app
"${CMAKE_CURRENT_SOURCE_DIR}/src/http.c"
"${CMAKE_CURRENT_SOURCE_DIR}/src/ws.c"
"${CMAKE_CURRENT_SOURCE_DIR}/src/heart.c"
+ "${CMAKE_CURRENT_SOURCE_DIR}/src/settings.c"
)
target_sources_ifdef(
@@ -42,6 +43,13 @@ generate_inc_file_for_target(
generate_inc_file_for_target(
app
+ src/simple.css
+ ${ZEPHYR_BINARY_DIR}/include/generated/simple.css.gz.inc
+ --gzip
+)
+
+generate_inc_file_for_target(
+ app
src/iot-contact.js
${ZEPHYR_BINARY_DIR}/include/generated/iot-contact.js.gz.inc
--gzip
diff --git a/fw/app/boards/nucleo_f767zi.conf b/fw/app/boards/nucleo_f767zi.conf
index 7f92421..ca69a03 100644
--- a/fw/app/boards/nucleo_f767zi.conf
+++ b/fw/app/boards/nucleo_f767zi.conf
@@ -3,6 +3,7 @@
# obtain one at https://mozilla.org/MPL/2.0/.
CONFIG_IOT_CONTACT_REMOTE_UPDATE=y
+CONFIG_IOT_CONTACT_NETWORK_HACK=y
CONFIG_BOOTLOADER_MCUBOOT=y
diff --git a/fw/app/meson.build b/fw/app/meson.build
new file mode 100644
index 0000000..6665fe4
--- /dev/null
+++ b/fw/app/meson.build
@@ -0,0 +1,60 @@
+external_project = import('unstable-external_project')
+
+application_source = meson.current_source_dir()
+
+external_project.add_project(
+ configure_zephyr,
+ configure_options: [
+ '--source-tree', application_source,
+ '--build-tree', meson.current_build_dir() / 'build',
+ '--board', board,
+ '--zephyr-base', zephyr,
+ '--zephyr-modules', ';'.join(zephyr_modules),
+ ],
+ verbose: true,
+)
+
+application = custom_target(
+ output: ['application.bin'],
+ command: [
+ build_zephyr,
+ '--build-tree', meson.current_build_dir() / 'build',
+ '--binary-name', 'zephyr.bin',
+ '--target-name', 'application.bin',
+ ],
+)
+
+version = '0.0.0'
+header_size = '0x200'
+slot_size = '0xc0000'
+
+update_image = custom_target(
+ output: ['update-image.bin'],
+ command: [
+ imgtool,
+ 'sign',
+ '--version', version,
+ '--header-size', header_size,
+ '--slot-size', slot_size,
+ '--key', signing_key,
+ application,
+ '@OUTPUT@',
+ ],
+ depends: application,
+)
+
+application_signed_confirmed = custom_target(
+ output: ['application.signed.confirmed.bin'],
+ command: [
+ imgtool,
+ 'sign',
+ '--version', version,
+ '--header-size', header_size,
+ '--slot-size', slot_size,
+ '--key', signing_key,
+ '--confirm',
+ application,
+ '@OUTPUT@',
+ ],
+ depends: application,
+)
diff --git a/fw/app/prj.conf b/fw/app/prj.conf
index 11dc04f..6589ec0 100644
--- a/fw/app/prj.conf
+++ b/fw/app/prj.conf
@@ -21,7 +21,6 @@ CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=4
CONFIG_LOG=y
CONFIG_LOG_BACKEND_NET=y
-CONFIG_LOG_BACKEND_NET_SERVER="[2001:db8::2]:514"
CONFIG_LOG_BACKEND_NET_AUTOSTART=n
CONFIG_LOG_MODE_DEFERRED=y
@@ -43,3 +42,20 @@ CONFIG_ZVFS_POLL_MAX=32
CONFIG_ZBUS=y
CONFIG_ZBUS_MSG_SUBSCRIBER=y
CONFIG_HEAP_MEM_POOL_SIZE=2048
+
+CONFIG_FLASH=y
+CONFIG_FLASH_MAP=y
+
+CONFIG_MPU_ALLOW_FLASH_WRITE=y
+
+CONFIG_NVS=y
+CONFIG_NVS_DATA_CRC=y
+
+CONFIG_SETTINGS=y
+CONFIG_SETTINGS_RUNTIME=y
+CONFIG_SETTINGS_NVS=y
+CONFIG_SETTINGS_SHELL=y
+
+CONFIG_GNU_C_EXTENSIONS=y
+
+CONFIG_JSON_LIBRARY=y
diff --git a/fw/app/src/http.c b/fw/app/src/http.c
index e206f86..f9016c1 100644
--- a/fw/app/src/http.c
+++ b/fw/app/src/http.c
@@ -5,6 +5,7 @@
*/
+#include <errno.h>
#include <stdint.h>
#include <zephyr/init.h>
@@ -13,6 +14,7 @@
#include <zephyr/net/http/service.h>
#include <zephyr/net/http/status.h>
+#include "settings.h"
#include "ws.h"
@@ -34,6 +36,21 @@ struct http_resource_detail_static index_resource_detail = {
.static_data_len = sizeof(index_html_gz),
};
+static const uint8_t css_gz[] = {
+ #include "simple.css.gz.inc"
+};
+
+struct http_resource_detail_static css_resource_detail = {
+ .common = {
+ .type = HTTP_RESOURCE_TYPE_STATIC,
+ .bitmask_of_supported_http_methods = BIT(HTTP_GET),
+ .content_encoding = "gzip",
+ .content_type = "text/css",
+ },
+ .static_data = css_gz,
+ .static_data_len = sizeof(css_gz),
+};
+
static const uint8_t js_html_gz[] = {
#include "iot-contact.js.gz.inc"
};
@@ -76,6 +93,54 @@ static struct http_resource_detail_dynamic favicon_resource_detail = {
.user_data = NULL,
};
+static int settings_handler(
+ struct http_client_ctx *client,
+ enum http_data_status status,
+ const struct http_request_ctx *request_ctx,
+ struct http_response_ctx *response_ctx,
+ void *user_data
+) {
+ static char buffer[SETTINGS_JSON_MAX_LEN];
+
+ int ret = settings_to_json(buffer, sizeof(buffer));
+ if (ret < 0) {
+ LOG_ERR("Could not serialize payload for settings request");
+ return ret;
+ }
+
+ size_t len = strnlen(buffer, sizeof(buffer));
+ if (len >= sizeof(buffer)) {
+ LOG_ERR("End of settings JSON string not found (strnlen returned %d)",
+ sizeof(buffer));
+ return -ENOMEM;
+ }
+
+ if (sizeof(buffer) < len + 2) {
+ LOG_ERR("Settings JSON buffer too small to hold \\n and \\0");
+ return -ENOMEM;
+ }
+ buffer[len + 0] = '\n';
+ buffer[len + 1] = '\0';
+ len += 1;
+
+ response_ctx->body = (const uint8_t *)buffer;
+ response_ctx->body_len = len;
+ response_ctx->final_chunk = true;
+ response_ctx->status = HTTP_200_OK;
+
+ return 0;
+}
+
+static struct http_resource_detail_dynamic settings_resource_detail = {
+ .common = {
+ .type = HTTP_RESOURCE_TYPE_DYNAMIC,
+ .bitmask_of_supported_http_methods = BIT(HTTP_GET),
+ .content_type = "text/json",
+ },
+ .cb = settings_handler,
+ .user_data = NULL,
+};
+
static uint8_t websocket_read_buffer[1024];
struct http_resource_detail_websocket websocket_resource_detail = {
@@ -95,7 +160,9 @@ HTTP_SERVICE_DEFINE(http_service, NULL, &http_port, 1, 10, NULL, NULL);
HTTP_RESOURCE_DEFINE(index_resource, http_service, "/", &index_resource_detail);
HTTP_RESOURCE_DEFINE(websocket_resource, http_service, "/", &websocket_resource_detail);
HTTP_RESOURCE_DEFINE(favicon_resource, http_service, "/favicon.ico", &favicon_resource_detail);
+HTTP_RESOURCE_DEFINE(css_resource, http_service, "/simple.css", &css_resource_detail);
HTTP_RESOURCE_DEFINE(js_resource, http_service, "/iot-contact.js", &js_resource_detail);
+HTTP_RESOURCE_DEFINE(settings_resource, http_service, "/settings.json", &settings_resource_detail);
int init_http_server(void) {
LOG_DBG("Starting HTTP server");
diff --git a/fw/app/src/index.html b/fw/app/src/index.html
index 5817818..d4ccd45 100644
--- a/fw/app/src/index.html
+++ b/fw/app/src/index.html
@@ -8,14 +8,19 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <title>iot-contact</title>
+ <title>IoT contact</title>
+ <link rel="stylesheet" type="text/css" href="simple.css">
<script type="text/javascript" src="/iot-contact.js"></script>
</head>
<body>
- <h4>iot-contact</h4>
- <p>
- <label for="heartbeat">Heartbeat</label>
- <meter id="heartbeat" min="0" max="1" value="0"></meter>
- </p>
+ <header>
+ <h1>IoT contact</h1>
+ </header>
+ <main>
+ <p class="notice">
+ <label for="heartbeat">Heartbeat</label>
+ <meter id="heartbeat" min="0" max="1" value="0"></meter>
+ </p>
+ </main>
</body>
</html>
diff --git a/fw/app/src/settings.c b/fw/app/src/settings.c
new file mode 100644
index 0000000..4b2c248
--- /dev/null
+++ b/fw/app/src/settings.c
@@ -0,0 +1,77 @@
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public License,
+ * v. 2.0. If a copy of the MPL was not distributed with this file, You can
+ * obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+#include <string.h>
+
+#include <zephyr/data/json.h>
+#include <zephyr/init.h>
+#include <zephyr/logging/log.h>
+#include <zephyr/settings/settings.h>
+
+#include "settings.h"
+
+
+LOG_MODULE_DECLARE(settings);
+
+
+int init_settings(void) {
+ int ret = settings_subsys_init();
+ if (ret < 0) {
+ LOG_ERR("Subsystem init failed (%d)", ret);
+ return ret;
+ }
+ LOG_INF("Subsystem initialized");
+
+ ret = settings_load();
+ if (ret < 0) {
+ LOG_ERR("Failed to load settings (%d)", ret);
+ return ret;
+ }
+ LOG_INF("Loaded settings");
+
+ return 0;
+}
+SYS_INIT(init_settings, APPLICATION, 50);
+
+static const struct json_obj_descr settings_syslog_target_descr[] = {
+ JSON_OBJ_DESCR_PRIM(struct settings_syslog_target, ip, JSON_TOK_STRING),
+};
+
+static const struct json_obj_descr settings_syslog_descr[] = {
+ JSON_OBJ_DESCR_OBJECT(struct settings_syslog, target, settings_syslog_target_descr),
+};
+
+static const struct json_obj_descr settings_descr[] = {
+ JSON_OBJ_DESCR_OBJECT(struct settings, syslog, settings_syslog_descr),
+};
+
+int settings_to_json(void *buffer, size_t len)
+{
+ struct settings settings = {0,};
+ settings.syslog.target.ip = (char *)settings.syslog.target.ip_array;
+
+ int ret = settings_runtime_get("syslog/target/ip",
+ settings.syslog.target.ip_array,
+ sizeof(settings.syslog.target.ip_array));
+ if (ret < 0) {
+ LOG_ERR("Failed to get runtime setting syslog/target/ip (%d)", ret);
+ return ret;
+ }
+
+ ret = json_obj_encode_buf(
+ settings_descr,
+ ARRAY_SIZE(settings_descr),
+ &settings,
+ buffer,
+ len
+ );
+ if (ret < 0) {
+ LOG_ERR("Failed to serialize settings as JSON");
+ return ret;
+ }
+
+ return 0;
+}
diff --git a/fw/app/src/settings.h b/fw/app/src/settings.h
new file mode 100644
index 0000000..8c7b4e3
--- /dev/null
+++ b/fw/app/src/settings.h
@@ -0,0 +1,33 @@
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public License,
+ * v. 2.0. If a copy of the MPL was not distributed with this file, You can
+ * obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef SRC_SETTINGS_H
+#define SRC_SETTINGS_H
+
+#include <stddef.h>
+
+#include <zephyr/data/json.h>
+
+#define IPV6_STRLEN_MAX 39 // excluding '\0'
+#define SETTINGS_JSON_MAX_LEN (IPV6_STRLEN_MAX + 50)
+
+
+struct settings_syslog_target {
+ char ip_array[IPV6_STRLEN_MAX];
+ char *ip; /* Zephyr's JSON lib does not work with arrays directly */
+};
+
+struct settings_syslog {
+ struct settings_syslog_target target;
+};
+
+struct settings {
+ struct settings_syslog syslog;
+};
+
+int settings_to_json(void *buffer, size_t data);
+
+#endif // !SRC_SETTINGS_H
diff --git a/fw/app/src/simple.css b/fw/app/src/simple.css
new file mode 120000
index 0000000..5483eb1
--- /dev/null
+++ b/fw/app/src/simple.css
@@ -0,0 +1 @@
+../../../simple.css/simple.css \ No newline at end of file
diff --git a/fw/app/src/syslog.c b/fw/app/src/syslog.c
index e19a196..22aa034 100644
--- a/fw/app/src/syslog.c
+++ b/fw/app/src/syslog.c
@@ -4,8 +4,12 @@
* obtain one at https://mozilla.org/MPL/2.0/.
*/
+#include <errno.h>
#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
+#include <string.h>
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
@@ -14,18 +18,24 @@
#include <zephyr/logging/log_ctrl.h>
#include <zephyr/logging/log_core.h>
#include <zephyr/net/conn_mgr_connectivity.h>
+#include <zephyr/settings/settings.h>
+#include <zephyr/sys/util.h>
#ifdef CONFIG_IOT_CONTACT_NETWORK_HACK
#include <zephyr/sys/reboot.h>
#endif // CONFIG_IOT_CONTACT_NETWORK_HACK
+#include "settings.h"
+
LOG_MODULE_REGISTER(syslog);
#define NETWORK_BUG_DELAY K_MSEC(4000)
#define L4_EVENT_MASK (NET_EVENT_L4_CONNECTED | NET_EVENT_L4_DISCONNECTED)
+#define SYSLOG_TARGET_PORT 514
struct net_mgmt_event_callback l4_cb;
static K_SEM_DEFINE(network_connected, 0, 1);
+static char target_ip[IPV6_STRLEN_MAX + 1] = "2001:db8::2";
void l4_event_handler(
struct net_mgmt_event_callback *cb,
@@ -87,4 +97,71 @@ int init_syslog(void)
return 0;
}
-SYS_INIT(init_syslog, APPLICATION, 50);
+SYS_INIT(init_syslog, APPLICATION, 40);
+
+int syslog_handle_set(const char *name, size_t len, settings_read_cb read_cb,
+ void *cb_arg)
+{
+ const char* next = NULL;
+
+ if (settings_name_steq(name, "target/ip", &next) && !next) {
+ memset(target_ip, '\0', sizeof(target_ip));
+ ssize_t ret = read_cb(cb_arg, target_ip, MIN(sizeof(target_ip) - 1, len));
+ if (ret < 0) {
+ LOG_ERR("Failed to set target IP (%d)", ret);
+ return (int)ret;
+ }
+ LOG_INF("Set target IP to '%s'", target_ip);
+ return 0;
+ }
+
+ return 0;
+}
+
+int syslog_handle_commit(void)
+{
+ char target[IPV6_STRLEN_MAX + 9]; // 9 for brackets, colon, port and \0
+
+ int ret = snprintf(target, sizeof(target), "[%s]:%d", target_ip,
+ SYSLOG_TARGET_PORT);
+ if (ret < 0) {
+ LOG_ERR("Failed to format target based on ip and port (%d)", ret);
+ return ret;
+ }
+
+ if (log_backend_net_set_addr(target) == false) {
+ LOG_ERR("Could not commit settings");
+ return -EINVAL;
+ }
+ LOG_INF("Committed settings");
+
+ return 0;
+}
+
+int syslog_handle_export(int (*cb)(const char *name, const void *value,
+ size_t val_len))
+{
+ LOG_WRN("Settings export not implemented");
+ return 0;
+}
+
+int syslog_handle_get(const char *name, char *val, int val_len_max)
+{
+ const char* next = NULL;
+
+ if (settings_name_steq(name, "target/ip", &next) && !next) {
+ size_t len = strnlen(target_ip, sizeof(target_ip));
+ memcpy(val, target_ip, MIN(len, val_len_max));
+ }
+
+ return 0;
+}
+
+SETTINGS_STATIC_HANDLER_DEFINE(
+ syslog_settings_handler,
+ "syslog",
+ syslog_handle_get,
+ syslog_handle_set,
+ syslog_handle_commit,
+ syslog_handle_export
+);
diff --git a/fw/btl/meson.build b/fw/btl/meson.build
new file mode 100644
index 0000000..204fe20
--- /dev/null
+++ b/fw/btl/meson.build
@@ -0,0 +1,25 @@
+external_project = import('unstable-external_project')
+
+external_project.add_project(
+ configure_zephyr,
+ configure_options: [
+ '--source-tree', bootloader_firmware,
+ '--build-tree', meson.current_build_dir() / 'build',
+ '--board', board,
+ '--zephyr-base', zephyr,
+ '--zephyr-modules', ';'.join(zephyr_modules),
+ '--extra-config', meson.current_source_dir() / 'bootloader.conf',
+ '--signing-key', signing_key,
+ ],
+ verbose: true,
+)
+
+bootloader = custom_target(
+ output: ['bootloader.bin'],
+ command: [
+ build_zephyr,
+ '--build-tree', meson.current_build_dir() / 'build',
+ '--binary-name', 'zephyr.bin',
+ '--target-name', 'bootloader.bin',
+ ],
+)
diff --git a/fw/meson.build b/fw/meson.build
new file mode 100644
index 0000000..8f45d5b
--- /dev/null
+++ b/fw/meson.build
@@ -0,0 +1,23 @@
+board = 'nucleo_f767zi'
+
+fs = import('fs')
+signing_key = fs.expanduser('~') / 'mcuboot' / 'key.pem'
+
+subdir('rtos')
+subdir('app')
+subdir('btl')
+subdir('sim')
+
+factory_image = custom_target(
+ output: ['factory-image.bin'],
+ command: [
+ make_factory_image,
+ '--bootloader', bootloader,
+ '--application', application_signed_confirmed,
+ '--factory-image', '@OUTPUT@',
+ ],
+ depends: [
+ bootloader,
+ application_signed_confirmed,
+ ],
+)
diff --git a/fw/nucleo.sh b/fw/nucleo.sh
deleted file mode 100755
index ad0467b..0000000
--- a/fw/nucleo.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-
-# This Source Code Form is subject to the terms of the Mozilla Public License,
-# v. 2.0. If a copy of the MPL was not distributed with this file, You can
-# obtain one at https://mozilla.org/MPL/2.0/.
-
-
-set -euf
-
-
-SCRIPT="$(realpath "$0")"
-FW="$(dirname "$SCRIPT")"
-ROOT="$(dirname "$FW")"
-BUILD="${ROOT}/build"
-BOOTLOADER_FIRMWARE="${BUILD}/fw/btl/zephyr/zephyr.bin"
-APPLICATION_FIRMWARE="${BUILD}/fw/app/zephyr/zephyr.bin"
-APPLICATION_FIRMWARE_SIGNED="${BUILD}/fw/app/zephyr/zephyr.signed.bin"
-BOOTLOADER_FLASH_ADDRESS='0x8000000'
-APPLICATION_FLASH_ADDRESS='0x8040000'
-IMGTOOL="${ROOT}/imgtool.py"
-KEY="${HOME}/mcuboot/key.pem"
-BOARD='nucleo_f767zi'
-
-
-set -x
-
-python "$IMGTOOL" sign \
- --version 0.0.0 \
- --header-size 0x200 \
- --slot-size 0xc0000 \
- --key "$KEY" \
- "$APPLICATION_FIRMWARE" \
- "$APPLICATION_FIRMWARE_SIGNED"
-st-flash --connect-under-reset write "$BOOTLOADER_FIRMWARE" \
- "$BOOTLOADER_FLASH_ADDRESS"
-st-flash --connect-under-reset write "$APPLICATION_FIRMWARE_SIGNED" \
- "$APPLICATION_FLASH_ADDRESS"
diff --git a/fw/rtos/CMakeLists.txt b/fw/rtos/CMakeLists.txt
deleted file mode 100644
index d9f116c..0000000
--- a/fw/rtos/CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public License,
-# v. 2.0. If a copy of the MPL was not distributed with this file, You can
-# obtain one at https://mozilla.org/MPL/2.0/.
-
-set(ZEPHYR_MODULES
- "${CMAKE_CURRENT_SOURCE_DIR}/modules/cmsis"
- "${CMAKE_CURRENT_SOURCE_DIR}/modules/hal_stm32"
- "${CMAKE_CURRENT_SOURCE_DIR}/modules/mbedtls"
- "${CMAKE_CURRENT_SOURCE_DIR}/modules/mcuboot"
- PARENT_SCOPE
-)
-
-set(ZEPHYR_BASE
- "${CMAKE_CURRENT_SOURCE_DIR}/zephyr"
- PARENT_SCOPE
-)
diff --git a/fw/rtos/meson.build b/fw/rtos/meson.build
new file mode 100644
index 0000000..800153d
--- /dev/null
+++ b/fw/rtos/meson.build
@@ -0,0 +1,3 @@
+subdir('modules')
+
+zephyr = meson.current_source_dir() / 'zephyr'
diff --git a/fw/rtos/modules/meson.build b/fw/rtos/modules/meson.build
new file mode 100644
index 0000000..14b14f5
--- /dev/null
+++ b/fw/rtos/modules/meson.build
@@ -0,0 +1,10 @@
+zephyr_modules = [
+ meson.current_source_dir() / 'cmsis',
+ meson.current_source_dir() / 'hal_stm32',
+ meson.current_source_dir() / 'mbedtls',
+ meson.current_source_dir() / 'mcuboot',
+]
+
+mcuboot = meson.current_source_dir() / 'mcuboot'
+bootloader_firmware = mcuboot / 'boot' / 'zephyr'
+imgtool = mcuboot / 'scripts' / 'imgtool.py'
diff --git a/fw/sim/meson.build b/fw/sim/meson.build
new file mode 100644
index 0000000..5edcad9
--- /dev/null
+++ b/fw/sim/meson.build
@@ -0,0 +1,24 @@
+external_project = import('unstable-external_project')
+
+external_project.add_project(
+ configure_zephyr,
+ configure_options: [
+ '--source-tree', application_source,
+ '--build-tree', meson.current_build_dir() / 'build',
+ '--board', 'native_sim/native/64',
+ '--zephyr-base', zephyr,
+ '--zephyr-modules', ';'.join(zephyr_modules),
+ ],
+ verbose: true,
+)
+
+simulation = custom_target(
+ output: ['simulation-linux-amd64.exe'],
+ command: [
+ build_zephyr,
+ '--build-tree', meson.current_build_dir() / 'build',
+ '--binary-name', 'zephyr.exe',
+ '--target-name', 'simulation-linux-amd64.exe',
+ ],
+ build_by_default: true,
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..9b7d7c1
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,13 @@
+project('iot-contact')
+
+cp = find_program('cp', required : true)
+
+fs = import('fs')
+
+css = fs.copyfile(meson.current_source_dir() / 'simple.css' / 'simple.css')
+
+subdir('tools')
+subdir('fw')
+subdir('pcb')
+subdir('web')
+subdir('artifacts')
diff --git a/pcb/.gitignore b/pcb/.gitignore
index dfd09f9..7132856 100644
--- a/pcb/.gitignore
+++ b/pcb/.gitignore
@@ -3,3 +3,4 @@ fp-info-cache
*.lck
*auto_saved_files*
*-backups
+_autosave*kicad*
diff --git a/pcb/CMakeLists.txt b/pcb/CMakeLists.txt
deleted file mode 100644
index 8d2c49a..0000000
--- a/pcb/CMakeLists.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-cmake_minimum_required(VERSION 3.10)
-
-project(iot-contact-pcb LANGUAGES NONE)
-
-include(kicad)
-
-set_property(GLOBAL PROPERTY JOB_POOLS kicad=1)
-
-set(schematic "${CMAKE_CURRENT_SOURCE_DIR}/iot-contact.kicad_sch")
-
-kicad_schematic_pdf(
- "schematic"
- "${CMAKE_CURRENT_BINARY_DIR}/schematic.pdf"
- "${schematic}"
-)
-
-kicad_bom_csv(
- "bom"
- "${CMAKE_CURRENT_BINARY_DIR}/bom.csv"
- "${schematic}"
-)
diff --git a/pcb/iot-contact.kicad_sch b/pcb/iot-contact.kicad_sch
index 77ac199..8f3da6c 100644
--- a/pcb/iot-contact.kicad_sch
+++ b/pcb/iot-contact.kicad_sch
@@ -8,7 +8,7 @@
(title "iot-contact")
)
(lib_symbols
- (symbol "Connector:Conn_01x02_Socket"
+ (symbol "Connector:Conn_01x05_Socket"
(pin_names
(offset 1.016)
(hide yes)
@@ -17,15 +17,15 @@
(in_bom yes)
(on_board yes)
(property "Reference" "J"
- (at 0 2.54 0)
+ (at 0 7.62 0)
(effects
(font
(size 1.27 1.27)
)
)
)
- (property "Value" "Conn_01x02_Socket"
- (at 0 -5.08 0)
+ (property "Value" "Conn_01x05_Socket"
+ (at 0 -7.62 0)
(effects
(font
(size 1.27 1.27)
@@ -50,7 +50,7 @@
(hide yes)
)
)
- (property "Description" "Generic connector, single row, 01x02, script generated"
+ (property "Description" "Generic connector, single row, 01x05, script generated"
(at 0 0 0)
(effects
(font
@@ -85,47 +85,11 @@
(hide yes)
)
)
- (symbol "Conn_01x02_Socket_1_1"
- (polyline
- (pts
- (xy -1.27 0) (xy -0.508 0)
- )
- (stroke
- (width 0.1524)
- (type default)
- )
- (fill
- (type none)
- )
- )
+ (symbol "Conn_01x05_Socket_1_1"
(polyline
(pts
- (xy -1.27 -2.54) (xy -0.508 -2.54)
- )
- (stroke
- (width 0.1524)
- (type default)
- )
- (fill
- (type none)
- )
- )
- (arc
- (start 0 -0.508)
- (mid -0.5058 0)
- (end 0 0.508)
- (stroke
- (width 0.1524)
- (type default)
+ (xy -1.27 5.08) (xy -0.508 5.08)
)
- (fill
- (type none)
- )
- )
- (arc
- (start 0 -3.048)
- (mid -0.5058 -2.54)
- (end 0 -2.032)
(stroke
(width 0.1524)
(type default)
@@ -134,123 +98,6 @@
(type none)
)
)
- (pin passive line
- (at -5.08 0 0)
- (length 3.81)
- (name "Pin_1"
- (effects
- (font
- (size 1.27 1.27)
- )
- )
- )
- (number "1"
- (effects
- (font
- (size 1.27 1.27)
- )
- )
- )
- )
- (pin passive line
- (at -5.08 -2.54 0)
- (length 3.81)
- (name "Pin_2"
- (effects
- (font
- (size 1.27 1.27)
- )
- )
- )
- (number "2"
- (effects
- (font
- (size 1.27 1.27)
- )
- )
- )
- )
- )
- (embedded_fonts no)
- )
- (symbol "Connector:Conn_01x03_Socket"
- (pin_names
- (offset 1.016)
- (hide yes)
- )
- (exclude_from_sim no)
- (in_bom yes)
- (on_board yes)
- (property "Reference" "J"
- (at 0 5.08 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- )
- )
- (property "Value" "Conn_01x03_Socket"
- (at 0 -5.08 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- )
- )
- (property "Footprint" ""
- (at 0 0 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- (hide yes)
- )
- )
- (property "Datasheet" "~"
- (at 0 0 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- (hide yes)
- )
- )
- (property "Description" "Generic connector, single row, 01x03, script generated"
- (at 0 0 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- (hide yes)
- )
- )
- (property "ki_locked" ""
- (at 0 0 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- )
- )
- (property "ki_keywords" "connector"
- (at 0 0 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- (hide yes)
- )
- )
- (property "ki_fp_filters" "Connector*:*_1x??_*"
- (at 0 0 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- (hide yes)
- )
- )
- (symbol "Conn_01x03_Socket_1_1"
(polyline
(pts
(xy -1.27 2.54) (xy -0.508 2.54)
@@ -287,204 +134,9 @@
(type none)
)
)
- (arc
- (start 0 2.032)
- (mid -0.5058 2.54)
- (end 0 3.048)
- (stroke
- (width 0.1524)
- (type default)
- )
- (fill
- (type none)
- )
- )
- (arc
- (start 0 -0.508)
- (mid -0.5058 0)
- (end 0 0.508)
- (stroke
- (width 0.1524)
- (type default)
- )
- (fill
- (type none)
- )
- )
- (arc
- (start 0 -3.048)
- (mid -0.5058 -2.54)
- (end 0 -2.032)
- (stroke
- (width 0.1524)
- (type default)
- )
- (fill
- (type none)
- )
- )
- (pin passive line
- (at -5.08 2.54 0)
- (length 3.81)
- (name "Pin_1"
- (effects
- (font
- (size 1.27 1.27)
- )
- )
- )
- (number "1"
- (effects
- (font
- (size 1.27 1.27)
- )
- )
- )
- )
- (pin passive line
- (at -5.08 0 0)
- (length 3.81)
- (name "Pin_2"
- (effects
- (font
- (size 1.27 1.27)
- )
- )
- )
- (number "2"
- (effects
- (font
- (size 1.27 1.27)
- )
- )
- )
- )
- (pin passive line
- (at -5.08 -2.54 0)
- (length 3.81)
- (name "Pin_3"
- (effects
- (font
- (size 1.27 1.27)
- )
- )
- )
- (number "3"
- (effects
- (font
- (size 1.27 1.27)
- )
- )
- )
- )
- )
- (embedded_fonts no)
- )
- (symbol "Connector:Conn_01x04_Socket"
- (pin_names
- (offset 1.016)
- (hide yes)
- )
- (exclude_from_sim no)
- (in_bom yes)
- (on_board yes)
- (property "Reference" "J"
- (at 0 5.08 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- )
- )
- (property "Value" "Conn_01x04_Socket"
- (at 0 -7.62 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- )
- )
- (property "Footprint" ""
- (at 0 0 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- (hide yes)
- )
- )
- (property "Datasheet" "~"
- (at 0 0 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- (hide yes)
- )
- )
- (property "Description" "Generic connector, single row, 01x04, script generated"
- (at 0 0 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- (hide yes)
- )
- )
- (property "ki_locked" ""
- (at 0 0 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- )
- )
- (property "ki_keywords" "connector"
- (at 0 0 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- (hide yes)
- )
- )
- (property "ki_fp_filters" "Connector*:*_1x??_*"
- (at 0 0 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- (hide yes)
- )
- )
- (symbol "Conn_01x04_Socket_1_1"
- (polyline
- (pts
- (xy -1.27 2.54) (xy -0.508 2.54)
- )
- (stroke
- (width 0.1524)
- (type default)
- )
- (fill
- (type none)
- )
- )
- (polyline
- (pts
- (xy -1.27 0) (xy -0.508 0)
- )
- (stroke
- (width 0.1524)
- (type default)
- )
- (fill
- (type none)
- )
- )
(polyline
(pts
- (xy -1.27 -2.54) (xy -0.508 -2.54)
+ (xy -1.27 -5.08) (xy -0.508 -5.08)
)
(stroke
(width 0.1524)
@@ -494,10 +146,10 @@
(type none)
)
)
- (polyline
- (pts
- (xy -1.27 -5.08) (xy -0.508 -5.08)
- )
+ (arc
+ (start 0 4.572)
+ (mid -0.5058 5.08)
+ (end 0 5.588)
(stroke
(width 0.1524)
(type default)
@@ -555,7 +207,7 @@
)
)
(pin passive line
- (at -5.08 2.54 0)
+ (at -5.08 5.08 0)
(length 3.81)
(name "Pin_1"
(effects
@@ -573,7 +225,7 @@
)
)
(pin passive line
- (at -5.08 0 0)
+ (at -5.08 2.54 0)
(length 3.81)
(name "Pin_2"
(effects
@@ -591,7 +243,7 @@
)
)
(pin passive line
- (at -5.08 -2.54 0)
+ (at -5.08 0 0)
(length 3.81)
(name "Pin_3"
(effects
@@ -609,7 +261,7 @@
)
)
(pin passive line
- (at -5.08 -5.08 0)
+ (at -5.08 -2.54 0)
(length 3.81)
(name "Pin_4"
(effects
@@ -626,6 +278,24 @@
)
)
)
+ (pin passive line
+ (at -5.08 -5.08 0)
+ (length 3.81)
+ (name "Pin_5"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "5"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
)
(embedded_fonts no)
)
@@ -2173,6 +1843,130 @@
)
(embedded_fonts no)
)
+ (symbol "Device:R"
+ (pin_numbers
+ (hide yes)
+ )
+ (pin_names
+ (offset 0)
+ )
+ (exclude_from_sim no)
+ (in_bom yes)
+ (on_board yes)
+ (property "Reference" "R"
+ (at 2.032 0 90)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (property "Value" "R"
+ (at 0 0 90)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (property "Footprint" ""
+ (at -1.778 0 90)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
+ )
+ (property "Datasheet" "~"
+ (at 0 0 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
+ )
+ (property "Description" "Resistor"
+ (at 0 0 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
+ )
+ (property "ki_keywords" "R res resistor"
+ (at 0 0 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
+ )
+ (property "ki_fp_filters" "R_*"
+ (at 0 0 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
+ )
+ (symbol "R_0_1"
+ (rectangle
+ (start -1.016 -2.54)
+ (end 1.016 2.54)
+ (stroke
+ (width 0.254)
+ (type default)
+ )
+ (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)
+ )
+ )
+ )
+ )
+ )
+ (embedded_fonts no)
+ )
(symbol "Switch:SW_Push"
(pin_numbers
(hide yes)
@@ -2560,9 +2354,19 @@
)
(uuid "56f4af8c-1572-4497-98f2-10a81ab55e1d")
)
+ (text "PCB versioning"
+ (exclude_from_sim no)
+ (at 116.332 122.174 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ (uuid "8ffab84b-2909-4547-976c-9674893a87fe")
+ )
(text "TODO: RMII connection"
(exclude_from_sim no)
- (at 109.474 82.55 0)
+ (at 109.982 70.104 0)
(effects
(font
(size 1.27 1.27)
@@ -2577,10 +2381,16 @@
(uuid "2ae0afa4-05df-4c1f-8fce-9e70d44fa58c")
)
(junction
- (at 133.35 130.81)
+ (at 133.35 146.05)
+ (diameter 0)
+ (color 0 0 0 0)
+ (uuid "bf436a8a-bdcf-41d1-b27e-8e9f94ae8393")
+ )
+ (junction
+ (at 115.57 104.14)
(diameter 0)
(color 0 0 0 0)
- (uuid "339686e0-bcb6-47c9-8375-f2246251856d")
+ (uuid "d7a5ded7-cab0-44bc-bcb3-51d295ef17c4")
)
(junction
(at 116.84 53.34)
@@ -2610,6 +2420,16 @@
)
(wire
(pts
+ (xy 241.3 93.98) (xy 245.11 93.98)
+ )
+ (stroke
+ (width 0)
+ (type default)
+ )
+ (uuid "0718babd-5e61-41eb-8188-33c1e5c2c2c4")
+ )
+ (wire
+ (pts
(xy 29.21 82.55) (xy 35.56 82.55)
)
(stroke
@@ -2630,43 +2450,43 @@
)
(wire
(pts
- (xy 55.88 80.01) (xy 66.04 80.01)
+ (xy 115.57 102.87) (xy 115.57 104.14)
)
(stroke
(width 0)
(type default)
)
- (uuid "106f8947-e275-4941-8b15-174ee405b3a9")
+ (uuid "1020a578-763e-4bf0-98ef-3e843e6e7cd5")
)
(wire
(pts
- (xy 33.02 80.01) (xy 35.56 80.01)
+ (xy 55.88 80.01) (xy 66.04 80.01)
)
(stroke
(width 0)
(type default)
)
- (uuid "12c2805a-9367-483f-8ed5-11a53d62a301")
+ (uuid "106f8947-e275-4941-8b15-174ee405b3a9")
)
(wire
(pts
- (xy 111.76 165.1) (xy 134.62 165.1)
+ (xy 33.02 80.01) (xy 35.56 80.01)
)
(stroke
(width 0)
(type default)
)
- (uuid "197c97bd-cbfb-422f-8d15-a5cc6533f28d")
+ (uuid "12c2805a-9367-483f-8ed5-11a53d62a301")
)
(wire
(pts
- (xy 241.3 102.87) (xy 243.84 102.87)
+ (xy 105.41 165.1) (xy 134.62 165.1)
)
(stroke
(width 0)
(type default)
)
- (uuid "1d27dae0-43b8-4c5d-8a53-0e780a7d9beb")
+ (uuid "197c97bd-cbfb-422f-8d15-a5cc6533f28d")
)
(wire
(pts
@@ -2680,7 +2500,7 @@
)
(wire
(pts
- (xy 109.22 97.79) (xy 109.22 167.64)
+ (xy 102.87 107.95) (xy 102.87 167.64)
)
(stroke
(width 0)
@@ -2690,7 +2510,7 @@
)
(wire
(pts
- (xy 111.76 95.25) (xy 111.76 165.1)
+ (xy 105.41 105.41) (xy 105.41 165.1)
)
(stroke
(width 0)
@@ -2760,7 +2580,7 @@
)
(wire
(pts
- (xy 133.35 130.81) (xy 133.35 142.24)
+ (xy 133.35 130.81) (xy 133.35 146.05)
)
(stroke
(width 0)
@@ -2770,53 +2590,53 @@
)
(wire
(pts
- (xy 241.3 97.79) (xy 243.84 97.79)
+ (xy 158.75 114.3) (xy 158.75 146.05)
)
(stroke
(width 0)
(type default)
)
- (uuid "3c7e0cc7-91bf-41c2-99bc-b56fabfb0484")
+ (uuid "3d0233b2-2c0b-4af4-b8e4-d31b44b7c104")
)
(wire
(pts
- (xy 158.75 114.3) (xy 158.75 142.24)
+ (xy 55.88 85.09) (xy 66.04 85.09)
)
(stroke
(width 0)
(type default)
)
- (uuid "3d0233b2-2c0b-4af4-b8e4-d31b44b7c104")
+ (uuid "401dae51-0601-4d58-a934-6d966ee866c8")
)
(wire
(pts
- (xy 55.88 85.09) (xy 66.04 85.09)
+ (xy 168.91 135.89) (xy 181.61 135.89)
)
(stroke
(width 0)
(type default)
)
- (uuid "401dae51-0601-4d58-a934-6d966ee866c8")
+ (uuid "42d7122a-ad24-4a57-bdaa-c27d241a57a6")
)
(wire
(pts
- (xy 168.91 135.89) (xy 181.61 135.89)
+ (xy 33.02 93.98) (xy 33.02 95.25)
)
(stroke
(width 0)
(type default)
)
- (uuid "42d7122a-ad24-4a57-bdaa-c27d241a57a6")
+ (uuid "493290ea-35d3-49d1-9fa1-0ea5e2af02df")
)
(wire
(pts
- (xy 33.02 93.98) (xy 33.02 95.25)
+ (xy 241.3 91.44) (xy 245.11 91.44)
)
(stroke
(width 0)
(type default)
)
- (uuid "493290ea-35d3-49d1-9fa1-0ea5e2af02df")
+ (uuid "5434de51-f264-4d32-9a62-d6f617624c67")
)
(wire
(pts
@@ -2860,7 +2680,7 @@
)
(wire
(pts
- (xy 137.16 142.24) (xy 133.35 142.24)
+ (xy 137.16 146.05) (xy 133.35 146.05)
)
(stroke
(width 0)
@@ -2870,6 +2690,16 @@
)
(wire
(pts
+ (xy 133.35 146.05) (xy 133.35 148.59)
+ )
+ (stroke
+ (width 0)
+ (type default)
+ )
+ (uuid "61d85b37-7184-4d40-93e2-cd0c4fb790fa")
+ )
+ (wire
+ (pts
(xy 166.37 54.61) (xy 167.64 54.61)
)
(stroke
@@ -2880,6 +2710,46 @@
)
(wire
(pts
+ (xy 115.57 104.14) (xy 115.57 105.41)
+ )
+ (stroke
+ (width 0)
+ (type default)
+ )
+ (uuid "668ac295-8e98-4bec-8a6a-9e0f9977aa67")
+ )
+ (wire
+ (pts
+ (xy 241.3 83.82) (xy 245.11 83.82)
+ )
+ (stroke
+ (width 0)
+ (type default)
+ )
+ (uuid "6c5416b3-8486-43d2-a4ce-6a4be340559a")
+ )
+ (wire
+ (pts
+ (xy 115.57 104.14) (xy 127 104.14)
+ )
+ (stroke
+ (width 0)
+ (type default)
+ )
+ (uuid "6ecbd238-9a11-40af-a479-f3c1c33f4443")
+ )
+ (wire
+ (pts
+ (xy 115.57 113.03) (xy 115.57 114.3)
+ )
+ (stroke
+ (width 0)
+ (type default)
+ )
+ (uuid "6f33808b-14aa-42f0-bfaf-5d5d041eda6f")
+ )
+ (wire
+ (pts
(xy 170.18 53.34) (xy 170.18 58.42)
)
(stroke
@@ -2890,23 +2760,23 @@
)
(wire
(pts
- (xy 91.44 97.79) (xy 109.22 97.79)
+ (xy 241.3 86.36) (xy 245.11 86.36)
)
(stroke
(width 0)
(type default)
)
- (uuid "7cacf695-e4dd-4107-81df-54e2713a513b")
+ (uuid "7bb55973-3d84-4ee7-b6b9-e5fc95e4fe2f")
)
(wire
(pts
- (xy 133.35 130.81) (xy 133.35 128.27)
+ (xy 91.44 107.95) (xy 102.87 107.95)
)
(stroke
(width 0)
(type default)
)
- (uuid "7e8208d1-8e17-44cb-a01e-27f145506f19")
+ (uuid "7cacf695-e4dd-4107-81df-54e2713a513b")
)
(wire
(pts
@@ -2920,33 +2790,33 @@
)
(wire
(pts
- (xy 241.3 74.93) (xy 243.84 74.93)
+ (xy 55.88 82.55) (xy 66.04 82.55)
)
(stroke
(width 0)
(type default)
)
- (uuid "7ff4d5b8-9eb4-4129-ab5e-fcfe279a3d60")
+ (uuid "80d7e9ef-293f-4a10-8e6b-f93c6dfc6aa7")
)
(wire
(pts
- (xy 55.88 82.55) (xy 66.04 82.55)
+ (xy 241.3 88.9) (xy 245.11 88.9)
)
(stroke
(width 0)
(type default)
)
- (uuid "80d7e9ef-293f-4a10-8e6b-f93c6dfc6aa7")
+ (uuid "830105cb-b7a4-486c-9905-375b2ac42ebe")
)
(wire
(pts
- (xy 241.3 91.44) (xy 243.84 91.44)
+ (xy 115.57 93.98) (xy 115.57 95.25)
)
(stroke
(width 0)
(type default)
)
- (uuid "82e76253-9dad-4e06-890b-3c6580d4271c")
+ (uuid "863152a8-b32a-4cee-ac15-5a3388895411")
)
(wire
(pts
@@ -3060,7 +2930,7 @@
)
(wire
(pts
- (xy 158.75 142.24) (xy 147.32 142.24)
+ (xy 158.75 146.05) (xy 147.32 146.05)
)
(stroke
(width 0)
@@ -3120,26 +2990,6 @@
)
(wire
(pts
- (xy 241.3 88.9) (xy 243.84 88.9)
- )
- (stroke
- (width 0)
- (type default)
- )
- (uuid "bd32fc53-2d64-4e5b-bfb7-6ff41106e415")
- )
- (wire
- (pts
- (xy 241.3 100.33) (xy 243.84 100.33)
- )
- (stroke
- (width 0)
- (type default)
- )
- (uuid "c0f3e087-4d08-45ef-bd3a-8c6f528a7689")
- )
- (wire
- (pts
(xy 135.89 43.18) (xy 135.89 63.5)
)
(stroke
@@ -3220,16 +3070,6 @@
)
(wire
(pts
- (xy 241.3 77.47) (xy 243.84 77.47)
- )
- (stroke
- (width 0)
- (type default)
- )
- (uuid "d7acbacc-050b-4c59-a5d3-449739214648")
- )
- (wire
- (pts
(xy 29.21 69.85) (xy 29.21 82.55)
)
(stroke
@@ -3250,7 +3090,7 @@
)
(wire
(pts
- (xy 91.44 95.25) (xy 111.76 95.25)
+ (xy 91.44 105.41) (xy 105.41 105.41)
)
(stroke
(width 0)
@@ -3260,16 +3100,6 @@
)
(wire
(pts
- (xy 241.3 105.41) (xy 243.84 105.41)
- )
- (stroke
- (width 0)
- (type default)
- )
- (uuid "ea53adc0-baa4-40d7-a0b3-640d08b56738")
- )
- (wire
- (pts
(xy 55.88 90.17) (xy 66.04 90.17)
)
(stroke
@@ -3280,7 +3110,7 @@
)
(wire
(pts
- (xy 109.22 167.64) (xy 134.62 167.64)
+ (xy 102.87 167.64) (xy 134.62 167.64)
)
(stroke
(width 0)
@@ -3290,16 +3120,6 @@
)
(wire
(pts
- (xy 241.3 86.36) (xy 243.84 86.36)
- )
- (stroke
- (width 0)
- (type default)
- )
- (uuid "f3dd7834-6263-40f4-9340-5f1c1a44fa6f")
- )
- (wire
- (pts
(xy 33.02 95.25) (xy 35.56 95.25)
)
(stroke
@@ -3458,8 +3278,8 @@
(hide yes)
)
)
- (property "Description" "BTN_REBOOT: Reset MCU"
- (at 129.794 145.288 0)
+ (property "Description" "REBOOT: Reset MCU"
+ (at 134.874 133.096 0)
(effects
(font
(size 1.27 1.27)
@@ -3618,8 +3438,78 @@
)
)
(symbol
+ (lib_id "Device:R")
+ (at 115.57 109.22 0)
+ (unit 1)
+ (exclude_from_sim no)
+ (in_bom yes)
+ (on_board yes)
+ (dnp no)
+ (fields_autoplaced yes)
+ (uuid "25ff6048-df12-4801-a5fa-10858ec580ea")
+ (property "Reference" "R2"
+ (at 118.11 107.9499 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (justify left)
+ )
+ )
+ (property "Value" "180R"
+ (at 118.11 110.4899 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (justify left)
+ )
+ )
+ (property "Footprint" ""
+ (at 113.792 109.22 90)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
+ )
+ (property "Datasheet" "~"
+ (at 115.57 109.22 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
+ )
+ (property "Description" "Resistor"
+ (at 115.57 109.22 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
+ )
+ (pin "1"
+ (uuid "4594fa96-7bf7-4a55-b5cf-06cd56d16577")
+ )
+ (pin "2"
+ (uuid "b8ec48f2-d366-4783-a0c0-ce6e9d04ad8c")
+ )
+ (instances
+ (project ""
+ (path "/5defd195-0277-4d04-9f5f-69e505c9845c"
+ (reference "R2")
+ (unit 1)
+ )
+ )
+ )
+ )
+ (symbol
(lib_id "Switch:SW_Push")
- (at 142.24 142.24 0)
+ (at 142.24 146.05 0)
(mirror y)
(unit 1)
(exclude_from_sim no)
@@ -3628,7 +3518,7 @@
(dnp no)
(uuid "4208718d-0b0e-478e-a1d4-d0fead52cb02")
(property "Reference" "SW2"
- (at 142.24 134.62 0)
+ (at 142.24 138.43 0)
(effects
(font
(size 1.27 1.27)
@@ -3636,7 +3526,7 @@
)
)
(property "Value" "SW_Push"
- (at 142.24 137.16 0)
+ (at 142.24 140.97 0)
(effects
(font
(size 1.27 1.27)
@@ -3644,7 +3534,7 @@
)
)
(property "Footprint" "Button_Switch_SMD:SW_SPST_TL3305B"
- (at 142.24 137.16 0)
+ (at 142.24 140.97 0)
(effects
(font
(size 1.27 1.27)
@@ -3653,7 +3543,7 @@
)
)
(property "Datasheet" "https://www.e-switch.com/wp-content/uploads/2024/08/TL3305.pdf"
- (at 142.24 137.16 0)
+ (at 142.24 140.97 0)
(effects
(font
(size 1.27 1.27)
@@ -3661,8 +3551,8 @@
(hide yes)
)
)
- (property "Description" "BTN_WIPE: Long press for factory reset"
- (at 129.794 147.828 0)
+ (property "Description" "WIPE: Long press for factory reset"
+ (at 134.62 148.336 0)
(effects
(font
(size 1.27 1.27)
@@ -3671,7 +3561,7 @@
)
)
(property "MPN" "TL3305BF260QG"
- (at 142.24 142.24 0)
+ (at 142.24 146.05 0)
(effects
(font
(size 1.27 1.27)
@@ -3680,7 +3570,7 @@
)
)
(property "Manufacturer" "E-Switch"
- (at 142.24 142.24 0)
+ (at 142.24 146.05 0)
(effects
(font
(size 1.27 1.27)
@@ -3704,6 +3594,76 @@
)
)
(symbol
+ (lib_id "Device:R")
+ (at 115.57 99.06 0)
+ (unit 1)
+ (exclude_from_sim no)
+ (in_bom yes)
+ (on_board yes)
+ (dnp no)
+ (fields_autoplaced yes)
+ (uuid "44194e8c-d4ca-4f3b-8f0c-38d2daec1648")
+ (property "Reference" "R1"
+ (at 118.11 97.7899 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (justify left)
+ )
+ )
+ (property "Value" "75k"
+ (at 118.11 100.3299 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (justify left)
+ )
+ )
+ (property "Footprint" ""
+ (at 113.792 99.06 90)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
+ )
+ (property "Datasheet" "~"
+ (at 115.57 99.06 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
+ )
+ (property "Description" "Resistor"
+ (at 115.57 99.06 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
+ )
+ (pin "2"
+ (uuid "4c288ead-2ab6-4e25-a3f0-01cafd4880ac")
+ )
+ (pin "1"
+ (uuid "28fc83dd-c36e-444e-9a1b-af275a24160b")
+ )
+ (instances
+ (project ""
+ (path "/5defd195-0277-4d04-9f5f-69e505c9845c"
+ (reference "R1")
+ (unit 1)
+ )
+ )
+ )
+ )
+ (symbol
(lib_id "Device:LED")
(at 181.61 129.54 90)
(unit 1)
@@ -3863,73 +3823,6 @@
)
)
(symbol
- (lib_id "power:+3V3")
- (at 133.35 128.27 0)
- (mirror y)
- (unit 1)
- (exclude_from_sim no)
- (in_bom yes)
- (on_board yes)
- (dnp no)
- (fields_autoplaced yes)
- (uuid "73b82ebf-51d1-4351-9ef8-e821f2bb51fc")
- (property "Reference" "#PWR04"
- (at 133.35 132.08 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- (hide yes)
- )
- )
- (property "Value" "+3V3"
- (at 133.35 123.19 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- )
- )
- (property "Footprint" ""
- (at 133.35 128.27 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- (hide yes)
- )
- )
- (property "Datasheet" ""
- (at 133.35 128.27 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- (hide yes)
- )
- )
- (property "Description" "Power symbol creates a global label with name \"+3V3\""
- (at 133.35 128.27 0)
- (effects
- (font
- (size 1.27 1.27)
- )
- (hide yes)
- )
- )
- (pin "1"
- (uuid "21725f84-8d25-45a0-a597-104450bf5d9f")
- )
- (instances
- (project ""
- (path "/5defd195-0277-4d04-9f5f-69e505c9845c"
- (reference "#PWR04")
- (unit 1)
- )
- )
- )
- )
- (symbol
(lib_id "Connector:Conn_ARM_JTAG_SWD_10")
(at 116.84 38.1 0)
(unit 1)
@@ -4107,17 +4000,16 @@
)
)
(symbol
- (lib_id "power:+3V3")
- (at 166.37 58.42 90)
+ (lib_id "power:GND")
+ (at 133.35 148.59 0)
(unit 1)
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(dnp no)
- (fields_autoplaced yes)
- (uuid "8dc38ef5-ad5d-4198-87b9-50e0c72e169c")
- (property "Reference" "#PWR06"
- (at 170.18 58.42 0)
+ (uuid "896bf6c9-1959-4e54-9ee3-0afb3af23951")
+ (property "Reference" "#PWR04"
+ (at 133.35 154.94 0)
(effects
(font
(size 1.27 1.27)
@@ -4125,17 +4017,16 @@
(hide yes)
)
)
- (property "Value" "+3V3"
- (at 162.56 58.4199 90)
+ (property "Value" "GND"
+ (at 133.35 153.67 0)
(effects
(font
(size 1.27 1.27)
)
- (justify left)
)
)
(property "Footprint" ""
- (at 166.37 58.42 0)
+ (at 133.35 148.59 0)
(effects
(font
(size 1.27 1.27)
@@ -4144,7 +4035,7 @@
)
)
(property "Datasheet" ""
- (at 166.37 58.42 0)
+ (at 133.35 148.59 0)
(effects
(font
(size 1.27 1.27)
@@ -4152,8 +4043,8 @@
(hide yes)
)
)
- (property "Description" "Power symbol creates a global label with name \"+3V3\""
- (at 166.37 58.42 0)
+ (property "Description" "Power symbol creates a global label with name \"GND\" , ground"
+ (at 133.35 148.59 0)
(effects
(font
(size 1.27 1.27)
@@ -4162,46 +4053,46 @@
)
)
(pin "1"
- (uuid "79de4807-fb45-4a6c-8f72-b7beada5fb9e")
+ (uuid "cf37e434-0987-4eb9-99b4-3eed1b644059")
)
(instances
(project ""
(path "/5defd195-0277-4d04-9f5f-69e505c9845c"
- (reference "#PWR06")
+ (reference "#PWR04")
(unit 1)
)
)
)
)
(symbol
- (lib_id "Device:LED")
- (at 194.31 129.54 90)
+ (lib_id "Connector:Conn_01x05_Socket")
+ (at 250.19 88.9 0)
(unit 1)
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(dnp no)
- (uuid "a18015d1-4ba3-4469-b302-93bb256ec205")
- (property "Reference" "D3"
- (at 198.12 129.8574 90)
+ (uuid "8abbe99b-a4dc-440e-9eca-761a29b3f878")
+ (property "Reference" "J5"
+ (at 251.46 87.6299 0)
(effects
(font
(size 1.27 1.27)
)
- (justify right)
+ (justify left)
)
)
- (property "Value" "green"
- (at 198.12 132.3974 90)
+ (property "Value" "Conn_01x05_Socket"
+ (at 251.46 90.1699 0)
(effects
(font
(size 1.27 1.27)
)
- (justify right)
+ (justify left)
)
)
- (property "Footprint" "LED_SMD:LED_1206_3216Metric"
- (at 194.31 129.54 0)
+ (property "Footprint" "TerminalBlock_WAGO:TerminalBlock_WAGO_236-405_1x05_P5.00mm_45Degree"
+ (at 250.19 88.9 0)
(effects
(font
(size 1.27 1.27)
@@ -4209,8 +4100,8 @@
(hide yes)
)
)
- (property "Datasheet" "https://s3-us-west-2.amazonaws.com/catsy.557/Dialight_CBI_data_598-1206_Apr2018.pdf"
- (at 194.31 129.54 0)
+ (property "Datasheet" "~"
+ (at 250.19 88.9 0)
(effects
(font
(size 1.27 1.27)
@@ -4218,60 +4109,67 @@
(hide yes)
)
)
- (property "Description" "LED_ACT: Firmware active"
- (at 185.166 143.764 90)
+ (property "Description" "Generic connector, single row, 01x05, script generated"
+ (at 250.19 88.9 0)
(effects
(font
(size 1.27 1.27)
)
- (justify right)
+ (hide yes)
)
)
- (property "MPN" "598-8270-107F"
- (at 194.31 129.54 0)
+ (property "MPN" "236-405"
+ (at 260.35 96.012 0)
(effects
(font
(size 1.27 1.27)
)
- (hide yes)
)
)
- (property "Manufacturer" "Dialight"
- (at 194.31 129.54 0)
+ (property "Manufacturer" "WAGO Corporation"
+ (at 260.604 93.218 0)
(effects
(font
(size 1.27 1.27)
)
- (hide yes)
)
)
+ (pin "3"
+ (uuid "f6371d9a-5e12-449a-b54a-fae342c0ad08")
+ )
+ (pin "4"
+ (uuid "2ed21cf7-6b19-4337-ba57-0d86f2172d6a")
+ )
+ (pin "5"
+ (uuid "54231faf-ba13-48ef-9437-f0bd433787d0")
+ )
(pin "2"
- (uuid "93474e55-5fe8-4dd1-9634-063f4d85bf3b")
+ (uuid "cbcad884-9c06-4de9-a8e1-86ef47db1684")
)
(pin "1"
- (uuid "50ab0127-dc13-43a3-8f87-157c61e57591")
+ (uuid "6edee8d4-ba9a-4079-87be-d50c29ed3fbd")
)
(instances
- (project "iot-contact"
+ (project ""
(path "/5defd195-0277-4d04-9f5f-69e505c9845c"
- (reference "D3")
+ (reference "J5")
(unit 1)
)
)
)
)
(symbol
- (lib_id "power:GND")
- (at 116.84 53.34 0)
+ (lib_id "power:+3V3")
+ (at 166.37 58.42 90)
(unit 1)
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(dnp no)
(fields_autoplaced yes)
- (uuid "a9fdb3b7-e62e-4e35-b95e-2b5451d40781")
- (property "Reference" "#PWR02"
- (at 116.84 59.69 0)
+ (uuid "8dc38ef5-ad5d-4198-87b9-50e0c72e169c")
+ (property "Reference" "#PWR06"
+ (at 170.18 58.42 0)
(effects
(font
(size 1.27 1.27)
@@ -4279,16 +4177,17 @@
(hide yes)
)
)
- (property "Value" "GND"
- (at 116.84 58.42 0)
+ (property "Value" "+3V3"
+ (at 162.56 58.4199 90)
(effects
(font
(size 1.27 1.27)
)
+ (justify left)
)
)
(property "Footprint" ""
- (at 116.84 53.34 0)
+ (at 166.37 58.42 0)
(effects
(font
(size 1.27 1.27)
@@ -4297,7 +4196,7 @@
)
)
(property "Datasheet" ""
- (at 116.84 53.34 0)
+ (at 166.37 58.42 0)
(effects
(font
(size 1.27 1.27)
@@ -4305,8 +4204,8 @@
(hide yes)
)
)
- (property "Description" "Power symbol creates a global label with name \"GND\" , ground"
- (at 116.84 53.34 0)
+ (property "Description" "Power symbol creates a global label with name \"+3V3\""
+ (at 166.37 58.42 0)
(effects
(font
(size 1.27 1.27)
@@ -4315,46 +4214,46 @@
)
)
(pin "1"
- (uuid "dbac907f-00ce-4688-80a3-aa16c1570783")
+ (uuid "79de4807-fb45-4a6c-8f72-b7beada5fb9e")
)
(instances
(project ""
(path "/5defd195-0277-4d04-9f5f-69e505c9845c"
- (reference "#PWR02")
+ (reference "#PWR06")
(unit 1)
)
)
)
)
(symbol
- (lib_id "Connector:Conn_01x02_Socket")
- (at 248.92 74.93 0)
+ (lib_id "Device:LED")
+ (at 194.31 129.54 90)
(unit 1)
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(dnp no)
- (uuid "ab915a24-5892-4750-b69f-bf601f5b3660")
- (property "Reference" "J5"
- (at 250.19 74.9299 0)
+ (uuid "a18015d1-4ba3-4469-b302-93bb256ec205")
+ (property "Reference" "D3"
+ (at 198.12 129.8574 90)
(effects
(font
(size 1.27 1.27)
)
- (justify left)
+ (justify right)
)
)
- (property "Value" "Conn_01x02_Socket"
- (at 250.19 77.4699 0)
+ (property "Value" "green"
+ (at 198.12 132.3974 90)
(effects
(font
(size 1.27 1.27)
)
- (justify left)
+ (justify right)
)
)
- (property "Footprint" "TerminalBlock_WAGO:TerminalBlock_WAGO_236-402_1x02_P5.00mm_45Degree"
- (at 248.92 74.93 0)
+ (property "Footprint" "LED_SMD:LED_1206_3216Metric"
+ (at 194.31 129.54 0)
(effects
(font
(size 1.27 1.27)
@@ -4362,8 +4261,8 @@
(hide yes)
)
)
- (property "Datasheet" "~"
- (at 248.92 74.93 0)
+ (property "Datasheet" "https://s3-us-west-2.amazonaws.com/catsy.557/Dialight_CBI_data_598-1206_Apr2018.pdf"
+ (at 194.31 129.54 0)
(effects
(font
(size 1.27 1.27)
@@ -4371,16 +4270,17 @@
(hide yes)
)
)
- (property "Description" "normally closed contact"
- (at 262.128 79.756 0)
+ (property "Description" "LED_ACT: Firmware active"
+ (at 185.166 143.764 90)
(effects
(font
(size 1.27 1.27)
)
+ (justify right)
)
)
- (property "MPN" "236-402"
- (at 248.92 74.93 0)
+ (property "MPN" "598-8270-107F"
+ (at 194.31 129.54 0)
(effects
(font
(size 1.27 1.27)
@@ -4388,8 +4288,8 @@
(hide yes)
)
)
- (property "Manufacturer" "WAGO Corporation"
- (at 248.92 74.93 0)
+ (property "Manufacturer" "Dialight"
+ (at 194.31 129.54 0)
(effects
(font
(size 1.27 1.27)
@@ -4398,49 +4298,49 @@
)
)
(pin "2"
- (uuid "9c8b6afb-bb3d-404f-967e-581c812b3355")
+ (uuid "93474e55-5fe8-4dd1-9634-063f4d85bf3b")
)
(pin "1"
- (uuid "428b547f-53a8-4158-9a2a-ed056b73bc0a")
+ (uuid "50ab0127-dc13-43a3-8f87-157c61e57591")
)
(instances
- (project ""
+ (project "iot-contact"
(path "/5defd195-0277-4d04-9f5f-69e505c9845c"
- (reference "J5")
+ (reference "D3")
(unit 1)
)
)
)
)
(symbol
- (lib_id "Connector:Conn_01x03_Socket")
- (at 248.92 88.9 0)
+ (lib_id "power:GND")
+ (at 116.84 53.34 0)
(unit 1)
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(dnp no)
- (uuid "b8e7e67c-4ba1-45c3-949c-ed1de34a8889")
- (property "Reference" "J6"
- (at 250.19 87.6299 0)
+ (fields_autoplaced yes)
+ (uuid "a9fdb3b7-e62e-4e35-b95e-2b5451d40781")
+ (property "Reference" "#PWR02"
+ (at 116.84 59.69 0)
(effects
(font
(size 1.27 1.27)
)
- (justify left)
+ (hide yes)
)
)
- (property "Value" "Conn_01x03_Socket"
- (at 250.19 90.1699 0)
+ (property "Value" "GND"
+ (at 116.84 58.42 0)
(effects
(font
(size 1.27 1.27)
)
- (justify left)
)
)
- (property "Footprint" "TerminalBlock_WAGO:TerminalBlock_WAGO_236-403_1x03_P5.00mm_45Degree"
- (at 248.92 88.9 0)
+ (property "Footprint" ""
+ (at 116.84 53.34 0)
(effects
(font
(size 1.27 1.27)
@@ -4448,8 +4348,8 @@
(hide yes)
)
)
- (property "Datasheet" "~"
- (at 248.92 88.9 0)
+ (property "Datasheet" ""
+ (at 116.84 53.34 0)
(effects
(font
(size 1.27 1.27)
@@ -4457,16 +4357,39 @@
(hide yes)
)
)
- (property "Description" "AC voltage supply"
- (at 259.08 92.71 0)
+ (property "Description" "Power symbol creates a global label with name \"GND\" , ground"
+ (at 116.84 53.34 0)
(effects
(font
(size 1.27 1.27)
)
+ (hide yes)
+ )
+ )
+ (pin "1"
+ (uuid "dbac907f-00ce-4688-80a3-aa16c1570783")
+ )
+ (instances
+ (project ""
+ (path "/5defd195-0277-4d04-9f5f-69e505c9845c"
+ (reference "#PWR02")
+ (unit 1)
+ )
)
)
- (property "MPN" "236-403"
- (at 248.92 88.9 0)
+ )
+ (symbol
+ (lib_id "power:+3V3")
+ (at 115.57 93.98 0)
+ (unit 1)
+ (exclude_from_sim no)
+ (in_bom yes)
+ (on_board yes)
+ (dnp no)
+ (fields_autoplaced yes)
+ (uuid "b8d6d94c-727e-456b-b826-af3fd7c72013")
+ (property "Reference" "#PWR09"
+ (at 115.57 97.79 0)
(effects
(font
(size 1.27 1.27)
@@ -4474,8 +4397,16 @@
(hide yes)
)
)
- (property "Manufacturer" "WAGO Corporation"
- (at 248.92 88.9 0)
+ (property "Value" "+3V3"
+ (at 115.57 88.9 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (property "Footprint" ""
+ (at 115.57 93.98 0)
(effects
(font
(size 1.27 1.27)
@@ -4483,19 +4414,31 @@
(hide yes)
)
)
- (pin "3"
- (uuid "2d15e7e0-56e4-496b-a237-9cd8ed4fd444")
+ (property "Datasheet" ""
+ (at 115.57 93.98 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
)
- (pin "2"
- (uuid "fa05bfdf-dde9-46a5-b86a-16de418107e2")
+ (property "Description" "Power symbol creates a global label with name \"+3V3\""
+ (at 115.57 93.98 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
)
(pin "1"
- (uuid "ab74c3af-f504-4aaa-80da-750726060fa7")
+ (uuid "4c5e5d17-e7b8-4575-85c6-050868f487a2")
)
(instances
(project ""
(path "/5defd195-0277-4d04-9f5f-69e505c9845c"
- (reference "J6")
+ (reference "#PWR09")
(unit 1)
)
)
@@ -4635,17 +4578,17 @@
)
)
(symbol
- (lib_id "power:+3V3")
- (at 116.84 22.86 0)
+ (lib_id "power:GND")
+ (at 115.57 114.3 0)
(unit 1)
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(dnp no)
(fields_autoplaced yes)
- (uuid "f07314fe-7b09-49cf-b467-c72e0210cbc0")
- (property "Reference" "#PWR01"
- (at 116.84 26.67 0)
+ (uuid "dd045ace-112c-424a-ad3b-982fb4c768f7")
+ (property "Reference" "#PWR010"
+ (at 115.57 120.65 0)
(effects
(font
(size 1.27 1.27)
@@ -4653,8 +4596,8 @@
(hide yes)
)
)
- (property "Value" "+3V3"
- (at 116.84 17.78 0)
+ (property "Value" "GND"
+ (at 115.57 119.38 0)
(effects
(font
(size 1.27 1.27)
@@ -4662,7 +4605,7 @@
)
)
(property "Footprint" ""
- (at 116.84 22.86 0)
+ (at 115.57 114.3 0)
(effects
(font
(size 1.27 1.27)
@@ -4671,7 +4614,7 @@
)
)
(property "Datasheet" ""
- (at 116.84 22.86 0)
+ (at 115.57 114.3 0)
(effects
(font
(size 1.27 1.27)
@@ -4679,8 +4622,8 @@
(hide yes)
)
)
- (property "Description" "Power symbol creates a global label with name \"+3V3\""
- (at 116.84 22.86 0)
+ (property "Description" "Power symbol creates a global label with name \"GND\" , ground"
+ (at 115.57 114.3 0)
(effects
(font
(size 1.27 1.27)
@@ -4689,46 +4632,29 @@
)
)
(pin "1"
- (uuid "54048577-5e4a-4485-9da1-9075022f4eb1")
+ (uuid "1a4096b2-db22-464d-b040-d8134123dfb5")
)
(instances
(project ""
(path "/5defd195-0277-4d04-9f5f-69e505c9845c"
- (reference "#PWR01")
+ (reference "#PWR010")
(unit 1)
)
)
)
)
(symbol
- (lib_id "Device:LED")
- (at 168.91 129.54 90)
+ (lib_id "power:+3V3")
+ (at 116.84 22.86 0)
(unit 1)
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(dnp no)
- (uuid "f84af62e-f45c-446e-99ce-43d73a894ddb")
- (property "Reference" "D1"
- (at 172.72 129.8574 90)
- (effects
- (font
- (size 1.27 1.27)
- )
- (justify right)
- )
- )
- (property "Value" "red"
- (at 172.72 132.3974 90)
- (effects
- (font
- (size 1.27 1.27)
- )
- (justify right)
- )
- )
- (property "Footprint" "LED_SMD:LED_1206_3216Metric"
- (at 168.91 129.54 0)
+ (fields_autoplaced yes)
+ (uuid "f07314fe-7b09-49cf-b467-c72e0210cbc0")
+ (property "Reference" "#PWR01"
+ (at 116.84 26.67 0)
(effects
(font
(size 1.27 1.27)
@@ -4736,26 +4662,25 @@
(hide yes)
)
)
- (property "Datasheet" "https://s3-us-west-2.amazonaws.com/catsy.557/Dialight_CBI_data_598-1206_Apr2018.pdf"
- (at 168.91 129.54 0)
+ (property "Value" "+3V3"
+ (at 116.84 17.78 0)
(effects
(font
(size 1.27 1.27)
)
- (hide yes)
)
)
- (property "Description" "LED_PWR: Board powered"
- (at 185.166 139.192 90)
+ (property "Footprint" ""
+ (at 116.84 22.86 0)
(effects
(font
(size 1.27 1.27)
)
- (justify right)
+ (hide yes)
)
)
- (property "MPN" "598-8210-107F"
- (at 168.91 129.54 0)
+ (property "Datasheet" ""
+ (at 116.84 22.86 0)
(effects
(font
(size 1.27 1.27)
@@ -4763,8 +4688,8 @@
(hide yes)
)
)
- (property "Manufacturer" "Dialight"
- (at 168.91 129.54 0)
+ (property "Description" "Power symbol creates a global label with name \"+3V3\""
+ (at 116.84 22.86 0)
(effects
(font
(size 1.27 1.27)
@@ -4772,50 +4697,47 @@
(hide yes)
)
)
- (pin "2"
- (uuid "ffad62d9-6a3f-484f-8d55-647f82592de4")
- )
(pin "1"
- (uuid "d679efbf-334d-4daf-8f40-2fd6fb31a0fa")
+ (uuid "54048577-5e4a-4485-9da1-9075022f4eb1")
)
(instances
(project ""
(path "/5defd195-0277-4d04-9f5f-69e505c9845c"
- (reference "D1")
+ (reference "#PWR01")
(unit 1)
)
)
)
)
(symbol
- (lib_id "Connector:Conn_01x04_Socket")
- (at 248.92 100.33 0)
+ (lib_id "Device:LED")
+ (at 168.91 129.54 90)
(unit 1)
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(dnp no)
- (uuid "f86d0087-ccb7-44bf-be0e-e6c0a5836284")
- (property "Reference" "J7"
- (at 250.19 100.3299 0)
+ (uuid "f84af62e-f45c-446e-99ce-43d73a894ddb")
+ (property "Reference" "D1"
+ (at 172.72 129.8574 90)
(effects
(font
(size 1.27 1.27)
)
- (justify left)
+ (justify right)
)
)
- (property "Value" "Conn_01x04_Socket"
- (at 250.19 102.8699 0)
+ (property "Value" "red"
+ (at 172.72 132.3974 90)
(effects
(font
(size 1.27 1.27)
)
- (justify left)
+ (justify right)
)
)
- (property "Footprint" "TerminalBlock_WAGO:TerminalBlock_WAGO_236-404_1x04_P5.00mm_45Degree"
- (at 248.92 100.33 0)
+ (property "Footprint" "LED_SMD:LED_1206_3216Metric"
+ (at 168.91 129.54 0)
(effects
(font
(size 1.27 1.27)
@@ -4823,8 +4745,8 @@
(hide yes)
)
)
- (property "Datasheet" "~"
- (at 248.92 100.33 0)
+ (property "Datasheet" "https://s3-us-west-2.amazonaws.com/catsy.557/Dialight_CBI_data_598-1206_Apr2018.pdf"
+ (at 168.91 129.54 0)
(effects
(font
(size 1.27 1.27)
@@ -4832,16 +4754,17 @@
(hide yes)
)
)
- (property "Description" "motor connector"
- (at 258.318 105.41 0)
+ (property "Description" "LED_PWR: Board powered"
+ (at 185.166 139.192 90)
(effects
(font
(size 1.27 1.27)
)
+ (justify right)
)
)
- (property "MPN" "236-404"
- (at 248.92 100.33 0)
+ (property "MPN" "598-8210-107F"
+ (at 168.91 129.54 0)
(effects
(font
(size 1.27 1.27)
@@ -4849,8 +4772,8 @@
(hide yes)
)
)
- (property "Manufacturer" "WAGO Corporation"
- (at 248.92 100.33 0)
+ (property "Manufacturer" "Dialight"
+ (at 168.91 129.54 0)
(effects
(font
(size 1.27 1.27)
@@ -4858,22 +4781,16 @@
(hide yes)
)
)
- (pin "1"
- (uuid "dd173b75-bf5d-418c-900b-22588dbf6f8e")
- )
- (pin "4"
- (uuid "d08e74f4-7939-4c87-985a-5c55f3282a4e")
- )
- (pin "3"
- (uuid "4fa4265e-7a54-4aee-91ee-fc3e359ec77e")
- )
(pin "2"
- (uuid "889f97b8-0784-45ed-82f3-d450f0dfd89d")
+ (uuid "ffad62d9-6a3f-484f-8d55-647f82592de4")
+ )
+ (pin "1"
+ (uuid "d679efbf-334d-4daf-8f40-2fd6fb31a0fa")
)
(instances
(project ""
(path "/5defd195-0277-4d04-9f5f-69e505c9845c"
- (reference "J7")
+ (reference "D1")
(unit 1)
)
)
@@ -5080,7 +4997,7 @@
)
)
(pin "POE_GND" output
- (at 91.44 97.79 0)
+ (at 91.44 107.95 0)
(uuid "6c770162-6936-4729-b598-10f0375ecc24")
(effects
(font
@@ -5090,7 +5007,7 @@
)
)
(pin "POE_VIN" output
- (at 91.44 95.25 0)
+ (at 91.44 105.41 0)
(uuid "1863d617-dc5e-4005-9116-05e2cde6d04b")
(effects
(font
@@ -5141,28 +5058,8 @@
(justify left top)
)
)
- (pin "AC_EARTH" bidirectional
- (at 241.3 86.36 0)
- (uuid "d38d9ad1-0808-4eb3-8f04-f5d375279cad")
- (effects
- (font
- (size 1.27 1.27)
- )
- (justify right)
- )
- )
- (pin "AC_NEUTRAL" bidirectional
- (at 241.3 88.9 0)
- (uuid "9f1bb5d9-5f27-4b27-8b9b-3c5279d0e3fd")
- (effects
- (font
- (size 1.27 1.27)
- )
- (justify right)
- )
- )
(pin "AC_PHASE" bidirectional
- (at 241.3 91.44 0)
+ (at 241.3 88.9 0)
(uuid "b45797bb-cca3-49c0-86c4-955a6b44d60c")
(effects
(font
@@ -5171,28 +5068,8 @@
(justify right)
)
)
- (pin "MOT_EARTH" bidirectional
- (at 241.3 97.79 0)
- (uuid "a3defca1-3eed-4b57-ab0a-f16f59fee2c7")
- (effects
- (font
- (size 1.27 1.27)
- )
- (justify right)
- )
- )
- (pin "MOT_NEUTRAL" bidirectional
- (at 241.3 100.33 0)
- (uuid "3b66624d-b956-4a77-a1d2-be8580699a49")
- (effects
- (font
- (size 1.27 1.27)
- )
- (justify right)
- )
- )
(pin "MOT_PHASE_1" bidirectional
- (at 241.3 102.87 0)
+ (at 241.3 91.44 0)
(uuid "ead288da-2d52-42f6-b402-c382468e36d4")
(effects
(font
@@ -5202,7 +5079,7 @@
)
)
(pin "MOT_PHASE_2" bidirectional
- (at 241.3 105.41 0)
+ (at 241.3 93.98 0)
(uuid "e9687363-d732-4f1b-99ef-f6609013c187")
(effects
(font
@@ -5212,7 +5089,7 @@
)
)
(pin "CONTACT_1" bidirectional
- (at 241.3 74.93 0)
+ (at 241.3 83.82 0)
(uuid "45229719-3224-4355-bc91-87ebcb939c01")
(effects
(font
@@ -5222,7 +5099,7 @@
)
)
(pin "CONTACT_2" bidirectional
- (at 241.3 77.47 0)
+ (at 241.3 86.36 0)
(uuid "b1fc0b36-ff3b-4224-9ca0-41809406e0d1")
(effects
(font
@@ -5394,26 +5271,6 @@
(justify left)
)
)
- (pin "BTN_REBOOT" input
- (at 156.21 114.3 270)
- (uuid "25cdef05-d216-4465-af84-0c3bcab2af5a")
- (effects
- (font
- (size 1.27 1.27)
- )
- (justify left)
- )
- )
- (pin "BTN_WIPE" input
- (at 158.75 114.3 270)
- (uuid "6ad16868-63a8-44e1-a096-87e22852f914")
- (effects
- (font
- (size 1.27 1.27)
- )
- (justify left)
- )
- )
(pin "LED_ACT" output
(at 173.99 114.3 270)
(uuid "c6d0305a-4e79-4cb1-88dd-2bc3b4bd5355")
@@ -5454,6 +5311,36 @@
(justify right)
)
)
+ (pin "VVERSION" input
+ (at 127 104.14 180)
+ (uuid "cc6082cf-6e1b-4529-a830-c6a9254ad3b1")
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (justify left)
+ )
+ )
+ (pin "~{BTN_REBOOT}" input
+ (at 156.21 114.3 270)
+ (uuid "cd291d13-5669-42bf-819b-2a4c6220376c")
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (justify left)
+ )
+ )
+ (pin "~{BTN_WIPE}" input
+ (at 158.75 114.3 270)
+ (uuid "a3c81ecf-25b7-4d55-bb41-ea32fa2b6812")
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (justify left)
+ )
+ )
(instances
(project "iot-contact"
(path "/5defd195-0277-4d04-9f5f-69e505c9845c"
diff --git a/pcb/meson.build b/pcb/meson.build
new file mode 100644
index 0000000..4feecce
--- /dev/null
+++ b/pcb/meson.build
@@ -0,0 +1,41 @@
+schematic_files = [
+ 'iot-contact.kicad_sch',
+ 'contacts.kicad_sch',
+ 'ethernet.kicad_sch',
+ 'io.kicad_sch',
+ 'power.kicad_sch',
+ 'processor.kicad_sch',
+]
+
+schematic = custom_target(
+ output: ['schematic.pdf'],
+ command: [
+ 'kicad-cli',
+ 'sch',
+ 'export',
+ 'pdf',
+ '--output', meson.current_build_dir() / 'schematic.pdf',
+ meson.current_source_dir() / 'iot-contact.kicad_sch',
+ ],
+ depend_files: schematic_files,
+ build_by_default: true,
+)
+
+bom = custom_target(
+ output: ['bill-of-materials.csv'],
+ command: [
+ 'kicad-cli',
+ 'sch',
+ 'export',
+ 'bom',
+ '--fields',
+ 'Reference,Description,Value,Footprint,Manufacturer,MPN,Datasheet',
+ '--output', meson.current_build_dir() / 'bill-of-materials.csv',
+ meson.current_source_dir() / 'iot-contact.kicad_sch',
+ ],
+ depend_files: schematic_files,
+ build_by_default: true,
+)
+
+fs = import('fs')
+kicad_pcb = fs.copyfile(meson.current_source_dir() / 'iot-contact.kicad_pcb')
diff --git a/pcb/processor.kicad_sch b/pcb/processor.kicad_sch
index 41b29b9..a35d700 100644
--- a/pcb/processor.kicad_sch
+++ b/pcb/processor.kicad_sch
@@ -7,10 +7,2343 @@
(title_block
(title "iot-contact")
)
- (lib_symbols)
- (hierarchical_label "BTN_REBOOT"
+ (lib_symbols
+ (symbol "MCU_ST_STM32F4:STM32F427VITx"
+ (exclude_from_sim no)
+ (in_bom yes)
+ (on_board yes)
+ (property "Reference" "U"
+ (at -20.32 69.85 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (justify left)
+ )
+ )
+ (property "Value" "STM32F427VITx"
+ (at 12.7 69.85 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (justify left)
+ )
+ )
+ (property "Footprint" "Package_QFP:LQFP-100_14x14mm_P0.5mm"
+ (at -20.32 -66.04 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (justify right)
+ (hide yes)
+ )
+ )
+ (property "Datasheet" "https://www.st.com/resource/en/datasheet/stm32f427vi.pdf"
+ (at 0 0 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
+ )
+ (property "Description" "STMicroelectronics Arm Cortex-M4 MCU, 2048KB flash, 256KB RAM, 180 MHz, 1.8-3.6V, 82 GPIO, LQFP100"
+ (at 0 0 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
+ )
+ (property "ki_keywords" "Arm Cortex-M4 STM32F4 STM32F427/437"
+ (at 0 0 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
+ )
+ (property "ki_fp_filters" "LQFP*14x14mm*P0.5mm*"
+ (at 0 0 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
+ )
+ (symbol "STM32F427VITx_0_1"
+ (rectangle
+ (start -20.32 -66.04)
+ (end 20.32 68.58)
+ (stroke
+ (width 0.254)
+ (type default)
+ )
+ (fill
+ (type background)
+ )
+ )
+ )
+ (symbol "STM32F427VITx_1_1"
+ (pin input line
+ (at -25.4 63.5 0)
+ (length 5.08)
+ (name "NRST"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "14"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin input line
+ (at -25.4 58.42 0)
+ (length 5.08)
+ (name "BOOT0"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "94"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin input line
+ (at -25.4 53.34 0)
+ (length 5.08)
+ (name "VREF+"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "21"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin bidirectional line
+ (at -25.4 48.26 0)
+ (length 5.08)
+ (name "PH0"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "12"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "RCC_OSC_IN" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 45.72 0)
+ (length 5.08)
+ (name "PH1"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "13"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "RCC_OSC_OUT" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 40.64 0)
+ (length 5.08)
+ (name "PE0"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "97"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DCMI_D2" bidirectional line)
+ (alternate "FMC_NBL0" bidirectional line)
+ (alternate "TIM4_ETR" bidirectional line)
+ (alternate "UART8_RX" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 38.1 0)
+ (length 5.08)
+ (name "PE1"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "98"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DCMI_D3" bidirectional line)
+ (alternate "FMC_NBL1" bidirectional line)
+ (alternate "UART8_TX" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 35.56 0)
+ (length 5.08)
+ (name "PE2"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "1"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ETH_TXD3" bidirectional line)
+ (alternate "FMC_A23" bidirectional line)
+ (alternate "SAI1_MCLK_A" bidirectional line)
+ (alternate "SPI4_SCK" bidirectional line)
+ (alternate "SYS_TRACECLK" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 33.02 0)
+ (length 5.08)
+ (name "PE3"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "2"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "FMC_A19" bidirectional line)
+ (alternate "SAI1_SD_B" bidirectional line)
+ (alternate "SYS_TRACED0" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 30.48 0)
+ (length 5.08)
+ (name "PE4"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "3"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DCMI_D4" bidirectional line)
+ (alternate "FMC_A20" bidirectional line)
+ (alternate "SAI1_FS_A" bidirectional line)
+ (alternate "SPI4_NSS" bidirectional line)
+ (alternate "SYS_TRACED1" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 27.94 0)
+ (length 5.08)
+ (name "PE5"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "4"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DCMI_D6" bidirectional line)
+ (alternate "FMC_A21" bidirectional line)
+ (alternate "SAI1_SCK_A" bidirectional line)
+ (alternate "SPI4_MISO" bidirectional line)
+ (alternate "SYS_TRACED2" bidirectional line)
+ (alternate "TIM9_CH1" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 25.4 0)
+ (length 5.08)
+ (name "PE6"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "5"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DCMI_D7" bidirectional line)
+ (alternate "FMC_A22" bidirectional line)
+ (alternate "SAI1_SD_A" bidirectional line)
+ (alternate "SPI4_MOSI" bidirectional line)
+ (alternate "SYS_TRACED3" bidirectional line)
+ (alternate "TIM9_CH2" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 22.86 0)
+ (length 5.08)
+ (name "PE7"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "38"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "FMC_D4" bidirectional line)
+ (alternate "FMC_DA4" bidirectional line)
+ (alternate "TIM1_ETR" bidirectional line)
+ (alternate "UART7_RX" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 20.32 0)
+ (length 5.08)
+ (name "PE8"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "39"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "FMC_D5" bidirectional line)
+ (alternate "FMC_DA5" bidirectional line)
+ (alternate "TIM1_CH1N" bidirectional line)
+ (alternate "UART7_TX" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 17.78 0)
+ (length 5.08)
+ (name "PE9"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "40"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DAC_EXTI9" bidirectional line)
+ (alternate "FMC_D6" bidirectional line)
+ (alternate "FMC_DA6" bidirectional line)
+ (alternate "TIM1_CH1" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 15.24 0)
+ (length 5.08)
+ (name "PE10"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "41"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "FMC_D7" bidirectional line)
+ (alternate "FMC_DA7" bidirectional line)
+ (alternate "TIM1_CH2N" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 12.7 0)
+ (length 5.08)
+ (name "PE11"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "42"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_EXTI11" bidirectional line)
+ (alternate "ADC2_EXTI11" bidirectional line)
+ (alternate "ADC3_EXTI11" bidirectional line)
+ (alternate "FMC_D8" bidirectional line)
+ (alternate "FMC_DA8" bidirectional line)
+ (alternate "SPI4_NSS" bidirectional line)
+ (alternate "TIM1_CH2" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 10.16 0)
+ (length 5.08)
+ (name "PE12"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "43"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "FMC_D9" bidirectional line)
+ (alternate "FMC_DA9" bidirectional line)
+ (alternate "SPI4_SCK" bidirectional line)
+ (alternate "TIM1_CH3N" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 7.62 0)
+ (length 5.08)
+ (name "PE13"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "44"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "FMC_D10" bidirectional line)
+ (alternate "FMC_DA10" bidirectional line)
+ (alternate "SPI4_MISO" bidirectional line)
+ (alternate "TIM1_CH3" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 5.08 0)
+ (length 5.08)
+ (name "PE14"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "45"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "FMC_D11" bidirectional line)
+ (alternate "FMC_DA11" bidirectional line)
+ (alternate "SPI4_MOSI" bidirectional line)
+ (alternate "TIM1_CH4" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 2.54 0)
+ (length 5.08)
+ (name "PE15"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "46"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_EXTI15" bidirectional line)
+ (alternate "ADC2_EXTI15" bidirectional line)
+ (alternate "ADC3_EXTI15" bidirectional line)
+ (alternate "FMC_D12" bidirectional line)
+ (alternate "FMC_DA12" bidirectional line)
+ (alternate "TIM1_BKIN" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 -2.54 0)
+ (length 5.08)
+ (name "PD0"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "81"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "CAN1_RX" bidirectional line)
+ (alternate "FMC_D2" bidirectional line)
+ (alternate "FMC_DA2" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 -5.08 0)
+ (length 5.08)
+ (name "PD1"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "82"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "CAN1_TX" bidirectional line)
+ (alternate "FMC_D3" bidirectional line)
+ (alternate "FMC_DA3" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 -7.62 0)
+ (length 5.08)
+ (name "PD2"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "83"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DCMI_D11" bidirectional line)
+ (alternate "SDIO_CMD" bidirectional line)
+ (alternate "TIM3_ETR" bidirectional line)
+ (alternate "UART5_RX" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 -10.16 0)
+ (length 5.08)
+ (name "PD3"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "84"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DCMI_D5" bidirectional line)
+ (alternate "FMC_CLK" bidirectional line)
+ (alternate "I2S2_CK" bidirectional line)
+ (alternate "SPI2_SCK" bidirectional line)
+ (alternate "USART2_CTS" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 -12.7 0)
+ (length 5.08)
+ (name "PD4"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "85"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "FMC_NOE" bidirectional line)
+ (alternate "USART2_RTS" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 -15.24 0)
+ (length 5.08)
+ (name "PD5"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "86"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "FMC_NWE" bidirectional line)
+ (alternate "USART2_TX" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 -17.78 0)
+ (length 5.08)
+ (name "PD6"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "87"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DCMI_D10" bidirectional line)
+ (alternate "FMC_NWAIT" bidirectional line)
+ (alternate "I2S3_SD" bidirectional line)
+ (alternate "SAI1_SD_A" bidirectional line)
+ (alternate "SPI3_MOSI" bidirectional line)
+ (alternate "USART2_RX" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 -20.32 0)
+ (length 5.08)
+ (name "PD7"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "88"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "FMC_NCE2" bidirectional line)
+ (alternate "FMC_NE1" bidirectional line)
+ (alternate "USART2_CK" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 -22.86 0)
+ (length 5.08)
+ (name "PD8"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "55"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "FMC_D13" bidirectional line)
+ (alternate "FMC_DA13" bidirectional line)
+ (alternate "USART3_TX" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 -25.4 0)
+ (length 5.08)
+ (name "PD9"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "56"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DAC_EXTI9" bidirectional line)
+ (alternate "FMC_D14" bidirectional line)
+ (alternate "FMC_DA14" bidirectional line)
+ (alternate "USART3_RX" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 -27.94 0)
+ (length 5.08)
+ (name "PD10"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "57"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "FMC_D15" bidirectional line)
+ (alternate "FMC_DA15" bidirectional line)
+ (alternate "USART3_CK" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 -30.48 0)
+ (length 5.08)
+ (name "PD11"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "58"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_EXTI11" bidirectional line)
+ (alternate "ADC2_EXTI11" bidirectional line)
+ (alternate "ADC3_EXTI11" bidirectional line)
+ (alternate "FMC_A16" bidirectional line)
+ (alternate "FMC_CLE" bidirectional line)
+ (alternate "USART3_CTS" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 -33.02 0)
+ (length 5.08)
+ (name "PD12"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "59"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "FMC_A17" bidirectional line)
+ (alternate "FMC_ALE" bidirectional line)
+ (alternate "TIM4_CH1" bidirectional line)
+ (alternate "USART3_RTS" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 -35.56 0)
+ (length 5.08)
+ (name "PD13"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "60"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "FMC_A18" bidirectional line)
+ (alternate "TIM4_CH2" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 -38.1 0)
+ (length 5.08)
+ (name "PD14"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "61"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "FMC_D0" bidirectional line)
+ (alternate "FMC_DA0" bidirectional line)
+ (alternate "TIM4_CH3" bidirectional line)
+ )
+ (pin bidirectional line
+ (at -25.4 -40.64 0)
+ (length 5.08)
+ (name "PD15"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "62"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_EXTI15" bidirectional line)
+ (alternate "ADC2_EXTI15" bidirectional line)
+ (alternate "ADC3_EXTI15" bidirectional line)
+ (alternate "FMC_D1" bidirectional line)
+ (alternate "FMC_DA1" bidirectional line)
+ (alternate "TIM4_CH4" bidirectional line)
+ )
+ (pin power_out line
+ (at -25.4 -45.72 0)
+ (length 5.08)
+ (name "VCAP_1"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "49"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin power_out line
+ (at -25.4 -48.26 0)
+ (length 5.08)
+ (name "VCAP_2"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "73"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin power_in line
+ (at -7.62 73.66 270)
+ (length 5.08)
+ (name "VBAT"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "6"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin power_in line
+ (at -5.08 73.66 270)
+ (length 5.08)
+ (name "VDD"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "11"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin power_in line
+ (at -2.54 73.66 270)
+ (length 5.08)
+ (name "VDD"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "19"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin power_in line
+ (at 0 73.66 270)
+ (length 5.08)
+ (name "VDD"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "28"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin power_in line
+ (at 0 -71.12 90)
+ (length 5.08)
+ (name "VSS"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "10"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin passive line
+ (at 0 -71.12 90)
+ (length 5.08)
+ (hide yes)
+ (name "VSS"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "27"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin passive line
+ (at 0 -71.12 90)
+ (length 5.08)
+ (hide yes)
+ (name "VSS"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "74"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin passive line
+ (at 0 -71.12 90)
+ (length 5.08)
+ (hide yes)
+ (name "VSS"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "99"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin power_in line
+ (at 2.54 73.66 270)
+ (length 5.08)
+ (name "VDD"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "50"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin power_in line
+ (at 2.54 -71.12 90)
+ (length 5.08)
+ (name "VSSA"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "20"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin power_in line
+ (at 5.08 73.66 270)
+ (length 5.08)
+ (name "VDD"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "75"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin power_in line
+ (at 7.62 73.66 270)
+ (length 5.08)
+ (name "VDD"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "100"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin power_in line
+ (at 10.16 73.66 270)
+ (length 5.08)
+ (name "VDDA"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "22"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin bidirectional line
+ (at 25.4 63.5 180)
+ (length 5.08)
+ (name "PA0"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "23"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_IN0" bidirectional line)
+ (alternate "ADC2_IN0" bidirectional line)
+ (alternate "ADC3_IN0" bidirectional line)
+ (alternate "ETH_CRS" bidirectional line)
+ (alternate "SYS_WKUP" bidirectional line)
+ (alternate "TIM2_CH1" bidirectional line)
+ (alternate "TIM2_ETR" bidirectional line)
+ (alternate "TIM5_CH1" bidirectional line)
+ (alternate "TIM8_ETR" bidirectional line)
+ (alternate "UART4_TX" bidirectional line)
+ (alternate "USART2_CTS" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 60.96 180)
+ (length 5.08)
+ (name "PA1"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "24"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_IN1" bidirectional line)
+ (alternate "ADC2_IN1" bidirectional line)
+ (alternate "ADC3_IN1" bidirectional line)
+ (alternate "ETH_REF_CLK" bidirectional line)
+ (alternate "ETH_RX_CLK" bidirectional line)
+ (alternate "TIM2_CH2" bidirectional line)
+ (alternate "TIM5_CH2" bidirectional line)
+ (alternate "UART4_RX" bidirectional line)
+ (alternate "USART2_RTS" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 58.42 180)
+ (length 5.08)
+ (name "PA2"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "25"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_IN2" bidirectional line)
+ (alternate "ADC2_IN2" bidirectional line)
+ (alternate "ADC3_IN2" bidirectional line)
+ (alternate "ETH_MDIO" bidirectional line)
+ (alternate "TIM2_CH3" bidirectional line)
+ (alternate "TIM5_CH3" bidirectional line)
+ (alternate "TIM9_CH1" bidirectional line)
+ (alternate "USART2_TX" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 55.88 180)
+ (length 5.08)
+ (name "PA3"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "26"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_IN3" bidirectional line)
+ (alternate "ADC2_IN3" bidirectional line)
+ (alternate "ADC3_IN3" bidirectional line)
+ (alternate "ETH_COL" bidirectional line)
+ (alternate "TIM2_CH4" bidirectional line)
+ (alternate "TIM5_CH4" bidirectional line)
+ (alternate "TIM9_CH2" bidirectional line)
+ (alternate "USART2_RX" bidirectional line)
+ (alternate "USB_OTG_HS_ULPI_D0" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 53.34 180)
+ (length 5.08)
+ (name "PA4"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "29"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_IN4" bidirectional line)
+ (alternate "ADC2_IN4" bidirectional line)
+ (alternate "DAC_OUT1" bidirectional line)
+ (alternate "DCMI_HSYNC" bidirectional line)
+ (alternate "I2S3_WS" bidirectional line)
+ (alternate "SPI1_NSS" bidirectional line)
+ (alternate "SPI3_NSS" bidirectional line)
+ (alternate "USART2_CK" bidirectional line)
+ (alternate "USB_OTG_HS_SOF" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 50.8 180)
+ (length 5.08)
+ (name "PA5"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "30"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_IN5" bidirectional line)
+ (alternate "ADC2_IN5" bidirectional line)
+ (alternate "DAC_OUT2" bidirectional line)
+ (alternate "SPI1_SCK" bidirectional line)
+ (alternate "TIM2_CH1" bidirectional line)
+ (alternate "TIM2_ETR" bidirectional line)
+ (alternate "TIM8_CH1N" bidirectional line)
+ (alternate "USB_OTG_HS_ULPI_CK" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 48.26 180)
+ (length 5.08)
+ (name "PA6"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "31"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_IN6" bidirectional line)
+ (alternate "ADC2_IN6" bidirectional line)
+ (alternate "DCMI_PIXCLK" bidirectional line)
+ (alternate "SPI1_MISO" bidirectional line)
+ (alternate "TIM13_CH1" bidirectional line)
+ (alternate "TIM1_BKIN" bidirectional line)
+ (alternate "TIM3_CH1" bidirectional line)
+ (alternate "TIM8_BKIN" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 45.72 180)
+ (length 5.08)
+ (name "PA7"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "32"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_IN7" bidirectional line)
+ (alternate "ADC2_IN7" bidirectional line)
+ (alternate "ETH_CRS_DV" bidirectional line)
+ (alternate "ETH_RX_DV" bidirectional line)
+ (alternate "SPI1_MOSI" bidirectional line)
+ (alternate "TIM14_CH1" bidirectional line)
+ (alternate "TIM1_CH1N" bidirectional line)
+ (alternate "TIM3_CH2" bidirectional line)
+ (alternate "TIM8_CH1N" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 43.18 180)
+ (length 5.08)
+ (name "PA8"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "67"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "I2C3_SCL" bidirectional line)
+ (alternate "RCC_MCO_1" bidirectional line)
+ (alternate "TIM1_CH1" bidirectional line)
+ (alternate "USART1_CK" bidirectional line)
+ (alternate "USB_OTG_FS_SOF" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 40.64 180)
+ (length 5.08)
+ (name "PA9"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "68"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DAC_EXTI9" bidirectional line)
+ (alternate "DCMI_D0" bidirectional line)
+ (alternate "I2C3_SMBA" bidirectional line)
+ (alternate "TIM1_CH2" bidirectional line)
+ (alternate "USART1_TX" bidirectional line)
+ (alternate "USB_OTG_FS_VBUS" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 38.1 180)
+ (length 5.08)
+ (name "PA10"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "69"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DCMI_D1" bidirectional line)
+ (alternate "TIM1_CH3" bidirectional line)
+ (alternate "USART1_RX" bidirectional line)
+ (alternate "USB_OTG_FS_ID" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 35.56 180)
+ (length 5.08)
+ (name "PA11"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "70"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_EXTI11" bidirectional line)
+ (alternate "ADC2_EXTI11" bidirectional line)
+ (alternate "ADC3_EXTI11" bidirectional line)
+ (alternate "CAN1_RX" bidirectional line)
+ (alternate "TIM1_CH4" bidirectional line)
+ (alternate "USART1_CTS" bidirectional line)
+ (alternate "USB_OTG_FS_DM" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 33.02 180)
+ (length 5.08)
+ (name "PA12"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "71"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "CAN1_TX" bidirectional line)
+ (alternate "TIM1_ETR" bidirectional line)
+ (alternate "USART1_RTS" bidirectional line)
+ (alternate "USB_OTG_FS_DP" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 30.48 180)
+ (length 5.08)
+ (name "PA13"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "72"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "SYS_JTMS-SWDIO" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 27.94 180)
+ (length 5.08)
+ (name "PA14"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "76"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "SYS_JTCK-SWCLK" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 25.4 180)
+ (length 5.08)
+ (name "PA15"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "77"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_EXTI15" bidirectional line)
+ (alternate "ADC2_EXTI15" bidirectional line)
+ (alternate "ADC3_EXTI15" bidirectional line)
+ (alternate "I2S3_WS" bidirectional line)
+ (alternate "SPI1_NSS" bidirectional line)
+ (alternate "SPI3_NSS" bidirectional line)
+ (alternate "SYS_JTDI" bidirectional line)
+ (alternate "TIM2_CH1" bidirectional line)
+ (alternate "TIM2_ETR" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 20.32 180)
+ (length 5.08)
+ (name "PB0"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "35"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_IN8" bidirectional line)
+ (alternate "ADC2_IN8" bidirectional line)
+ (alternate "ETH_RXD2" bidirectional line)
+ (alternate "TIM1_CH2N" bidirectional line)
+ (alternate "TIM3_CH3" bidirectional line)
+ (alternate "TIM8_CH2N" bidirectional line)
+ (alternate "USB_OTG_HS_ULPI_D1" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 17.78 180)
+ (length 5.08)
+ (name "PB1"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "36"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_IN9" bidirectional line)
+ (alternate "ADC2_IN9" bidirectional line)
+ (alternate "ETH_RXD3" bidirectional line)
+ (alternate "TIM1_CH3N" bidirectional line)
+ (alternate "TIM3_CH4" bidirectional line)
+ (alternate "TIM8_CH3N" bidirectional line)
+ (alternate "USB_OTG_HS_ULPI_D2" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 15.24 180)
+ (length 5.08)
+ (name "PB2"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "37"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ )
+ (pin bidirectional line
+ (at 25.4 12.7 180)
+ (length 5.08)
+ (name "PB3"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "89"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "I2S3_CK" bidirectional line)
+ (alternate "SPI1_SCK" bidirectional line)
+ (alternate "SPI3_SCK" bidirectional line)
+ (alternate "SYS_JTDO-SWO" bidirectional line)
+ (alternate "TIM2_CH2" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 10.16 180)
+ (length 5.08)
+ (name "PB4"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "90"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "I2S3_ext_SD" bidirectional line)
+ (alternate "SPI1_MISO" bidirectional line)
+ (alternate "SPI3_MISO" bidirectional line)
+ (alternate "SYS_JTRST" bidirectional line)
+ (alternate "TIM3_CH1" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 7.62 180)
+ (length 5.08)
+ (name "PB5"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "91"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "CAN2_RX" bidirectional line)
+ (alternate "DCMI_D10" bidirectional line)
+ (alternate "ETH_PPS_OUT" bidirectional line)
+ (alternate "FMC_SDCKE1" bidirectional line)
+ (alternate "I2C1_SMBA" bidirectional line)
+ (alternate "I2S3_SD" bidirectional line)
+ (alternate "SPI1_MOSI" bidirectional line)
+ (alternate "SPI3_MOSI" bidirectional line)
+ (alternate "TIM3_CH2" bidirectional line)
+ (alternate "USB_OTG_HS_ULPI_D7" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 5.08 180)
+ (length 5.08)
+ (name "PB6"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "92"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "CAN2_TX" bidirectional line)
+ (alternate "DCMI_D5" bidirectional line)
+ (alternate "FMC_SDNE1" bidirectional line)
+ (alternate "I2C1_SCL" bidirectional line)
+ (alternate "TIM4_CH1" bidirectional line)
+ (alternate "USART1_TX" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 2.54 180)
+ (length 5.08)
+ (name "PB7"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "93"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DCMI_VSYNC" bidirectional line)
+ (alternate "FMC_NL" bidirectional line)
+ (alternate "I2C1_SDA" bidirectional line)
+ (alternate "TIM4_CH2" bidirectional line)
+ (alternate "USART1_RX" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 0 180)
+ (length 5.08)
+ (name "PB8"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "95"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "CAN1_RX" bidirectional line)
+ (alternate "DCMI_D6" bidirectional line)
+ (alternate "ETH_TXD3" bidirectional line)
+ (alternate "I2C1_SCL" bidirectional line)
+ (alternate "SDIO_D4" bidirectional line)
+ (alternate "TIM10_CH1" bidirectional line)
+ (alternate "TIM4_CH3" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -2.54 180)
+ (length 5.08)
+ (name "PB9"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "96"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "CAN1_TX" bidirectional line)
+ (alternate "DAC_EXTI9" bidirectional line)
+ (alternate "DCMI_D7" bidirectional line)
+ (alternate "I2C1_SDA" bidirectional line)
+ (alternate "I2S2_WS" bidirectional line)
+ (alternate "SDIO_D5" bidirectional line)
+ (alternate "SPI2_NSS" bidirectional line)
+ (alternate "TIM11_CH1" bidirectional line)
+ (alternate "TIM4_CH4" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -5.08 180)
+ (length 5.08)
+ (name "PB10"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "47"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ETH_RX_ER" bidirectional line)
+ (alternate "I2C2_SCL" bidirectional line)
+ (alternate "I2S2_CK" bidirectional line)
+ (alternate "SPI2_SCK" bidirectional line)
+ (alternate "TIM2_CH3" bidirectional line)
+ (alternate "USART3_TX" bidirectional line)
+ (alternate "USB_OTG_HS_ULPI_D3" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -7.62 180)
+ (length 5.08)
+ (name "PB11"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "48"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_EXTI11" bidirectional line)
+ (alternate "ADC2_EXTI11" bidirectional line)
+ (alternate "ADC3_EXTI11" bidirectional line)
+ (alternate "ETH_TX_EN" bidirectional line)
+ (alternate "I2C2_SDA" bidirectional line)
+ (alternate "TIM2_CH4" bidirectional line)
+ (alternate "USART3_RX" bidirectional line)
+ (alternate "USB_OTG_HS_ULPI_D4" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -10.16 180)
+ (length 5.08)
+ (name "PB12"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "51"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "CAN2_RX" bidirectional line)
+ (alternate "ETH_TXD0" bidirectional line)
+ (alternate "I2C2_SMBA" bidirectional line)
+ (alternate "I2S2_WS" bidirectional line)
+ (alternate "SPI2_NSS" bidirectional line)
+ (alternate "TIM1_BKIN" bidirectional line)
+ (alternate "USART3_CK" bidirectional line)
+ (alternate "USB_OTG_HS_ID" bidirectional line)
+ (alternate "USB_OTG_HS_ULPI_D5" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -12.7 180)
+ (length 5.08)
+ (name "PB13"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "52"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "CAN2_TX" bidirectional line)
+ (alternate "ETH_TXD1" bidirectional line)
+ (alternate "I2S2_CK" bidirectional line)
+ (alternate "SPI2_SCK" bidirectional line)
+ (alternate "TIM1_CH1N" bidirectional line)
+ (alternate "USART3_CTS" bidirectional line)
+ (alternate "USB_OTG_HS_ULPI_D6" bidirectional line)
+ (alternate "USB_OTG_HS_VBUS" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -15.24 180)
+ (length 5.08)
+ (name "PB14"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "53"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "I2S2_ext_SD" bidirectional line)
+ (alternate "SPI2_MISO" bidirectional line)
+ (alternate "TIM12_CH1" bidirectional line)
+ (alternate "TIM1_CH2N" bidirectional line)
+ (alternate "TIM8_CH2N" bidirectional line)
+ (alternate "USART3_RTS" bidirectional line)
+ (alternate "USB_OTG_HS_DM" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -17.78 180)
+ (length 5.08)
+ (name "PB15"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "54"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_EXTI15" bidirectional line)
+ (alternate "ADC2_EXTI15" bidirectional line)
+ (alternate "ADC3_EXTI15" bidirectional line)
+ (alternate "I2S2_SD" bidirectional line)
+ (alternate "RTC_REFIN" bidirectional line)
+ (alternate "SPI2_MOSI" bidirectional line)
+ (alternate "TIM12_CH2" bidirectional line)
+ (alternate "TIM1_CH3N" bidirectional line)
+ (alternate "TIM8_CH3N" bidirectional line)
+ (alternate "USB_OTG_HS_DP" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -22.86 180)
+ (length 5.08)
+ (name "PC0"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "15"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_IN10" bidirectional line)
+ (alternate "ADC2_IN10" bidirectional line)
+ (alternate "ADC3_IN10" bidirectional line)
+ (alternate "FMC_SDNWE" bidirectional line)
+ (alternate "USB_OTG_HS_ULPI_STP" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -25.4 180)
+ (length 5.08)
+ (name "PC1"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "16"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_IN11" bidirectional line)
+ (alternate "ADC2_IN11" bidirectional line)
+ (alternate "ADC3_IN11" bidirectional line)
+ (alternate "ETH_MDC" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -27.94 180)
+ (length 5.08)
+ (name "PC2"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "17"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_IN12" bidirectional line)
+ (alternate "ADC2_IN12" bidirectional line)
+ (alternate "ADC3_IN12" bidirectional line)
+ (alternate "ETH_TXD2" bidirectional line)
+ (alternate "FMC_SDNE0" bidirectional line)
+ (alternate "I2S2_ext_SD" bidirectional line)
+ (alternate "SPI2_MISO" bidirectional line)
+ (alternate "USB_OTG_HS_ULPI_DIR" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -30.48 180)
+ (length 5.08)
+ (name "PC3"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "18"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_IN13" bidirectional line)
+ (alternate "ADC2_IN13" bidirectional line)
+ (alternate "ADC3_IN13" bidirectional line)
+ (alternate "ETH_TX_CLK" bidirectional line)
+ (alternate "FMC_SDCKE0" bidirectional line)
+ (alternate "I2S2_SD" bidirectional line)
+ (alternate "SPI2_MOSI" bidirectional line)
+ (alternate "USB_OTG_HS_ULPI_NXT" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -33.02 180)
+ (length 5.08)
+ (name "PC4"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "33"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_IN14" bidirectional line)
+ (alternate "ADC2_IN14" bidirectional line)
+ (alternate "ETH_RXD0" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -35.56 180)
+ (length 5.08)
+ (name "PC5"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "34"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_IN15" bidirectional line)
+ (alternate "ADC2_IN15" bidirectional line)
+ (alternate "ETH_RXD1" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -38.1 180)
+ (length 5.08)
+ (name "PC6"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "63"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DCMI_D0" bidirectional line)
+ (alternate "I2S2_MCK" bidirectional line)
+ (alternate "SDIO_D6" bidirectional line)
+ (alternate "TIM3_CH1" bidirectional line)
+ (alternate "TIM8_CH1" bidirectional line)
+ (alternate "USART6_TX" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -40.64 180)
+ (length 5.08)
+ (name "PC7"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "64"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DCMI_D1" bidirectional line)
+ (alternate "I2S3_MCK" bidirectional line)
+ (alternate "SDIO_D7" bidirectional line)
+ (alternate "TIM3_CH2" bidirectional line)
+ (alternate "TIM8_CH2" bidirectional line)
+ (alternate "USART6_RX" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -43.18 180)
+ (length 5.08)
+ (name "PC8"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "65"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DCMI_D2" bidirectional line)
+ (alternate "SDIO_D0" bidirectional line)
+ (alternate "TIM3_CH3" bidirectional line)
+ (alternate "TIM8_CH3" bidirectional line)
+ (alternate "USART6_CK" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -45.72 180)
+ (length 5.08)
+ (name "PC9"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "66"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DAC_EXTI9" bidirectional line)
+ (alternate "DCMI_D3" bidirectional line)
+ (alternate "I2C3_SDA" bidirectional line)
+ (alternate "I2S_CKIN" bidirectional line)
+ (alternate "RCC_MCO_2" bidirectional line)
+ (alternate "SDIO_D1" bidirectional line)
+ (alternate "TIM3_CH4" bidirectional line)
+ (alternate "TIM8_CH4" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -48.26 180)
+ (length 5.08)
+ (name "PC10"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "78"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DCMI_D8" bidirectional line)
+ (alternate "I2S3_CK" bidirectional line)
+ (alternate "SDIO_D2" bidirectional line)
+ (alternate "SPI3_SCK" bidirectional line)
+ (alternate "UART4_TX" bidirectional line)
+ (alternate "USART3_TX" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -50.8 180)
+ (length 5.08)
+ (name "PC11"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "79"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_EXTI11" bidirectional line)
+ (alternate "ADC2_EXTI11" bidirectional line)
+ (alternate "ADC3_EXTI11" bidirectional line)
+ (alternate "DCMI_D4" bidirectional line)
+ (alternate "I2S3_ext_SD" bidirectional line)
+ (alternate "SDIO_D3" bidirectional line)
+ (alternate "SPI3_MISO" bidirectional line)
+ (alternate "UART4_RX" bidirectional line)
+ (alternate "USART3_RX" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -53.34 180)
+ (length 5.08)
+ (name "PC12"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "80"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "DCMI_D9" bidirectional line)
+ (alternate "I2S3_SD" bidirectional line)
+ (alternate "SDIO_CK" bidirectional line)
+ (alternate "SPI3_MOSI" bidirectional line)
+ (alternate "UART5_TX" bidirectional line)
+ (alternate "USART3_CK" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -55.88 180)
+ (length 5.08)
+ (name "PC13"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "7"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "RTC_AF1" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -58.42 180)
+ (length 5.08)
+ (name "PC14"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "8"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "RCC_OSC32_IN" bidirectional line)
+ )
+ (pin bidirectional line
+ (at 25.4 -60.96 180)
+ (length 5.08)
+ (name "PC15"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (number "9"
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (alternate "ADC1_EXTI15" bidirectional line)
+ (alternate "ADC2_EXTI15" bidirectional line)
+ (alternate "ADC3_EXTI15" bidirectional line)
+ (alternate "RCC_OSC32_OUT" bidirectional line)
+ )
+ )
+ (embedded_fonts no)
+ )
+ )
+ (text "See AN4488 to get started"
+ (exclude_from_sim no)
+ (at 184.15 34.544 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ (uuid "82f61e74-c865-4393-826a-066e2a341f3e")
+ )
+ (hierarchical_label "~{BTN_REBOOT}"
(shape input)
- (at 114.3 139.7 270)
+ (at 105.41 179.07 270)
(effects
(font
(size 1.27 1.27)
@@ -21,7 +2354,7 @@
)
(hierarchical_label "~{JTAG_RESET}"
(shape input)
- (at 114.3 38.1 90)
+ (at 34.29 35.56 90)
(effects
(font
(size 1.27 1.27)
@@ -43,7 +2376,7 @@
)
(hierarchical_label "UART_TX"
(shape output)
- (at 142.24 38.1 90)
+ (at 62.23 35.56 90)
(effects
(font
(size 1.27 1.27)
@@ -54,7 +2387,7 @@
)
(hierarchical_label "LED_UPD"
(shape output)
- (at 142.24 139.7 270)
+ (at 154.94 179.07 270)
(effects
(font
(size 1.27 1.27)
@@ -65,7 +2398,7 @@
)
(hierarchical_label "JTAG_TMS"
(shape bidirectional)
- (at 119.38 38.1 90)
+ (at 39.37 35.56 90)
(effects
(font
(size 1.27 1.27)
@@ -74,9 +2407,9 @@
)
(uuid "617b37ec-b5d3-4e1b-971a-1e543c286c47")
)
- (hierarchical_label "BTN_WIPE"
+ (hierarchical_label "~{BTN_WIPE}"
(shape input)
- (at 116.84 139.7 270)
+ (at 107.95 179.07 270)
(effects
(font
(size 1.27 1.27)
@@ -87,7 +2420,7 @@
)
(hierarchical_label "JTAG_TDI"
(shape input)
- (at 124.46 38.1 90)
+ (at 44.45 35.56 90)
(effects
(font
(size 1.27 1.27)
@@ -98,7 +2431,7 @@
)
(hierarchical_label "LED_PWR"
(shape output)
- (at 139.7 139.7 270)
+ (at 152.4 179.07 270)
(effects
(font
(size 1.27 1.27)
@@ -109,7 +2442,7 @@
)
(hierarchical_label "LED_ACT"
(shape output)
- (at 144.78 139.7 270)
+ (at 157.48 179.07 270)
(effects
(font
(size 1.27 1.27)
@@ -131,7 +2464,7 @@
)
(hierarchical_label "JTAG_TCK"
(shape input)
- (at 116.84 38.1 90)
+ (at 36.83 35.56 90)
(effects
(font
(size 1.27 1.27)
@@ -140,9 +2473,20 @@
)
(uuid "806823e9-c7ef-45dc-832c-ddb4378c340f")
)
+ (hierarchical_label "VVERSION"
+ (shape input)
+ (at 35.56 100.33 180)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (justify right)
+ )
+ (uuid "919dc185-71c3-4c56-8386-f6c0dc6b4c73")
+ )
(hierarchical_label "JTAG_TDO"
(shape output)
- (at 121.92 38.1 90)
+ (at 41.91 35.56 90)
(effects
(font
(size 1.27 1.27)
@@ -153,7 +2497,7 @@
)
(hierarchical_label "UART_RX"
(shape input)
- (at 139.7 38.1 90)
+ (at 59.69 35.56 90)
(effects
(font
(size 1.27 1.27)
@@ -173,4 +2517,384 @@
)
(uuid "fa84533f-5191-4139-bd31-6669d829fda6")
)
+ (symbol
+ (lib_id "MCU_ST_STM32F4:STM32F427VITx")
+ (at 120.65 102.87 0)
+ (unit 1)
+ (exclude_from_sim no)
+ (in_bom yes)
+ (on_board yes)
+ (dnp no)
+ (uuid "492f8748-c9dd-4fe0-bb34-6c5556772be7")
+ (property "Reference" "U1"
+ (at 125.3333 171.45 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (justify left)
+ )
+ )
+ (property "Value" "STM32F427VITx"
+ (at 125.3333 173.99 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (justify left)
+ )
+ )
+ (property "Footprint" "Package_QFP:LQFP-100_14x14mm_P0.5mm"
+ (at 100.33 168.91 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (justify right)
+ (hide yes)
+ )
+ )
+ (property "Datasheet" "https://www.st.com/resource/en/datasheet/stm32f427vi.pdf"
+ (at 120.65 102.87 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
+ )
+ (property "Description" "STMicroelectronics Arm Cortex-M4 MCU, 2048KB flash, 256KB RAM, 180 MHz, 1.8-3.6V, 82 GPIO, LQFP100"
+ (at 120.65 102.87 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ (hide yes)
+ )
+ )
+ (property "MPN" "STM32F427VIT6TR"
+ (at 120.65 105.41 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (property "Manufacturer" "STMicroelectronics"
+ (at 120.65 102.87 0)
+ (effects
+ (font
+ (size 1.27 1.27)
+ )
+ )
+ )
+ (pin "92"
+ (uuid "e4c4e477-4df4-4d22-8137-7a3809c6a3a2")
+ )
+ (pin "48"
+ (uuid "e589f154-9286-4327-906d-cfcbabc2ed20")
+ )
+ (pin "99"
+ (uuid "447c55fd-f080-44d5-9ade-8e60cbe2c7b0")
+ )
+ (pin "6"
+ (uuid "bc5ece86-6932-465d-8fb3-96d527622132")
+ )
+ (pin "9"
+ (uuid "244fae6a-9e98-499a-ace9-1ce09c8e7a0e")
+ )
+ (pin "8"
+ (uuid "02fcc468-73a3-4047-beda-87bebeeba025")
+ )
+ (pin "66"
+ (uuid "d49ec73f-033a-4e20-95bf-39854d574dbf")
+ )
+ (pin "11"
+ (uuid "70fed43a-7e2a-4b89-ba1f-e09256b7dedd")
+ )
+ (pin "22"
+ (uuid "e802dfae-c3a2-4b0d-8229-8bb8b8522018")
+ )
+ (pin "76"
+ (uuid "4c3961b5-f729-4932-bbe0-56280aba52fa")
+ )
+ (pin "70"
+ (uuid "2903d135-0c3e-4e73-bded-cd59b65e7d5e")
+ )
+ (pin "87"
+ (uuid "a947f40e-d1a2-4d06-9eb9-f013a0c915f0")
+ )
+ (pin "19"
+ (uuid "a8b1c0f1-c3af-4402-bade-8c6256f16fa9")
+ )
+ (pin "80"
+ (uuid "02b9a60d-dfac-43a4-bd6a-5082d897d4a4")
+ )
+ (pin "86"
+ (uuid "52fbcef4-5dee-4eb1-935d-931b3f04f6b1")
+ )
+ (pin "39"
+ (uuid "2838effe-cd57-46fc-8d66-296dedf993eb")
+ )
+ (pin "10"
+ (uuid "88383fd5-5c3b-4ed1-8946-f4dc542ad054")
+ )
+ (pin "59"
+ (uuid "59092238-689f-4239-aa98-a6d90ca6e83f")
+ )
+ (pin "32"
+ (uuid "f007a9ff-b969-44ba-b252-2ccc6bb6f0ae")
+ )
+ (pin "58"
+ (uuid "2961db49-ca2d-4545-bb6a-66b4af18f94d")
+ )
+ (pin "36"
+ (uuid "251e434d-20b9-4ea5-8dff-4230f7493345")
+ )
+ (pin "27"
+ (uuid "ce7b188e-a0c1-4270-b6c7-008f03ca1195")
+ )
+ (pin "57"
+ (uuid "39d4daca-1ba3-4059-8055-da23f2975c6f")
+ )
+ (pin "1"
+ (uuid "550e6611-fcde-4cb5-9ac9-1642bc900ebd")
+ )
+ (pin "77"
+ (uuid "e5ff3c99-6188-4806-a6c7-b673e51b68fe")
+ )
+ (pin "18"
+ (uuid "a47353ca-4018-47d7-90a8-00c875b1259f")
+ )
+ (pin "95"
+ (uuid "793262f3-13c3-45a3-8faa-9e2400884ac7")
+ )
+ (pin "38"
+ (uuid "ad433341-962b-4e0a-bf6d-b6fea2c19633")
+ )
+ (pin "63"
+ (uuid "64d9fce3-4cb0-49c2-afd9-105d338da8c0")
+ )
+ (pin "68"
+ (uuid "b5661107-f766-4c36-944e-067090eb2f15")
+ )
+ (pin "78"
+ (uuid "f62235a3-0419-4c08-9da6-46f639d10a22")
+ )
+ (pin "7"
+ (uuid "3935ca3c-f812-4727-95e9-dadecd0c0991")
+ )
+ (pin "37"
+ (uuid "05843a20-ac2f-4dbc-80b2-64dffa0de78c")
+ )
+ (pin "72"
+ (uuid "0479f1c0-23cd-4067-b96c-e8ddc65c2d2a")
+ )
+ (pin "3"
+ (uuid "4f229d09-ada9-4e8c-b176-f6d36f45264f")
+ )
+ (pin "30"
+ (uuid "1e6bae45-5e01-4bf0-a18d-5d2ec8709808")
+ )
+ (pin "69"
+ (uuid "d59137af-158e-41f0-983a-86e714f0aad7")
+ )
+ (pin "33"
+ (uuid "55778e22-5558-4006-82e8-5b0f09e2ff4e")
+ )
+ (pin "61"
+ (uuid "fae60b9e-5c19-43cd-9b7d-5b3241a97831")
+ )
+ (pin "45"
+ (uuid "e45b7856-2a64-44c0-be85-2c7bfec51717")
+ )
+ (pin "43"
+ (uuid "627bfaa0-96e7-4025-a603-ead11fe35601")
+ )
+ (pin "40"
+ (uuid "4caf1a8c-40fc-4bb3-bf0c-cc4d93ef37f2")
+ )
+ (pin "4"
+ (uuid "3d9ebefa-f59b-4e06-938d-1dd3806d271c")
+ )
+ (pin "83"
+ (uuid "d4022d04-6001-46a0-ae6e-459fc0fe3f65")
+ )
+ (pin "53"
+ (uuid "f0a250e3-4d4d-48b2-a3ae-3f6db2df4b41")
+ )
+ (pin "67"
+ (uuid "15f8da82-96ee-4dcd-97be-c331c670d09a")
+ )
+ (pin "12"
+ (uuid "e8cf13e6-5fd0-4750-a95f-c368d18ecb7e")
+ )
+ (pin "98"
+ (uuid "1e8cfcf6-cc76-4680-a5a1-6c8f76564755")
+ )
+ (pin "97"
+ (uuid "f68fa204-b9f2-4bc5-b296-2da3b7b41264")
+ )
+ (pin "13"
+ (uuid "1c2cba00-bf11-4091-9dfc-149eb9bb8817")
+ )
+ (pin "21"
+ (uuid "9c811c3e-e36f-407d-8b65-cc96cfe2efa3")
+ )
+ (pin "94"
+ (uuid "ae2f126d-8464-403f-9438-0df971e0f204")
+ )
+ (pin "14"
+ (uuid "5e6686fb-9870-4c13-9418-c9ad8871bf27")
+ )
+ (pin "52"
+ (uuid "0f3a7e62-c9b9-4ba9-a8be-24cb17048257")
+ )
+ (pin "51"
+ (uuid "c0bd4607-b468-4695-a75e-4556bb0094f5")
+ )
+ (pin "23"
+ (uuid "1d346cd4-81d2-4fd3-bee8-1a6ad366a2cb")
+ )
+ (pin "100"
+ (uuid "fa7de910-9474-4b02-962c-17453a5f154e")
+ )
+ (pin "15"
+ (uuid "d493a4b5-1d57-4f14-b0cf-73664b02fc10")
+ )
+ (pin "28"
+ (uuid "1548f5e8-da80-4288-9b2c-a38d4803de1e")
+ )
+ (pin "5"
+ (uuid "129c2caf-3c43-4437-b059-baecfcab4286")
+ )
+ (pin "60"
+ (uuid "fe65aed0-c2b8-4f16-a135-ef6b654502d6")
+ )
+ (pin "35"
+ (uuid "fbf675cc-c3b0-4daa-9dad-25bef691f099")
+ )
+ (pin "96"
+ (uuid "ebba91a6-f183-426c-8799-c16680169d65")
+ )
+ (pin "55"
+ (uuid "f805788e-8802-4ab0-9c51-1867b993cf81")
+ )
+ (pin "84"
+ (uuid "b48c5bb8-28e1-4ab6-a0ec-d94bab6586d9")
+ )
+ (pin "73"
+ (uuid "35967f2b-6e7c-4aa1-a594-7ad9abc5da85")
+ )
+ (pin "71"
+ (uuid "88260419-7ff4-495c-a186-1a0e7d3a8c63")
+ )
+ (pin "54"
+ (uuid "26dcd4ca-b3bf-45b4-b8e7-ccb19970bd9e")
+ )
+ (pin "42"
+ (uuid "09e62a1b-53ae-4eb8-809c-64e68ed81c69")
+ )
+ (pin "47"
+ (uuid "c6fc5476-19fd-435e-a463-881c93804e9d")
+ )
+ (pin "91"
+ (uuid "d02d4056-fe2e-4daa-a143-c204b1bf37ea")
+ )
+ (pin "74"
+ (uuid "3417c800-b462-438d-a01f-f44f95701fa0")
+ )
+ (pin "46"
+ (uuid "55e8539e-2e12-4ae9-90f5-e4621301863d")
+ )
+ (pin "62"
+ (uuid "ac2d1c2f-c9cf-42fd-ac51-839b403c7301")
+ )
+ (pin "88"
+ (uuid "06c3cf56-13be-412b-a237-a0d81a74776c")
+ )
+ (pin "85"
+ (uuid "9c60823c-a7d0-40d6-92f7-e004ff5bc1ef")
+ )
+ (pin "56"
+ (uuid "d594f236-7eb2-40b8-b825-583db410fa20")
+ )
+ (pin "89"
+ (uuid "38e3a7c2-95eb-4b4a-bc8d-bbf473caa7c6")
+ )
+ (pin "25"
+ (uuid "caed367f-2304-4e0b-bc72-91f4230b17e2")
+ )
+ (pin "24"
+ (uuid "c2e8512b-4396-46fe-b4e2-3f8582201e40")
+ )
+ (pin "90"
+ (uuid "ec58a3b6-da4c-45f1-ae00-6c0c64654711")
+ )
+ (pin "49"
+ (uuid "1a055044-8224-4cc3-a1d0-fb096c7514a8")
+ )
+ (pin "34"
+ (uuid "cc142d85-c151-4d1d-8e47-3063ca34ad65")
+ )
+ (pin "44"
+ (uuid "29edf8b5-d32e-4513-aecc-97229a7e9b3f")
+ )
+ (pin "93"
+ (uuid "990e0d4b-69a5-4cc1-83e7-32e0bd3c5d39")
+ )
+ (pin "75"
+ (uuid "ee6ea2b1-ab95-421e-ae26-ecbd1e522a74")
+ )
+ (pin "64"
+ (uuid "10658c1a-bb4e-4577-8c91-0415c41c65f3")
+ )
+ (pin "29"
+ (uuid "e7895fc0-5283-42c4-99d2-cc7b8e7f0f5f")
+ )
+ (pin "20"
+ (uuid "076f5566-5c99-472d-8f89-7a9f86b5a0a9")
+ )
+ (pin "41"
+ (uuid "55c5213b-38ac-430e-a202-825f937f1767")
+ )
+ (pin "2"
+ (uuid "b1f20a59-96d6-4148-b780-935fbe64f61a")
+ )
+ (pin "82"
+ (uuid "043494cc-e4d2-4aed-bb53-f8e1ea43edb6")
+ )
+ (pin "79"
+ (uuid "b3520875-78ad-4332-a117-21758f1a696a")
+ )
+ (pin "31"
+ (uuid "abfa66ef-f9f2-471d-b941-e88366a6554c")
+ )
+ (pin "65"
+ (uuid "1bc89573-5e09-4c25-bea3-3c6f17a8d2a7")
+ )
+ (pin "81"
+ (uuid "599b4cd4-767f-43d0-aecd-18b1a328488b")
+ )
+ (pin "16"
+ (uuid "b4c5a137-2ad8-4076-951c-d7327bff27c8")
+ )
+ (pin "26"
+ (uuid "536b12dc-aebf-44dd-ac4f-3965f2fb06a4")
+ )
+ (pin "50"
+ (uuid "ef7cb854-ad7b-4bda-b033-17dd2a7c56a8")
+ )
+ (pin "17"
+ (uuid "cb873fee-b490-4aef-bbb5-33682c40daaa")
+ )
+ (instances
+ (project ""
+ (path "/5defd195-0277-4d04-9f5f-69e505c9845c/9e600826-010a-409d-9a37-ea8e6fbe6058"
+ (reference "U1")
+ (unit 1)
+ )
+ )
+ )
+ )
)
diff --git a/pcb/versions.tsv b/pcb/versions.tsv
new file mode 100644
index 0000000..9d6daa1
--- /dev/null
+++ b/pcb/versions.tsv
@@ -0,0 +1,120 @@
+Version R1 R2 n_ADC_min n_ADC n_ADC_max power
+v0.1.0-pre1 75000.0 Ohm (1.0 %) 180.0 Ohm (1.0 %) 0x00A 0x00A 0x00A 0.000144852
+(unassigned) 20000.0 Ohm (1.0 %) 100.0 Ohm (1.0 %) 0x014 0x014 0x015 0.000541791
+(unassigned) 47000.0 Ohm (1.0 %) 360.0 Ohm (1.0 %) 0x01F 0x01F 0x020 0.000229941
+(unassigned) 15000.0 Ohm (1.0 %) 160.0 Ohm (1.0 %) 0x02A 0x02B 0x02C 0.000718338
+(unassigned) 11000.0 Ohm (1.0 %) 150.0 Ohm (1.0 %) 0x036 0x037 0x038 0.000976682
+(unassigned) 12000.0 Ohm (1.0 %) 200.0 Ohm (1.0 %) 0x042 0x043 0x044 0.000892623
+(unassigned) 91000.0 Ohm (1.0 %) 1800.0 Ohm (1.0 %) 0x04E 0x04F 0x051 0.000117349
+(unassigned) 13000.0 Ohm (1.0 %) 300.0 Ohm (1.0 %) 0x05B 0x05C 0x05E 0.000818797
+(unassigned) 68000.0 Ohm (1.0 %) 1800.0 Ohm (1.0 %) 0x068 0x06A 0x06C 0.000156017
+(unassigned) 43000.0 Ohm (1.0 %) 1300.0 Ohm (1.0 %) 0x076 0x078 0x07B 0.000245824
+(unassigned) 24000.0 Ohm (1.0 %) 820.0 Ohm (1.0 %) 0x085 0x087 0x08A 0.000438759
+(unassigned) 47000.0 Ohm (1.0 %) 1800.0 Ohm (1.0 %) 0x094 0x097 0x09A 0.000223156
+(unassigned) 12000.0 Ohm (1.0 %) 510.0 Ohm (1.0 %) 0x0A4 0x0A7 0x0AA 0.000870504
+(unassigned) 47000.0 Ohm (1.0 %) 2200.0 Ohm (1.0 %) 0x0B4 0x0B7 0x0BB 0.000221341
+(unassigned) 91000.0 Ohm (1.0 %) 4700.0 Ohm (1.0 %) 0x0C5 0x0C9 0x0CD 0.000113793
+(unassigned) 39000.0 Ohm (1.0 %) 2200.0 Ohm (1.0 %) 0x0D7 0x0DB 0x0DF 0.000264320
+(unassigned) 39000.0 Ohm (1.0 %) 2400.0 Ohm (1.0 %) 0x0E9 0x0ED 0x0F2 0.000263043
+(unassigned) 75000.0 Ohm (1.0 %) 5100.0 Ohm (1.0 %) 0x100 0x105 0x10A 0.000135955
+(unassigned) 27000.0 Ohm (1.0 %) 2000.0 Ohm (1.0 %) 0x115 0x11A 0x120 0.000375517
+(unassigned) 15000.0 Ohm (1.0 %) 1200.0 Ohm (1.0 %) 0x12A 0x12F 0x135 0.000672222
+(unassigned) 15000.0 Ohm (1.0 %) 1300.0 Ohm (1.0 %) 0x141 0x147 0x14D 0.000668098
+(unassigned) 16000.0 Ohm (1.0 %) 1500.0 Ohm (1.0 %) 0x159 0x15F 0x165 0.000622286
+(unassigned) 15000.0 Ohm (1.0 %) 1600.0 Ohm (1.0 %) 0x184 0x18B 0x192 0.000656024
+(unassigned) 13000.0 Ohm (1.0 %) 1500.0 Ohm (1.0 %) 0x1A0 0x1A8 0x1AF 0.000751034
+(unassigned) 13000.0 Ohm (1.0 %) 1600.0 Ohm (1.0 %) 0x1B9 0x1C1 0x1C9 0.000745890
+(unassigned) 91000.0 Ohm (1.0 %) 12000.0 Ohm (1.0 %) 0x1D5 0x1DD 0x1E6 0.000105728
+(unassigned) 36000.0 Ohm (1.0 %) 5100.0 Ohm (1.0 %) 0x1F3 0x1FC 0x205 0.000264964
+(unassigned) 13000.0 Ohm (1.0 %) 2000.0 Ohm (1.0 %) 0x219 0x222 0x22C 0.000726
+(unassigned) 11000.0 Ohm (1.0 %) 1800.0 Ohm (1.0 %) 0x236 0x240 0x24A 0.000850781
+(unassigned) 27000.0 Ohm (1.0 %) 4700.0 Ohm (1.0 %) 0x255 0x25F 0x26A 0.000343533
+(unassigned) 30000.0 Ohm (1.0 %) 5600.0 Ohm (1.0 %) 0x279 0x284 0x28F 0.000305899
+(unassigned) 9100.0 Ohm (1.0 %) 1800.0 Ohm (1.0 %) 0x299 0x2A4 0x2B0 0.000999083
+(unassigned) 62000.0 Ohm (1.0 %) 13000.0 Ohm (1.0 %) 0x2BA 0x2C6 0x2D2 0.0001452
+(unassigned) 12000.0 Ohm (1.0 %) 2700.0 Ohm (1.0 %) 0x2E4 0x2F0 0x2FD 0.000740816
+(unassigned) 18000.0 Ohm (1.0 %) 4300.0 Ohm (1.0 %) 0x309 0x316 0x322 0.000488341
+(unassigned) 36000.0 Ohm (1.0 %) 9100.0 Ohm (1.0 %) 0x32D 0x33A 0x348 0.000241463
+(unassigned) 56000.0 Ohm (1.0 %) 15000.0 Ohm (1.0 %) 0x354 0x361 0x36F 0.000153380
+(unassigned) 18000.0 Ohm (1.0 %) 5100.0 Ohm (1.0 %) 0x37A 0x388 0x396 0.000471429
+(unassigned) 10000.0 Ohm (1.0 %) 3000.0 Ohm (1.0 %) 0x3A3 0x3B1 0x3C0 0.000837692
+(unassigned) 16000.0 Ohm (1.0 %) 5100.0 Ohm (1.0 %) 0x3CF 0x3DE 0x3ED 0.000516114
+(unassigned) 27000.0 Ohm (1.0 %) 9100.0 Ohm (1.0 %) 0x3F9 0x408 0x418 0.000301662
+(unassigned) 56000.0 Ohm (1.0 %) 20000.0 Ohm (1.0 %) 0x426 0x436 0x446 0.000143289
+(unassigned) 18000.0 Ohm (1.0 %) 6800.0 Ohm (1.0 %) 0x453 0x463 0x473 0.000439113
+(unassigned) 30000.0 Ohm (1.0 %) 12000.0 Ohm (1.0 %) 0x481 0x492 0x4A3 0.000259286
+(unassigned) 12000.0 Ohm (1.0 %) 5100.0 Ohm (1.0 %) 0x4B4 0x4C5 0x4D7 0.000636842
+(unassigned) 15000.0 Ohm (1.0 %) 6800.0 Ohm (1.0 %) 0x4EC 0x4FD 0x50F 0.000499541
+(unassigned) 13000.0 Ohm (1.0 %) 6200.0 Ohm (1.0 %) 0x519 0x52A 0x53C 0.000567188
+(unassigned) 18000.0 Ohm (1.0 %) 9100.0 Ohm (1.0 %) 0x54D 0x55F 0x571 0.000401845
+(unassigned) 62000.0 Ohm (1.0 %) 33000.0 Ohm (1.0 %) 0x57C 0x58E 0x5A1 0.000114632
+(unassigned) 10000.0 Ohm (1.0 %) 5600.0 Ohm (1.0 %) 0x5AB 0x5BE 0x5D1 0.000698077
+(unassigned) 56000.0 Ohm (1.0 %) 33000.0 Ohm (1.0 %) 0x5DB 0x5EE 0x602 0.000122360
+(unassigned) 10000.0 Ohm (1.0 %) 6200.0 Ohm (1.0 %) 0x60C 0x61F 0x633 0.000672222
+(unassigned) 15000.0 Ohm (1.0 %) 10000.0 Ohm (1.0 %) 0x652 0x666 0x67A 0.0004356
+(unassigned) 47000.0 Ohm (1.0 %) 33000.0 Ohm (1.0 %) 0x685 0x699 0x6AD 0.000136125
+(unassigned) 27000.0 Ohm (1.0 %) 20000.0 Ohm (1.0 %) 0x6BB 0x6CF 0x6E3 0.000231702
+(unassigned) 15000.0 Ohm (1.0 %) 12000.0 Ohm (1.0 %) 0x708 0x71C 0x730 0.000403333
+(unassigned) 51000.0 Ohm (1.0 %) 43000.0 Ohm (1.0 %) 0x73D 0x751 0x766 0.000115851
+(unassigned) 18000.0 Ohm (1.0 %) 16000.0 Ohm (1.0 %) 0x773 0x787 0x79B 0.000320294
+(unassigned) 16000.0 Ohm (1.0 %) 15000.0 Ohm (1.0 %) 0x7A9 0x7BD 0x7D2 0.000351290
+(unassigned) 5600.0 Ohm (1.0 %) 5600.0 Ohm (1.0 %) 0x7EB 0x800 0x814 0.000972321
+(unassigned) 15000.0 Ohm (1.0 %) 16000.0 Ohm (1.0 %) 0x82D 0x842 0x856 0.000351290
+(unassigned) 16000.0 Ohm (1.0 %) 18000.0 Ohm (1.0 %) 0x864 0x878 0x88C 0.000320294
+(unassigned) 11000.0 Ohm (1.0 %) 13000.0 Ohm (1.0 %) 0x896 0x8AA 0x8BE 0.00045375
+(unassigned) 12000.0 Ohm (1.0 %) 15000.0 Ohm (1.0 %) 0x8CF 0x8E3 0x8F7 0.000403333
+(unassigned) 9100.0 Ohm (1.0 %) 12000.0 Ohm (1.0 %) 0x905 0x919 0x92D 0.000516114
+(unassigned) 36000.0 Ohm (1.0 %) 51000.0 Ohm (1.0 %) 0x94D 0x961 0x974 0.000125172
+(unassigned) 10000.0 Ohm (1.0 %) 15000.0 Ohm (1.0 %) 0x985 0x999 0x9AD 0.0004356
+(unassigned) 4300.0 Ohm (1.0 %) 6800.0 Ohm (1.0 %) 0x9B9 0x9CD 0x9E0 0.000981081
+(unassigned) 12000.0 Ohm (1.0 %) 20000.0 Ohm (1.0 %) 0x9EC 0x9FF 0xA13 0.000340312
+(unassigned) 9100.0 Ohm (1.0 %) 16000.0 Ohm (1.0 %) 0xA1F 0xA32 0xA45 0.000433865
+(unassigned) 30000.0 Ohm (1.0 %) 56000.0 Ohm (1.0 %) 0xA58 0xA6B 0xA7D 0.000126628
+(unassigned) 5600.0 Ohm (1.0 %) 11000.0 Ohm (1.0 %) 0xA87 0xA9A 0xAAC 0.000656024
+(unassigned) 30000.0 Ohm (1.0 %) 62000.0 Ohm (1.0 %) 0xAB6 0xAC8 0xADA 0.000118370
+(unassigned) 11000.0 Ohm (1.0 %) 24000.0 Ohm (1.0 %) 0xAE6 0xAF8 0xB0A 0.000311143
+(unassigned) 13000.0 Ohm (1.0 %) 30000.0 Ohm (1.0 %) 0xB18 0xB29 0xB3A 0.000253256
+(unassigned) 16000.0 Ohm (1.0 %) 39000.0 Ohm (1.0 %) 0xB47 0xB58 0xB69 0.000198
+(unassigned) 6200.0 Ohm (1.0 %) 16000.0 Ohm (1.0 %) 0xB77 0xB87 0xB98 0.000490541
+(unassigned) 11000.0 Ohm (1.0 %) 30000.0 Ohm (1.0 %) 0xBA4 0xBB4 0xBC4 0.000265610
+(unassigned) 6200.0 Ohm (1.0 %) 18000.0 Ohm (1.0 %) 0xBD6 0xBE6 0xBF5 0.00045
+(unassigned) 3900.0 Ohm (1.0 %) 12000.0 Ohm (1.0 %) 0xC03 0xC13 0xC22 0.000684906
+(unassigned) 12000.0 Ohm (1.0 %) 39000.0 Ohm (1.0 %) 0xC2D 0xC3B 0xC4A 0.000213529
+(unassigned) 18000.0 Ohm (1.0 %) 62000.0 Ohm (1.0 %) 0xC57 0xC66 0xC74 0.000136125
+(unassigned) 3300.0 Ohm (1.0 %) 12000.0 Ohm (1.0 %) 0xC7E 0xC8C 0xC9A 0.000711765
+(unassigned) 3900.0 Ohm (1.0 %) 15000.0 Ohm (1.0 %) 0xCA5 0xCB2 0xCBF 0.000576190
+(unassigned) 2700.0 Ohm (1.0 %) 11000.0 Ohm (1.0 %) 0xCCB 0xCD8 0xCE5 0.000794891
+(unassigned) 13000.0 Ohm (1.0 %) 56000.0 Ohm (1.0 %) 0xCEF 0xCFB 0xD08 0.000157826
+(unassigned) 18000.0 Ohm (1.0 %) 82000.0 Ohm (1.0 %) 0xD12 0xD1E 0xD2A 0.0001089
+(unassigned) 5600.0 Ohm (1.0 %) 27000.0 Ohm (1.0 %) 0xD34 0xD40 0xD4B 0.000334049
+(unassigned) 4700.0 Ohm (1.0 %) 24000.0 Ohm (1.0 %) 0xD55 0xD60 0xD6C 0.000379443
+(unassigned) 2400.0 Ohm (1.0 %) 13000.0 Ohm (1.0 %) 0xD76 0xD81 0xD8C 0.000707143
+(unassigned) 13000.0 Ohm (1.0 %) 75000.0 Ohm (1.0 %) 0xD98 0xDA2 0xDAC 0.00012375
+(unassigned) 3900.0 Ohm (1.0 %) 24000.0 Ohm (1.0 %) 0xDB9 0xDC3 0xDCC 0.000390323
+(unassigned) 1500.0 Ohm (1.0 %) 10000.0 Ohm (1.0 %) 0xDE0 0xDE9 0xDF2 0.000946957
+(unassigned) 1800.0 Ohm (1.0 %) 13000.0 Ohm (1.0 %) 0xE04 0xE0D 0xE16 0.000735811
+(unassigned) 1500.0 Ohm (1.0 %) 12000.0 Ohm (1.0 %) 0xE30 0xE38 0xE40 0.000806667
+(unassigned) 1500.0 Ohm (1.0 %) 13000.0 Ohm (1.0 %) 0xE50 0xE57 0xE5F 0.000751034
+(unassigned) 1600.0 Ohm (1.0 %) 15000.0 Ohm (1.0 %) 0xE6D 0xE74 0xE7B 0.000656024
+(unassigned) 1500.0 Ohm (1.0 %) 16000.0 Ohm (1.0 %) 0xE9A 0xEA0 0xEA6 0.000622286
+(unassigned) 1300.0 Ohm (1.0 %) 15000.0 Ohm (1.0 %) 0xEB2 0xEB8 0xEBE 0.000668098
+(unassigned) 1200.0 Ohm (1.0 %) 15000.0 Ohm (1.0 %) 0xECA 0xED0 0xED5 0.000672222
+(unassigned) 2000.0 Ohm (1.0 %) 27000.0 Ohm (1.0 %) 0xEDF 0xEE5 0xEEA 0.000375517
+(unassigned) 820.0 Ohm (1.0 %) 12000.0 Ohm (1.0 %) 0xEF4 0xEF9 0xEFE 0.000849454
+(unassigned) 3900.0 Ohm (1.0 %) 62000.0 Ohm (1.0 %) 0xF08 0xF0D 0xF11 0.000165250
+(unassigned) 750.0 Ohm (1.0 %) 13000.0 Ohm (1.0 %) 0xF1B 0xF20 0xF24 0.000792
+(unassigned) 4300.0 Ohm (1.0 %) 82000.0 Ohm (1.0 %) 0xF2F 0xF33 0xF37 0.000126188
+(unassigned) 620.0 Ohm (1.0 %) 13000.0 Ohm (1.0 %) 0xF41 0xF45 0xF48 0.000799559
+(unassigned) 1300.0 Ohm (1.0 %) 30000.0 Ohm (1.0 %) 0xF52 0xF55 0xF58 0.000347923
+(unassigned) 470.0 Ohm (1.0 %) 12000.0 Ohm (1.0 %) 0xF62 0xF65 0xF68 0.000873296
+(unassigned) 560.0 Ohm (1.0 %) 16000.0 Ohm (1.0 %) 0xF72 0xF75 0xF77 0.000657609
+(unassigned) 560.0 Ohm (1.0 %) 18000.0 Ohm (1.0 %) 0xF81 0xF83 0xF86 0.000586746
+(unassigned) 820.0 Ohm (1.0 %) 30000.0 Ohm (1.0 %) 0xF90 0xF92 0xF94 0.000353342
+(unassigned) 430.0 Ohm (1.0 %) 18000.0 Ohm (1.0 %) 0xF9E 0xF9F 0xFA1 0.000590884
+(unassigned) 330.0 Ohm (1.0 %) 16000.0 Ohm (1.0 %) 0xFAB 0xFAC 0xFAE 0.000666871
+(unassigned) 470.0 Ohm (1.0 %) 27000.0 Ohm (1.0 %) 0xFB8 0xFB9 0xFBA 0.000396432
+(unassigned) 390.0 Ohm (1.0 %) 27000.0 Ohm (1.0 %) 0xFC4 0xFC5 0xFC6 0.000397590
+(unassigned) 180.0 Ohm (1.0 %) 16000.0 Ohm (1.0 %) 0xFD1 0xFD1 0xFD2 0.000673053
+(unassigned) 110.0 Ohm (1.0 %) 13000.0 Ohm (1.0 %) 0xFDC 0xFDD 0xFDD 0.000830664
+(unassigned) 330.0 Ohm (1.0 %) 56000.0 Ohm (1.0 %) 0xFE7 0xFE7 0xFE7 0.000193325
+(unassigned) 160.0 Ohm (1.0 %) 47000.0 Ohm (1.0 %) 0xFF1 0xFF1 0xFF1 0.000230916
diff --git a/simple.css b/simple.css
new file mode 160000
+Subproject 9f62bf3630812239712693886af032311c2dfa3
diff --git a/cmake/LICENSE.txt b/tools/LICENSE.txt
index d0a1fa1..d0a1fa1 100644
--- a/cmake/LICENSE.txt
+++ b/tools/LICENSE.txt
diff --git a/tools/build_zephyr.py b/tools/build_zephyr.py
new file mode 100755
index 0000000..5dd9e47
--- /dev/null
+++ b/tools/build_zephyr.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python3
+
+
+# This Source Code Form is subject to the terms of the Mozilla Public License,
+# v. 2.0. If a copy of the MPL was not distributed with this file, You can
+# obtain one at https://mozilla.org/MPL/2.0/.
+
+
+import argparse
+import multiprocessing
+import shutil
+import subprocess
+import pathlib
+
+
+def main() -> None:
+ parser = argparse.ArgumentParser(
+ description="Build a Zephyr GNU Make build",
+ )
+
+ parser.add_argument("-B", "--build-tree", required=True)
+ parser.add_argument("-b", "--binary-name", required=True)
+ parser.add_argument("-n", "--target-name", required=True)
+
+ args = parser.parse_args()
+
+ build_tree = pathlib.Path(args.build_tree)
+ output_dir = build_tree.parent
+
+ subprocess.run(
+ [
+ "make",
+ f"-j{multiprocessing.cpu_count()}",
+ "-C",
+ f"{str(build_tree)}",
+ ],
+ shell=False,
+ check=True,
+ )
+
+ shutil.copy(build_tree / "zephyr" / args.binary_name, output_dir / args.target_name)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tools/configure_zephyr.py b/tools/configure_zephyr.py
new file mode 100755
index 0000000..f4707c6
--- /dev/null
+++ b/tools/configure_zephyr.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python3
+
+
+# This Source Code Form is subject to the terms of the Mozilla Public License,
+# v. 2.0. If a copy of the MPL was not distributed with this file, You can
+# obtain one at https://mozilla.org/MPL/2.0/.
+
+
+import argparse
+import subprocess
+
+
+def main() -> None:
+ parser = argparse.ArgumentParser(
+ description="Configure a Zephyr CMake build",
+ )
+
+ parser.add_argument("-S", "--source-tree", required=True)
+ parser.add_argument("-B", "--build-tree", required=True)
+ parser.add_argument("-b", "--board", required=True)
+ parser.add_argument("-z", "--zephyr-base", required=True)
+ parser.add_argument("-m", "--zephyr-modules", required=False)
+ parser.add_argument("-c", "--extra-config", required=False)
+ parser.add_argument("-k", "--signing-key", required=False)
+ parser.add_argument("--prefix", required=False)
+ parser.add_argument("--libdir", required=False)
+ parser.add_argument("--bindir", required=False)
+
+ args = parser.parse_args()
+
+ command = [
+ "cmake",
+ f"-S{args.source_tree}",
+ f"-B{args.build_tree}",
+ f"-DBOARD={args.board}",
+ f"-DZEPHYR_BASE={args.zephyr_base}",
+ ]
+
+ if args.zephyr_modules is not None:
+ command.append(f"-DZEPHYR_MODULES={args.zephyr_modules}")
+
+ if args.extra_config is not None:
+ command.append(f"-DEXTRA_CONF_FILE={args.extra_config}")
+
+ if args.signing_key is not None:
+ command.append(f'-DCONFIG_BOOT_SIGNATURE_KEY_FILE="{args.signing_key}"')
+
+ subprocess.run(command, shell=False, check=True)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tools/deploy.py b/tools/deploy.py
new file mode 100755
index 0000000..26048e8
--- /dev/null
+++ b/tools/deploy.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python3
+
+
+import argparse
+import subprocess
+import pathlib
+
+
+SCRIPT = pathlib.Path(__file__)
+SOURCE_ROOT = SCRIPT.parent.parent.resolve()
+ARTIFACTS_DEFAULT = SOURCE_ROOT / "build" / "artifacts"
+
+
+def main() -> None:
+ parser = argparse.ArgumentParser(
+ description="Use OpenSSH and rsync to deploy artifacts",
+ )
+
+ parser.add_argument(
+ "-a",
+ "--artifacts",
+ default=ARTIFACTS_DEFAULT,
+ help="local path to artifacts folder",
+ )
+ parser.add_argument(
+ "-H", "--host", default="cloud", help="target `Host` name from ~/.ssh/config"
+ )
+ parser.add_argument(
+ "-p",
+ "--path",
+ default="/srv/http/deploy.xengineering.eu/public/git/iot-contact/main/",
+ help="remote path to destination folder on server",
+ )
+ parser.add_argument(
+ "-d",
+ "--dry-run",
+ action="store_true",
+ help="do not execute command and instead print it",
+ )
+
+ args = parser.parse_args()
+
+ command = [
+ "rsync",
+ "-av",
+ "--delete",
+ f"{str(pathlib.Path(args.artifacts).resolve())}/",
+ f"{args.host}:{args.path}",
+ ]
+
+ if args.dry_run:
+ print(command)
+ else:
+ subprocess.run(command, shell=False, check=True)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tools/make_factory_image.py b/tools/make_factory_image.py
new file mode 100755
index 0000000..735f657
--- /dev/null
+++ b/tools/make_factory_image.py
@@ -0,0 +1,95 @@
+#!/usr/bin/env python3
+
+
+import argparse
+import dataclasses
+import pathlib
+
+
+PADDING_BYTE: bytes = b"\xff"
+
+
+def main() -> None:
+ args = Arguments.from_cli()
+ print(args)
+
+ factory_image: bytes = join(
+ bootloader=args.bootloader.read_bytes(),
+ application=args.application.read_bytes(),
+ offset=args.offset,
+ )
+
+ args.factory_image.write_bytes(factory_image)
+
+
+def join(bootloader: bytes, application: bytes, offset: int) -> bytes:
+ padding = PADDING_BYTE * (offset - len(bootloader))
+
+ return bootloader + padding + application
+
+
+@dataclasses.dataclass
+class Arguments:
+ bootloader: pathlib.Path
+ offset: int
+ application: pathlib.Path
+ factory_image: pathlib.Path
+
+ def __post_init__(self) -> None:
+ assert isinstance(self.bootloader, pathlib.Path)
+
+ assert isinstance(self.offset, int)
+ assert self.offset >= 0
+
+ assert isinstance(self.application, pathlib.Path)
+
+ assert isinstance(self.factory_image, pathlib.Path)
+
+ def __str__(self) -> str:
+ return f"""{__file__} \\
+ --bootloader {self.bootloader} \\
+ --offset 0x{self.offset:X} \\
+ --application {self.application} \\
+ --factory_image {self.factory_image}"""
+
+ @staticmethod
+ def from_cli() -> "Arguments":
+ parser = argparse.ArgumentParser(
+ description="Join bootloader and application firmware to a factory image"
+ )
+
+ parser.add_argument(
+ "-b", "--bootloader", required=True, help="path to bootloader firmware"
+ )
+
+ default_offset = 0x40000
+ parser.add_argument(
+ "-o",
+ "--offset",
+ default=default_offset,
+ help=f"offset in bytes between bootloader and application (default: 0x{default_offset:X})",
+ )
+
+ parser.add_argument(
+ "-a", "--application", required=True, help="path to application firmware"
+ )
+
+ parser.add_argument(
+ "-f",
+ "--factory-image",
+ default=pathlib.Path("factory-image.bin"),
+ help="path to output factory image file",
+ )
+
+ args = parser.parse_args()
+
+ return Arguments(
+ bootloader=pathlib.Path(args.bootloader),
+ offset=int(args.offset),
+ application=pathlib.Path(args.application),
+ factory_image=pathlib.Path(args.factory_image),
+ )
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tools/meson.build b/tools/meson.build
new file mode 100644
index 0000000..f58c54b
--- /dev/null
+++ b/tools/meson.build
@@ -0,0 +1,3 @@
+configure_zephyr = meson.current_source_dir() / 'configure_zephyr.py'
+build_zephyr = meson.current_source_dir() / 'build_zephyr.py'
+make_factory_image = meson.current_source_dir() / 'make_factory_image.py'
diff --git a/tools/resistor_selector.py b/tools/resistor_selector.py
new file mode 100755
index 0000000..1ee51b7
--- /dev/null
+++ b/tools/resistor_selector.py
@@ -0,0 +1,327 @@
+#!/usr/bin/env python3
+
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at https://mozilla.org/MPL/2.0/.
+
+
+import argparse
+import dataclasses
+from decimal import getcontext, Decimal
+import pathlib
+
+
+DESCRIPTION = """Help resistor value calculation for hardware version detection"""
+# fmt: off
+IMPLEMENTED_SERIES = {
+ 24: (1.0, 1.1, 1.2, 1.3, 1.5, 1.6, 1.8, 2.0, 2.2, 2.4, 2.7, 3.0, 3.3, 3.6, 3.9, 4.3, 4.7, 5.1, 5.6, 6.2, 6.8, 7.5, 8.2, 9.1),
+}
+"""Series are hardcoded from Wikipedia since they do not follow the formula"""
+# fmt: on
+MULTIPLIERS = (
+ 100.0,
+ 1000.0,
+ 10000.0,
+)
+
+
+def main() -> None:
+ getcontext().prec = 6
+
+ args = Arguments.from_cli()
+
+ resistors: list[Resistor] = []
+ for multiplier in MULTIPLIERS:
+ for value in IMPLEMENTED_SERIES[args.series]:
+ resistors.append(
+ Resistor(
+ resistance=Decimal(multiplier) * Decimal(value),
+ tolerance=args.tolerance,
+ )
+ )
+
+ voltage_dividers = []
+ for r1 in resistors:
+ for r2 in resistors:
+ combination = VoltageDivider(voltage=args.voltage, r1=r1, r2=r2)
+ voltage_dividers.append(combination)
+
+ sorted_voltage_dividers = sorted(voltage_dividers, key=lambda c: c.v_adc)
+
+ filtered_voltage_dividers = filter(
+ source=sorted_voltage_dividers,
+ margin=args.margin,
+ n_bits_adc=args.n_bits_adc,
+ power=args.power,
+ )
+
+ results = VoltageDividers(
+ combinations=tuple[VoltageDivider, ...](filtered_voltage_dividers)
+ )
+
+ output: str = results.to_tsv(
+ voltage=args.voltage,
+ n_bits_adc=args.n_bits_adc,
+ )
+
+ if args.output is None:
+ print(output)
+ else:
+ args.output.write_text(output)
+
+
+@dataclasses.dataclass(frozen=True, kw_only=True)
+class Arguments:
+ series: int
+ voltage: Decimal # volts
+ n_bits_adc: int # number of bits
+ output: pathlib.Path | None
+ margin: int
+ power: Decimal # watt
+ tolerance: Decimal # percent
+
+ def __post_init__(self) -> None:
+ assert isinstance(self.series, int)
+ assert self.series in IMPLEMENTED_SERIES
+
+ assert isinstance(self.voltage, Decimal)
+ assert 0.0 < self.voltage
+
+ assert isinstance(self.n_bits_adc, int)
+ assert self.n_bits_adc > 0
+
+ if self.output is not None:
+ assert isinstance(self.output, pathlib.Path)
+
+ assert isinstance(self.margin, int)
+ assert self.margin >= 0
+
+ assert isinstance(self.power, Decimal)
+ assert self.power >= Decimal(0.0)
+
+ assert isinstance(self.tolerance, Decimal)
+ assert self.tolerance >= Decimal(0.0)
+
+ @staticmethod
+ def from_cli() -> "Arguments":
+ parser = argparse.ArgumentParser(
+ description=DESCRIPTION,
+ )
+
+ default_series = 24
+ parser.add_argument(
+ "-s",
+ "--series",
+ default=default_series,
+ help=f"resistor E series (supported: {[k for k in IMPLEMENTED_SERIES]}, default: {default_series})",
+ )
+
+ default_voltage = 3.3
+ parser.add_argument(
+ "-v",
+ "--voltage",
+ default=default_voltage,
+ help=f"voltage [V] powering the voltage divider (default: {default_voltage})",
+ )
+
+ default_bits = 12
+ parser.add_argument(
+ "-b",
+ "--bits",
+ default=default_bits,
+ help=f"number of ADC bits (default: {default_bits})",
+ )
+
+ parser.add_argument(
+ "-o",
+ "--output",
+ default=None,
+ type=pathlib.Path,
+ help="output file to write to (default: stdout)",
+ )
+
+ default_margin: int = 10
+ parser.add_argument(
+ "-m",
+ "--margin",
+ default=default_margin,
+ help=f"min. ADC value difference between adjacent voltage dividers (default: {default_margin})",
+ )
+
+ default_power = 0.001
+ parser.add_argument(
+ "-p",
+ "--power",
+ default=default_power,
+ help=f"max. power [W] consumed by voltage divider (default: {default_power})",
+ )
+
+ default_tolerance = 1.0
+ parser.add_argument(
+ "-t",
+ "--tolerance",
+ default=default_tolerance,
+ help=f"resistor tolerance [percent] (default: {default_tolerance})",
+ )
+
+ args = parser.parse_args()
+
+ return Arguments(
+ series=int(args.series),
+ voltage=Decimal(args.voltage),
+ n_bits_adc=int(args.bits),
+ output=args.output,
+ margin=int(args.margin),
+ power=Decimal(args.power),
+ tolerance=Decimal(args.tolerance),
+ )
+
+
+@dataclasses.dataclass(frozen=True, kw_only=True)
+class Resistor:
+ resistance: Decimal # ohm
+ tolerance: Decimal # percent
+
+ def __post_init__(self) -> None:
+ assert isinstance(self.resistance, Decimal)
+ assert self.resistance >= Decimal(0.0)
+
+ assert isinstance(self.tolerance, Decimal)
+ assert self.tolerance >= Decimal(0.0)
+
+ def __str__(self) -> str:
+ return f"{float(self.resistance)} Ohm ({float(self.tolerance)} %)"
+
+ @property
+ def resistance_min(self) -> Decimal:
+ return self.resistance * (Decimal(1.0) - (self.tolerance / Decimal(100.0)))
+
+ @property
+ def resistance_max(self) -> Decimal:
+ return self.resistance * (Decimal(1.0) + (self.tolerance / Decimal(100.0)))
+
+
+@dataclasses.dataclass(frozen=True, kw_only=True)
+class VoltageDivider:
+ voltage: Decimal # voltage over both resistors in volts
+ r1: Resistor # resistor closer to +
+ r2: Resistor # resistor closer to -
+
+ @property
+ def power(self) -> Decimal:
+ return self.voltage**2 / (self.r1.resistance + self.r2.resistance)
+
+ @property
+ def v_adc_min(self) -> Decimal:
+ return self.voltage / (
+ Decimal(1.0) + self.r1.resistance_max / self.r2.resistance_min
+ )
+
+ @property
+ def v_adc(self) -> Decimal:
+ return self.voltage / (Decimal(1.0) + self.r1.resistance / self.r2.resistance)
+
+ @property
+ def v_adc_max(self) -> Decimal:
+ return self.voltage / (
+ Decimal(1.0) + self.r1.resistance_min / self.r2.resistance_max
+ )
+
+ @staticmethod
+ def volts_to_n_adc(
+ max_voltage: Decimal, voltage_adc: Decimal, n_bits_adc: int
+ ) -> int:
+ n_max = 2**n_bits_adc - 1
+ continuous = voltage_adc / max_voltage * Decimal(n_max)
+ discrete = int(continuous + Decimal(0.5))
+ return discrete
+
+ def n_adc_min(self, n_bits_adc: int) -> int:
+ return self.volts_to_n_adc(
+ max_voltage=self.voltage,
+ voltage_adc=self.v_adc_min,
+ n_bits_adc=n_bits_adc,
+ )
+
+ def n_adc(self, n_bits_adc: int) -> int:
+ return self.volts_to_n_adc(
+ max_voltage=self.voltage,
+ voltage_adc=self.v_adc,
+ n_bits_adc=n_bits_adc,
+ )
+
+ def n_adc_max(self, n_bits_adc: int) -> int:
+ return self.volts_to_n_adc(
+ max_voltage=self.voltage,
+ voltage_adc=self.v_adc_max,
+ n_bits_adc=n_bits_adc,
+ )
+
+ def to_tsv(self, voltage: Decimal, n_bits_adc: int) -> str:
+ return (
+ f"{self.r1}"
+ f"\t{self.r2}"
+ f"\t{self.v_adc_min}"
+ f"\t{self.v_adc}"
+ f"\t{self.v_adc_max}"
+ f"\t0x{self.n_adc_min(n_bits_adc=n_bits_adc):03X}"
+ f"\t0x{self.n_adc(n_bits_adc=n_bits_adc):03X}"
+ f"\t0x{self.n_adc_max(n_bits_adc=n_bits_adc):03X}"
+ f"\t{self.power}"
+ )
+
+
+@dataclasses.dataclass(frozen=True, kw_only=True)
+class VoltageDividers:
+ combinations: tuple[VoltageDivider, ...]
+
+ def to_tsv(self, voltage: Decimal, n_bits_adc: int) -> str:
+ output = (
+ "R1"
+ "\tR2"
+ "\tV_ADC_min"
+ "\tV_ADC"
+ "\tV_ADC_max"
+ "\tn_ADC_min"
+ "\tn_ADC"
+ "\tn_ADC_max"
+ "\tpower"
+ )
+ for combination in self.combinations:
+ output += "\n" + combination.to_tsv(
+ voltage=voltage,
+ n_bits_adc=n_bits_adc,
+ )
+ return output
+
+
+def filter(
+ source: list[VoltageDivider],
+ margin: int,
+ n_bits_adc: int,
+ power: Decimal,
+) -> list[VoltageDivider]:
+ sink: list[VoltageDivider] = []
+ v_adc_max = Decimal(0.0)
+ n_adc_max = 0
+
+ for voltage_divider in source:
+ if voltage_divider.v_adc_min <= v_adc_max:
+ continue # overlapping voltage ranges
+
+ if voltage_divider.n_adc_min(n_bits_adc) < n_adc_max + margin:
+ continue # not enough ADC value margin
+
+ if voltage_divider.power > power:
+ continue # draws too much power
+
+ sink.append(voltage_divider)
+ v_adc_max = voltage_divider.v_adc_max
+ n_adc_max = voltage_divider.n_adc_max(n_bits_adc)
+
+ return sink
+
+
+if __name__ == "__main__":
+ main()
diff --git a/web/CMakeLists.txt b/web/CMakeLists.txt
deleted file mode 100644
index 0cdb498..0000000
--- a/web/CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-cmake_minimum_required(VERSION 3.10)
-
-include(hugo)
-
-hugo_site(
- "website"
- "${CMAKE_CURRENT_SOURCE_DIR}"
- "${CMAKE_CURRENT_BINARY_DIR}/public"
-)
diff --git a/web/hugo.toml b/web/hugo.toml
deleted file mode 100644
index 493ec29..0000000
--- a/web/hugo.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-title = 'IoT contact'
-disableKinds = ["taxonomy", "RSS", "sitemap"]
diff --git a/web/index.html b/web/index.html
new file mode 100644
index 0000000..f8d76ed
--- /dev/null
+++ b/web/index.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="stylesheet" type="text/css" href="simple.css">
+ <title>IoT contact</title>
+ </head>
+ <body>
+ <main>
+ <h1>IoT contact</h1>
+
+ <h4>Printed circuit board</h4>
+ <ul>
+ <li><a href="iot-contact.kicad_pcb">iot-contact.kicad_pcb</a></li>
+ <li><a href="schematic.pdf">schematic.pdf</a></li>
+ <li><a href="bill-of-materials.csv">bill-of-materials.csv</a></li>
+ </ul>
+
+ <h4>Firmware</h4>
+ <ul>
+ <li><a href="factory-image.bin">factory-image.bin</a></li>
+ <li><a href="update-image.bin">update-image.bin</a></li>
+ <li><a href="simulation-linux-amd64.exe">simulation-linux-amd64.exe</a></li>
+ </ul>
+ </main>
+ </body>
+</html>
diff --git a/web/layouts/baseof.html b/web/layouts/baseof.html
deleted file mode 100644
index 983e6e1..0000000
--- a/web/layouts/baseof.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>{{ .Site.Title }}</title>
- </head>
- <body>
- {{ block "main" . }}{{end}}
- </body>
-</html>
diff --git a/web/layouts/home.html b/web/layouts/home.html
deleted file mode 100644
index 5425ac9..0000000
--- a/web/layouts/home.html
+++ /dev/null
@@ -1,3 +0,0 @@
-{{- define "main" -}}
-<h1>{{ .Site.Title }}</h1>
-{{- end -}}
diff --git a/web/meson.build b/web/meson.build
new file mode 100644
index 0000000..19551a5
--- /dev/null
+++ b/web/meson.build
@@ -0,0 +1 @@
+index_html = fs.copyfile(meson.current_source_dir() / 'index.html')