├── .gitattributes ├── .gitignore ├── Makefile ├── README.md ├── main ├── adxl345.c ├── component.mk ├── esp32_i2c_adxl345_main.c ├── i2c.c └── include │ ├── adxl345.h │ └── i2c.h └── sdkconfig /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | 30 | # Build 31 | build 32 | 33 | # Eclipse 34 | .cproject 35 | .settings 36 | .project 37 | 38 | .output 39 | *.old 40 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a 3 | # project subdirectory. 4 | # 5 | 6 | PROJECT_NAME := esp32-i2c-adxl345 7 | 8 | include $(IDF_PATH)/make/project.mk 9 | 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #ESP32 I2C ADXL345 Accelerometer Lib 2 | 3 | ##Introduction 4 | This is a i2c adxl345 lib designed for [esp-idf][1]. Currently there is no i2c lib in esp-idf repository, so I modified a lib from ESP8266 rtos sdk. 5 | 6 | ##Usage 7 | Please refer to esp32_i2c_adxl345_main.c. 8 | 9 | ##Notice 10 | I only tested GPIO4 and GPIO5. In theory other pins should also work with the same configurations. 11 | 12 | ##Credits 13 | - The I2C lib is based on [esp-open-rtos][2] 14 | - The adxl345 lib is based on [Geeetech wiki][3] example code 15 | 16 | 17 | [1]:https://github.com/espressif/esp-idf 18 | [2]:https://github.com/SuperHouse/esp-open-rtos 19 | [3]:http://www.geeetech.com/wiki/index.php/ADXL345_Triple_Axis_Accelerometer_Breakout -------------------------------------------------------------------------------- /main/adxl345.c: -------------------------------------------------------------------------------- 1 | #include "esp_log.h" 2 | #include "freertos/FreeRTOS.h" 3 | #include "stdint.h" 4 | #include "stdbool.h" 5 | #include "driver/gpio.h" 6 | #include "adxl345.h" 7 | #include "i2c.h" 8 | 9 | #define ACC (0x53)//(0xA7>>1) 10 | #define A_TO_READ (6) 11 | static const char *TAG = "adxl345"; 12 | 13 | // Write val to address register on ACC 14 | void writeTo(uint8_t DEVICE, uint8_t address, uint8_t val) { 15 | if (!i2c_slave_write_with_reg(DEVICE, address, val)) { 16 | ESP_LOGE(TAG, "I2C write error"); 17 | } 18 | } 19 | 20 | // Read num bytes starting from address register on ACC in to buff array 21 | void readFrom(uint8_t DEVICE, uint8_t address, uint8_t num, uint8_t buff[]) { 22 | if (!i2c_slave_read(DEVICE, address, buff, num)) { 23 | ESP_LOGE(TAG, "I2C read error"); 24 | } 25 | } 26 | 27 | void initAcc(uint8_t scl_pin, uint8_t sda_pin) { 28 | // Turning on ADXL345 29 | i2c_init(scl_pin, sda_pin); 30 | writeTo(ACC, 0x2D, 1 << 3); 31 | writeTo(ACC, 0x31, 0x0B); 32 | writeTo(ACC, 0x2C, 0x09); 33 | } 34 | 35 | void getAccelerometerData(int *result) { 36 | uint8_t regAddress = 0x32; 37 | uint8_t buff[A_TO_READ]; 38 | readFrom(ACC, regAddress, A_TO_READ, buff); 39 | result[0] = (((int) buff[1]) << 8) | buff[0]; 40 | result[1] = (((int) buff[3]) << 8) | buff[2]; 41 | result[2] = (((int) buff[5]) << 8) | buff[4]; 42 | } 43 | -------------------------------------------------------------------------------- /main/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # "main" pseudo-component makefile. 3 | # 4 | # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) 5 | -------------------------------------------------------------------------------- /main/esp32_i2c_adxl345_main.c: -------------------------------------------------------------------------------- 1 | #include "freertos/FreeRTOS.h" 2 | #include "freertos/task.h" 3 | #include "esp_system.h" 4 | #include "esp_log.h" 5 | #include "nvs_flash.h" 6 | #include "driver/gpio.h" 7 | #include "adxl345.h" 8 | 9 | #define SCL_PIN GPIO_NUM_17 10 | #define SDA_PIN GPIO_NUM_16 11 | static const char *TAG = "sensor"; 12 | 13 | static void sensorTask(void *pvParameters) { 14 | ESP_LOGI(TAG,"sensor task started\n"); 15 | 16 | initAcc(SCL_PIN,SDA_PIN); 17 | ESP_LOGI(TAG,"accelerometer started"); 18 | 19 | int acc[3]; 20 | while (1) { 21 | getAccelerometerData(acc); 22 | ESP_LOGI(TAG,"X=%d,Y=%d,Z=%d\n",(int8_t)acc[0],(int8_t)acc[1],(int8_t)acc[2]); 23 | vTaskDelay(1000 / portTICK_RATE_MS); 24 | } 25 | 26 | } 27 | 28 | void app_main() { 29 | ESP_ERROR_CHECK(nvs_flash_init()); 30 | ESP_LOGI("system","system inited"); 31 | 32 | xTaskCreate(&sensorTask, //pvTaskCode 33 | "sensorTask",//pcName 34 | 4096,//usStackDepth 35 | NULL,//pvParameters 36 | 4,//uxPriority 37 | NULL//pxCreatedTask 38 | ); 39 | 40 | } 41 | 42 | -------------------------------------------------------------------------------- /main/i2c.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "i2c.h" 4 | #include "esp_log.h" 5 | 6 | // I2C driver for ESP32 written for use with esp-idf 7 | // With calling overhead, we end up at ~100kbit/s 8 | #define CLK_HALF_PERIOD_US (1) 9 | 10 | #define CLK_STRETCH (10) 11 | 12 | static bool started; 13 | static uint8_t g_scl_pin; 14 | static uint8_t g_sda_pin; 15 | 16 | static const char *TAG = "sensor"; 17 | 18 | void i2c_init(uint8_t scl_pin, uint8_t sda_pin) 19 | { 20 | started = false; 21 | g_scl_pin = scl_pin; 22 | g_sda_pin = sda_pin; 23 | 24 | gpio_set_pull_mode(g_scl_pin,GPIO_PULLUP_ONLY); 25 | gpio_set_pull_mode(g_sda_pin,GPIO_PULLUP_ONLY); 26 | 27 | gpio_set_direction(g_scl_pin,GPIO_MODE_INPUT_OUTPUT); 28 | gpio_set_direction(g_sda_pin,GPIO_MODE_INPUT_OUTPUT); 29 | 30 | // I2C bus idle state. 31 | gpio_set_level(g_scl_pin,1); 32 | gpio_set_level(g_sda_pin,1); 33 | } 34 | 35 | static inline void i2c_delay(void) 36 | { 37 | ets_delay_us(CLK_HALF_PERIOD_US); 38 | } 39 | 40 | // Set SCL as input, allowing it to float high, and return current 41 | // level of line, 0 or 1 42 | static inline bool read_scl(void) 43 | { 44 | // gpio_write(g_scl_pin, 1); 45 | gpio_set_level(g_scl_pin,1); 46 | return gpio_get_level(g_scl_pin); // Clock high, valid ACK 47 | } 48 | 49 | // Set SDA as input, allowing it to float high, and return current 50 | // level of line, 0 or 1 51 | static inline bool read_sda(void) 52 | { 53 | gpio_set_level(g_sda_pin, 1); 54 | // TODO: Without this delay we get arbitration lost in i2c_stop 55 | i2c_delay(); 56 | return gpio_get_level(g_sda_pin); // Clock high, valid ACK 57 | } 58 | 59 | // Actively drive SCL signal low 60 | static inline void clear_scl(void) 61 | { 62 | gpio_set_level(g_scl_pin, 0); 63 | } 64 | 65 | // Actively drive SDA signal low 66 | static inline void clear_sda(void) 67 | { 68 | gpio_set_level(g_sda_pin, 0); 69 | } 70 | 71 | // Output start condition 72 | void i2c_start(void) 73 | { 74 | uint32_t clk_stretch = CLK_STRETCH; 75 | if (started) { // if started, do a restart cond 76 | // Set SDA to 1 77 | (void) read_sda(); 78 | i2c_delay(); 79 | while (read_scl() == 0 && clk_stretch--) ; 80 | // Repeated start setup time, minimum 4.7us 81 | i2c_delay(); 82 | } 83 | if (read_sda() == 0) { 84 | ESP_LOGE(TAG,"arbitration lost in i2c_start"); 85 | } 86 | // SCL is high, set SDA from 1 to 0. 87 | clear_sda(); 88 | i2c_delay(); 89 | clear_scl(); 90 | started = true; 91 | } 92 | 93 | // Output stop condition 94 | void i2c_stop(void) 95 | { 96 | uint32_t clk_stretch = CLK_STRETCH; 97 | // Set SDA to 0 98 | clear_sda(); 99 | i2c_delay(); 100 | // Clock stretching 101 | while (read_scl() == 0 && clk_stretch--) ; 102 | // Stop bit setup time, minimum 4us 103 | i2c_delay(); 104 | // SCL is high, set SDA from 0 to 1 105 | if (read_sda() == 0) { 106 | ESP_LOGE(TAG,"arbitration lost in i2c_stop"); 107 | } 108 | i2c_delay(); 109 | started = false; 110 | } 111 | 112 | // Write a bit to I2C bus 113 | static void i2c_write_bit(bool bit) 114 | { 115 | uint32_t clk_stretch = CLK_STRETCH; 116 | if (bit) { 117 | (void) read_sda(); 118 | } else { 119 | clear_sda(); 120 | } 121 | i2c_delay(); 122 | // Clock stretching 123 | while (read_scl() == 0 && clk_stretch--) ; 124 | // SCL is high, now data is valid 125 | // If SDA is high, check that nobody else is driving SDA 126 | if (bit && read_sda() == 0) { 127 | ESP_LOGE(TAG,"arbitration lost in i2c_write_bit"); 128 | } 129 | i2c_delay(); 130 | clear_scl(); 131 | } 132 | 133 | // Read a bit from I2C bus 134 | static bool i2c_read_bit(void) 135 | { 136 | uint32_t clk_stretch = CLK_STRETCH; 137 | bool bit; 138 | // Let the slave drive data 139 | (void) read_sda(); 140 | i2c_delay(); 141 | // Clock stretching 142 | while (read_scl() == 0 && clk_stretch--) ; 143 | // SCL is high, now data is valid 144 | bit = read_sda(); 145 | i2c_delay(); 146 | clear_scl(); 147 | return bit; 148 | } 149 | 150 | bool i2c_write(uint8_t byte) 151 | { 152 | bool nack; 153 | uint8_t bit; 154 | for (bit = 0; bit < 8; bit++) { 155 | i2c_write_bit((byte & 0x80) != 0); 156 | byte <<= 1; 157 | } 158 | nack = i2c_read_bit(); 159 | return !nack; 160 | } 161 | 162 | uint8_t i2c_read(bool ack) 163 | { 164 | uint8_t byte = 0; 165 | uint8_t bit; 166 | for (bit = 0; bit < 8; bit++) { 167 | byte = (byte << 1) | i2c_read_bit(); 168 | } 169 | i2c_write_bit(ack); 170 | return byte; 171 | } 172 | 173 | bool i2c_slave_write(uint8_t slave_addr, uint8_t *data, uint8_t len) 174 | { 175 | bool success = false; 176 | do { 177 | i2c_start(); 178 | if (!i2c_write(slave_addr << 1)) 179 | break; 180 | while (len--) { 181 | if (!i2c_write(*data++)) 182 | break; 183 | } 184 | i2c_stop(); 185 | success = true; 186 | } while(0); 187 | if (!success) { 188 | ESP_LOGE(TAG,"write error"); 189 | } 190 | return success; 191 | } 192 | 193 | bool i2c_slave_write_with_reg(uint8_t slave_addr,uint8_t reg_addr, uint8_t data) 194 | { 195 | bool success = false; 196 | do { 197 | i2c_start(); 198 | if (!i2c_write(slave_addr << 1)) 199 | break; 200 | if (!i2c_write(reg_addr)) 201 | break; 202 | if (!i2c_write(data)) 203 | break; 204 | i2c_stop(); 205 | success = true; 206 | } while(0); 207 | if (!success) { 208 | ESP_LOGE(TAG,"write error"); 209 | } 210 | return success; 211 | } 212 | 213 | bool i2c_slave_read(uint8_t slave_addr, uint8_t data, uint8_t *buf, uint32_t len) 214 | { 215 | bool success = false; 216 | do { 217 | i2c_start(); 218 | if (!i2c_write(slave_addr << 1)) { 219 | break; 220 | } 221 | i2c_write(data); 222 | i2c_stop(); 223 | i2c_start(); 224 | if (!i2c_write(slave_addr << 1 | 1)) { // Slave address + read 225 | break; 226 | } 227 | while(len) { 228 | *buf = i2c_read(len == 1); 229 | buf++; 230 | len--; 231 | } 232 | success = true; 233 | } while(0); 234 | i2c_stop(); 235 | if (!success) { 236 | ESP_LOGE(TAG,"read error"); 237 | } 238 | return success; 239 | } 240 | -------------------------------------------------------------------------------- /main/include/adxl345.h: -------------------------------------------------------------------------------- 1 | #ifndef __ADXL345_H__ 2 | #define __ADXL345_H__ 3 | #include "stdint.h" 4 | #include "stdbool.h" 5 | 6 | void initAcc(uint8_t scl_pin, uint8_t sda_pin); 7 | void getAccelerometerData(int *result); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /main/include/i2c.h: -------------------------------------------------------------------------------- 1 | #ifndef __I2C_H__ 2 | #define __I2C_H__ 3 | 4 | #include 5 | #include 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | // Init bitbanging I2C driver on given pins 12 | void i2c_init(uint8_t scl_pin, uint8_t sda_pin); 13 | 14 | // Write a byte to I2C bus. Return true if slave acked. 15 | bool i2c_write(uint8_t byte); 16 | 17 | // Read a byte from I2C bus. Return true if slave acked. 18 | uint8_t i2c_read(bool ack); 19 | 20 | // Write 'len' bytes from 'buf' to slave. Return true if slave acked. 21 | bool i2c_slave_write(uint8_t slave_addr, uint8_t *buf, uint8_t len); 22 | bool i2c_slave_write_with_reg(uint8_t slave_addr,uint8_t reg_addr, uint8_t data); 23 | // Issue a read operation and send 'data', followed by reading 'len' bytes 24 | // from slave into 'buf'. Return true if slave acked. 25 | bool i2c_slave_read(uint8_t slave_addr, uint8_t data, uint8_t *buf, uint32_t len); 26 | 27 | // Send start and stop conditions. Only needed when implementing protocols for 28 | // devices where the i2c_slave_[read|write] functions above are of no use. 29 | void i2c_start(void); 30 | void i2c_stop(void); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif /* __I2C_H__ */ 37 | -------------------------------------------------------------------------------- /sdkconfig: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated file; DO NOT EDIT. 3 | # Espressif IoT Development Framework Configuration 4 | # 5 | 6 | # 7 | # SDK tool configuration 8 | # 9 | CONFIG_TOOLPREFIX="xtensa-esp32-elf-" 10 | CONFIG_PYTHON="python" 11 | 12 | # 13 | # Bootloader config 14 | # 15 | # CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set 16 | # CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set 17 | CONFIG_LOG_BOOTLOADER_LEVEL_WARN=y 18 | # CONFIG_LOG_BOOTLOADER_LEVEL_INFO is not set 19 | # CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set 20 | # CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set 21 | CONFIG_LOG_BOOTLOADER_LEVEL=2 22 | 23 | # 24 | # Security features 25 | # 26 | # CONFIG_SECURE_BOOT_ENABLED is not set 27 | # CONFIG_FLASH_ENCRYPTION_ENABLED is not set 28 | 29 | # 30 | # Serial flasher config 31 | # 32 | CONFIG_ESPTOOLPY_PORT="COM4" 33 | CONFIG_ESPTOOLPY_BAUD_115200B=y 34 | # CONFIG_ESPTOOLPY_BAUD_230400B is not set 35 | # CONFIG_ESPTOOLPY_BAUD_921600B is not set 36 | # CONFIG_ESPTOOLPY_BAUD_2MB is not set 37 | # CONFIG_ESPTOOLPY_BAUD_OTHER is not set 38 | CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 39 | CONFIG_ESPTOOLPY_BAUD=115200 40 | CONFIG_ESPTOOLPY_COMPRESSED=y 41 | # CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set 42 | # CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set 43 | CONFIG_ESPTOOLPY_FLASHMODE_DIO=y 44 | # CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set 45 | CONFIG_ESPTOOLPY_FLASHMODE="dio" 46 | # CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set 47 | CONFIG_ESPTOOLPY_FLASHFREQ_40M=y 48 | # CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set 49 | # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set 50 | CONFIG_ESPTOOLPY_FLASHFREQ="40m" 51 | # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set 52 | # CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set 53 | CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y 54 | # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set 55 | # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set 56 | CONFIG_ESPTOOLPY_FLASHSIZE="4MB" 57 | 58 | # 59 | # Partition Table 60 | # 61 | CONFIG_PARTITION_TABLE_SINGLE_APP=y 62 | # CONFIG_PARTITION_TABLE_TWO_OTA is not set 63 | # CONFIG_PARTITION_TABLE_CUSTOM is not set 64 | CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" 65 | CONFIG_PARTITION_TABLE_CUSTOM_APP_BIN_OFFSET=0x10000 66 | CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" 67 | CONFIG_APP_OFFSET=0x10000 68 | CONFIG_PHY_DATA_OFFSET=0xf000 69 | CONFIG_OPTIMIZATION_LEVEL_DEBUG=y 70 | # CONFIG_OPTIMIZATION_LEVEL_RELEASE is not set 71 | 72 | # 73 | # Component config 74 | # 75 | CONFIG_BTC_TASK_STACK_SIZE=3072 76 | # CONFIG_BLUEDROID_MEM_DEBUG is not set 77 | CONFIG_BT_RESERVE_DRAM=0 78 | 79 | # 80 | # ESP32-specific config 81 | # 82 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set 83 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_160 is not set 84 | CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y 85 | CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240 86 | CONFIG_ESP32_ENABLE_STACK_WIFI=y 87 | # CONFIG_ESP32_ENABLE_STACK_BT is not set 88 | CONFIG_MEMMAP_SMP=y 89 | # CONFIG_MEMMAP_TRACEMEM is not set 90 | CONFIG_TRACEMEM_RESERVE_DRAM=0x0 91 | CONFIG_WIFI_ENABLED=y 92 | CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 93 | CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2048 94 | CONFIG_MAIN_TASK_STACK_SIZE=4096 95 | CONFIG_NEWLIB_STDOUT_ADDCR=y 96 | # CONFIG_NEWLIB_NANO_FORMAT is not set 97 | CONFIG_CONSOLE_UART_DEFAULT=y 98 | # CONFIG_CONSOLE_UART_CUSTOM is not set 99 | # CONFIG_CONSOLE_UART_NONE is not set 100 | CONFIG_CONSOLE_UART_NUM=0 101 | CONFIG_CONSOLE_UART_BAUDRATE=115200 102 | # CONFIG_ULP_COPROC_ENABLED is not set 103 | CONFIG_ULP_COPROC_RESERVE_MEM=0 104 | # CONFIG_ESP32_PANIC_PRINT_HALT is not set 105 | CONFIG_ESP32_PANIC_PRINT_REBOOT=y 106 | # CONFIG_ESP32_PANIC_SILENT_REBOOT is not set 107 | # CONFIG_ESP32_PANIC_GDBSTUB is not set 108 | CONFIG_ESP32_DEBUG_OCDAWARE=y 109 | CONFIG_INT_WDT=y 110 | CONFIG_INT_WDT_TIMEOUT_MS=300 111 | CONFIG_INT_WDT_CHECK_CPU1=y 112 | CONFIG_TASK_WDT=y 113 | # CONFIG_TASK_WDT_PANIC is not set 114 | CONFIG_TASK_WDT_TIMEOUT_S=5 115 | CONFIG_TASK_WDT_CHECK_IDLE_TASK=y 116 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y 117 | # CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set 118 | CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y 119 | # CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set 120 | # CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set 121 | CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y 122 | CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=0 123 | CONFIG_ESP32_PHY_AUTO_INIT=y 124 | # CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set 125 | CONFIG_ESP32_PHY_MAX_TX_POWER=20 126 | # CONFIG_ETHERNET is not set 127 | 128 | # 129 | # FreeRTOS 130 | # 131 | # CONFIG_FREERTOS_UNICORE is not set 132 | CONFIG_FREERTOS_CORETIMER_0=y 133 | # CONFIG_FREERTOS_CORETIMER_1 is not set 134 | # CONFIG_FREERTOS_CORETIMER_2 is not set 135 | CONFIG_FREERTOS_HZ=1000 136 | CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y 137 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE=y 138 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set 139 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY is not set 140 | CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 141 | CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y 142 | # CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set 143 | # CONFIG_FREERTOS_ASSERT_DISABLE is not set 144 | CONFIG_FREERTOS_BREAK_ON_SCHEDULER_START_JTAG=y 145 | # CONFIG_ENABLE_MEMORY_DEBUG is not set 146 | CONFIG_FREERTOS_ISR_STACKSIZE=1536 147 | # CONFIG_FREERTOS_LEGACY_HOOKS is not set 148 | # CONFIG_FREERTOS_DEBUG_INTERNALS is not set 149 | 150 | # 151 | # Log output 152 | # 153 | # CONFIG_LOG_DEFAULT_LEVEL_NONE is not set 154 | # CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set 155 | # CONFIG_LOG_DEFAULT_LEVEL_WARN is not set 156 | CONFIG_LOG_DEFAULT_LEVEL_INFO=y 157 | # CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set 158 | # CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set 159 | CONFIG_LOG_DEFAULT_LEVEL=3 160 | CONFIG_LOG_COLORS=y 161 | 162 | # 163 | # LWIP 164 | # 165 | # CONFIG_L2_TO_L3_COPY is not set 166 | CONFIG_LWIP_MAX_SOCKETS=4 167 | CONFIG_LWIP_THREAD_LOCAL_STORAGE_INDEX=0 168 | # CONFIG_LWIP_SO_REUSE is not set 169 | CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 170 | 171 | # 172 | # mbedTLS 173 | # 174 | CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384 175 | # CONFIG_MBEDTLS_DEBUG is not set 176 | CONFIG_MBEDTLS_HARDWARE_AES=y 177 | CONFIG_MBEDTLS_HARDWARE_MPI=y 178 | CONFIG_MBEDTLS_MPI_USE_INTERRUPT=y 179 | CONFIG_MBEDTLS_HARDWARE_SHA=y 180 | CONFIG_MBEDTLS_HAVE_TIME=y 181 | # CONFIG_MBEDTLS_HAVE_TIME_DATE is not set 182 | 183 | # 184 | # SPI Flash driver 185 | # 186 | # CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set 187 | --------------------------------------------------------------------------------