├── bolt-ons ├── gps-bolt-on │ ├── SUP500F_v3.pdf │ ├── README.md │ ├── GPS_raw_data.ino │ ├── GPS_parsed.ino │ └── GPS_2_CAN.ino ├── rgb-led-bolt-on │ ├── disco-demo.ino │ └── can-led-alerts.ino └── button-bolt-on │ ├── toggle-buttons-can-broadcast.ino │ └── broadcast-button-state.ino ├── esp-idf └── blink │ ├── .gitignore │ ├── CMakeLists.txt │ ├── src │ ├── CMakeLists.txt │ └── main.c │ ├── .vscode │ └── extensions.json │ ├── platformio.ini │ ├── test │ └── README │ ├── lib │ └── README │ ├── include │ └── README │ └── sdkconfig.esp32-can-x2 ├── images └── 1050px-ESP32_CAN_X2_revD_3quarter.jpg ├── enclosures └── slim │ ├── ESP32-CAN-X2_enclosure_slim_base.stl │ └── ESP32-CAN-X2_enclosure_slim_lid.stl ├── circuitpython ├── blink.py ├── README.md └── ping_pong.py ├── README.md ├── arduino ├── ping_pong │ ├── README.md │ └── ping_pong.ino ├── can_logger_and_transmitter │ ├── can1 │ │ ├── can1_receiver.ino │ │ └── can1_transmit.ino │ └── can2 │ │ ├── can2_receiver.ino │ │ ├── can2_loopback_test.ino │ │ └── can2_transmit.ino ├── rcp_buttons │ └── rcp_buttons.ino └── CAN Forward │ ├── can_demo_forward.ino │ └── can_demo_forward_demo.ino ├── bolt-on-template ├── LICENSE.txt └── eagle │ └── bolt-on_template.sch └── projects └── GPS_and_sensor_broadcast └── gps_and_sensor_broadcast.ino /bolt-ons/gps-bolt-on/SUP500F_v3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autosportlabs/ESP32-CAN-X2/HEAD/bolt-ons/gps-bolt-on/SUP500F_v3.pdf -------------------------------------------------------------------------------- /esp-idf/blink/.gitignore: -------------------------------------------------------------------------------- 1 | .pio 2 | .vscode/.browse.c_cpp.db* 3 | .vscode/c_cpp_properties.json 4 | .vscode/launch.json 5 | .vscode/ipch 6 | -------------------------------------------------------------------------------- /esp-idf/blink/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.16.0) 2 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 3 | project(blink) 4 | -------------------------------------------------------------------------------- /images/1050px-ESP32_CAN_X2_revD_3quarter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autosportlabs/ESP32-CAN-X2/HEAD/images/1050px-ESP32_CAN_X2_revD_3quarter.jpg -------------------------------------------------------------------------------- /enclosures/slim/ESP32-CAN-X2_enclosure_slim_base.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autosportlabs/ESP32-CAN-X2/HEAD/enclosures/slim/ESP32-CAN-X2_enclosure_slim_base.stl -------------------------------------------------------------------------------- /enclosures/slim/ESP32-CAN-X2_enclosure_slim_lid.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autosportlabs/ESP32-CAN-X2/HEAD/enclosures/slim/ESP32-CAN-X2_enclosure_slim_lid.stl -------------------------------------------------------------------------------- /esp-idf/blink/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file was automatically generated for projects 2 | # without default 'CMakeLists.txt' file. 3 | 4 | FILE(GLOB_RECURSE app_sources ${CMAKE_SOURCE_DIR}/src/*.*) 5 | 6 | idf_component_register(SRCS ${app_sources}) 7 | -------------------------------------------------------------------------------- /circuitpython/blink.py: -------------------------------------------------------------------------------- 1 | import board 2 | import digitalio 3 | import time 4 | 5 | # For the ESP32-CAN-X2 the LED is on IO2 6 | led = digitalio.DigitalInOut(board.IO2) 7 | led.direction = digitalio.Direction.OUTPUT 8 | 9 | while True: 10 | led.value = True 11 | time.sleep(0.5) 12 | led.value = False 13 | time.sleep(0.5) 14 | -------------------------------------------------------------------------------- /esp-idf/blink/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See http://go.microsoft.com/fwlink/?LinkId=827846 3 | // for the documentation about the extensions.json format 4 | "recommendations": [ 5 | "platformio.platformio-ide" 6 | ], 7 | "unwantedRecommendations": [ 8 | "ms-vscode.cpptools-extension-pack" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /bolt-ons/gps-bolt-on/README.md: -------------------------------------------------------------------------------- 1 | # GPS bolt on 2 | 3 | ## GPS Module 4 | The GPS bolt on uses the Skytraq SUP500F. See the datasheet within this repository for programming information 5 | 6 | ## Pin configuration 7 | 8 | ``` 9 | * Rx to GPS module (tx from ESP32) - pin 17 of SV1 - GPIO40 of ESP32 10 | * Tx from GPS module (rx to ESP32) - pin 18 of SV1 - GPIO41 of ESP32 11 | * P1PPS from GPS module - pin 16 of SV1 - GPIO39 of ESP32 12 | * PSE_SEL from GPS moduel - pin 11 of SV1 - GPIO45 of ESP32 13 | ``` 14 | 15 | -------------------------------------------------------------------------------- /esp-idf/blink/platformio.ini: -------------------------------------------------------------------------------- 1 | ; PlatformIO Project Configuration File 2 | ; 3 | ; Build options: build flags, source filter 4 | ; Upload options: custom upload port, speed and extra flags 5 | ; Library options: dependencies, extra library storages 6 | ; Advanced options: extra scripting 7 | ; 8 | ; Please visit documentation for the other options and examples 9 | ; https://docs.platformio.org/page/projectconf.html 10 | 11 | [env:esp32-can-x2] 12 | platform = espressif32 13 | board = esp32-s3-devkitc-1 14 | framework = espidf 15 | -------------------------------------------------------------------------------- /esp-idf/blink/test/README: -------------------------------------------------------------------------------- 1 | 2 | This directory is intended for PlatformIO Test Runner and project tests. 3 | 4 | Unit Testing is a software testing method by which individual units of 5 | source code, sets of one or more MCU program modules together with associated 6 | control data, usage procedures, and operating procedures, are tested to 7 | determine whether they are fit for use. Unit testing finds problems early 8 | in the development cycle. 9 | 10 | More information about PlatformIO Unit Testing: 11 | - https://docs.platformio.org/en/latest/advanced/unit-testing/index.html 12 | -------------------------------------------------------------------------------- /bolt-ons/gps-bolt-on/GPS_raw_data.ino: -------------------------------------------------------------------------------- 1 | void setup() { 2 | Serial.begin(115200); // Initialize serial communication with the Serial Monitor 3 | Serial1.begin(9600, SERIAL_8N1, 41, 40); // Initialize serial communication with the GPS module 4 | Serial.print("starting\r\n"); 5 | 6 | } 7 | 8 | void loop() { 9 | if (Serial1.available()) { // Check if data is available from the GPS module 10 | char c = Serial1.read(); // Read a character from the GPS module 11 | Serial.print(c); // Print the character to the Serial Monitor (Raw Data) 12 | } 13 | } 14 | 15 | 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ESP32-CAN-X2 2 | Code samples for the ESP32-CAN-X2 automotive-grade CAN bus development board 3 | 4 | Full documentation: https://wiki.autosportlabs.com/ESP32-CAN-X2 5 | 6 | ![ESP32-CAN-X2](images/1050px-ESP32_CAN_X2_revD_3quarter.jpg) 7 | 8 | * arduino - code examples for Arduino 9 | * bolt-ons - code examples for Arduino 10 | * circuitpython - code examples for Circuit Python 11 | * esp-idf - code examples for ESP-IDF 12 | * projects - specific project examples 13 | 14 | ## Hardware 15 | * enclosures - 3D printable enclosures 16 | * bolt-on-template - PCB templates for making your own bolt-on 17 | 18 | 19 | -------------------------------------------------------------------------------- /arduino/ping_pong/README.md: -------------------------------------------------------------------------------- 1 | ## IDE setup 2 | ### Selecting the board 3 | In the Arduino IDE, choose the Autosport Labs ESP32-CAN-X2 board. For the port, choose the port that represents the USB port for the connected ESP32-CAN-X2 4 | 5 | * Note: you may need to update your list of boards if you do not see it in the IDE 6 | 7 | ### Add support for mcp_canbus 8 | In the library manager, install the mcp_canbus library by Longan Labs. 9 | 10 | ### Compiling the ping pong example 11 | * Load the ping pong example into the IDE. 12 | * Press verify, and if there are no erros, upload to the board. 13 | * After uploading, press the reset button on the ESP32-CAN-X2 board 14 | 15 | You should see LED1 blinking at a regular interval 16 | 17 | ### Testing the ping pong example 18 | * Refer to the wiring diagram on https://wiki.autosportlabs.com/ESP32-CAN-X2 19 | * Connect the wires: 20 | * CAN1 high to CAN2 high 21 | * CAN1 low to CAN2 low 22 | 23 | Observe the messages in the serial monitor showing CAN bus activity 24 | 25 | -------------------------------------------------------------------------------- /circuitpython/README.md: -------------------------------------------------------------------------------- 1 | ## Getting CircuitPython 2 | Download the .bin file from https://circuitpython.org/board/autosportlabs_esp32_can_x2/ 3 | 4 | ## Flash circuitpython to the board 5 | 6 | Follow these instructions for burning circuitpython .bin file using the GUI tool or esptool.py 7 | https://learn.adafruit.com/circuitpython-with-esp32-quick-start?view=all 8 | 9 | * Note, this only needs to be done once - your python files will be uploaded to the board after this step is complete 10 | 11 | ## Connect ESP32-CAN-X2 to your computer 12 | Connect the ESP32-CAN-X2 to your computer; after a moment, a removable drive should appear 13 | 14 | ## Copy your python code to the removable drive 15 | Replace code.py with your own code. Ensure the filename remains code.py 16 | 17 | ## Example code 18 | ### blink.py 19 | blink.py - blinks LED1 20 | 21 | ### ping_pong.py 22 | ping_pong.py - sends CAN bus messages between CAN1 and CAN2. 23 | 24 | In order to test, join these connections together: 25 | * CAN1 High -> CAN2 High 26 | * CAN1 Low -> CAN2 Low 27 | -------------------------------------------------------------------------------- /bolt-ons/rgb-led-bolt-on/disco-demo.ino: -------------------------------------------------------------------------------- 1 | // disco LED example 2 | // Sets all LEDs to random colors 3 | #include 4 | 5 | #define LED_TYPE LED_STRIP_WS2812 6 | 7 | #define LED_PIN 14 // change this number to be the GPIO pin connected to the LED 8 | #define LED_BRIGHTNESS 30 // sets how bright the LED is. O is off; 255 is burn your eyeballs out (not recommended) 9 | #define LED_COUNT 10 // 10 LEDs in the matrix 10 | 11 | CRGB leds[LED_COUNT]; // Array to hold the LED data 12 | 13 | void setup() { 14 | // Initialize the LED strip 15 | FastLED.addLeds(leds, LED_COUNT); 16 | FastLED.setBrightness(LED_BRIGHTNESS); 17 | fill_solid(leds, LED_COUNT, CRGB::Black); // Turn off all LEDs initially 18 | FastLED.show(); 19 | } 20 | 21 | void loop() { 22 | for (uint8_t i = 0; i < LED_COUNT; i++) { 23 | byte red = random(256); 24 | byte green = random(256); 25 | byte blue = random(256); 26 | leds[i] = CRGB(red, green, blue); 27 | FastLED.show(); 28 | } 29 | delay( 100 ); 30 | } 31 | -------------------------------------------------------------------------------- /bolt-on-template/LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Autosport Labs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /esp-idf/blink/src/main.c: -------------------------------------------------------------------------------- 1 | #include "freertos/FreeRTOS.h" 2 | #include "esp_timer.h" 3 | #include "esp_log.h" 4 | #include "driver/gpio.h" 5 | 6 | #define LED_PIN GPIO_NUM_2 7 | 8 | static const char *TAG = "ESP32-CAN-X2"; 9 | 10 | void led_callback() { 11 | static bool state = true; 12 | 13 | state = state != true; 14 | 15 | gpio_set_level(LED_PIN, state); 16 | } 17 | 18 | void app_main() { 19 | ESP_LOGI(TAG, "Start"); 20 | 21 | gpio_config_t led_config; 22 | led_config.pin_bit_mask = 0x01L << LED_PIN; 23 | led_config.intr_type = GPIO_INTR_DISABLE; 24 | led_config.mode = GPIO_MODE_OUTPUT; 25 | led_config.pull_up_en = GPIO_PULLUP_ENABLE; 26 | led_config.pull_down_en = GPIO_PULLDOWN_DISABLE; 27 | 28 | ESP_ERROR_CHECK(gpio_config(&led_config)); 29 | 30 | 31 | esp_timer_handle_t led_timer_handle; 32 | esp_timer_create_args_t timer_config; 33 | timer_config.dispatch_method = ESP_TIMER_TASK; 34 | timer_config.name = "LED Timer"; 35 | timer_config.callback = led_callback; 36 | ESP_ERROR_CHECK(esp_timer_create(&timer_config, &led_timer_handle)); 37 | ESP_ERROR_CHECK(esp_timer_start_periodic(led_timer_handle, 1000000)); 38 | } -------------------------------------------------------------------------------- /esp-idf/blink/lib/README: -------------------------------------------------------------------------------- 1 | 2 | This directory is intended for project specific (private) libraries. 3 | PlatformIO will compile them to static libraries and link into executable file. 4 | 5 | The source code of each library should be placed in a an own separate directory 6 | ("lib/your_library_name/[here are source files]"). 7 | 8 | For example, see a structure of the following two libraries `Foo` and `Bar`: 9 | 10 | |--lib 11 | | | 12 | | |--Bar 13 | | | |--docs 14 | | | |--examples 15 | | | |--src 16 | | | |- Bar.c 17 | | | |- Bar.h 18 | | | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html 19 | | | 20 | | |--Foo 21 | | | |- Foo.c 22 | | | |- Foo.h 23 | | | 24 | | |- README --> THIS FILE 25 | | 26 | |- platformio.ini 27 | |--src 28 | |- main.c 29 | 30 | and a contents of `src/main.c`: 31 | ``` 32 | #include 33 | #include 34 | 35 | int main (void) 36 | { 37 | ... 38 | } 39 | 40 | ``` 41 | 42 | PlatformIO Library Dependency Finder will find automatically dependent 43 | libraries scanning project source files. 44 | 45 | More information about PlatformIO Library Dependency Finder 46 | - https://docs.platformio.org/page/librarymanager/ldf.html 47 | -------------------------------------------------------------------------------- /esp-idf/blink/include/README: -------------------------------------------------------------------------------- 1 | 2 | This directory is intended for project header files. 3 | 4 | A header file is a file containing C declarations and macro definitions 5 | to be shared between several project source files. You request the use of a 6 | header file in your project source file (C, C++, etc) located in `src` folder 7 | by including it, with the C preprocessing directive `#include'. 8 | 9 | ```src/main.c 10 | 11 | #include "header.h" 12 | 13 | int main (void) 14 | { 15 | ... 16 | } 17 | ``` 18 | 19 | Including a header file produces the same results as copying the header file 20 | into each source file that needs it. Such copying would be time-consuming 21 | and error-prone. With a header file, the related declarations appear 22 | in only one place. If they need to be changed, they can be changed in one 23 | place, and programs that include the header file will automatically use the 24 | new version when next recompiled. The header file eliminates the labor of 25 | finding and changing all the copies as well as the risk that a failure to 26 | find one copy will result in inconsistencies within a program. 27 | 28 | In C, the usual convention is to give header files names that end with `.h'. 29 | It is most portable to use only letters, digits, dashes, and underscores in 30 | header file names, and at most one dot. 31 | 32 | Read more about using header files in official GCC documentation: 33 | 34 | * Include Syntax 35 | * Include Operation 36 | * Once-Only Headers 37 | * Computed Includes 38 | 39 | https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html 40 | -------------------------------------------------------------------------------- /circuitpython/ping_pong.py: -------------------------------------------------------------------------------- 1 | import board 2 | import digitalio 3 | import busio 4 | from time import sleep 5 | from canio import CAN as CAN1 6 | from adafruit_mcp2515 import MCP2515 as CAN2 7 | from canio import Message, RemoteTransmissionRequest 8 | 9 | 10 | # Setup CAN1 via canio 11 | can1 = CAN1(rx=board.IO6, tx=board.IO7, baudrate=500_000, auto_restart=True) 12 | 13 | # Setup CAN2 via adafruit_mcp2515 14 | # CS pin for MCP2515 on CAN2 15 | cs = digitalio.DigitalInOut(board.IO10) 16 | cs.direction = digitalio.Direction.OUTPUT 17 | spi = busio.SPI(board.IO12, board.IO11, board.IO13) 18 | can2 = CAN2(spi, cs, baudrate=500_000) 19 | 20 | while True: 21 | print("CAN1: Tx Errors:", can1.transmit_error_count, 22 | "Rx Errors:", can1.receive_error_count, 23 | "state:", can1.state) 24 | with can1.listen(timeout=1.0) as can1_listener: 25 | message_count = can1_listener.in_waiting() 26 | if message_count: 27 | print("CAN1: Messages available:", message_count) 28 | for _i in range(message_count): 29 | msg = can1_listener.receive() 30 | if isinstance(msg, Message): 31 | print("CAN1: Recieved", msg.data, "from", hex(msg.id)) 32 | if isinstance(msg, RemoteTransmissionRequest): 33 | print("CAN1: RTR request length", msg.length, "from", hex(msg.id)) 34 | 35 | send_success = can1.send(Message(id=0xf6, data=b"ping", extended=False)) 36 | print("CAN1: Send success", send_success) 37 | 38 | with can2.listen(timeout=1.0) as can2_listener: 39 | message_count = can2_listener.in_waiting() 40 | if message_count: 41 | print("CAN2: Messages available:", message_count) 42 | for _i in range(message_count): 43 | msg = can2_listener.receive() 44 | if isinstance(msg, Message): 45 | print("CAN2: Recieved", msg.data, "from", hex(msg.id)) 46 | send_sucess = can2.send(Message(id=0xf7, data=b"pong", extended=False)) 47 | print("CAN2: Send success", send_success) 48 | if isinstance(msg, RemoteTransmissionRequest): 49 | print("CAN2: RTR request length", msg.length, "from", hex(msg.id)) 50 | sleep(1) 51 | -------------------------------------------------------------------------------- /bolt-ons/gps-bolt-on/GPS_parsed.ino: -------------------------------------------------------------------------------- 1 | /* 2 | This code is for an ESP32-CAN-X2 microcontroller to read GPS data from a GPS module. 3 | - **TinyGPSPlus**: A library by Mikal Hart used to parse and decode NMEA sentences from GPS modules, providing easy access to location data such as latitude, longitude, speed, and quality indicators. 4 | The code initializes a hardware serial connection for the GPS module and parse GPS data. 5 | 6 | **Pin Configuration:** 7 | - Rx to GPS module (tx from ESP32) - pin 17 of SV1 - GPIO40 of ESP32 8 | - Tx from GPS module (rx to ESP32) - pin 18 of SV1 - GPIO41 of ESP32 9 | - P1PPS from GPS module - pin 16 of SV1 - GPIO39 of ESP32 10 | - PSE_SEL from GPS moduel - pin 11 of SV1 - GPIO45 of ESP32 11 | */ 12 | 13 | #include 14 | 15 | // RX, TX pins connected to the GPS module 16 | // Serial1 uses the hardware serial port and does not need pin assignment in code 17 | TinyGPSPlus gps; 18 | 19 | void setup() { 20 | Serial.begin(9600); // Initialize serial communication with the Serial Monitor 21 | Serial1.begin(9600, SERIAL_8N1, 41, 40); // Initialize serial communication with the GPS module 22 | // Note: Replace 41 and 40 with actual RX and TX pins if required by your hardware. 23 | 24 | Serial.println("GPS Module Initialized"); 25 | } 26 | 27 | void loop() { 28 | while (Serial1.available() > 0) { 29 | char c = Serial1.read(); 30 | 31 | gps.encode(c); // Parse the NMEA sentence 32 | 33 | if (gps.location.isUpdated()) { 34 | printGPSData(); 35 | } 36 | } 37 | } 38 | 39 | void printGPSData() { 40 | // Latitude and Longitude 41 | Serial.print("Latitude: "); 42 | Serial.print(gps.location.lat(), 6); // Six decimal places for precision 43 | Serial.print(" Longitude: "); 44 | Serial.println(gps.location.lng(), 6); 45 | 46 | // Number of Satellites 47 | Serial.print("Satellites: "); 48 | Serial.println(gps.satellites.value()); 49 | 50 | // HDOP (Horizontal Dilution of Precision) 51 | Serial.print("HDOP: "); 52 | Serial.println(gps.hdop.hdop()); // Corrected the function call for HDOP 53 | 54 | // Speed in km/h 55 | Serial.print("Speed: "); 56 | Serial.print(gps.speed.kmph()); // Speed in kilometers per hour 57 | Serial.println(" km/h"); 58 | 59 | Serial.println(); 60 | } 61 | -------------------------------------------------------------------------------- /arduino/can_logger_and_transmitter/can1/can1_receiver.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * ESP32 TWAI/CAN Receiver Example 3 | * 4 | * Functionality: 5 | * - Initializes CAN controller at 500kbps 6 | * - Receives standard CAN frames (11-bit IDs) 7 | * - Prints all received messages to serial monitor 8 | * - Non-blocking message reception 9 | * 10 | * Hardware Connections: 11 | * - RX: GPIO6, TX: GPIO7 12 | * 13 | * Usage: 14 | * - Connect to CAN bus with proper termination 15 | * - Monitor received messages at 115200 baud 16 | */ 17 | 18 | #include 19 | 20 | #define CAN1_RX_PIN GPIO_NUM_6 21 | #define CAN1_TX_PIN GPIO_NUM_7 22 | 23 | 24 | void CAN1_readMsg() 25 | { 26 | twai_message_t message; 27 | 28 | while (twai_receive(&message, 0) == ESP_OK) // Non-blocking 29 | { 30 | Serial.printf("[0x%X]: ", message.identifier); 31 | for (int i = 0; i < message.data_length_code; i++) 32 | { 33 | Serial.printf("0x%02X", message.data[i]); 34 | if (i < message.data_length_code - 1) 35 | Serial.print(", "); 36 | } 37 | Serial.println(); 38 | } 39 | } 40 | 41 | bool setupCAN1(void) 42 | { 43 | twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT((gpio_num_t)CAN1_TX_PIN, (gpio_num_t)CAN1_RX_PIN, TWAI_MODE_NORMAL); // TWAI general configuration 44 | twai_timing_config_t t_config = TWAI_TIMING_CONFIG_500KBITS(); // TWAI timing configuration (500 kbps @ 80 MHz APB clock) 45 | twai_filter_config_t f_config = TWAI_FILTER_CONFIG_ACCEPT_ALL(); // TWAI filter config - accept all 46 | 47 | if (twai_driver_install(&g_config, &t_config, &f_config) != ESP_OK) // Install TWAI driver 48 | { 49 | Serial.println("Failed to install TWAI driver"); 50 | return false; 51 | } 52 | 53 | // Start TWAI driver 54 | if (twai_start() != ESP_OK) 55 | { 56 | Serial.println("Failed to start TWAI driver"); 57 | return false; 58 | } 59 | 60 | Serial.println("TWAI (CAN1) started. Waiting for messages..."); 61 | return true; 62 | } 63 | 64 | void setup() 65 | { 66 | Serial.begin(115200); 67 | Serial.println("Initializing CAN1..."); 68 | if (!setupCAN1()) 69 | { 70 | Serial.println("Failed to setup CAN1. Exiting..."); 71 | while (1); 72 | } 73 | } 74 | 75 | void loop() 76 | { 77 | CAN1_readMsg(); // read CAN1 message 78 | } 79 | -------------------------------------------------------------------------------- /arduino/can_logger_and_transmitter/can2/can2_receiver.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * ESP32 MCP2515 CAN Bus Receiver 3 | * 4 | * Implements a CAN bus receiver using MCP2515 controller with: 5 | * - Custom SPI pin configuration 6 | * - 500kbps baud rate (16MHz crystal) 7 | * - Standard and extended frame support 8 | * - Non-blocking message reception 9 | * - Formatted message output to Serial 10 | * 11 | * Hardware Configuration: 12 | * - SPI Interface: 13 | * - SCK: GPIO12 14 | * - MISO: GPIO13 15 | * - MOSI: GPIO11 16 | * - CS: GPIO10 17 | * - Uses MCP2515 CAN controller module 18 | * 19 | * Dependencies: 20 | * - MCP_CAN library (https://github.com/coryjfowler/MCP_CAN_lib) 21 | */ 22 | 23 | #include // ADD library https://github.com/coryjfowler/MCP_CAN_lib 24 | #include 25 | 26 | // Custom SPI Pins for MCP2515 27 | #define CAN2_CS_PIN GPIO_NUM_10 28 | #define CAN2_SPI_SCK GPIO_NUM_12 29 | #define CAN2_SPI_MISO GPIO_NUM_13 30 | #define CAN2_SPI_MOSI GPIO_NUM_11 31 | 32 | SPIClass CAN2_SPI(HSPI); // HSPI bus 33 | MCP_CAN CAN2(&CAN2_SPI, CAN2_CS_PIN); 34 | 35 | bool setupCAN2() 36 | { 37 | CAN2_SPI.begin(CAN2_SPI_SCK, CAN2_SPI_MISO, CAN2_SPI_MOSI, CAN2_CS_PIN); 38 | 39 | if (CAN2.begin(MCP_STDEXT, CAN_500KBPS, MCP_16MHZ) == CAN_OK) { 40 | CAN2.setMode(MCP_NORMAL); 41 | return true; 42 | } else { 43 | return false; 44 | } 45 | } 46 | 47 | void CAN2_readMsg() 48 | { 49 | if (CAN2.checkReceive() == CAN_MSGAVAIL) { 50 | long unsigned int canId; 51 | byte len; 52 | byte buf[8]; 53 | 54 | CAN2.readMsgBuf(&canId, &len, buf); 55 | 56 | Serial.printf("[0x%03lX]: ", canId); 57 | for (byte i = 0; i < len; i++) { 58 | Serial.printf("0x%02X", buf[i]); 59 | if (i < len - 1) Serial.print(", "); 60 | } 61 | Serial.println(); 62 | } 63 | } 64 | 65 | void setup() 66 | { 67 | Serial.begin(115200); 68 | 69 | if (!setupCAN2()) { 70 | Serial.println("Failed to initialize CAN2. Check connections."); 71 | while (1); 72 | } else { 73 | Serial.println("MCP2515 Initialized Successfully (Receiver)"); 74 | } 75 | } 76 | 77 | /** 78 | * Continuously checks and reads available CAN messages. 79 | * This function is repeatedly called in the main loop to 80 | * process incoming CAN messages using the CAN2_readMsg function. 81 | */ 82 | 83 | void loop() 84 | { 85 | CAN2_readMsg(); // Read CAN messages 86 | } 87 | -------------------------------------------------------------------------------- /arduino/can_logger_and_transmitter/can2/can2_loopback_test.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * ESP32 MCP2515 CAN Bus Example (Loopback Mode) 3 | * 4 | * Functionality: 5 | * - Initializes MCP2515 at 500kbps (16MHz crystal) 6 | * - Demonstrates loopback mode operation 7 | * - Sends test messages with ID 0x123 8 | * - Receives and prints looped-back messages 9 | * - Includes error checking for all operations 10 | * 11 | * Hardware Connections: 12 | * - SPI: SCK=GPIO12, MISO=GPIO13, MOSI=GPIO11, CS: GPIO10 13 | * - Requires MCP2515 CAN controller module 14 | * 15 | * Usage: 16 | * - Set to loopback mode for testing 17 | * - Monitor serial output at 115200 baud 18 | * - Change to normal mode for actual CAN bus communication 19 | */ 20 | 21 | #include // ADD library https://github.com/coryjfowler/MCP_CAN_lib 22 | #include 23 | 24 | // Custom SPI Pins 25 | #define CAN2_CS_PIN GPIO_NUM_10 26 | #define CAN2_SPI_SCK GPIO_NUM_12 27 | #define CAN2_SPI_MISO GPIO_NUM_13 28 | #define CAN2_SPI_MOSI GPIO_NUM_11 29 | 30 | SPIClass CAN2_SPI(HSPI); // Using HSPI 31 | MCP_CAN CAN2(&CAN2_SPI, CAN2_CS_PIN); 32 | 33 | void setup() { 34 | Serial.begin(115200); 35 | delay(5000); // Give time for the Serial Monitor to open 36 | CAN2_SPI.begin(CAN2_SPI_SCK, CAN2_SPI_MISO, CAN2_SPI_MOSI, CAN2_CS_PIN); 37 | 38 | if (CAN2.begin(MCP_STDEXT, CAN_500KBPS, MCP_16MHZ) == CAN_OK) { 39 | Serial.println("MCP2515 Initialized Successfully (loopback mode)"); 40 | } else { 41 | Serial.println("Error Initializing MCP2515"); 42 | while (1); 43 | } 44 | 45 | CAN2.setMode(MCP_LOOPBACK); 46 | delay(1000); 47 | } 48 | 49 | void loop() { 50 | byte data[8] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88}; 51 | 52 | byte result = CAN2.sendMsgBuf(0x123, 0, 8, data); 53 | 54 | if (result == CAN_OK) { 55 | Serial.println("Message sent (loopback)"); 56 | } else { 57 | Serial.print("Send failed, error code: "); 58 | Serial.println(result); 59 | } 60 | 61 | delay(100); 62 | 63 | if (CAN2.checkReceive() == CAN_MSGAVAIL) { 64 | long unsigned int canId; 65 | byte len; 66 | byte recvData[8]; 67 | CAN2.readMsgBuf(&canId, &len, recvData); 68 | 69 | Serial.print("["); 70 | Serial.print(canId, HEX); 71 | Serial.print("]: "); 72 | for (byte i = 0; i < len; i++) { 73 | Serial.print(recvData[i], HEX); 74 | if (i < len - 1) Serial.print(", "); 75 | } 76 | Serial.println(); 77 | } 78 | 79 | delay(1000); 80 | } 81 | -------------------------------------------------------------------------------- /arduino/can_logger_and_transmitter/can1/can1_transmit.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * ESP32 TWAI/CAN Transmitter Example 3 | * 4 | * Functionality: 5 | * - Initializes CAN controller at 500kbps 6 | * - Transmits standard CAN frames with ID 0x123 7 | * - Sends 8-byte payload (0x01-0x08) every second 8 | * - Prints transmission details to serial monitor 9 | * 10 | * Hardware Connections: 11 | * - TX: GPIO7, RX: GPIO6 12 | * 13 | * Usage: 14 | * - Connect to CAN bus with proper termination 15 | * - Monitor output at 115200 baud 16 | */ 17 | 18 | 19 | #include 20 | 21 | #define CAN1_TX_PIN GPIO_NUM_7 22 | #define CAN1_RX_PIN GPIO_NUM_6 23 | 24 | bool setupCAN1() 25 | { 26 | twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT((gpio_num_t)CAN1_TX_PIN, (gpio_num_t)CAN1_RX_PIN, TWAI_MODE_NORMAL); 27 | twai_timing_config_t t_config = TWAI_TIMING_CONFIG_500KBITS(); // 500 kbps 28 | twai_filter_config_t f_config = TWAI_FILTER_CONFIG_ACCEPT_ALL(); 29 | 30 | if (twai_driver_install(&g_config, &t_config, &f_config) != ESP_OK) { 31 | Serial.println("Failed to install TWAI driver"); 32 | return false; 33 | } 34 | 35 | if (twai_start() != ESP_OK) { 36 | Serial.println("Failed to start TWAI driver"); 37 | return false; 38 | } 39 | 40 | Serial.println("TWAI (CAN1) sender started..."); 41 | return true; 42 | } 43 | 44 | void sendCAN1Message() 45 | { 46 | twai_message_t message; 47 | message.identifier = 0x123; // Standard CAN1 ID 48 | message.extd = 0; // Standard frame 49 | message.rtr = 0; // Not a remote frame 50 | message.data_length_code = 8; // 8-byte data frame 51 | 52 | for (int i = 0; i < 8; i++) { 53 | message.data[i] = i + 1; // 0x01, 0x02, ..., 0x08 54 | } 55 | 56 | esp_err_t result = twai_transmit(&message, pdMS_TO_TICKS(100)); 57 | if (result == ESP_OK) { 58 | Serial.print("Message sent: [0x"); 59 | Serial.print(message.identifier, HEX); 60 | Serial.print("] "); 61 | for (int i = 0; i < message.data_length_code; i++) { 62 | Serial.printf("0x%02X", message.data[i]); 63 | if (i < message.data_length_code - 1) Serial.print(", "); 64 | } 65 | Serial.println(); 66 | } else if (result == ESP_ERR_TIMEOUT) { 67 | Serial.println("Transmit timeout – bus busy or buffer full"); 68 | } else { 69 | Serial.printf("Transmit error: %s\n", esp_err_to_name(result)); 70 | } 71 | } 72 | 73 | void setup() 74 | { 75 | Serial.begin(115200); 76 | delay(1000); 77 | Serial.println("Initializing CAN1 sender..."); 78 | if (!setupCAN1()) { 79 | Serial.println("Setup failed. Halting."); 80 | while (1); 81 | } 82 | } 83 | 84 | void loop() 85 | { 86 | sendCAN1Message(); 87 | delay(1000); // Send every 1 second 88 | } 89 | -------------------------------------------------------------------------------- /arduino/can_logger_and_transmitter/can2/can2_transmit.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * ESP32 MCP2515 CAN Bus Transmitter 3 | * 4 | * Implements a CAN bus transmitter using MCP2515 controller with: 5 | * - Custom SPI pin configuration (HSPI bus) 6 | * - 500kbps baud rate (16MHz crystal) 7 | * - Support for standard CAN frames (11-bit IDs) 8 | * - Configurable message ID and payload 9 | * - Transmission status feedback 10 | * 11 | * Hardware Configuration: 12 | * - SPI Interface: 13 | * - SCK: GPIO12 14 | * - MISO: GPIO13 15 | * - MOSI: GPIO11 16 | * - CS: GPIO10 17 | * - Requires MCP2515 CAN controller module 18 | * - 120Ω termination resistor recommended on CAN bus 19 | * 20 | * Default Transmission: 21 | * - Sends 8-byte test pattern every second 22 | * - Default CAN ID: 0x123 23 | * - Payload: 0x01 to 0x08 24 | * 25 | * Dependencies: 26 | * - MCP_CAN library (https://github.com/coryjfowler/MCP_CAN_lib) 27 | */ 28 | 29 | #include // ADD library https://github.com/coryjfowler/MCP_CAN_lib 30 | #include 31 | 32 | // Custom SPI Pins for MCP2515 33 | #define CAN2_CS_PIN GPIO_NUM_10 34 | #define CAN2_SPI_SCK GPIO_NUM_12 35 | #define CAN2_SPI_MISO GPIO_NUM_13 36 | #define CAN2_SPI_MOSI GPIO_NUM_11 37 | 38 | SPIClass CAN2_SPI(HSPI); // Use default HSPI SPI bus 39 | MCP_CAN CAN2(&CAN2_SPI, CAN2_CS_PIN); 40 | 41 | bool setupCAN2() 42 | { 43 | CAN2_SPI.begin(CAN2_SPI_SCK, CAN2_SPI_MISO, CAN2_SPI_MOSI, CAN2_CS_PIN); 44 | 45 | // Initialize MCP2515 with 500kbps and 16MHz crystal 46 | if (CAN2.begin(MCP_STDEXT, CAN_500KBPS, MCP_16MHZ) == CAN_OK) 47 | { 48 | CAN2.setMode(MCP_NORMAL); 49 | return true; 50 | } 51 | else 52 | { 53 | return false; 54 | } 55 | } 56 | 57 | void sendDataCAN2(byte *data, unsigned long data_len, unsigned long can_id) 58 | { 59 | // CAN ID 0x123 60 | byte result = CAN2.sendMsgBuf(can_id, 0, data_len, data); 61 | 62 | if (result == CAN_OK) 63 | { 64 | Serial.println("Message sent successfully via CAN2"); 65 | } 66 | else 67 | { 68 | Serial.print("Message send failed, code: "); 69 | Serial.println(result); 70 | } 71 | } 72 | 73 | void setup() 74 | { 75 | Serial.begin(115200); 76 | 77 | // Initialize SPI with custom pins 78 | if (!setupCAN2()) 79 | { 80 | Serial.println("Failed to initialize CAN2. Check connections."); 81 | while (1) 82 | ; 83 | } 84 | else 85 | { 86 | Serial.println("MCP2515 Initialized Successfully (Sender)"); 87 | } 88 | delay(1000); 89 | } 90 | 91 | void loop() 92 | { 93 | // Create dummy data payload 94 | byte data[8] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}; 95 | unsigned long can_id = 0x123; // Example CAN ID 96 | unsigned long data_len = sizeof(data) / sizeof(data[0]); // Length of the data array 97 | 98 | sendDataCAN2(data, data_len, can_id); 99 | delay(1000); 100 | } 101 | -------------------------------------------------------------------------------- /bolt-ons/rgb-led-bolt-on/can-led-alerts.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include // For TWAI (CAN) 3 | 4 | #define LED_PIN 14 // GPIO pin connected to the LED strip 5 | #define LED_BRIGHTNESS 30 // LED brightness (0 = off, 255 = maximum brightness) 6 | #define LED_COUNT 10 // Number of LEDs in the strip 7 | 8 | // Define CAN1 TX and RX pins 9 | #define CAN1_TX 7 // Adjust based on your setup 10 | #define CAN1_RX 6 // Adjust based on your setup 11 | #define CAN_LED_ID 0x101 // CAN ID for individual LED control 12 | #define CAN_ALERT_ID 0x102 // CAN ID for array (left/right) control 13 | 14 | CRGB leds[LED_COUNT]; // Array to hold the LED data 15 | 16 | // Function to initialize the CAN bus 17 | void initCAN() { 18 | // General CAN configuration 19 | twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT((gpio_num_t)CAN1_TX, (gpio_num_t)CAN1_RX, TWAI_MODE_NORMAL); 20 | twai_timing_config_t t_config = TWAI_TIMING_CONFIG_1MBITS(); 21 | twai_filter_config_t f_config = TWAI_FILTER_CONFIG_ACCEPT_ALL(); 22 | 23 | // Install CAN driver 24 | if (twai_driver_install(&g_config, &t_config, &f_config) == ESP_OK) { 25 | Serial.println("TWAI driver installed successfully"); 26 | } else { 27 | Serial.println("Failed to install TWAI driver"); 28 | } 29 | 30 | // Start CAN driver 31 | if (twai_start() == ESP_OK) { 32 | Serial.println("TWAI driver started successfully"); 33 | } else { 34 | Serial.println("Failed to start TWAI driver"); 35 | } 36 | } 37 | 38 | void setup() { 39 | // Serial.begin(115200); // Initialize Serial monitor for debugging 40 | 41 | // Initialize the LED strip 42 | FastLED.addLeds(leds, LED_COUNT); 43 | FastLED.setBrightness(LED_BRIGHTNESS); 44 | fill_solid(leds, LED_COUNT, CRGB::Black); // Turn off all LEDs initially 45 | FastLED.show(); 46 | 47 | // Initialize the CAN bus 48 | initCAN(); 49 | } 50 | 51 | // Function to set the color of a specific LED 52 | void setLEDColor(uint8_t index, byte red, byte green, byte blue) { 53 | if (index < LED_COUNT) { // Ensure the index is within bounds 54 | leds[index] = CRGB(red, green, blue); 55 | FastLED.show(); 56 | } 57 | } 58 | 59 | // Function to set the color of an array (left or right) of LEDs 60 | void setArrayColor(uint8_t index, byte red, byte green, byte blue) { 61 | uint8_t start = (index == 0) ? 0 : 5; // Determine start position based on index 62 | uint8_t end = start + 5; // Determine end position 63 | if (end > LED_COUNT) end = LED_COUNT; // Ensure we don't go out of bounds 64 | 65 | for (uint8_t i = start; i < end; i++) { 66 | leds[i] = CRGB(red, green, blue); 67 | } 68 | FastLED.show(); 69 | } 70 | 71 | void loop() { 72 | // Prepare a structure to hold incoming CAN messages 73 | twai_message_t rx_msg; 74 | 75 | // Check for incoming CAN messages 76 | if (twai_receive(&rx_msg, pdMS_TO_TICKS(10)) == ESP_OK) { 77 | if (rx_msg.identifier == CAN_LED_ID && rx_msg.data_length_code == 4) { 78 | // Set a specific LED's color 79 | uint8_t ledIndex = rx_msg.data[0]; 80 | byte red = rx_msg.data[1]; 81 | byte green = rx_msg.data[2]; 82 | byte blue = rx_msg.data[3]; 83 | setLEDColor(ledIndex, red, green, blue); 84 | } 85 | else if (rx_msg.identifier == CAN_ALERT_ID && rx_msg.data_length_code == 4) { 86 | // Set the color of an LED array (left or right) 87 | uint8_t arrayIndex = rx_msg.data[0]; 88 | byte red = rx_msg.data[1]; 89 | byte green = rx_msg.data[2]; 90 | byte blue = rx_msg.data[3]; 91 | setArrayColor(arrayIndex, red, green, blue); 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /bolt-ons/button-bolt-on/toggle-buttons-can-broadcast.ino: -------------------------------------------------------------------------------- 1 | #include "driver/twai.h" 2 | #include 3 | #include 4 | 5 | #define POLLING_RATE_MS 1000 6 | #define BUTTON_CAN_ID 1000 7 | 8 | #define LED_GPIO 14 // GPIO pin connected to the LED 9 | #define LED_BRIGHT 100 // Brightness level (0-255) 10 | #define LED_COUNT 10 // Total number of LEDs 11 | #define BUTTON_COUNT 4 12 | 13 | #define BUTTON_1 21 14 | #define BUTTON_2 47 15 | #define BUTTON_3 48 16 | #define BUTTON_4 38 17 | 18 | 19 | // Button state structure 20 | struct ButtonState { 21 | uint32_t button_port; 22 | bool pressed; // Current button state 23 | bool last_pressed; // Previous button state 24 | bool activated; // Current LED state (on/off) 25 | }; 26 | 27 | // Configure the RGB colors for active button states 28 | CRGB button_active_colors[] = { 29 | CRGB(0, 127, 127), 30 | CRGB(0, 127, 0), 31 | CRGB(127, 0, 127), 32 | CRGB(127, 127, 127) 33 | }; 34 | 35 | // Inactive LED color 36 | CRGB inactive_color = CRGB(0, 0, 0); 37 | 38 | // Button states 39 | ButtonState button_states[] = { 40 | {BUTTON_1, false, true, false}, 41 | {BUTTON_2, false, true, false}, 42 | {BUTTON_3, false, true, false}, 43 | {BUTTON_4, false, true, false}, 44 | }; 45 | 46 | // FastLED setup 47 | CRGB leds[LED_COUNT]; // Array to hold LED colors 48 | 49 | void setup() { 50 | // Uncomment for debug output 51 | // Serial.begin(115200); 52 | 53 | Serial.println("Initializing LEDs"); 54 | FastLED.addLeds(leds, LED_COUNT); // Initialize LED strip 55 | FastLED.setBrightness(LED_BRIGHT); // Set brightness 56 | FastLED.clear(); // Clear LEDs (turn them off) 57 | FastLED.show(); 58 | 59 | Serial.println("Initializing buttons"); 60 | for (int i = 0; i < BUTTON_COUNT; i++) { 61 | pinMode(button_states[i].button_port, INPUT_PULLUP); // Configure buttons as input with pull-up resistors 62 | } 63 | 64 | Serial.println("Initializing builtin CAN peripheral"); 65 | twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT((gpio_num_t)CAN1_TX, (gpio_num_t)CAN1_RX, TWAI_MODE_NORMAL); 66 | twai_timing_config_t t_config = TWAI_TIMING_CONFIG_1MBITS(); 67 | twai_filter_config_t f_config = TWAI_FILTER_CONFIG_ACCEPT_ALL(); 68 | 69 | if (twai_driver_install(&g_config, &t_config, &f_config) == ESP_OK) { 70 | Serial.println("CAN1 driver initialized"); 71 | } else { 72 | Serial.println("Failed to initialize CAN1 driver"); 73 | } 74 | 75 | if (twai_start() == ESP_OK) { 76 | Serial.println("CAN1 interface started"); 77 | } else { 78 | Serial.println("Failed to start CAN1"); 79 | return; 80 | } 81 | } 82 | 83 | void setSwitchLEDs(int index, CRGB color) { 84 | if (index < LED_COUNT - 1) { // Ensure index does not exceed LED array 85 | leds[index] = color; 86 | leds[index + 1] = color; 87 | } 88 | } 89 | 90 | void sendCANButtonStates() { 91 | twai_message_t message; 92 | message.identifier = BUTTON_CAN_ID; 93 | message.extd = 0; 94 | message.rtr = 0; 95 | message.data_length_code = 4; 96 | 97 | for (int i = 0; i < BUTTON_COUNT; i++) { 98 | message.data[i] = button_states[i].activated; 99 | } 100 | 101 | if (twai_transmit(&message, pdMS_TO_TICKS(1000)) == ESP_OK) { 102 | Serial.println("CAN message queued for transmission"); 103 | } else { 104 | Serial.println("Failed to queue CAN message"); 105 | } 106 | } 107 | 108 | void loop() { 109 | for (int i = 0; i < BUTTON_COUNT; i++) { 110 | // Read the current button state 111 | button_states[i].pressed = digitalRead(button_states[i].button_port) == LOW; 112 | 113 | // Detect a button press (edge detection: HIGH to LOW) 114 | if (!button_states[i].last_pressed && button_states[i].pressed) { 115 | // Toggle the LED state 116 | button_states[i].activated = !button_states[i].activated; 117 | } 118 | 119 | // Update the last button state 120 | button_states[i].last_pressed = button_states[i].pressed; 121 | 122 | // Set the LED color based on the toggled state 123 | if (button_states[i].activated) { 124 | setSwitchLEDs(i * 2, button_active_colors[i]); // Turn LEDs on 125 | } else { 126 | setSwitchLEDs(i * 2, inactive_color); // Turn LEDs off 127 | } 128 | } 129 | 130 | // Update LED strip 131 | FastLED.show(); 132 | 133 | // Send button states over CAN 134 | sendCANButtonStates(); 135 | 136 | // Debounce delay 137 | delay(50); 138 | } 139 | -------------------------------------------------------------------------------- /arduino/rcp_buttons/rcp_buttons.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include "driver/twai.h" 3 | 4 | #define HEARTBEAT_RATE_MS 50 // 20hz heartbeat 5 | #define BUTTON_COUNT 4 // Number of configured buttons 6 | 7 | #define CAN1_ID 0xF6 8 | 9 | typedef struct { 10 | String name; 11 | uint8_t pin; 12 | } Button; 13 | 14 | // Define the GPIO -> Button mapping. This uses pins 7-10 on SV1 on the ASL ESP-CAN-X2 15 | Button buttons[BUTTON_COUNT] = { 16 | {"left", 14}, {"right", 21}, {"ok", 47}, {"no", 48} 17 | }; 18 | 19 | uint8_t debounce_registers[BUTTON_COUNT]; // rolling buffers of bits for debounce, see https://deepbluembedded.com/arduino-button-debouncing/ for other options 20 | uint8_t button_state; // bit packed button state 21 | uint32_t last_can_ms; // Timestamp of the last can message in millis 22 | 23 | void setup() { 24 | Serial.begin(115200); 25 | 26 | if (!setupCAN1()) { 27 | Serial.println("CAN1 initialization failure, aborting!"); 28 | return; 29 | } 30 | 31 | if (!setupGPIOButtons()) { 32 | Serial.println("GPIO button intiialization failure, aborting!"); 33 | return; 34 | } 35 | } 36 | 37 | bool setupGPIOButtons() { 38 | for (int i = 0; i < BUTTON_COUNT; i++) { 39 | pinMode(buttons[i].pin, INPUT_PULLUP); 40 | } 41 | return true; 42 | } 43 | 44 | bool setupCAN1() { 45 | Serial.println("Initializing builtin CAN peripheral"); 46 | twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT((gpio_num_t)CAN1_TX, (gpio_num_t)CAN1_RX, TWAI_MODE_NORMAL); 47 | g_config.tx_queue_len = 1; // Only allow one message to be queued, ideally nothing ever sits in the queue 48 | twai_timing_config_t t_config = TWAI_TIMING_CONFIG_500KBITS(); 49 | twai_filter_config_t f_config = TWAI_FILTER_CONFIG_ACCEPT_ALL(); 50 | 51 | if(twai_driver_install(&g_config, &t_config, &f_config) == ESP_OK) { 52 | Serial.println("CAN1 Driver initialized"); 53 | } else { 54 | Serial.println("Failed to initialze CAN1 driver"); 55 | return false; 56 | } 57 | 58 | if (twai_start() == ESP_OK) { 59 | Serial.println("CAN1 interface started"); 60 | } else { 61 | Serial.println("Failed to start CAN1"); 62 | return false; 63 | } 64 | 65 | uint32_t alerts_to_enable = TWAI_ALERT_TX_IDLE | TWAI_ALERT_TX_SUCCESS | TWAI_ALERT_TX_FAILED | TWAI_ALERT_RX_QUEUE_FULL | TWAI_ALERT_RX_DATA | TWAI_ALERT_ERR_PASS | TWAI_ALERT_BUS_ERROR; 66 | if (twai_reconfigure_alerts(alerts_to_enable, NULL) == ESP_OK) { 67 | Serial.println("CAN1 Alerts reconfigured"); 68 | } else { 69 | Serial.println("Failed to reconfigure alerts"); 70 | return false; 71 | } 72 | 73 | return true; 74 | } 75 | 76 | void sendCANMessage(uint8_t button_state) { 77 | // Send message 78 | // Configure message to transmit 79 | twai_message_t message; 80 | message.identifier = CAN1_ID; 81 | message.extd = 0; 82 | message.rtr = 0; 83 | message.data_length_code = 1; 84 | message.data[0] = button_state; 85 | 86 | // Queue message for transmission 87 | esp_err_t err = twai_transmit(&message, pdMS_TO_TICKS(HEARTBEAT_RATE_MS)); 88 | if (err == ESP_OK) { 89 | Serial.println("CAN1: Message queued for transmission"); 90 | } else if (err == ESP_ERR_TIMEOUT) { 91 | Serial.println("CAN1: Transmission failed, timeout."); 92 | } else { 93 | Serial.println("CAN1: Unknown message transmit failure."); 94 | } 95 | } 96 | 97 | void loop() { 98 | uint8_t previous_state = button_state; 99 | uint32_t now = millis(); 100 | uint32_t start_micros = micros(); 101 | // Loop through the buttons, inverting the read (high == not pressed, low == pressed) and adding it to the 102 | // end of the debounce register, then update the button state if all bits are either 1 or 0 in the debounce 103 | // register 104 | for(int i = 0; i < BUTTON_COUNT; i++) { 105 | debounce_registers[i] = (debounce_registers[i] << 1) | !digitalRead(buttons[i].pin); 106 | if (debounce_registers[i] == 0xff) { 107 | button_state |= 1 << i; 108 | } else if (debounce_registers[i] == 0) { 109 | button_state &= 1 << i ^ 0xff; 110 | } 111 | } 112 | 113 | if (previous_state != button_state) { 114 | // The button state has changed, send a CAN message immediately 115 | sendCANMessage(button_state); 116 | last_can_ms = now; 117 | } else { 118 | // No state change, see if enough time has passed for another heartbeat 119 | if (last_can_ms == 0 || now - last_can_ms >= HEARTBEAT_RATE_MS) { 120 | sendCANMessage(button_state); 121 | last_can_ms = now; 122 | } 123 | } 124 | 125 | // Try to get the loop to run approx. every 1ms. 126 | uint32_t end_micros = micros(); 127 | uint32_t micro_duration = 0; 128 | if (end_micros < start_micros) { 129 | micro_duration = (0xffffffff - start_micros) + end_micros; 130 | } else { 131 | micro_duration = end_micros - start_micros; 132 | } 133 | 134 | if (micro_duration < 1000) { 135 | delayMicroseconds(1000 - micro_duration); 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /bolt-ons/button-bolt-on/broadcast-button-state.ino: -------------------------------------------------------------------------------- 1 | #include // For TWAI (CAN) 2 | #include // For WS2812 LED control 3 | 4 | // Define GPIO pins for buttons 5 | #define BUTTON_1_PIN 21 6 | #define BUTTON_2_PIN 47 7 | #define BUTTON_3_PIN 48 8 | #define BUTTON_4_PIN 38 9 | 10 | // Define GPIO pins for CAN 11 | #define CAN_BUTTON_STATE_ID 0x200 // CAN ID for periodic button state messages 12 | #define CAN_BUTTON_EVENT_ID 0x201 // CAN ID for button event messages 13 | 14 | // Define WS2812 LED and Button configuration 15 | #define NUM_BUTTONS 4 // Number of buttons 16 | #define LED_PIN 14 // GPIO pin for WS2812 data 17 | #define NUM_LEDS (2 * NUM_BUTTONS) // Number of LEDs (2 LEDs per button) 18 | CRGB leds[NUM_LEDS]; // Array to store LED colors 19 | 20 | // Button states 21 | bool buttonStates[NUM_BUTTONS] = {0, 0, 0, 0}; // Stores the current state of each button 22 | 23 | // TWAI Configuration 24 | void setupTWAI() { 25 | twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT((gpio_num_t)CAN1_TX, (gpio_num_t)CAN1_RX, TWAI_MODE_NORMAL); 26 | twai_timing_config_t t_config = TWAI_TIMING_CONFIG_1MBITS(); 27 | twai_filter_config_t f_config = TWAI_FILTER_CONFIG_ACCEPT_ALL(); 28 | 29 | if (twai_driver_install(&g_config, &t_config, &f_config) == ESP_OK) { 30 | Serial.println("TWAI driver installed successfully."); 31 | } else { 32 | Serial.println("Failed to install TWAI driver."); 33 | } 34 | 35 | if (twai_start() == ESP_OK) { 36 | Serial.println("TWAI driver started successfully."); 37 | } else { 38 | Serial.println("Failed to start TWAI driver."); 39 | } 40 | } 41 | 42 | // Read button states and return as a boolean array 43 | void readButtonStates(bool states[]) { 44 | states[0] = !digitalRead(BUTTON_1_PIN); // Invert if buttons are active low 45 | states[1] = !digitalRead(BUTTON_2_PIN); 46 | states[2] = !digitalRead(BUTTON_3_PIN); 47 | states[3] = !digitalRead(BUTTON_4_PIN); 48 | } 49 | 50 | // Send periodic button states via CAN bus 51 | void sendButtonStates(const bool states[]) { 52 | twai_message_t tx_msg; 53 | tx_msg.identifier = CAN_BUTTON_STATE_ID; 54 | tx_msg.extd = 0; 55 | tx_msg.data_length_code = NUM_BUTTONS; 56 | 57 | for (int i = 0; i < NUM_BUTTONS; i++) { 58 | tx_msg.data[i] = states[i]; 59 | } 60 | 61 | if (twai_transmit(&tx_msg, pdMS_TO_TICKS(10)) == ESP_OK) { 62 | Serial.println("Button states sent via CAN bus."); 63 | } else { 64 | Serial.println("Failed to send button states."); 65 | } 66 | } 67 | 68 | // Send button state change event via CAN bus 69 | void sendButtonEvent(uint8_t buttonId, bool state) { 70 | twai_message_t tx_msg; 71 | tx_msg.identifier = CAN_BUTTON_EVENT_ID; 72 | tx_msg.extd = 0; 73 | tx_msg.data_length_code = 2; 74 | 75 | tx_msg.data[0] = buttonId; // Button ID 76 | tx_msg.data[1] = state; // Button state (1 = pressed, 0 = not pressed) 77 | 78 | if (twai_transmit(&tx_msg, pdMS_TO_TICKS(10)) == ESP_OK) { 79 | Serial.printf("Button %d state change sent: %d\n", buttonId + 1, state); 80 | } else { 81 | Serial.println("Failed to send button state change."); 82 | } 83 | } 84 | 85 | // Update LED colors based on button states 86 | void updateLEDs(const bool states[]) { 87 | for (int i = 0; i < NUM_BUTTONS; i++) { 88 | if (states[i]) { 89 | leds[i*2] = CRGB::Green; // Button pressed -> Green 90 | leds[(i*2)+1] = CRGB::Green; // Button pressed -> Green 91 | } 92 | else{ 93 | leds[i*2] = CRGB::Black; // Button released -> Blank 94 | leds[(i*2)+1] = CRGB::Black; // Button released -> Blank 95 | } 96 | } 97 | FastLED.show(); 98 | } 99 | 100 | void setup() { 101 | // Uncomment following line for debugging 102 | // Serial.begin(115200); 103 | 104 | // Configure button pins 105 | pinMode(BUTTON_1_PIN, INPUT_PULLUP); 106 | pinMode(BUTTON_2_PIN, INPUT_PULLUP); 107 | pinMode(BUTTON_3_PIN, INPUT_PULLUP); 108 | pinMode(BUTTON_4_PIN, INPUT_PULLUP); 109 | 110 | // Initialize FastLED 111 | FastLED.addLeds(leds, NUM_LEDS); 112 | FastLED.clear(); 113 | FastLED.show(); 114 | 115 | setupTWAI(); 116 | Serial.println("Setup complete."); 117 | } 118 | 119 | void loop() { 120 | static bool lastButtonStates[NUM_BUTTONS] = {0, 0, 0, 0}; // Previous button states 121 | static unsigned long lastPeriodicTime = 0; 122 | 123 | bool currentStates[NUM_BUTTONS]; 124 | readButtonStates(currentStates); 125 | 126 | // Send button state change events 127 | for (int i = 0; i < NUM_BUTTONS; i++) { 128 | if (currentStates[i] != lastButtonStates[i]) { // Detect state change 129 | sendButtonEvent(i, currentStates[i]); 130 | lastButtonStates[i] = currentStates[i]; // Update the last state 131 | } 132 | } 133 | 134 | // Send periodic button states every 100ms (10 Hz) 135 | if (millis() - lastPeriodicTime >= 100) { 136 | sendButtonStates(currentStates); 137 | lastPeriodicTime = millis(); 138 | } 139 | 140 | // Update LEDs based on current button states 141 | updateLEDs(currentStates); 142 | 143 | 144 | delay(50); // Small delay to debounce and prevent busy loop 145 | } 146 | 147 | -------------------------------------------------------------------------------- /arduino/CAN Forward/can_demo_forward.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * CAN Bus Bridge between ESP32 TWAI (CAN1) and MCP2515 (CAN2) 3 | * 4 | * Description: 5 | * This code creates a bidirectional bridge between two CAN interfaces: 6 | * 1. CAN1 - ESP32's native TWAI controller (CAN protocol) 7 | * 2. CAN2 - External MCP2515 module connected via SPI 8 | * 9 | * Functionality: 10 | * - Monitors CAN1 bus for incoming messages 11 | * - Forwards all received CAN1 messages to CAN2 12 | * - Prints all transactions to Serial monitor for debugging 13 | * - Handles basic error detection and reporting 14 | * 15 | * Hardware Configuration: 16 | * CAN1 (TWAI): 17 | * - RX: GPIO6 18 | * - TX: GPIO7 19 | * - Speed: 250kbps 20 | * 21 | * CAN2 (MCP2515): 22 | * - SPI Bus: HSPI 23 | * - SCK: GPIO12 24 | * - MISO: GPIO13 25 | * - MOSI: GPIO11 26 | * - CS: GPIO10 27 | * - Speed: 1Mbps 28 | * - Crystal: 16MHz 29 | * 30 | * Libraries Required: 31 | * - driver/twai.h (ESP32 native) 32 | * - MCP_CAN_lib (https://github.com/coryjfowler/MCP_CAN_lib) 33 | * - SPI.h (Arduino/ESP32) 34 | * 35 | * Notes: 36 | * - Currently forwards messages unmodified 37 | * - Add message filtering/modification in CAN1_readMsg() if needed 38 | * - Serial monitor runs at 115200 baud 39 | */ 40 | 41 | #include 42 | #include // ADD library https://github.com/coryjfowler/MCP_CAN_lib 43 | #include 44 | 45 | // CAN1 (TWAI) Pins 46 | #define CAN1_RX_PIN GPIO_NUM_6 47 | #define CAN1_TX_PIN GPIO_NUM_7 48 | 49 | // CAN2 (MCP2515) Custom SPI Pins 50 | #define CAN2_CS_PIN GPIO_NUM_10 51 | #define CAN2_SPI_SCK GPIO_NUM_12 52 | #define CAN2_SPI_MISO GPIO_NUM_13 53 | #define CAN2_SPI_MOSI GPIO_NUM_11 54 | 55 | SPIClass CAN2_SPI(HSPI); // HSPI bus 56 | MCP_CAN CAN2(&CAN2_SPI, CAN2_CS_PIN); 57 | 58 | byte led_state = LOW; 59 | 60 | bool sendDataCAN2(unsigned long can_id, byte ext_flag, byte *data, unsigned long data_len) 61 | { 62 | 63 | // Serial.printf("Sending message to CAN2 [0x%03lX]: ", can_id); 64 | Serial.printf("Sending message to CAN2 [0x%08lX %s]: ", can_id, ext_flag ? "EXT" : "STD"); // Print the Identifier and whether it is EXT or STD. 65 | for (byte i = 0; i < data_len; i++) 66 | { 67 | Serial.printf("0x%02X", data[i]); 68 | if (i < data_len - 1) 69 | Serial.print(", "); 70 | } 71 | Serial.println(); 72 | 73 | // Send the message via CAN2 74 | byte result = CAN2.sendMsgBuf(can_id, ext_flag, data_len, data); 75 | 76 | if (result == CAN_OK) 77 | { 78 | Serial.println("Message sent successfully via CAN2"); 79 | return true; 80 | } 81 | else 82 | { 83 | Serial.printf("Message send failed, code: %d\n", result); 84 | return false; 85 | } 86 | } 87 | 88 | void CAN1_readMsg() 89 | { 90 | twai_message_t message; 91 | 92 | while (twai_receive(&message, 0) == ESP_OK) // Non-blocking 93 | { 94 | // Print original CAN1 message 95 | Serial.printf("[CAN1 0x%X %s]: ", message.identifier, message.extd ? "EXT" : "STD"); // To check if the frame is STD or EXT alongwith the Identifier. 96 | for (int i = 0; i < message.data_length_code; i++) 97 | { 98 | Serial.printf("0x%02X", message.data[i]); 99 | if (i < message.data_length_code - 1) 100 | Serial.print(", "); 101 | } 102 | Serial.println(); 103 | 104 | // Here you can modify the data before it is sent to CAN2 105 | 106 | // Send modified message to CAN2 107 | if (sendDataCAN2(message.identifier, message.extd, message.data, message.data_length_code)) { 108 | digitalWrite(LED_BUILTIN, led_state); 109 | led_state = led_state ? LOW : HIGH; 110 | } 111 | } 112 | } 113 | 114 | bool setupCAN1(void) 115 | { 116 | twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT((gpio_num_t)CAN1_TX_PIN, (gpio_num_t)CAN1_RX_PIN, TWAI_MODE_NORMAL); 117 | twai_timing_config_t t_config = TWAI_TIMING_CONFIG_250KBITS(); // CAN1 at 250 kbps 118 | twai_filter_config_t f_config = TWAI_FILTER_CONFIG_ACCEPT_ALL(); // Accept all messages 119 | 120 | if (twai_driver_install(&g_config, &t_config, &f_config) != ESP_OK) 121 | { 122 | Serial.println("Failed to install TWAI driver"); 123 | return false; 124 | } 125 | 126 | if (twai_start() != ESP_OK) 127 | { 128 | Serial.println("Failed to start TWAI driver"); 129 | return false; 130 | } 131 | 132 | Serial.println("CAN1 (TWAI) started. Waiting for messages..."); 133 | return true; 134 | } 135 | 136 | bool setupCAN2() 137 | { 138 | CAN2_SPI.begin(CAN2_SPI_SCK, CAN2_SPI_MISO, CAN2_SPI_MOSI, CAN2_CS_PIN); 139 | 140 | if (CAN2.begin(MCP_STDEXT, CAN_1000KBPS, MCP_16MHZ) == CAN_OK) 141 | { 142 | CAN2.setMode(MCP_NORMAL); 143 | return true; 144 | } 145 | else 146 | { 147 | return false; 148 | } 149 | } 150 | 151 | void setup() 152 | { 153 | Serial.begin(115200); 154 | 155 | //configure LED 156 | pinMode(LED_BUILTIN, OUTPUT); 157 | 158 | // Setup CAN1 (TWAI) 159 | Serial.println("Initializing CAN1..."); 160 | if (!setupCAN1()) 161 | { 162 | Serial.println("Failed to setup CAN1. Exiting..."); 163 | while (1) 164 | ; 165 | } 166 | 167 | // Setup CAN2 (MCP2515) 168 | Serial.println("Initializing CAN2..."); 169 | if (!setupCAN2()) 170 | { 171 | Serial.println("Failed to initialize CAN2. Exiting..."); 172 | while (1) 173 | ; 174 | } 175 | } 176 | 177 | void loop() 178 | { 179 | CAN1_readMsg(); // Read from CAN1 and forward to CAN2 with data modification 180 | } 181 | -------------------------------------------------------------------------------- /arduino/CAN Forward/can_demo_forward_demo.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * CAN Bus Dual-Interface Test Program for ESP32 3 | * 4 | * Description: 5 | * Demonstrates communication between two CAN interfaces: 6 | * 1. CAN1 - ESP32's native TWAI controller (transmitter) 7 | * 2. CAN2 - External MCP2515 module (receiver) 8 | * 9 | * Functionality: 10 | * - Periodically transmits test messages via CAN1 (every 1 second) 11 | * - Listens for incoming messages on CAN2 12 | * - Prints all transactions to Serial monitor 13 | * 14 | * Hardware Configuration: 15 | * CAN1 (TWAI - Transmitter): 16 | * - TX: GPIO7 17 | * - RX: GPIO6 18 | * - Speed: 250kbps 19 | * 20 | * CAN2 (MCP2515 - Receiver): 21 | * - SPI Bus: HSPI 22 | * - SCK: GPIO12 23 | * - MISO: GPIO13 24 | * - MOSI: GPIO11 25 | * - CS: GPIO10 26 | * - Speed: 1Mbps 27 | * - Crystal: 16MHz 28 | * 29 | * Message Details: 30 | * - Test message ID: 0x123 31 | * - Test data: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 32 | * - Sent every 1000ms 33 | * 34 | * Libraries Required: 35 | * - driver/twai.h (ESP32 native) 36 | * - MCP_CAN_lib (https://github.com/coryjfowler/MCP_CAN_lib) 37 | * - SPI.h (Arduino/ESP32) 38 | * 39 | * Usage: 40 | * 1. Connect CAN1 and CAN2 buses properly 41 | * 2. Monitor serial output at 115200 baud 42 | * 3. Messages sent on CAN1 should appear on CAN2 if properly connected 43 | */ 44 | 45 | #include 46 | #include // ADD library https://github.com/coryjfowler/MCP_CAN_lib 47 | #include 48 | 49 | #define CAN1_TX_PIN GPIO_NUM_7 50 | #define CAN1_RX_PIN GPIO_NUM_6 51 | 52 | // Custom SPI Pins for MCP2515 53 | #define CAN2_CS_PIN GPIO_NUM_10 54 | #define CAN2_SPI_SCK GPIO_NUM_12 55 | #define CAN2_SPI_MISO GPIO_NUM_13 56 | #define CAN2_SPI_MOSI GPIO_NUM_11 57 | 58 | SPIClass CAN2_SPI(HSPI); // HSPI bus 59 | MCP_CAN CAN2(&CAN2_SPI, CAN2_CS_PIN); 60 | 61 | bool setupCAN2() 62 | { 63 | CAN2_SPI.begin(CAN2_SPI_SCK, CAN2_SPI_MISO, CAN2_SPI_MOSI, CAN2_CS_PIN); 64 | 65 | if (CAN2.begin(MCP_STDEXT, CAN_1000KBPS, MCP_16MHZ) == CAN_OK) { 66 | CAN2.setMode(MCP_NORMAL); 67 | return true; 68 | } else { 69 | return false; 70 | } 71 | } 72 | 73 | 74 | bool setupCAN1() 75 | { 76 | twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT((gpio_num_t)CAN1_TX_PIN, (gpio_num_t)CAN1_RX_PIN, TWAI_MODE_NORMAL); 77 | twai_timing_config_t t_config = TWAI_TIMING_CONFIG_250KBITS(); // 250 kbps 78 | twai_filter_config_t f_config = TWAI_FILTER_CONFIG_ACCEPT_ALL(); 79 | 80 | if (twai_driver_install(&g_config, &t_config, &f_config) != ESP_OK) { 81 | Serial.println("Failed to install TWAI driver"); 82 | return false; 83 | } 84 | 85 | if (twai_start() != ESP_OK) { 86 | Serial.println("Failed to start TWAI driver"); 87 | return false; 88 | } 89 | 90 | Serial.println("TWAI (CAN1) sender started..."); 91 | return true; 92 | } 93 | 94 | void sendCAN1Message(unsigned long canId, byte len, byte* data) 95 | { 96 | twai_message_t message; 97 | message.identifier = canId; // Standard CAN1 ID 98 | message.extd = 0; // Standard frame 99 | message.rtr = 0; // Not a remote frame 100 | message.data_length_code = len; // 8-byte data frame 101 | 102 | for (int i = 0; i < message.data_length_code; i++) { 103 | message.data[i] = data[i]; 104 | } 105 | 106 | esp_err_t result = twai_transmit(&message, pdMS_TO_TICKS(100)); 107 | if (result == ESP_OK) { 108 | Serial.print("Message sent: [0x"); 109 | Serial.print(message.identifier, HEX); 110 | Serial.print("] "); 111 | for (int i = 0; i < message.data_length_code; i++) { 112 | Serial.printf("0x%02X", message.data[i]); 113 | if (i < message.data_length_code - 1) Serial.print(", "); 114 | } 115 | Serial.println(); 116 | } else if (result == ESP_ERR_TIMEOUT) { 117 | Serial.println("Transmit timeout – bus busy or buffer full"); 118 | } else { 119 | Serial.printf("Transmit error: %s\n", esp_err_to_name(result)); 120 | } 121 | } 122 | 123 | void setup() 124 | { 125 | Serial.begin(115200); 126 | delay(1000); 127 | Serial.println("Initializing CAN1 sender..."); 128 | if (!setupCAN1()) { 129 | Serial.println("Setup failed. Halting."); 130 | while (1); 131 | } 132 | if (!setupCAN2()) { 133 | Serial.println("Failed to initialize CAN2. Check connections."); 134 | while (1); 135 | } else { 136 | Serial.println("MCP2515 Initialized Successfully (Receiver)"); 137 | } 138 | } 139 | 140 | void receiveCAN2() 141 | { 142 | if (CAN2.checkReceive() == CAN_MSGAVAIL) { 143 | long unsigned int canId; 144 | byte len; 145 | byte buf[8]; 146 | 147 | CAN2.readMsgBuf(&canId, &len, buf); 148 | 149 | Serial.printf("Received Msg from [0x%03lX]: ", canId); 150 | for (byte i = 0; i < len; i++) { 151 | Serial.printf("0x%02X", buf[i]); 152 | if (i < len - 1) Serial.print(", "); 153 | } 154 | Serial.println(); 155 | } 156 | } 157 | unsigned long prevTime = 0; 158 | void loop() 159 | { 160 | 161 | byte data[8] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}; // Example data 162 | unsigned long canId = 0x123; // Example CAN ID 163 | byte len = 6; 164 | unsigned long currentTime = millis(); 165 | if (currentTime - prevTime >= 1000) { // Send every second 166 | sendCAN1Message(canId, len, data); // Send CAN1 message 167 | prevTime = currentTime; 168 | } 169 | 170 | receiveCAN2(); // Check for incoming messages on CAN2 171 | } 172 | -------------------------------------------------------------------------------- /arduino/ping_pong/ping_pong.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Simple example of sending/receiving messages between the two CAN interfaces on the ESP32-CAN-X2 dev board. 3 | https://wiki.autosportlabs.com/ESP32-CAN-X2 4 | 5 | This example relies on the ESP32 supplied TWAI api for interfacing with CAN1, and the Longan Labs mcp_canbus library 6 | for interfacing with the MCP2515 on CAN2. 7 | */ 8 | 9 | #include 10 | #include 11 | #include "mcp_canbus.h" 12 | #include "driver/twai.h" 13 | 14 | #define POLLING_RATE_MS 1000 15 | 16 | #define CAN1_ID 0xF6 17 | #define CAN2_ID 0xF7 18 | 19 | MCP_CAN CAN(CS); 20 | 21 | void setup() { 22 | Serial.begin(115200); 23 | pinMode(LED_BUILTIN, OUTPUT); 24 | 25 | Serial.println("Initializing builtin CAN peripheral"); 26 | twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT((gpio_num_t)CAN1_TX, (gpio_num_t)CAN1_RX, TWAI_MODE_NORMAL); 27 | twai_timing_config_t t_config = TWAI_TIMING_CONFIG_500KBITS(); 28 | twai_filter_config_t f_config = TWAI_FILTER_CONFIG_ACCEPT_ALL(); 29 | 30 | if(twai_driver_install(&g_config, &t_config, &f_config) == ESP_OK) { 31 | Serial.println("CAN1 Driver initialized"); 32 | } else { 33 | Serial.println("Failed to initialze CAN1 driver"); 34 | return; 35 | } 36 | 37 | if (twai_start() == ESP_OK) { 38 | Serial.println("CAN1 interface started"); 39 | } else { 40 | Serial.println("Failed to start CAN1"); 41 | return; 42 | } 43 | 44 | uint32_t alerts_to_enable = TWAI_ALERT_TX_IDLE | TWAI_ALERT_TX_SUCCESS | TWAI_ALERT_TX_FAILED | TWAI_ALERT_RX_QUEUE_FULL | TWAI_ALERT_RX_DATA | TWAI_ALERT_ERR_PASS | TWAI_ALERT_BUS_ERROR; 45 | if (twai_reconfigure_alerts(alerts_to_enable, NULL) == ESP_OK) { 46 | Serial.println("CAN1 Alerts reconfigured"); 47 | } else { 48 | Serial.println("Failed to reconfigure alerts"); 49 | return; 50 | } 51 | 52 | if (CAN_OK == CAN.begin(CAN_500KBPS)) { 53 | Serial.println("CAN2 interface started"); 54 | } else { 55 | Serial.println("Failed to start CAN2"); 56 | while (1); 57 | } 58 | } 59 | 60 | static void sendCAN1() { 61 | // Send message 62 | // Configure message to transmit 63 | twai_message_t message; 64 | message.identifier = CAN1_ID; 65 | message.extd = 0; 66 | message.rtr = 0; 67 | message.data_length_code = 4; 68 | message.data[0] = (int8_t)'p'; 69 | message.data[1] = (int8_t)'i'; 70 | message.data[2] = (int8_t)'n'; 71 | message.data[3] = (int8_t)'g'; 72 | 73 | // Queue message for transmission 74 | if (twai_transmit(&message, pdMS_TO_TICKS(1000)) == ESP_OK) { 75 | Serial.println("CAN1: Message queued for transmission"); 76 | } else { 77 | Serial.println("CAN1: Failed to queue message for transmission"); 78 | } 79 | } 80 | 81 | static void readCAN1() { 82 | twai_message_t message; 83 | while (twai_receive(&message, 0) == ESP_OK) { 84 | 85 | Serial.print("CAN1: Received "); 86 | // Process received message 87 | if (message.extd) { 88 | Serial.print("extended "); 89 | } else { 90 | Serial.print("standard "); 91 | } 92 | 93 | if (message.rtr) { 94 | Serial.print("RTR "); 95 | } 96 | 97 | Serial.printf("packet with id 0x%x", message.identifier); 98 | 99 | if (message.rtr) { 100 | Serial.printf(" and requested length %d\n", message.data_length_code); 101 | } else { 102 | Serial.printf(" and length %d\n", message.data_length_code); 103 | Serial.printf("CAN1: Data: %.*s\n", message.data_length_code, message.data); 104 | } 105 | } 106 | } 107 | 108 | void sendCAN2() { 109 | unsigned char msg[4] = {'p', 'o', 'n', 'g'}; 110 | 111 | if (CAN_OK == CAN.sendMsgBuf(CAN2_ID, 0, 4, msg)) { 112 | Serial.println("CAN2: Message queued for transmission"); 113 | } else { 114 | Serial.println("CAN2: Failed to queue message for transmission"); 115 | } 116 | } 117 | 118 | void readCAN2() { 119 | // try to parse packet 120 | unsigned char len = 0; 121 | unsigned char buf[8]; 122 | 123 | if (CAN_MSGAVAIL == CAN.checkReceive()) { 124 | Serial.print("CAN2: Received "); 125 | 126 | CAN.readMsgBuf(&len, buf); 127 | 128 | 129 | if (CAN.isExtendedFrame()) { 130 | Serial.print("extended "); 131 | } else { 132 | Serial.print("standard "); 133 | } 134 | 135 | if (CAN.isRemoteRequest()) { 136 | // Remote transmission request, packet contains no data 137 | Serial.print("RTR "); 138 | } 139 | 140 | Serial.printf("packet with id 0x%x", CAN.getCanId()); 141 | 142 | if (CAN.isRemoteRequest()) { 143 | Serial.printf(" and requested length %d\n", len); 144 | } else { 145 | Serial.printf(" and length %d\n", len); 146 | Serial.printf("CAN2: Data: %.*s\n", len, buf); 147 | sendCAN2(); 148 | } 149 | Serial.println(); 150 | } 151 | } 152 | 153 | 154 | void loop() { 155 | Serial.println("MAIN: Disable LED"); 156 | digitalWrite(LED_BUILTIN, HIGH); 157 | delay(1000); 158 | 159 | // Check if alert happened 160 | uint32_t alerts_triggered; 161 | twai_read_alerts(&alerts_triggered, pdMS_TO_TICKS(POLLING_RATE_MS)); 162 | twai_status_info_t twaistatus; 163 | twai_get_status_info(&twaistatus); 164 | 165 | // Handle alerts 166 | if (alerts_triggered & TWAI_ALERT_ERR_PASS) { 167 | Serial.println("CAN1: Alert: TWAI controller has become error passive."); 168 | } 169 | if (alerts_triggered & TWAI_ALERT_BUS_ERROR) { 170 | Serial.println("CAN1: Alert: A (Bit, Stuff, CRC, Form, ACK) error has occurred on the bus."); 171 | Serial.printf("CAN1: Bus error count: %d\n", twaistatus.bus_error_count); 172 | } 173 | if (alerts_triggered & TWAI_ALERT_TX_FAILED) { 174 | Serial.println("CAN1: Alert: The Transmission failed."); 175 | Serial.printf("CAN1: TX buffered: %d\t", twaistatus.msgs_to_tx); 176 | Serial.printf("CAN1: TX error: %d\t", twaistatus.tx_error_counter); 177 | Serial.printf("CAN1: TX failed: %d\n", twaistatus.tx_failed_count); 178 | } 179 | if (alerts_triggered & TWAI_ALERT_RX_QUEUE_FULL) { 180 | Serial.println("CAN1: Alert: The RX queue is full causing a received frame to be lost."); 181 | Serial.printf("CAN1: RX buffered: %d\t", twaistatus.msgs_to_rx); 182 | Serial.printf("CAN1: RX missed: %d\t", twaistatus.rx_missed_count); 183 | Serial.printf("CAN1: RX overrun %d\n", twaistatus.rx_overrun_count); 184 | } 185 | if (alerts_triggered & TWAI_ALERT_TX_SUCCESS) { 186 | Serial.println("CAN1: Alert: The Transmission was successful."); 187 | Serial.printf("CAN1: TX buffered: %d\n", twaistatus.msgs_to_tx); 188 | } 189 | // Check if message is received 190 | if (alerts_triggered & TWAI_ALERT_RX_DATA) { 191 | readCAN1(); 192 | } 193 | 194 | // Send message 195 | sendCAN1(); 196 | 197 | 198 | Serial.println("MAIN: Enable LED"); 199 | digitalWrite(LED_BUILTIN, LOW); 200 | delay(1000); 201 | readCAN2(); 202 | } 203 | -------------------------------------------------------------------------------- /bolt-ons/gps-bolt-on/GPS_2_CAN.ino: -------------------------------------------------------------------------------- 1 | /* 2 | This code is for an ESP32-CAN-X2 microcontroller to read GPS data from a GPS module and transmit it over a CAN bus network. 3 | - **TinyGPSPlus**: A library by Mikal Hart used to parse and decode NMEA sentences from GPS modules, providing easy access to location data such as latitude, longitude, speed, and quality indicators. 4 | The code initializes a hardware serial connection for the GPS module and a CAN bus interface for broadcasting the parsed GPS data. 5 | 6 | **GPS bolt-on Pin Configurations** 7 | - Rx to GPS module (tx from ESP32) - pin 17 of SV1 - GPIO40 of ESP32 8 | - Tx from GPS module (rx to ESP32) - pin 18 of SV1 - GPIO41 of ESP32 9 | - P1PPS from GPS module - pin 16 of SV1 - GPIO39 of ESP32 10 | - PSE_SEL from GPS moduel - pin 11 of SV1 - GPIO45 of ESP32 11 | 12 | **CAN Broadcasting the following information:** 13 | 14 | - **CAN ID 100**: 15 | - Latitude in signed decimal degrees. 4 byte payload (Multiply value by 1000000 to get 6 digits of precision, pack into 4 bytes) 16 | - CAN byte offset 0-3 17 | - Longitude in signed decimal degrees. 4 byte payload (Multiply value by 1000000 to get 6 digits of precision, pack into 4 bytes) 18 | - CAN byte offset 4-7 19 | 20 | - **CAN ID 101**: 21 | - Speed in km/h. 2 byte payload, offset 0 (Multiply by 100 to get 2 digits of precision, pack into two bytes) 22 | - GPS quality indicator. 1 byte payload, offset 2 (value is typically 0,1,2) 23 | - GPS Satellite count. 1 byte payload, offset 3 24 | - GPSDOP (dilution of precision). 2 byte payload, offset 4 (Multiply by 100 to get 2 digits of precision, pack into two bytes) 25 | 26 | */ 27 | 28 | #include 29 | #include 30 | #include "driver/twai.h" 31 | #include 32 | 33 | // Initialize TinyGPS++ 34 | TinyGPSPlus gps; 35 | 36 | // CAN1 IDs for broadcasting GPS data 37 | #define CAN_ID_LAT_LNG 100 38 | #define CAN_ID_SPEED_QUALITY 101 39 | 40 | // Define CAN1 TX and RX pins 41 | #define CAN1_TX 7 // Adjust based on your setup 42 | #define CAN1_RX 6 // Adjust based on your setup 43 | 44 | // Desired update rate in Hz (1,5, 10, 25, 50) 45 | static const uint8_t updateRateHz = 10; 46 | 47 | // Baud-rate code for 115200 is 5 48 | static const uint8_t baudCode115k = 5; 49 | 50 | // manages how often we send GPS broadcasts 51 | // In your globals 52 | static uint32_t last_gps_broadcast = 0; 53 | const uint32_t gps_broadcast_interval = 1000 / updateRateHz; // e.g. 100 ms 54 | 55 | void configureSkytraqBaudRate(uint8_t baudCode) { 56 | // Payload bytes: { MsgID=0x05, COM_port=0, BaudCode, Attributes=0 } 57 | const uint8_t payloadLen = 4; 58 | uint8_t payload[payloadLen] = { 0x05, 0x00, baudCode, 0x00 }; 59 | 60 | // XOR-checksum over the payload bytes 61 | uint8_t checksum = 0; 62 | for (uint8_t i = 0; i < payloadLen; i++) { 63 | checksum ^= payload[i]; 64 | } 65 | 66 | // Build the full packet: 67 | // A0 A1 00 04 [payload…] [checksum] 0D 0A 68 | uint8_t pkt[2 + 2 + payloadLen + 1 + 2] = { 69 | 0xA0, 0xA1, // header 70 | 0x00, payloadLen, // payload length MSB=0, LSB=4 71 | payload[0], payload[1], payload[2], payload[3], // payload 72 | checksum, // XOR of payload[] 73 | 0x0D, 0x0A // terminator 74 | }; 75 | 76 | Serial2.write(pkt, sizeof(pkt)); 77 | } 78 | 79 | void configureSkytraqUpdateRate(uint8_t rateHz) { 80 | // Payload bytes: { MsgID=0x0E, Rate, Attributes=0 } 81 | const uint8_t payloadLen = 3; 82 | uint8_t payload[payloadLen] = { 0x0E, rateHz, 0x00 }; 83 | 84 | // XOR‐checksum over the payload bytes 85 | uint8_t checksum = 0; 86 | for (uint8_t i = 0; i < payloadLen; i++) { 87 | checksum ^= payload[i]; 88 | } 89 | 90 | // Build the full packet: 91 | // A0 A1 00 03 [payload…] [checksum] 0D 0A 92 | uint8_t pkt[2 + 2 + payloadLen + 1 + 2] = { 93 | 0xA0, 0xA1, // header 94 | 0x00, payloadLen, // payload length MSB=0, LSB=3 95 | payload[0], payload[1], payload[2], // payload 96 | checksum, // XOR of payload[] 97 | 0x0D, 0x0A // terminator 98 | }; 99 | 100 | Serial2.write(pkt, sizeof(pkt)); 101 | } 102 | 103 | void setup() { 104 | Serial.begin(115200); // Initialize serial communication with the Serial Monitor 105 | 106 | // Setup GPS 107 | Serial2.begin(9600, SERIAL_8N1, 41, 40); // Initialize serial communication with the GPS module using hardware Serial2 108 | configureSkytraqBaudRate(baudCode115k); 109 | // give module a moment to switch 110 | delay(1000); 111 | Serial2.begin(115200); 112 | configureSkytraqUpdateRate(updateRateHz); 113 | Serial.println("GPS Module Initialized"); 114 | 115 | // CAN1 Initialization 116 | Serial.println("Initializing CAN1..."); 117 | twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT((gpio_num_t)CAN1_TX, (gpio_num_t)CAN1_RX, TWAI_MODE_NORMAL); 118 | twai_timing_config_t t_config = TWAI_TIMING_CONFIG_1MBITS(); 119 | twai_filter_config_t f_config = TWAI_FILTER_CONFIG_ACCEPT_ALL(); 120 | 121 | if (twai_driver_install(&g_config, &t_config, &f_config) == ESP_OK) { 122 | Serial.println("CAN1 Driver initialized"); 123 | } else { 124 | Serial.println("Failed to initialize CAN1 driver"); 125 | return; 126 | } 127 | 128 | if (twai_start() == ESP_OK) { 129 | Serial.println("CAN1 interface started"); 130 | } else { 131 | Serial.println("Failed to start CAN1"); 132 | return; 133 | } 134 | } 135 | 136 | void broadcast_gps() { 137 | // Prepare the messages 138 | twai_message_t message_lat_lng; 139 | twai_message_t message_speed_quality; 140 | 141 | // Latitude and Longitude 142 | int32_t latitude = gps.location.lat() * 1000000; // Convert to signed decimal degrees with 6 digits of precision 143 | int32_t longitude = gps.location.lng() * 1000000; // Convert to signed decimal degrees with 6 digits of precision 144 | 145 | message_lat_lng.identifier = CAN_ID_LAT_LNG; 146 | message_lat_lng.extd = 0; // Standard Frame 147 | message_lat_lng.rtr = 0; // Data Frame 148 | message_lat_lng.data_length_code = 8; // 8-byte payload 149 | 150 | memcpy(&message_lat_lng.data[0], &latitude, 4); // First 4 bytes for latitude 151 | memcpy(&message_lat_lng.data[4], &longitude, 4); // Next 4 bytes for longitude 152 | 153 | // Speed and GPS stats indicator 154 | int16_t speed = gps.speed.kmph() * 100; // Convert speed to 2 decimal precision 155 | int16_t hdop_value = gps.hdop.value(); // Note, HDOP is pre-scaled to two digits of precision by tinyGPS 156 | 157 | uint8_t gps_quality; 158 | if (!gps.hdop.isValid()) { 159 | gps_quality = 0; // no sat data at all 160 | } 161 | else if (gps.location.isValid()) { 162 | gps_quality = 2; // full 3D fix 163 | } 164 | else { 165 | gps_quality = 1; // just satellites / 2D fix 166 | } 167 | 168 | message_speed_quality.identifier = CAN_ID_SPEED_QUALITY; 169 | message_speed_quality.extd = 0; // Standard Frame 170 | message_speed_quality.rtr = 0; // Data Frame 171 | message_speed_quality.data_length_code = 6; // 5-byte payload 172 | 173 | memcpy(&message_speed_quality.data[0], &speed, 2); // First 2 bytes for speed 174 | message_speed_quality.data[2] = gps_quality; // 1 byte for GPS quality indicator 175 | message_speed_quality.data[3] = gps.satellites.value(); //satellite count 176 | memcpy(&message_speed_quality.data[4], &hdop_value, 2); // 2 bytes for HDOP 177 | 178 | // Send messages over CAN1 179 | if (twai_transmit(&message_lat_lng, pdMS_TO_TICKS(1000)) == ESP_OK) { 180 | Serial.println("CAN1: tx lat/lon"); 181 | } else { 182 | Serial.println("CAN1: Failed to send Latitude and Longitude data"); 183 | } 184 | 185 | if (twai_transmit(&message_speed_quality, pdMS_TO_TICKS(1000)) == ESP_OK) { 186 | Serial.println("CAN1: tx speed/qual"); 187 | } else { 188 | Serial.println("CAN1: Failed to send Speed and GPS quality data"); 189 | } 190 | } 191 | 192 | void check_send_gps() { 193 | while (Serial2.available() > 0) { 194 | //read in serial data, feed it to the GPS library 195 | //so it can construct GPS udpates 196 | char c = Serial2.read(); 197 | gps.encode(c); // Parse the NMEA sentence 198 | 199 | // time to broadcast? 200 | uint32_t now = millis(); 201 | if (now - last_gps_broadcast >= gps_broadcast_interval) { 202 | broadcast_gps(); 203 | last_gps_broadcast = now; 204 | } 205 | } 206 | } 207 | 208 | void loop() { 209 | check_send_gps(); 210 | } 211 | -------------------------------------------------------------------------------- /projects/GPS_and_sensor_broadcast/gps_and_sensor_broadcast.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Project to combine GPS CAN bus broadcast with the GPS-bolt-on and also integrate a simple sensor reading using a GPIO. 3 | 4 | System is powered by 12v DC, which is connected to the board with a 3 pin cable: 5 | * 12v 6 | * ground 7 | * sensor connection 8 | 9 | Sensor is connected to a digital switch that is powered by 12v. When the switch is activated, the switch output is connected to 12v. 10 | When the switch output is not activated, there is a pulldown to ground. Therefore, with this design the ESP32's GPIO input must be protected. 11 | 12 | Input circuit protection diagram: 13 | 14 | Sensor output ──[12 V pull-up]───┐ 15 | │ 16 | ┌┴┐ 17 | │R│ 4.7K 1/4 W current limiting resistor 18 | └┬┘ 19 | │ 20 | +──► ESP32 GPIO 47 21 | │ 22 | ┌┴┐ 23 | --- cathode (band) 24 | | | 25 | │Z│ 1N4728A (3.6 V zener) to GND 26 | └┬┘ 27 | │ 28 | GND 29 | 30 | 31 | **GPS bolt-on Pin Configurations** 32 | - Rx to GPS module (tx from ESP32) - pin 17 of SV1 - GPIO40 of ESP32 33 | - Tx from GPS module (rx to ESP32) - pin 18 of SV1 - GPIO41 of ESP32 34 | - P1PPS from GPS module - pin 16 of SV1 - GPIO39 of ESP32 35 | - PSE_SEL from GPS moduel - pin 11 of SV1 - GPIO45 of ESP32 36 | 37 | **CAN Broadcasting the following information:** 38 | 39 | - **CAN ID 100**: 40 | - Latitude in signed decimal degrees. 4 byte payload (Multiply value by 1000000 to get 6 digits of precision, pack into 4 bytes) 41 | - CAN byte offset 0-3 42 | - Longitude in signed decimal degrees. 4 byte payload (Multiply value by 1000000 to get 6 digits of precision, pack into 4 bytes) 43 | - CAN byte offset 4-7 44 | 45 | - **CAN ID 101**: 46 | - Speed in km/h. 2 byte payload, offset 0 (Multiply by 100 to get 2 digits of precision, pack into two bytes) 47 | - GPS quality indicator. 1 byte payload, offset 2 (value is typically 0,1,2) 48 | - GPS Satellite count. 1 byte payload, offset 3 49 | - GPSDOP (dilution of precision). 2 byte payload, offset 4 (Multiply by 100 to get 2 digits of precision, pack into two bytes) 50 | 51 | ** CAN ID 102** 52 | - A counter to indicate the main program loop is basically alive (byte 0) 53 | - A sensor reading that sends 1 if the sensor output is activated (connected to ground) (byte 1) 54 | */ 55 | 56 | #include 57 | #include 58 | #include "driver/twai.h" 59 | #include 60 | 61 | // Initialize TinyGPS++ 62 | TinyGPSPlus gps; 63 | 64 | // GPIO pin for level sensor 65 | #define GPIO_SENSOR 47 66 | 67 | // CAN1 IDs for broadcasting GPS data 68 | #define CAN_ID_LAT_LNG 100 69 | #define CAN_ID_SPEED_QUALITY 101 70 | #define CAN_ID_COUNTER 102 71 | 72 | // Define CAN1 TX and RX pins 73 | #define CAN1_TX 7 // Adjust based on your setup 74 | #define CAN1_RX 6 // Adjust based on your setup 75 | 76 | // Desired update rate in Hz (1,5, 10, 25, 50) 77 | static const uint8_t updateRateHz = 10; 78 | 79 | // Baud-rate code for 115200 is 5 80 | static const uint8_t baudCode115k = 5; 81 | 82 | // A counter that will be broadcast to prove 83 | // the system is alive 84 | static uint8_t counter = 0; 85 | static uint32_t last_counter_increment_time = 0; 86 | 87 | // manages how often we send GPS broadcasts 88 | // In your globals 89 | static uint32_t last_gps_broadcast = 0; 90 | const uint32_t gps_broadcast_interval = 1000 / updateRateHz; // e.g. 100 ms 91 | static bool led_state = false; 92 | static bool can_init = false; 93 | 94 | void configureSkytraqBaudRate(uint8_t baudCode) { 95 | // Payload bytes: { MsgID=0x05, COM_port=0, BaudCode, Attributes=0 } 96 | const uint8_t payloadLen = 4; 97 | uint8_t payload[payloadLen] = { 0x05, 0x00, baudCode, 0x00 }; 98 | 99 | // XOR-checksum over the payload bytes 100 | uint8_t checksum = 0; 101 | for (uint8_t i = 0; i < payloadLen; i++) { 102 | checksum ^= payload[i]; 103 | } 104 | 105 | // Build the full packet: 106 | // A0 A1 00 04 [payload…] [checksum] 0D 0A 107 | uint8_t pkt[2 + 2 + payloadLen + 1 + 2] = { 108 | 0xA0, 0xA1, // header 109 | 0x00, payloadLen, // payload length MSB=0, LSB=4 110 | payload[0], payload[1], payload[2], payload[3], // payload 111 | checksum, // XOR of payload[] 112 | 0x0D, 0x0A // terminator 113 | }; 114 | 115 | Serial2.write(pkt, sizeof(pkt)); 116 | } 117 | 118 | void configureSkytraqUpdateRate(uint8_t rateHz) { 119 | // Payload bytes: { MsgID=0x0E, Rate, Attributes=0 } 120 | const uint8_t payloadLen = 3; 121 | uint8_t payload[payloadLen] = { 0x0E, rateHz, 0x00 }; 122 | 123 | // XOR‐checksum over the payload bytes 124 | uint8_t checksum = 0; 125 | for (uint8_t i = 0; i < payloadLen; i++) { 126 | checksum ^= payload[i]; 127 | } 128 | 129 | // Build the full packet: 130 | // A0 A1 00 03 [payload…] [checksum] 0D 0A 131 | uint8_t pkt[2 + 2 + payloadLen + 1 + 2] = { 132 | 0xA0, 0xA1, // header 133 | 0x00, payloadLen, // payload length MSB=0, LSB=3 134 | payload[0], payload[1], payload[2], // payload 135 | checksum, // XOR of payload[] 136 | 0x0D, 0x0A // terminator 137 | }; 138 | 139 | Serial2.write(pkt, sizeof(pkt)); 140 | } 141 | 142 | void setup() { 143 | pinMode(LED_BUILTIN, OUTPUT); //configure LED for being controlled 144 | 145 | Serial.begin(115200); // Initialize serial communication with the Serial Monitor 146 | 147 | // Setup level sensor GPIO 148 | pinMode(GPIO_SENSOR, INPUT_PULLDOWN); 149 | 150 | // Setup GPS 151 | Serial2.begin(9600, SERIAL_8N1, 41, 40); // Initialize serial communication with the GPS module using hardware Serial2 152 | configureSkytraqBaudRate(baudCode115k); 153 | // give module a moment to switch 154 | delay(1000); 155 | Serial2.begin(115200); 156 | configureSkytraqUpdateRate(updateRateHz); 157 | Serial.println("GPS Module Initialized"); 158 | } 159 | 160 | bool init_CAN() { 161 | // CAN1 Initialization 162 | Serial.println("Initializing CAN1..."); 163 | twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT((gpio_num_t)CAN1_TX, (gpio_num_t)CAN1_RX, TWAI_MODE_NORMAL); 164 | twai_timing_config_t t_config = TWAI_TIMING_CONFIG_1MBITS(); 165 | twai_filter_config_t f_config = TWAI_FILTER_CONFIG_ACCEPT_ALL(); 166 | 167 | if (twai_driver_install(&g_config, &t_config, &f_config) == ESP_OK) { 168 | Serial.println("CAN1 Driver initialized"); 169 | } else { 170 | Serial.println("Failed to initialize CAN1 driver"); 171 | return false; 172 | } 173 | 174 | if (twai_start() == ESP_OK) { 175 | Serial.println("CAN1 interface started"); 176 | } else { 177 | Serial.println("Failed to start CAN1"); 178 | return false; 179 | } 180 | Serial.println("CAN1 initialization complete!"); 181 | return true; 182 | } 183 | 184 | void toggle_led() { 185 | led_state = !led_state; 186 | digitalWrite(LED_BUILTIN, led_state); 187 | } 188 | 189 | void check_send_sensor() { 190 | if (millis() - last_counter_increment_time < 1000) { 191 | return; 192 | } 193 | 194 | counter++; 195 | last_counter_increment_time = millis(); 196 | 197 | uint8_t is_activated = digitalRead(GPIO_SENSOR) == 1; 198 | 199 | twai_message_t message_counter; 200 | 201 | message_counter.identifier = CAN_ID_COUNTER; 202 | message_counter.extd = 0; // Standard Frame 203 | message_counter.rtr = 0; // Data Frame 204 | message_counter.data_length_code = 2; // 1-byte payload 205 | message_counter.data[0] = counter; // set first byte to the counter 206 | message_counter.data[1] = is_activated; // set the sensor value is activated 207 | 208 | if (twai_transmit(&message_counter, pdMS_TO_TICKS(1000)) == ESP_OK) { 209 | Serial.println("CAN1: tx counter/sensor"); 210 | toggle_led(); 211 | } 212 | 213 | } 214 | 215 | void broadcast_gps() { 216 | // Prepare the messages 217 | twai_message_t message_lat_lng; 218 | twai_message_t message_speed_quality; 219 | 220 | // Latitude and Longitude 221 | int32_t latitude = gps.location.lat() * 1000000; // Convert to signed decimal degrees with 6 digits of precision 222 | int32_t longitude = gps.location.lng() * 1000000; // Convert to signed decimal degrees with 6 digits of precision 223 | 224 | message_lat_lng.identifier = CAN_ID_LAT_LNG; 225 | message_lat_lng.extd = 0; // Standard Frame 226 | message_lat_lng.rtr = 0; // Data Frame 227 | message_lat_lng.data_length_code = 8; // 8-byte payload 228 | 229 | memcpy(&message_lat_lng.data[0], &latitude, 4); // First 4 bytes for latitude 230 | memcpy(&message_lat_lng.data[4], &longitude, 4); // Next 4 bytes for longitude 231 | 232 | // Speed and GPS stats indicator 233 | int16_t speed = gps.speed.kmph() * 100; // Convert speed to 2 decimal precision 234 | int16_t hdop_value = gps.hdop.value(); // Note, HDOP is pre-scaled to two digits of precision by tinyGPS 235 | 236 | uint8_t gps_quality; 237 | if (!gps.hdop.isValid()) { 238 | gps_quality = 0; // no sat data at all 239 | } 240 | else if (gps.location.isValid()) { 241 | gps_quality = 2; // full 3D fix 242 | } 243 | else { 244 | gps_quality = 1; // just satellites / 2D fix 245 | } 246 | 247 | message_speed_quality.identifier = CAN_ID_SPEED_QUALITY; 248 | message_speed_quality.extd = 0; // Standard Frame 249 | message_speed_quality.rtr = 0; // Data Frame 250 | message_speed_quality.data_length_code = 6; // 5-byte payload 251 | 252 | memcpy(&message_speed_quality.data[0], &speed, 2); // First 2 bytes for speed 253 | message_speed_quality.data[2] = gps_quality; // 1 byte for GPS quality indicator 254 | message_speed_quality.data[3] = gps.satellites.value(); //satellite count 255 | memcpy(&message_speed_quality.data[4], &hdop_value, 2); // 2 bytes for HDOP 256 | 257 | // Send messages over CAN1 258 | if (twai_transmit(&message_lat_lng, pdMS_TO_TICKS(1000)) == ESP_OK) { 259 | Serial.println("CAN1: tx lat/lon"); 260 | } else { 261 | Serial.println("CAN1: Failed to send Latitude and Longitude data"); 262 | } 263 | 264 | if (twai_transmit(&message_speed_quality, pdMS_TO_TICKS(1000)) == ESP_OK) { 265 | Serial.println("CAN1: tx speed/qual"); 266 | } else { 267 | Serial.println("CAN1: Failed to send Speed and GPS quality data"); 268 | } 269 | 270 | if (gps_quality) { 271 | toggle_led(); 272 | } 273 | } 274 | 275 | void check_send_gps() { 276 | while (Serial2.available() > 0) { 277 | //read in serial data, feed it to the GPS library 278 | //so it can construct GPS udpates 279 | char c = Serial2.read(); 280 | gps.encode(c); // Parse the NMEA sentence 281 | 282 | // time to broadcast? 283 | uint32_t now = millis(); 284 | if (now - last_gps_broadcast >= gps_broadcast_interval) { 285 | broadcast_gps(); 286 | last_gps_broadcast = now; 287 | } 288 | } 289 | } 290 | 291 | void loop() { 292 | if (! can_init) { 293 | can_init = init_CAN(); 294 | if (!can_init) { 295 | return; 296 | } 297 | } 298 | check_send_sensor(); 299 | check_send_gps(); 300 | } 301 | -------------------------------------------------------------------------------- /esp-idf/blink/sdkconfig.esp32-can-x2: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated file. DO NOT EDIT. 3 | # Espressif IoT Development Framework (ESP-IDF) Project Configuration 4 | # 5 | CONFIG_IDF_CMAKE=y 6 | CONFIG_IDF_TARGET_ARCH_XTENSA=y 7 | CONFIG_IDF_TARGET="esp32s3" 8 | CONFIG_IDF_TARGET_ESP32S3=y 9 | CONFIG_IDF_FIRMWARE_CHIP_ID=0x0009 10 | 11 | # 12 | # SDK tool configuration 13 | # 14 | CONFIG_SDK_TOOLPREFIX="xtensa-esp32s3-elf-" 15 | # CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set 16 | # end of SDK tool configuration 17 | 18 | # 19 | # Build type 20 | # 21 | CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y 22 | # CONFIG_APP_BUILD_TYPE_ELF_RAM is not set 23 | CONFIG_APP_BUILD_GENERATE_BINARIES=y 24 | CONFIG_APP_BUILD_BOOTLOADER=y 25 | CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y 26 | # end of Build type 27 | 28 | # 29 | # Application manager 30 | # 31 | CONFIG_APP_COMPILE_TIME_DATE=y 32 | # CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set 33 | # CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set 34 | # CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set 35 | CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 36 | # end of Application manager 37 | 38 | # 39 | # Bootloader config 40 | # 41 | CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x0 42 | CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y 43 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set 44 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set 45 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set 46 | # CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set 47 | # CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set 48 | # CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set 49 | CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y 50 | # CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set 51 | # CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set 52 | CONFIG_BOOTLOADER_LOG_LEVEL=3 53 | CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y 54 | # CONFIG_BOOTLOADER_FACTORY_RESET is not set 55 | # CONFIG_BOOTLOADER_APP_TEST is not set 56 | CONFIG_BOOTLOADER_WDT_ENABLE=y 57 | # CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set 58 | CONFIG_BOOTLOADER_WDT_TIME_MS=9000 59 | # CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set 60 | # CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set 61 | # CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON is not set 62 | # CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS is not set 63 | CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 64 | # CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set 65 | CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y 66 | # end of Bootloader config 67 | 68 | # 69 | # Security features 70 | # 71 | CONFIG_SECURE_BOOT_SUPPORTS_RSA=y 72 | CONFIG_SECURE_TARGET_HAS_SECURE_ROM_DL_MODE=y 73 | # CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set 74 | # CONFIG_SECURE_BOOT is not set 75 | # CONFIG_SECURE_FLASH_ENC_ENABLED is not set 76 | # end of Security features 77 | 78 | # 79 | # Boot ROM Behavior 80 | # 81 | CONFIG_BOOT_ROM_LOG_ALWAYS_ON=y 82 | # CONFIG_BOOT_ROM_LOG_ALWAYS_OFF is not set 83 | # CONFIG_BOOT_ROM_LOG_ON_GPIO_HIGH is not set 84 | # CONFIG_BOOT_ROM_LOG_ON_GPIO_LOW is not set 85 | # end of Boot ROM Behavior 86 | 87 | # 88 | # Serial flasher config 89 | # 90 | CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 91 | # CONFIG_ESPTOOLPY_NO_STUB is not set 92 | # CONFIG_ESPTOOLPY_OCT_FLASH is not set 93 | # CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set 94 | # CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set 95 | CONFIG_ESPTOOLPY_FLASHMODE_DIO=y 96 | # CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set 97 | CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y 98 | CONFIG_ESPTOOLPY_FLASHMODE="dio" 99 | # CONFIG_ESPTOOLPY_FLASHFREQ_120M is not set 100 | CONFIG_ESPTOOLPY_FLASHFREQ_80M=y 101 | # CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set 102 | # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set 103 | CONFIG_ESPTOOLPY_FLASHFREQ="80m" 104 | # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set 105 | CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y 106 | # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set 107 | # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set 108 | # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set 109 | CONFIG_ESPTOOLPY_FLASHSIZE="2MB" 110 | CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y 111 | CONFIG_ESPTOOLPY_BEFORE_RESET=y 112 | # CONFIG_ESPTOOLPY_BEFORE_NORESET is not set 113 | CONFIG_ESPTOOLPY_BEFORE="default_reset" 114 | CONFIG_ESPTOOLPY_AFTER_RESET=y 115 | # CONFIG_ESPTOOLPY_AFTER_NORESET is not set 116 | CONFIG_ESPTOOLPY_AFTER="hard_reset" 117 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set 118 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set 119 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set 120 | CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y 121 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set 122 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set 123 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set 124 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set 125 | CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 126 | CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 127 | # end of Serial flasher config 128 | 129 | # 130 | # Partition Table 131 | # 132 | CONFIG_PARTITION_TABLE_SINGLE_APP=y 133 | # CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set 134 | # CONFIG_PARTITION_TABLE_TWO_OTA is not set 135 | # CONFIG_PARTITION_TABLE_CUSTOM is not set 136 | CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" 137 | CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" 138 | CONFIG_PARTITION_TABLE_OFFSET=0x8000 139 | CONFIG_PARTITION_TABLE_MD5=y 140 | # end of Partition Table 141 | 142 | # 143 | # Compiler options 144 | # 145 | CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y 146 | # CONFIG_COMPILER_OPTIMIZATION_SIZE is not set 147 | # CONFIG_COMPILER_OPTIMIZATION_PERF is not set 148 | # CONFIG_COMPILER_OPTIMIZATION_NONE is not set 149 | CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y 150 | # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set 151 | # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set 152 | CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2 153 | # CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set 154 | CONFIG_COMPILER_HIDE_PATHS_MACROS=y 155 | # CONFIG_COMPILER_CXX_EXCEPTIONS is not set 156 | # CONFIG_COMPILER_CXX_RTTI is not set 157 | CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y 158 | # CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set 159 | # CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set 160 | # CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set 161 | # CONFIG_COMPILER_WARN_WRITE_STRINGS is not set 162 | # CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set 163 | # CONFIG_COMPILER_DUMP_RTL_FILES is not set 164 | # end of Compiler options 165 | 166 | # 167 | # Component config 168 | # 169 | 170 | # 171 | # Application Level Tracing 172 | # 173 | # CONFIG_APPTRACE_DEST_JTAG is not set 174 | CONFIG_APPTRACE_DEST_NONE=y 175 | CONFIG_APPTRACE_LOCK_ENABLE=y 176 | # end of Application Level Tracing 177 | 178 | # 179 | # ESP-ASIO 180 | # 181 | # CONFIG_ASIO_SSL_SUPPORT is not set 182 | # end of ESP-ASIO 183 | 184 | # 185 | # Bluetooth 186 | # 187 | # CONFIG_BT_ENABLED is not set 188 | # end of Bluetooth 189 | 190 | # 191 | # CoAP Configuration 192 | # 193 | CONFIG_COAP_MBEDTLS_PSK=y 194 | # CONFIG_COAP_MBEDTLS_PKI is not set 195 | # CONFIG_COAP_MBEDTLS_DEBUG is not set 196 | CONFIG_COAP_LOG_DEFAULT_LEVEL=0 197 | # end of CoAP Configuration 198 | 199 | # 200 | # Driver configurations 201 | # 202 | 203 | # 204 | # ADC configuration 205 | # 206 | # CONFIG_ADC_FORCE_XPD_FSM is not set 207 | CONFIG_ADC_DISABLE_DAC=y 208 | # end of ADC configuration 209 | 210 | # 211 | # MCPWM configuration 212 | # 213 | # CONFIG_MCPWM_ISR_IN_IRAM is not set 214 | # end of MCPWM configuration 215 | 216 | # 217 | # SPI configuration 218 | # 219 | # CONFIG_SPI_MASTER_IN_IRAM is not set 220 | CONFIG_SPI_MASTER_ISR_IN_IRAM=y 221 | # CONFIG_SPI_SLAVE_IN_IRAM is not set 222 | CONFIG_SPI_SLAVE_ISR_IN_IRAM=y 223 | # end of SPI configuration 224 | 225 | # 226 | # TWAI configuration 227 | # 228 | # CONFIG_TWAI_ISR_IN_IRAM is not set 229 | # end of TWAI configuration 230 | 231 | # 232 | # UART configuration 233 | # 234 | # CONFIG_UART_ISR_IN_IRAM is not set 235 | # end of UART configuration 236 | 237 | # 238 | # GDMA Configuration 239 | # 240 | # CONFIG_GDMA_CTRL_FUNC_IN_IRAM is not set 241 | # CONFIG_GDMA_ISR_IRAM_SAFE is not set 242 | # end of GDMA Configuration 243 | # end of Driver configurations 244 | 245 | # 246 | # eFuse Bit Manager 247 | # 248 | # CONFIG_EFUSE_CUSTOM_TABLE is not set 249 | # CONFIG_EFUSE_VIRTUAL is not set 250 | CONFIG_EFUSE_MAX_BLK_LEN=256 251 | # end of eFuse Bit Manager 252 | 253 | # 254 | # ESP-TLS 255 | # 256 | CONFIG_ESP_TLS_USING_MBEDTLS=y 257 | CONFIG_ESP_TLS_USE_DS_PERIPHERAL=y 258 | # CONFIG_ESP_TLS_SERVER is not set 259 | # CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set 260 | # CONFIG_ESP_TLS_PSK_VERIFICATION is not set 261 | # CONFIG_ESP_TLS_INSECURE is not set 262 | # end of ESP-TLS 263 | 264 | # 265 | # ESP32S3-Specific 266 | # 267 | # CONFIG_ESP32S3_DEFAULT_CPU_FREQ_80 is not set 268 | CONFIG_ESP32S3_DEFAULT_CPU_FREQ_160=y 269 | # CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240 is not set 270 | CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ=160 271 | 272 | # 273 | # Cache config 274 | # 275 | CONFIG_ESP32S3_INSTRUCTION_CACHE_16KB=y 276 | # CONFIG_ESP32S3_INSTRUCTION_CACHE_32KB is not set 277 | CONFIG_ESP32S3_INSTRUCTION_CACHE_SIZE=0x4000 278 | # CONFIG_ESP32S3_INSTRUCTION_CACHE_4WAYS is not set 279 | CONFIG_ESP32S3_INSTRUCTION_CACHE_8WAYS=y 280 | CONFIG_ESP32S3_ICACHE_ASSOCIATED_WAYS=8 281 | # CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_16B is not set 282 | CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_32B=y 283 | CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_SIZE=32 284 | # CONFIG_ESP32S3_INSTRUCTION_CACHE_WRAP is not set 285 | # CONFIG_ESP32S3_DATA_CACHE_16KB is not set 286 | CONFIG_ESP32S3_DATA_CACHE_32KB=y 287 | # CONFIG_ESP32S3_DATA_CACHE_64KB is not set 288 | CONFIG_ESP32S3_DATA_CACHE_SIZE=0x8000 289 | # CONFIG_ESP32S3_DATA_CACHE_4WAYS is not set 290 | CONFIG_ESP32S3_DATA_CACHE_8WAYS=y 291 | CONFIG_ESP32S3_DCACHE_ASSOCIATED_WAYS=8 292 | # CONFIG_ESP32S3_DATA_CACHE_LINE_16B is not set 293 | CONFIG_ESP32S3_DATA_CACHE_LINE_32B=y 294 | # CONFIG_ESP32S3_DATA_CACHE_LINE_64B is not set 295 | CONFIG_ESP32S3_DATA_CACHE_LINE_SIZE=32 296 | # CONFIG_ESP32S3_DATA_CACHE_WRAP is not set 297 | # end of Cache config 298 | 299 | # CONFIG_ESP32S3_SPIRAM_SUPPORT is not set 300 | # CONFIG_ESP32S3_TRAX is not set 301 | CONFIG_ESP32S3_TRACEMEM_RESERVE_DRAM=0x0 302 | # CONFIG_ESP32S3_ULP_COPROC_ENABLED is not set 303 | CONFIG_ESP32S3_ULP_COPROC_RESERVE_MEM=0 304 | CONFIG_ESP32S3_DEBUG_OCDAWARE=y 305 | CONFIG_ESP32S3_BROWNOUT_DET=y 306 | CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_7=y 307 | # CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_6 is not set 308 | # CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_5 is not set 309 | # CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_4 is not set 310 | # CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_3 is not set 311 | # CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_2 is not set 312 | # CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_1 is not set 313 | CONFIG_ESP32S3_BROWNOUT_DET_LVL=7 314 | CONFIG_ESP32S3_TIME_SYSCALL_USE_RTC_FRC1=y 315 | # CONFIG_ESP32S3_TIME_SYSCALL_USE_RTC is not set 316 | # CONFIG_ESP32S3_TIME_SYSCALL_USE_FRC1 is not set 317 | # CONFIG_ESP32S3_TIME_SYSCALL_USE_NONE is not set 318 | CONFIG_ESP32S3_RTC_CLK_SRC_INT_RC=y 319 | # CONFIG_ESP32S3_RTC_CLK_SRC_EXT_CRYS is not set 320 | # CONFIG_ESP32S3_RTC_CLK_SRC_EXT_OSC is not set 321 | # CONFIG_ESP32S3_RTC_CLK_SRC_INT_8MD256 is not set 322 | CONFIG_ESP32S3_RTC_CLK_CAL_CYCLES=1024 323 | CONFIG_ESP32S3_DEEP_SLEEP_WAKEUP_DELAY=2000 324 | # CONFIG_ESP32S3_NO_BLOBS is not set 325 | # CONFIG_ESP32S3_RTCDATA_IN_FAST_MEM is not set 326 | # CONFIG_ESP32S3_USE_FIXED_STATIC_RAM_SIZE is not set 327 | # end of ESP32S3-Specific 328 | 329 | # 330 | # ADC-Calibration 331 | # 332 | # end of ADC-Calibration 333 | 334 | # 335 | # Common ESP-related 336 | # 337 | CONFIG_ESP_ERR_TO_NAME_LOOKUP=y 338 | # end of Common ESP-related 339 | 340 | # 341 | # Ethernet 342 | # 343 | CONFIG_ETH_ENABLED=y 344 | CONFIG_ETH_USE_SPI_ETHERNET=y 345 | # CONFIG_ETH_SPI_ETHERNET_DM9051 is not set 346 | # CONFIG_ETH_SPI_ETHERNET_W5500 is not set 347 | # CONFIG_ETH_SPI_ETHERNET_KSZ8851SNL is not set 348 | # CONFIG_ETH_USE_OPENETH is not set 349 | # end of Ethernet 350 | 351 | # 352 | # Event Loop Library 353 | # 354 | # CONFIG_ESP_EVENT_LOOP_PROFILING is not set 355 | CONFIG_ESP_EVENT_POST_FROM_ISR=y 356 | CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y 357 | # end of Event Loop Library 358 | 359 | # 360 | # GDB Stub 361 | # 362 | # end of GDB Stub 363 | 364 | # 365 | # ESP HTTP client 366 | # 367 | CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y 368 | # CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set 369 | CONFIG_ESP_HTTP_CLIENT_ENABLE_DIGEST_AUTH=y 370 | # end of ESP HTTP client 371 | 372 | # 373 | # HTTP Server 374 | # 375 | CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 376 | CONFIG_HTTPD_MAX_URI_LEN=512 377 | CONFIG_HTTPD_ERR_RESP_NO_DELAY=y 378 | CONFIG_HTTPD_PURGE_BUF_LEN=32 379 | # CONFIG_HTTPD_LOG_PURGE_DATA is not set 380 | # CONFIG_HTTPD_WS_SUPPORT is not set 381 | # end of HTTP Server 382 | 383 | # 384 | # ESP HTTPS OTA 385 | # 386 | # CONFIG_OTA_ALLOW_HTTP is not set 387 | # end of ESP HTTPS OTA 388 | 389 | # 390 | # ESP HTTPS server 391 | # 392 | # CONFIG_ESP_HTTPS_SERVER_ENABLE is not set 393 | # end of ESP HTTPS server 394 | 395 | # 396 | # Hardware Settings 397 | # 398 | 399 | # 400 | # MAC Config 401 | # 402 | CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y 403 | CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y 404 | CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y 405 | CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y 406 | # CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_TWO is not set 407 | CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_FOUR=y 408 | CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES=4 409 | # end of MAC Config 410 | 411 | # 412 | # Sleep Config 413 | # 414 | CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y 415 | CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y 416 | CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND=y 417 | # CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND is not set 418 | # end of Sleep Config 419 | 420 | # 421 | # RTC Clock Config 422 | # 423 | CONFIG_RTC_CLOCK_BBPLL_POWER_ON_WITH_USB=y 424 | # end of RTC Clock Config 425 | # end of Hardware Settings 426 | 427 | # 428 | # IPC (Inter-Processor Call) 429 | # 430 | CONFIG_ESP_IPC_TASK_STACK_SIZE=1536 431 | CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y 432 | CONFIG_ESP_IPC_ISR_ENABLE=y 433 | # end of IPC (Inter-Processor Call) 434 | 435 | # 436 | # LCD and Touch Panel 437 | # 438 | 439 | # 440 | # LCD Peripheral Configuration 441 | # 442 | CONFIG_LCD_PANEL_IO_FORMAT_BUF_SIZE=32 443 | # end of LCD Peripheral Configuration 444 | # end of LCD and Touch Panel 445 | 446 | # 447 | # ESP NETIF Adapter 448 | # 449 | CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 450 | CONFIG_ESP_NETIF_TCPIP_LWIP=y 451 | # CONFIG_ESP_NETIF_LOOPBACK is not set 452 | CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER=y 453 | # end of ESP NETIF Adapter 454 | 455 | # 456 | # PHY 457 | # 458 | CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y 459 | # CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION is not set 460 | CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20 461 | CONFIG_ESP_PHY_MAX_TX_POWER=20 462 | CONFIG_ESP_PHY_ENABLE_USB=y 463 | # end of PHY 464 | 465 | # 466 | # Power Management 467 | # 468 | # CONFIG_PM_ENABLE is not set 469 | CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y 470 | CONFIG_PM_POWER_DOWN_TAGMEM_IN_LIGHT_SLEEP=y 471 | # end of Power Management 472 | 473 | # 474 | # ESP System Settings 475 | # 476 | # CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set 477 | CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT=y 478 | # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set 479 | # CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set 480 | # CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME is not set 481 | CONFIG_ESP_SYSTEM_RTC_FAST_MEM_AS_HEAP_DEPCHECK=y 482 | CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP=y 483 | 484 | # 485 | # Memory protection 486 | # 487 | # end of Memory protection 488 | 489 | CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 490 | CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 491 | CONFIG_ESP_MAIN_TASK_STACK_SIZE=3584 492 | CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y 493 | # CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1 is not set 494 | # CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set 495 | CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 496 | CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 497 | CONFIG_ESP_CONSOLE_UART_DEFAULT=y 498 | # CONFIG_ESP_CONSOLE_USB_CDC is not set 499 | # CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG is not set 500 | # CONFIG_ESP_CONSOLE_UART_CUSTOM is not set 501 | # CONFIG_ESP_CONSOLE_NONE is not set 502 | # CONFIG_ESP_CONSOLE_SECONDARY_NONE is not set 503 | CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG=y 504 | CONFIG_ESP_CONSOLE_UART=y 505 | CONFIG_ESP_CONSOLE_MULTIPLE_UART=y 506 | CONFIG_ESP_CONSOLE_UART_NUM=0 507 | CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 508 | CONFIG_ESP_INT_WDT=y 509 | CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 510 | CONFIG_ESP_INT_WDT_CHECK_CPU1=y 511 | CONFIG_ESP_TASK_WDT=y 512 | # CONFIG_ESP_TASK_WDT_PANIC is not set 513 | CONFIG_ESP_TASK_WDT_TIMEOUT_S=5 514 | CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y 515 | CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y 516 | # CONFIG_ESP_PANIC_HANDLER_IRAM is not set 517 | # CONFIG_ESP_DEBUG_STUBS_ENABLE is not set 518 | CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_4=y 519 | # end of ESP System Settings 520 | 521 | # 522 | # High resolution timer (esp_timer) 523 | # 524 | # CONFIG_ESP_TIMER_PROFILING is not set 525 | CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER=y 526 | CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER=y 527 | CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 528 | CONFIG_ESP_TIMER_INTERRUPT_LEVEL=1 529 | # CONFIG_ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD is not set 530 | CONFIG_ESP_TIMER_IMPL_SYSTIMER=y 531 | # end of High resolution timer (esp_timer) 532 | 533 | # 534 | # Wi-Fi 535 | # 536 | CONFIG_ESP32_WIFI_ENABLED=y 537 | CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 538 | CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 539 | # CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set 540 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y 541 | CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 542 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 543 | # CONFIG_ESP32_WIFI_CSI_ENABLED is not set 544 | CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y 545 | CONFIG_ESP32_WIFI_TX_BA_WIN=6 546 | CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y 547 | CONFIG_ESP32_WIFI_RX_BA_WIN=6 548 | CONFIG_ESP32_WIFI_NVS_ENABLED=y 549 | CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y 550 | # CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set 551 | CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 552 | CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 553 | CONFIG_ESP32_WIFI_IRAM_OPT=y 554 | CONFIG_ESP32_WIFI_RX_IRAM_OPT=y 555 | CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y 556 | # CONFIG_ESP_WIFI_SLP_IRAM_OPT is not set 557 | # CONFIG_ESP_WIFI_FTM_ENABLE is not set 558 | # CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set 559 | # CONFIG_ESP_WIFI_GCMP_SUPPORT is not set 560 | # CONFIG_ESP_WIFI_GMAC_SUPPORT is not set 561 | CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y 562 | # end of Wi-Fi 563 | 564 | # 565 | # Core dump 566 | # 567 | # CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH is not set 568 | # CONFIG_ESP_COREDUMP_ENABLE_TO_UART is not set 569 | CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y 570 | # end of Core dump 571 | 572 | # 573 | # FAT Filesystem support 574 | # 575 | # CONFIG_FATFS_CODEPAGE_DYNAMIC is not set 576 | CONFIG_FATFS_CODEPAGE_437=y 577 | # CONFIG_FATFS_CODEPAGE_720 is not set 578 | # CONFIG_FATFS_CODEPAGE_737 is not set 579 | # CONFIG_FATFS_CODEPAGE_771 is not set 580 | # CONFIG_FATFS_CODEPAGE_775 is not set 581 | # CONFIG_FATFS_CODEPAGE_850 is not set 582 | # CONFIG_FATFS_CODEPAGE_852 is not set 583 | # CONFIG_FATFS_CODEPAGE_855 is not set 584 | # CONFIG_FATFS_CODEPAGE_857 is not set 585 | # CONFIG_FATFS_CODEPAGE_860 is not set 586 | # CONFIG_FATFS_CODEPAGE_861 is not set 587 | # CONFIG_FATFS_CODEPAGE_862 is not set 588 | # CONFIG_FATFS_CODEPAGE_863 is not set 589 | # CONFIG_FATFS_CODEPAGE_864 is not set 590 | # CONFIG_FATFS_CODEPAGE_865 is not set 591 | # CONFIG_FATFS_CODEPAGE_866 is not set 592 | # CONFIG_FATFS_CODEPAGE_869 is not set 593 | # CONFIG_FATFS_CODEPAGE_932 is not set 594 | # CONFIG_FATFS_CODEPAGE_936 is not set 595 | # CONFIG_FATFS_CODEPAGE_949 is not set 596 | # CONFIG_FATFS_CODEPAGE_950 is not set 597 | CONFIG_FATFS_CODEPAGE=437 598 | CONFIG_FATFS_LFN_NONE=y 599 | # CONFIG_FATFS_LFN_HEAP is not set 600 | # CONFIG_FATFS_LFN_STACK is not set 601 | CONFIG_FATFS_FS_LOCK=0 602 | CONFIG_FATFS_TIMEOUT_MS=10000 603 | CONFIG_FATFS_PER_FILE_CACHE=y 604 | # CONFIG_FATFS_USE_FASTSEEK is not set 605 | # end of FAT Filesystem support 606 | 607 | # 608 | # Modbus configuration 609 | # 610 | CONFIG_FMB_COMM_MODE_TCP_EN=y 611 | CONFIG_FMB_TCP_PORT_DEFAULT=502 612 | CONFIG_FMB_TCP_PORT_MAX_CONN=5 613 | CONFIG_FMB_TCP_CONNECTION_TOUT_SEC=20 614 | CONFIG_FMB_COMM_MODE_RTU_EN=y 615 | CONFIG_FMB_COMM_MODE_ASCII_EN=y 616 | CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150 617 | CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200 618 | CONFIG_FMB_QUEUE_LENGTH=20 619 | CONFIG_FMB_PORT_TASK_STACK_SIZE=4096 620 | CONFIG_FMB_SERIAL_BUF_SIZE=256 621 | CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8 622 | CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000 623 | CONFIG_FMB_PORT_TASK_PRIO=10 624 | # CONFIG_FMB_PORT_TASK_AFFINITY_NO_AFFINITY is not set 625 | CONFIG_FMB_PORT_TASK_AFFINITY_CPU0=y 626 | # CONFIG_FMB_PORT_TASK_AFFINITY_CPU1 is not set 627 | CONFIG_FMB_PORT_TASK_AFFINITY=0x0 628 | CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT=y 629 | CONFIG_FMB_CONTROLLER_SLAVE_ID=0x00112233 630 | CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20 631 | CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 632 | CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 633 | CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 634 | # CONFIG_FMB_TIMER_PORT_ENABLED is not set 635 | CONFIG_FMB_TIMER_GROUP=0 636 | CONFIG_FMB_TIMER_INDEX=0 637 | CONFIG_FMB_MASTER_TIMER_GROUP=0 638 | CONFIG_FMB_MASTER_TIMER_INDEX=0 639 | # CONFIG_FMB_TIMER_ISR_IN_IRAM is not set 640 | # end of Modbus configuration 641 | 642 | # 643 | # FreeRTOS 644 | # 645 | # CONFIG_FREERTOS_UNICORE is not set 646 | CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF 647 | CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER=y 648 | CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL1=y 649 | # CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL3 is not set 650 | CONFIG_FREERTOS_SYSTICK_USES_SYSTIMER=y 651 | CONFIG_FREERTOS_HZ=100 652 | CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y 653 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set 654 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set 655 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y 656 | # CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set 657 | CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y 658 | CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 659 | CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y 660 | # CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set 661 | # CONFIG_FREERTOS_ASSERT_DISABLE is not set 662 | CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 663 | CONFIG_FREERTOS_ISR_STACKSIZE=1536 664 | # CONFIG_FREERTOS_LEGACY_HOOKS is not set 665 | CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 666 | CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y 667 | # CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set 668 | CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 669 | CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 670 | CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 671 | CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 672 | # CONFIG_FREERTOS_USE_TRACE_FACILITY is not set 673 | # CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set 674 | CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y 675 | CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y 676 | # CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set 677 | # CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set 678 | CONFIG_FREERTOS_DEBUG_OCDAWARE=y 679 | CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT=y 680 | # CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH is not set 681 | # end of FreeRTOS 682 | 683 | # 684 | # Hardware Abstraction Layer (HAL) and Low Level (LL) 685 | # 686 | CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y 687 | # CONFIG_HAL_ASSERTION_DISABLE is not set 688 | # CONFIG_HAL_ASSERTION_SILIENT is not set 689 | # CONFIG_HAL_ASSERTION_ENABLE is not set 690 | CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=2 691 | # end of Hardware Abstraction Layer (HAL) and Low Level (LL) 692 | 693 | # 694 | # Heap memory debugging 695 | # 696 | CONFIG_HEAP_POISONING_DISABLED=y 697 | # CONFIG_HEAP_POISONING_LIGHT is not set 698 | # CONFIG_HEAP_POISONING_COMPREHENSIVE is not set 699 | CONFIG_HEAP_TRACING_OFF=y 700 | # CONFIG_HEAP_TRACING_STANDALONE is not set 701 | # CONFIG_HEAP_TRACING_TOHOST is not set 702 | # CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set 703 | # end of Heap memory debugging 704 | 705 | # 706 | # jsmn 707 | # 708 | # CONFIG_JSMN_PARENT_LINKS is not set 709 | # CONFIG_JSMN_STRICT is not set 710 | # end of jsmn 711 | 712 | # 713 | # libsodium 714 | # 715 | # end of libsodium 716 | 717 | # 718 | # Log output 719 | # 720 | # CONFIG_LOG_DEFAULT_LEVEL_NONE is not set 721 | # CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set 722 | # CONFIG_LOG_DEFAULT_LEVEL_WARN is not set 723 | CONFIG_LOG_DEFAULT_LEVEL_INFO=y 724 | # CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set 725 | # CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set 726 | CONFIG_LOG_DEFAULT_LEVEL=3 727 | CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y 728 | # CONFIG_LOG_MAXIMUM_LEVEL_DEBUG is not set 729 | # CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set 730 | CONFIG_LOG_MAXIMUM_LEVEL=3 731 | CONFIG_LOG_COLORS=y 732 | CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y 733 | # CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set 734 | # end of Log output 735 | 736 | # 737 | # LWIP 738 | # 739 | CONFIG_LWIP_LOCAL_HOSTNAME="espressif" 740 | # CONFIG_LWIP_NETIF_API is not set 741 | # CONFIG_LWIP_TCPIP_CORE_LOCKING is not set 742 | CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y 743 | # CONFIG_LWIP_L2_TO_L3_COPY is not set 744 | # CONFIG_LWIP_IRAM_OPTIMIZATION is not set 745 | CONFIG_LWIP_TIMERS_ONDEMAND=y 746 | CONFIG_LWIP_MAX_SOCKETS=10 747 | # CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set 748 | # CONFIG_LWIP_SO_LINGER is not set 749 | CONFIG_LWIP_SO_REUSE=y 750 | CONFIG_LWIP_SO_REUSE_RXTOALL=y 751 | # CONFIG_LWIP_SO_RCVBUF is not set 752 | # CONFIG_LWIP_NETBUF_RECVINFO is not set 753 | CONFIG_LWIP_IP4_FRAG=y 754 | CONFIG_LWIP_IP6_FRAG=y 755 | # CONFIG_LWIP_IP4_REASSEMBLY is not set 756 | # CONFIG_LWIP_IP6_REASSEMBLY is not set 757 | # CONFIG_LWIP_IP_FORWARD is not set 758 | # CONFIG_LWIP_STATS is not set 759 | # CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set 760 | CONFIG_LWIP_ESP_GRATUITOUS_ARP=y 761 | CONFIG_LWIP_GARP_TMR_INTERVAL=60 762 | CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 763 | CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y 764 | # CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set 765 | CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y 766 | # CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set 767 | CONFIG_LWIP_DHCP_OPTIONS_LEN=68 768 | 769 | # 770 | # DHCP server 771 | # 772 | CONFIG_LWIP_DHCPS=y 773 | CONFIG_LWIP_DHCPS_LEASE_UNIT=60 774 | CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 775 | # end of DHCP server 776 | 777 | # CONFIG_LWIP_AUTOIP is not set 778 | CONFIG_LWIP_IPV6=y 779 | # CONFIG_LWIP_IPV6_AUTOCONFIG is not set 780 | CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 781 | # CONFIG_LWIP_IPV6_FORWARD is not set 782 | # CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set 783 | CONFIG_LWIP_NETIF_LOOPBACK=y 784 | CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 785 | 786 | # 787 | # TCP 788 | # 789 | CONFIG_LWIP_MAX_ACTIVE_TCP=16 790 | CONFIG_LWIP_MAX_LISTENING_TCP=16 791 | CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y 792 | CONFIG_LWIP_TCP_MAXRTX=12 793 | CONFIG_LWIP_TCP_SYNMAXRTX=12 794 | CONFIG_LWIP_TCP_MSS=1440 795 | CONFIG_LWIP_TCP_TMR_INTERVAL=250 796 | CONFIG_LWIP_TCP_MSL=60000 797 | CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 798 | CONFIG_LWIP_TCP_WND_DEFAULT=5744 799 | CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 800 | CONFIG_LWIP_TCP_QUEUE_OOSEQ=y 801 | # CONFIG_LWIP_TCP_SACK_OUT is not set 802 | # CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set 803 | CONFIG_LWIP_TCP_OVERSIZE_MSS=y 804 | # CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set 805 | # CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set 806 | CONFIG_LWIP_TCP_RTO_TIME=1500 807 | # end of TCP 808 | 809 | # 810 | # UDP 811 | # 812 | CONFIG_LWIP_MAX_UDP_PCBS=16 813 | CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 814 | # end of UDP 815 | 816 | # 817 | # Checksums 818 | # 819 | # CONFIG_LWIP_CHECKSUM_CHECK_IP is not set 820 | # CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set 821 | CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y 822 | # end of Checksums 823 | 824 | CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072 825 | CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y 826 | # CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set 827 | # CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set 828 | CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF 829 | # CONFIG_LWIP_PPP_SUPPORT is not set 830 | CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 831 | CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 832 | # CONFIG_LWIP_SLIP_SUPPORT is not set 833 | 834 | # 835 | # ICMP 836 | # 837 | CONFIG_LWIP_ICMP=y 838 | # CONFIG_LWIP_MULTICAST_PING is not set 839 | # CONFIG_LWIP_BROADCAST_PING is not set 840 | # end of ICMP 841 | 842 | # 843 | # LWIP RAW API 844 | # 845 | CONFIG_LWIP_MAX_RAW_PCBS=16 846 | # end of LWIP RAW API 847 | 848 | # 849 | # SNTP 850 | # 851 | CONFIG_LWIP_SNTP_MAX_SERVERS=1 852 | # CONFIG_LWIP_DHCP_GET_NTP_SRV is not set 853 | CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 854 | # end of SNTP 855 | 856 | CONFIG_LWIP_ESP_LWIP_ASSERT=y 857 | 858 | # 859 | # Hooks 860 | # 861 | # CONFIG_LWIP_HOOK_TCP_ISN_NONE is not set 862 | CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT=y 863 | # CONFIG_LWIP_HOOK_TCP_ISN_CUSTOM is not set 864 | CONFIG_LWIP_HOOK_IP6_ROUTE_NONE=y 865 | # CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT is not set 866 | # CONFIG_LWIP_HOOK_IP6_ROUTE_CUSTOM is not set 867 | CONFIG_LWIP_HOOK_ND6_GET_GW_NONE=y 868 | # CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT is not set 869 | # CONFIG_LWIP_HOOK_ND6_GET_GW_CUSTOM is not set 870 | CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_NONE=y 871 | # CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT is not set 872 | # CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_CUSTOM is not set 873 | # end of Hooks 874 | 875 | # CONFIG_LWIP_DEBUG is not set 876 | # end of LWIP 877 | 878 | # 879 | # mbedTLS 880 | # 881 | CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y 882 | # CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set 883 | # CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set 884 | CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y 885 | CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 886 | CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096 887 | # CONFIG_MBEDTLS_DYNAMIC_BUFFER is not set 888 | # CONFIG_MBEDTLS_DEBUG is not set 889 | 890 | # 891 | # mbedTLS v2.28.x related 892 | # 893 | # CONFIG_MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH is not set 894 | # CONFIG_MBEDTLS_X509_TRUSTED_CERT_CALLBACK is not set 895 | # CONFIG_MBEDTLS_SSL_CONTEXT_SERIALIZATION is not set 896 | CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE=y 897 | # end of mbedTLS v2.28.x related 898 | 899 | # 900 | # Certificate Bundle 901 | # 902 | CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y 903 | CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y 904 | # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set 905 | # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set 906 | # CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set 907 | # end of Certificate Bundle 908 | 909 | # CONFIG_MBEDTLS_ECP_RESTARTABLE is not set 910 | # CONFIG_MBEDTLS_CMAC_C is not set 911 | CONFIG_MBEDTLS_HARDWARE_AES=y 912 | CONFIG_MBEDTLS_AES_USE_INTERRUPT=y 913 | CONFIG_MBEDTLS_HARDWARE_MPI=y 914 | CONFIG_MBEDTLS_HARDWARE_SHA=y 915 | CONFIG_MBEDTLS_ROM_MD5=y 916 | # CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set 917 | # CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set 918 | CONFIG_MBEDTLS_HAVE_TIME=y 919 | # CONFIG_MBEDTLS_HAVE_TIME_DATE is not set 920 | CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y 921 | CONFIG_MBEDTLS_SHA512_C=y 922 | CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y 923 | # CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set 924 | # CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set 925 | # CONFIG_MBEDTLS_TLS_DISABLED is not set 926 | CONFIG_MBEDTLS_TLS_SERVER=y 927 | CONFIG_MBEDTLS_TLS_CLIENT=y 928 | CONFIG_MBEDTLS_TLS_ENABLED=y 929 | 930 | # 931 | # TLS Key Exchange Methods 932 | # 933 | # CONFIG_MBEDTLS_PSK_MODES is not set 934 | CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y 935 | CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y 936 | CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y 937 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y 938 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y 939 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y 940 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y 941 | # end of TLS Key Exchange Methods 942 | 943 | CONFIG_MBEDTLS_SSL_RENEGOTIATION=y 944 | # CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set 945 | CONFIG_MBEDTLS_SSL_PROTO_TLS1=y 946 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y 947 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y 948 | # CONFIG_MBEDTLS_SSL_PROTO_GMTSSL1_1 is not set 949 | # CONFIG_MBEDTLS_SSL_PROTO_DTLS is not set 950 | CONFIG_MBEDTLS_SSL_ALPN=y 951 | CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y 952 | CONFIG_MBEDTLS_X509_CHECK_KEY_USAGE=y 953 | CONFIG_MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE=y 954 | CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y 955 | 956 | # 957 | # Symmetric Ciphers 958 | # 959 | CONFIG_MBEDTLS_AES_C=y 960 | # CONFIG_MBEDTLS_CAMELLIA_C is not set 961 | # CONFIG_MBEDTLS_DES_C is not set 962 | CONFIG_MBEDTLS_RC4_DISABLED=y 963 | # CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set 964 | # CONFIG_MBEDTLS_RC4_ENABLED is not set 965 | # CONFIG_MBEDTLS_BLOWFISH_C is not set 966 | # CONFIG_MBEDTLS_XTEA_C is not set 967 | CONFIG_MBEDTLS_CCM_C=y 968 | CONFIG_MBEDTLS_GCM_C=y 969 | # CONFIG_MBEDTLS_NIST_KW_C is not set 970 | # end of Symmetric Ciphers 971 | 972 | # CONFIG_MBEDTLS_RIPEMD160_C is not set 973 | 974 | # 975 | # Certificates 976 | # 977 | CONFIG_MBEDTLS_PEM_PARSE_C=y 978 | CONFIG_MBEDTLS_PEM_WRITE_C=y 979 | CONFIG_MBEDTLS_X509_CRL_PARSE_C=y 980 | CONFIG_MBEDTLS_X509_CSR_PARSE_C=y 981 | # end of Certificates 982 | 983 | CONFIG_MBEDTLS_ECP_C=y 984 | CONFIG_MBEDTLS_ECDH_C=y 985 | CONFIG_MBEDTLS_ECDSA_C=y 986 | # CONFIG_MBEDTLS_ECJPAKE_C is not set 987 | CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y 988 | CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y 989 | CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y 990 | CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y 991 | CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y 992 | CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y 993 | CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y 994 | CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y 995 | CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y 996 | CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y 997 | CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y 998 | CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y 999 | CONFIG_MBEDTLS_ECP_NIST_OPTIM=y 1000 | # CONFIG_MBEDTLS_POLY1305_C is not set 1001 | # CONFIG_MBEDTLS_CHACHA20_C is not set 1002 | # CONFIG_MBEDTLS_HKDF_C is not set 1003 | # CONFIG_MBEDTLS_THREADING_C is not set 1004 | # CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI is not set 1005 | # CONFIG_MBEDTLS_SECURITY_RISKS is not set 1006 | # end of mbedTLS 1007 | 1008 | # 1009 | # mDNS 1010 | # 1011 | CONFIG_MDNS_MAX_SERVICES=10 1012 | CONFIG_MDNS_TASK_PRIORITY=1 1013 | CONFIG_MDNS_TASK_STACK_SIZE=4096 1014 | # CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set 1015 | CONFIG_MDNS_TASK_AFFINITY_CPU0=y 1016 | # CONFIG_MDNS_TASK_AFFINITY_CPU1 is not set 1017 | CONFIG_MDNS_TASK_AFFINITY=0x0 1018 | CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000 1019 | # CONFIG_MDNS_STRICT_MODE is not set 1020 | CONFIG_MDNS_TIMER_PERIOD_MS=100 1021 | # CONFIG_MDNS_NETWORKING_SOCKET is not set 1022 | CONFIG_MDNS_MULTIPLE_INSTANCE=y 1023 | # end of mDNS 1024 | 1025 | # 1026 | # ESP-MQTT Configurations 1027 | # 1028 | CONFIG_MQTT_PROTOCOL_311=y 1029 | CONFIG_MQTT_TRANSPORT_SSL=y 1030 | CONFIG_MQTT_TRANSPORT_WEBSOCKET=y 1031 | CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y 1032 | # CONFIG_MQTT_MSG_ID_INCREMENTAL is not set 1033 | # CONFIG_MQTT_SKIP_PUBLISH_IF_DISCONNECTED is not set 1034 | # CONFIG_MQTT_REPORT_DELETED_MESSAGES is not set 1035 | # CONFIG_MQTT_USE_CUSTOM_CONFIG is not set 1036 | # CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set 1037 | # CONFIG_MQTT_CUSTOM_OUTBOX is not set 1038 | # end of ESP-MQTT Configurations 1039 | 1040 | # 1041 | # Newlib 1042 | # 1043 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y 1044 | # CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set 1045 | # CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set 1046 | # CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set 1047 | # CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set 1048 | CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y 1049 | # CONFIG_NEWLIB_NANO_FORMAT is not set 1050 | # end of Newlib 1051 | 1052 | # 1053 | # NVS 1054 | # 1055 | # end of NVS 1056 | 1057 | # 1058 | # OpenSSL 1059 | # 1060 | # CONFIG_OPENSSL_DEBUG is not set 1061 | CONFIG_OPENSSL_ERROR_STACK=y 1062 | # CONFIG_OPENSSL_ASSERT_DO_NOTHING is not set 1063 | CONFIG_OPENSSL_ASSERT_EXIT=y 1064 | # end of OpenSSL 1065 | 1066 | # 1067 | # OpenThread 1068 | # 1069 | # CONFIG_OPENTHREAD_ENABLED is not set 1070 | # end of OpenThread 1071 | 1072 | # 1073 | # PThreads 1074 | # 1075 | CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 1076 | CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 1077 | CONFIG_PTHREAD_STACK_MIN=768 1078 | CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y 1079 | # CONFIG_PTHREAD_DEFAULT_CORE_0 is not set 1080 | # CONFIG_PTHREAD_DEFAULT_CORE_1 is not set 1081 | CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 1082 | CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" 1083 | # end of PThreads 1084 | 1085 | # 1086 | # SPI Flash driver 1087 | # 1088 | # CONFIG_SPI_FLASH_VERIFY_WRITE is not set 1089 | # CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set 1090 | CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y 1091 | # CONFIG_SPI_FLASH_ROM_IMPL is not set 1092 | CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y 1093 | # CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set 1094 | # CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set 1095 | # CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set 1096 | # CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set 1097 | # CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set 1098 | CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y 1099 | CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20 1100 | CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1 1101 | CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=8192 1102 | # CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set 1103 | # CONFIG_SPI_FLASH_CHECK_ERASE_TIMEOUT_DISABLED is not set 1104 | # CONFIG_SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST is not set 1105 | 1106 | # 1107 | # Auto-detect flash chips 1108 | # 1109 | CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y 1110 | CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y 1111 | CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y 1112 | CONFIG_SPI_FLASH_SUPPORT_WINBOND_CHIP=y 1113 | CONFIG_SPI_FLASH_SUPPORT_BOYA_CHIP=y 1114 | CONFIG_SPI_FLASH_SUPPORT_TH_CHIP=y 1115 | CONFIG_SPI_FLASH_SUPPORT_MXIC_OPI_CHIP=y 1116 | # end of Auto-detect flash chips 1117 | 1118 | CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=y 1119 | # end of SPI Flash driver 1120 | 1121 | # 1122 | # SPIFFS Configuration 1123 | # 1124 | CONFIG_SPIFFS_MAX_PARTITIONS=3 1125 | 1126 | # 1127 | # SPIFFS Cache Configuration 1128 | # 1129 | CONFIG_SPIFFS_CACHE=y 1130 | CONFIG_SPIFFS_CACHE_WR=y 1131 | # CONFIG_SPIFFS_CACHE_STATS is not set 1132 | # end of SPIFFS Cache Configuration 1133 | 1134 | CONFIG_SPIFFS_PAGE_CHECK=y 1135 | CONFIG_SPIFFS_GC_MAX_RUNS=10 1136 | # CONFIG_SPIFFS_GC_STATS is not set 1137 | CONFIG_SPIFFS_PAGE_SIZE=256 1138 | CONFIG_SPIFFS_OBJ_NAME_LEN=32 1139 | # CONFIG_SPIFFS_FOLLOW_SYMLINKS is not set 1140 | CONFIG_SPIFFS_USE_MAGIC=y 1141 | CONFIG_SPIFFS_USE_MAGIC_LENGTH=y 1142 | CONFIG_SPIFFS_META_LENGTH=4 1143 | CONFIG_SPIFFS_USE_MTIME=y 1144 | 1145 | # 1146 | # Debug Configuration 1147 | # 1148 | # CONFIG_SPIFFS_DBG is not set 1149 | # CONFIG_SPIFFS_API_DBG is not set 1150 | # CONFIG_SPIFFS_GC_DBG is not set 1151 | # CONFIG_SPIFFS_CACHE_DBG is not set 1152 | # CONFIG_SPIFFS_CHECK_DBG is not set 1153 | # CONFIG_SPIFFS_TEST_VISUALISATION is not set 1154 | # end of Debug Configuration 1155 | # end of SPIFFS Configuration 1156 | 1157 | # 1158 | # TCP Transport 1159 | # 1160 | 1161 | # 1162 | # Websocket 1163 | # 1164 | CONFIG_WS_TRANSPORT=y 1165 | CONFIG_WS_BUFFER_SIZE=1024 1166 | # end of Websocket 1167 | # end of TCP Transport 1168 | 1169 | # 1170 | # TinyUSB Stack 1171 | # 1172 | # CONFIG_TINYUSB is not set 1173 | # end of TinyUSB Stack 1174 | 1175 | # 1176 | # Unity unit testing library 1177 | # 1178 | CONFIG_UNITY_ENABLE_FLOAT=y 1179 | CONFIG_UNITY_ENABLE_DOUBLE=y 1180 | # CONFIG_UNITY_ENABLE_64BIT is not set 1181 | # CONFIG_UNITY_ENABLE_COLOR is not set 1182 | CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y 1183 | # CONFIG_UNITY_ENABLE_FIXTURE is not set 1184 | # CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set 1185 | # end of Unity unit testing library 1186 | 1187 | # 1188 | # USB-OTG 1189 | # 1190 | CONFIG_USB_OTG_SUPPORTED=y 1191 | CONFIG_USB_HOST_CONTROL_TRANSFER_MAX_SIZE=256 1192 | CONFIG_USB_HOST_HW_BUFFER_BIAS_BALANCED=y 1193 | # CONFIG_USB_HOST_HW_BUFFER_BIAS_IN is not set 1194 | # CONFIG_USB_HOST_HW_BUFFER_BIAS_PERIODIC_OUT is not set 1195 | # end of USB-OTG 1196 | 1197 | # 1198 | # Virtual file system 1199 | # 1200 | CONFIG_VFS_SUPPORT_IO=y 1201 | CONFIG_VFS_SUPPORT_DIR=y 1202 | CONFIG_VFS_SUPPORT_SELECT=y 1203 | CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y 1204 | CONFIG_VFS_SUPPORT_TERMIOS=y 1205 | 1206 | # 1207 | # Host File System I/O (Semihosting) 1208 | # 1209 | CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 1210 | CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 1211 | # end of Host File System I/O (Semihosting) 1212 | # end of Virtual file system 1213 | 1214 | # 1215 | # Wear Levelling 1216 | # 1217 | # CONFIG_WL_SECTOR_SIZE_512 is not set 1218 | CONFIG_WL_SECTOR_SIZE_4096=y 1219 | CONFIG_WL_SECTOR_SIZE=4096 1220 | # end of Wear Levelling 1221 | 1222 | # 1223 | # Wi-Fi Provisioning Manager 1224 | # 1225 | CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 1226 | CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 1227 | # end of Wi-Fi Provisioning Manager 1228 | 1229 | # 1230 | # Supplicant 1231 | # 1232 | CONFIG_WPA_MBEDTLS_CRYPTO=y 1233 | # CONFIG_WPA_WAPI_PSK is not set 1234 | # CONFIG_WPA_SUITE_B_192 is not set 1235 | # CONFIG_WPA_DEBUG_PRINT is not set 1236 | # CONFIG_WPA_TESTING_OPTIONS is not set 1237 | # CONFIG_WPA_WPS_STRICT is not set 1238 | # CONFIG_WPA_11KV_SUPPORT is not set 1239 | # end of Supplicant 1240 | # end of Component config 1241 | 1242 | # 1243 | # Compatibility options 1244 | # 1245 | # CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set 1246 | # end of Compatibility options 1247 | 1248 | # Deprecated options for backward compatibility 1249 | CONFIG_TOOLPREFIX="xtensa-esp32s3-elf-" 1250 | # CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set 1251 | # CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set 1252 | # CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set 1253 | CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y 1254 | # CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set 1255 | # CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set 1256 | CONFIG_LOG_BOOTLOADER_LEVEL=3 1257 | # CONFIG_APP_ROLLBACK_ENABLE is not set 1258 | # CONFIG_FLASH_ENCRYPTION_ENABLED is not set 1259 | # CONFIG_FLASHMODE_QIO is not set 1260 | # CONFIG_FLASHMODE_QOUT is not set 1261 | CONFIG_FLASHMODE_DIO=y 1262 | # CONFIG_FLASHMODE_DOUT is not set 1263 | # CONFIG_MONITOR_BAUD_9600B is not set 1264 | # CONFIG_MONITOR_BAUD_57600B is not set 1265 | CONFIG_MONITOR_BAUD_115200B=y 1266 | # CONFIG_MONITOR_BAUD_230400B is not set 1267 | # CONFIG_MONITOR_BAUD_921600B is not set 1268 | # CONFIG_MONITOR_BAUD_2MB is not set 1269 | # CONFIG_MONITOR_BAUD_OTHER is not set 1270 | CONFIG_MONITOR_BAUD_OTHER_VAL=115200 1271 | CONFIG_MONITOR_BAUD=115200 1272 | CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y 1273 | # CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set 1274 | CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y 1275 | # CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set 1276 | # CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set 1277 | CONFIG_OPTIMIZATION_ASSERTION_LEVEL=2 1278 | # CONFIG_CXX_EXCEPTIONS is not set 1279 | CONFIG_STACK_CHECK_NONE=y 1280 | # CONFIG_STACK_CHECK_NORM is not set 1281 | # CONFIG_STACK_CHECK_STRONG is not set 1282 | # CONFIG_STACK_CHECK_ALL is not set 1283 | # CONFIG_WARN_WRITE_STRINGS is not set 1284 | # CONFIG_DISABLE_GCC8_WARNINGS is not set 1285 | # CONFIG_ESP32_APPTRACE_DEST_TRAX is not set 1286 | CONFIG_ESP32_APPTRACE_DEST_NONE=y 1287 | CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y 1288 | CONFIG_ADC2_DISABLE_DAC=y 1289 | # CONFIG_EVENT_LOOP_PROFILING is not set 1290 | CONFIG_POST_EVENTS_FROM_ISR=y 1291 | CONFIG_POST_EVENTS_FROM_IRAM_ISR=y 1292 | CONFIG_ESP_SYSTEM_PD_FLASH=y 1293 | CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND=y 1294 | CONFIG_IPC_TASK_STACK_SIZE=1536 1295 | CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y 1296 | # CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set 1297 | CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 1298 | CONFIG_ESP32_PHY_MAX_TX_POWER=20 1299 | CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU=y 1300 | # CONFIG_ESP32S2_PANIC_PRINT_HALT is not set 1301 | CONFIG_ESP32S2_PANIC_PRINT_REBOOT=y 1302 | # CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set 1303 | # CONFIG_ESP32S2_PANIC_GDBSTUB is not set 1304 | CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y 1305 | CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 1306 | CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 1307 | CONFIG_MAIN_TASK_STACK_SIZE=3584 1308 | CONFIG_CONSOLE_UART_DEFAULT=y 1309 | # CONFIG_CONSOLE_UART_CUSTOM is not set 1310 | # CONFIG_ESP_CONSOLE_UART_NONE is not set 1311 | CONFIG_CONSOLE_UART=y 1312 | CONFIG_CONSOLE_UART_NUM=0 1313 | CONFIG_CONSOLE_UART_BAUDRATE=115200 1314 | CONFIG_INT_WDT=y 1315 | CONFIG_INT_WDT_TIMEOUT_MS=300 1316 | CONFIG_INT_WDT_CHECK_CPU1=y 1317 | CONFIG_TASK_WDT=y 1318 | # CONFIG_TASK_WDT_PANIC is not set 1319 | CONFIG_TASK_WDT_TIMEOUT_S=5 1320 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y 1321 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y 1322 | # CONFIG_ESP32_DEBUG_STUBS_ENABLE is not set 1323 | CONFIG_TIMER_TASK_STACK_SIZE=3584 1324 | # CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set 1325 | # CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set 1326 | CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y 1327 | CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 1328 | CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 1329 | CONFIG_MB_QUEUE_LENGTH=20 1330 | CONFIG_MB_SERIAL_TASK_STACK_SIZE=4096 1331 | CONFIG_MB_SERIAL_BUF_SIZE=256 1332 | CONFIG_MB_SERIAL_TASK_PRIO=10 1333 | CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT=y 1334 | CONFIG_MB_CONTROLLER_SLAVE_ID=0x00112233 1335 | CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20 1336 | CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 1337 | CONFIG_MB_CONTROLLER_STACK_SIZE=4096 1338 | CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 1339 | # CONFIG_MB_TIMER_PORT_ENABLED is not set 1340 | CONFIG_MB_TIMER_GROUP=0 1341 | CONFIG_MB_TIMER_INDEX=0 1342 | # CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set 1343 | CONFIG_TIMER_TASK_PRIORITY=1 1344 | CONFIG_TIMER_TASK_STACK_DEPTH=2048 1345 | CONFIG_TIMER_QUEUE_LENGTH=10 1346 | # CONFIG_L2_TO_L3_COPY is not set 1347 | # CONFIG_USE_ONLY_LWIP_SELECT is not set 1348 | CONFIG_ESP_GRATUITOUS_ARP=y 1349 | CONFIG_GARP_TMR_INTERVAL=60 1350 | CONFIG_TCPIP_RECVMBOX_SIZE=32 1351 | CONFIG_TCP_MAXRTX=12 1352 | CONFIG_TCP_SYNMAXRTX=12 1353 | CONFIG_TCP_MSS=1440 1354 | CONFIG_TCP_MSL=60000 1355 | CONFIG_TCP_SND_BUF_DEFAULT=5744 1356 | CONFIG_TCP_WND_DEFAULT=5744 1357 | CONFIG_TCP_RECVMBOX_SIZE=6 1358 | CONFIG_TCP_QUEUE_OOSEQ=y 1359 | # CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set 1360 | CONFIG_TCP_OVERSIZE_MSS=y 1361 | # CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set 1362 | # CONFIG_TCP_OVERSIZE_DISABLE is not set 1363 | CONFIG_UDP_RECVMBOX_SIZE=6 1364 | CONFIG_TCPIP_TASK_STACK_SIZE=3072 1365 | CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y 1366 | # CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set 1367 | # CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set 1368 | CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF 1369 | # CONFIG_PPP_SUPPORT is not set 1370 | CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 1371 | CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 1372 | CONFIG_ESP32_PTHREAD_STACK_MIN=768 1373 | CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y 1374 | # CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set 1375 | # CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set 1376 | CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 1377 | CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" 1378 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y 1379 | # CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set 1380 | # CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set 1381 | # CONFIG_USB_ENABLED is not set 1382 | CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y 1383 | CONFIG_SUPPORT_TERMIOS=y 1384 | CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 1385 | CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 1386 | # End of deprecated options 1387 | -------------------------------------------------------------------------------- /bolt-on-template/eagle/bolt-on_template.sch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | >VALUE 207 | 208 | 209 | 210 | 211 | 212 | <b>SUPPLY SYMBOL</b> 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | >DRAWING_NAME 251 | >LAST_DATE_TIME 252 | >SHEET 253 | Sheet: 254 | 255 | 256 | 257 | 258 | 259 | <b>FRAME</b><p> 260 | DIN A3, landscape with location and doc. field 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | <b>Pin Headers</b><p> 276 | Naming:<p> 277 | MA = male<p> 278 | # contacts - # rows<p> 279 | W = angled<p> 280 | <author>Created by librarian@cadsoft.de</author> 281 | 282 | 283 | <b>PIN HEADER</b> 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | >NAME 427 | 1 428 | 20 429 | 10 430 | >VALUE 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | PIN HEADER 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | >VALUE 488 | >NAME 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | <b>PIN HEADER</b> 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | IO/Sensors 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 626 | 627 | 628 | 629 | 630 | 631 | 633 | 634 | 635 | 636 | 637 | 638 | 645 | 646 | 647 | 648 | 649 | 650 | 652 | 653 | 654 | 655 | 656 | 657 | 659 | 660 | 661 | 662 | 663 | 664 | 666 | 667 | 668 | 669 | 670 | 671 | 678 | 679 | 680 | 681 | 682 | 683 | 685 | 686 | 687 | 688 | 689 | 690 | 692 | 693 | 694 | 695 | 696 | 697 | 699 | 700 | 701 | 702 | 703 | 704 | 706 | 707 | 708 | 709 | 710 | 711 | 713 | 714 | 715 | 716 | 717 | 718 | 720 | 721 | 722 | 723 | 724 | 725 | 727 | 728 | 729 | 730 | 731 | 732 | 734 | 735 | 736 | 737 | 738 | 739 | 741 | 742 | 743 | 744 | 745 | 746 | 748 | 749 | 750 | 751 | 752 | 753 | 755 | 756 | 757 | 758 | 759 | 760 | 762 | 763 | 764 | 765 | 766 | 767 | 769 | 770 | 771 | 772 | 773 | 774 | 776 | 777 | 778 | 779 | 780 | 781 | 783 | 784 | 785 | 786 | 787 | 788 | 790 | 791 | 792 | 793 | 794 | 795 | 797 | 798 | 799 | 800 | 801 | 802 | 804 | 805 | 806 | 807 | 808 | 809 | 811 | 812 | 813 | 814 | 815 | 816 | 818 | 819 | 820 | 821 | 822 | 823 | 825 | 826 | 827 | 828 | 829 | 830 | 832 | 833 | 834 | 835 | 836 | 837 | 839 | 840 | 841 | 842 | 843 | 844 | 846 | 847 | 848 | 849 | 850 | 851 | 853 | 854 | 855 | 856 | 857 | 858 | 860 | 861 | 862 | 863 | 864 | 865 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | Since Version 8.2, EAGLE supports online libraries. The ids 879 | of those online libraries will not be understood (or retained) 880 | with this version. 881 | 882 | 883 | Since Version 8.3, EAGLE supports URNs for individual library 884 | assets (packages, symbols, and devices). The URNs of those assets 885 | will not be understood (or retained) with this version. 886 | 887 | 888 | Since Version 8.3, EAGLE supports the association of 3D packages 889 | with devices in libraries, schematics, and board files. Those 3D 890 | packages will not be understood (or retained) with this version. 891 | 892 | 893 | 894 | --------------------------------------------------------------------------------