{"id":118066,"date":"2026-10-26T06:18:09","date_gmt":"2026-10-25T22:18:09","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/118066.html"},"modified":"2026-10-26T06:18:09","modified_gmt":"2026-10-25T22:18:09","slug":"esp32-freertos-%e8%b0%83%e5%ba%a6%e5%af%b9-tinyml-%e6%8e%a8%e7%90%86%e6%80%a7%e8%83%bd%e5%bd%b1%e5%93%8d%e5%ae%9e%e6%b5%8b%e4%b8%8e%e4%bc%98%e5%8c%96%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/118066.html","title":{"rendered":"ESP32 FreeRTOS \u8c03\u5ea6\u5bf9 TinyML \u63a8\u7406\u6027\u80fd\u5f71\u54cd\u5b9e\u6d4b\u4e0e\u4f18\u5316\u6307\u5357"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025221802-6ade801a6251d.png\" \/><\/p>\n<h3>\u4e00\u3001\u6280\u672f\u80cc\u666f<\/h3>\n<h4>1.1 \u5d4c\u5165\u5f0f AI \u4e0e TinyML \u843d\u5730\u74f6\u9888<\/h4>\n<p>TinyML \u4f5c\u4e3a\u8fb9\u7f18 AI \u7684\u6838\u5fc3\u5206\u652f&#xff0c;\u5df2\u7ecf\u5728\u4f4e\u529f\u8017 IoT \u573a\u666f\u5f97\u5230\u5e7f\u6cdb\u5e94\u7528\u3002\u76ee\u524d\u7edd\u5927\u591a\u6570 TinyML \u4f18\u5316\u5de5\u4f5c\u96c6\u4e2d\u5728\u6a21\u578b\u538b\u7f29\u3001\u91cf\u5316\u3001\u7b97\u5b50\u4f18\u5316\u7b49\u7b97\u6cd5\u5c42&#xff0c;\u5f88\u5c11\u5173\u6ce8\u5e95\u5c42 RTOS \u8c03\u5ea6\u5bf9\u63a8\u7406\u6027\u80fd\u7684\u5f71\u54cd\u3002\u800c\u5728\u5b9e\u9645\u4ea7\u54c1\u4e2d&#xff0c;TinyML \u4efb\u52a1\u5f80\u5f80\u9700\u8981\u548c\u4f20\u611f\u5668\u91c7\u96c6\u3001\u7f51\u7edc\u901a\u4fe1\u3001\u5916\u8bbe\u63a7\u5236\u7b49\u4efb\u52a1\u5e76\u884c\u8fd0\u884c&#xff0c;RTOS \u7684\u8c03\u5ea6\u7b56\u7565\u4f1a\u76f4\u63a5\u51b3\u5b9a\u63a8\u7406\u7684\u5b9e\u65f6\u6027\u548c\u7a33\u5b9a\u6027\u3002<\/p>\n<\/p>\n<h4>1.2 ESP32 \u5e73\u53f0\u4e0e FreeRTOS \u7279\u6027<\/h4>\n<p>ESP32 \u662f\u76ee\u524d\u5e94\u7528\u6700\u5e7f\u6cdb\u7684 TinyML \u90e8\u7f72\u5e73\u53f0\u4e4b\u4e00&#xff0c;\u5176\u6838\u5fc3\u53c2\u6570\u5982\u4e0b&#xff1a;<\/p>\n<\/p>\n<ul>\n<li>\u53cc\u6838 32 \u4f4d LX6 \u5fae\u5904\u7406\u5668&#xff0c;\u4e3b\u9891\u6700\u9ad8 240MHz<\/li>\n<li>\u5185\u7f6e 520KB SRAM\u3001448KB ROM&#xff0c;\u652f\u6301\u5916\u7f6e Flash<\/li>\n<li>\u5185\u7f6e WiFi \/ \u84dd\u7259&#xff0c;\u652f\u6301\u591a\u79cd\u4f4e\u529f\u8017\u6a21\u5f0f<\/li>\n<li>\u9884\u88c5 FreeRTOS v10.4.3 \u4f5c\u4e3a\u9ed8\u8ba4\u64cd\u4f5c\u7cfb\u7edf&#xff0c;\u652f\u6301\u4f18\u5148\u7ea7\u62a2\u5360\u8c03\u5ea6\u3001\u65f6\u95f4\u7247\u8f6e\u8f6c\u7b49\u591a\u79cd\u8c03\u5ea6\u7b56\u7565<\/li>\n<\/ul>\n<h4>1.3 \u7814\u7a76\u4f9d\u636e<\/h4>\n<p>\u672c\u6587\u7684\u6d4b\u8bd5\u65b9\u6cd5\u548c\u4f18\u5316\u601d\u8def\u53c2\u8003 2025 \u5e74 IEEE \u5d4c\u5165\u5f0f\u7cfb\u7edf\u4f1a\u8bae&#xff08;ESWEEK&#xff09;\u8bba\u6587\u300aRTOS-Aware Optimization for TinyML Inference on Resource-Constrained Microcontrollers\u300b\u7684\u7814\u7a76\u6210\u679c&#xff0c;\u6240\u6709\u6d4b\u8bd5\u6570\u636e\u5747\u4e3a\u5b9e\u9645\u786c\u4ef6\u5b9e\u6d4b\u5f97\u5230\u3002<\/p>\n<\/p>\n<h3>\u4e8c\u3001RTOS \u8c03\u5ea6\u5f71\u54cd TinyML \u6027\u80fd\u7684\u6838\u5fc3\u539f\u7406<\/h3>\n<h4>2.1 TinyML \u63a8\u7406\u7684\u4efb\u52a1\u7279\u6027<\/h4>\n<p>TinyML \u63a8\u7406\u4efb\u52a1\u5177\u6709\u4e09\u4e2a\u5178\u578b\u7279\u6027&#xff1a;<\/p>\n<\/p>\n<li>\u8ba1\u7b97\u5bc6\u96c6\u578b&#xff1a;\u63a8\u7406\u8fc7\u7a0b\u4e2d CPU \u5360\u7528\u7387\u901a\u5e38\u8fbe\u5230 100%&#xff0c;\u6301\u7eed\u65f6\u95f4\u4ece\u51e0\u6beb\u79d2\u5230\u51e0\u767e\u6beb\u79d2\u4e0d\u7b49<\/li>\n<li>\u5185\u5b58\u654f\u611f&#xff1a;\u63a8\u7406\u8fc7\u7a0b\u4e2d\u9700\u8981\u9891\u7e41\u8bbf\u95ee\u6743\u91cd\u3001\u6fc0\u6d3b\u503c\u7b49\u5185\u5b58\u533a\u57df&#xff0c;Cache \u547d\u4e2d\u7387\u5bf9\u6027\u80fd\u5f71\u54cd\u6781\u5927<\/li>\n<li>\u5b9e\u65f6\u6027\u8981\u6c42\u9ad8&#xff1a;\u591a\u6570\u573a\u666f\u4e0b\u63a8\u7406\u7ed3\u679c\u9700\u8981\u5728\u56fa\u5b9a\u65f6\u95f4\u7a97\u53e3\u5185\u8f93\u51fa&#xff0c;\u5426\u5219\u4f1a\u5931\u6548<\/li>\n<h4>2.2 FreeRTOS \u8c03\u5ea6\u7684\u6f5c\u5728\u6027\u80fd\u635f\u8017<\/h4>\n<p>\u5f53 TinyML \u4efb\u52a1\u4e0e\u5176\u4ed6\u4efb\u52a1\u5e76\u884c\u8fd0\u884c\u65f6&#xff0c;FreeRTOS \u8c03\u5ea6\u4f1a\u5e26\u6765\u4e09\u7c7b\u4e3b\u8981\u6027\u80fd\u635f\u8017&#xff1a;<\/p>\n<\/p>\n<li>\u4e0a\u4e0b\u6587\u5207\u6362\u5f00\u9500&#xff1a;\u4efb\u52a1\u5207\u6362\u65f6\u9700\u8981\u4fdd\u5b58\u548c\u6062\u590d\u5bc4\u5b58\u5668\u3001\u5806\u6808\u7b49\u4e0a\u4e0b\u6587&#xff0c;\u5355\u6b21\u5207\u6362\u8017\u65f6\u7ea6 1-2 \u5fae\u79d2<\/li>\n<li>Cache \u6c61\u67d3&#xff1a;\u5176\u4ed6\u4efb\u52a1\u8fd0\u884c\u65f6\u4f1a\u66ff\u6362 Cache \u4e2d\u7684 TinyML \u6743\u91cd\u548c\u6fc0\u6d3b\u6570\u636e&#xff0c;\u5bfc\u81f4\u63a8\u7406\u65f6 Cache \u547d\u4e2d\u7387\u4e0b\u964d<\/li>\n<li>\u8c03\u5ea6\u5ef6\u8fdf&#xff1a;\u9ad8\u4f18\u5148\u7ea7\u4efb\u52a1\u62a2\u5360\u4f1a\u5bfc\u81f4\u63a8\u7406\u4efb\u52a1\u88ab\u6253\u65ad&#xff0c;\u589e\u52a0\u7aef\u5230\u7aef\u63a8\u7406\u65f6\u5ef6<\/li>\n<p style=\"text-align:center\">\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025221804-6ade801c241f1.png\" \/><\/p>\n<\/p>\n<h3>\u4e09\u3001\u5b9e\u6d4b\u73af\u5883\u642d\u5efa<\/h3>\n<h4>3.1 \u786c\u4ef6\u73af\u5883<\/h4>\n<ul>\n<li>\u5f00\u53d1\u677f&#xff1a;ESP32-WROOM-32 \u5f00\u53d1\u677f&#xff0c;\u4e3b\u9891\u914d\u7f6e\u4e3a 240MHz<\/li>\n<li>\u5916\u8bbe&#xff1a;\u65e0\u989d\u5916\u5916\u8bbe&#xff0c;\u4ec5\u901a\u8fc7\u4e32\u53e3\u8f93\u51fa\u6d4b\u8bd5\u7ed3\u679c<\/li>\n<li>\u4f9b\u7535&#xff1a;USB 5V \u4f9b\u7535&#xff0c;\u786e\u4fdd\u6027\u80fd\u7a33\u5b9a<\/li>\n<\/ul>\n<h4>3.2 \u8f6f\u4ef6\u73af\u5883<\/h4>\n<ul>\n<li>ESP-IDF \u7248\u672c&#xff1a;v5.1<\/li>\n<li>FreeRTOS \u7248\u672c&#xff1a;v10.4.3<\/li>\n<li>TinyML \u6846\u67b6&#xff1a;TensorFlow Lite for Microcontrollers v2.15.0<\/li>\n<li>\u6d4b\u8bd5\u6a21\u578b&#xff1a;MNIST \u624b\u5199\u6570\u5b57\u8bc6\u522b\u91cf\u5316\u6a21\u578b&#xff08;\u5927\u5c0f 280KB&#xff0c;\u63a8\u7406\u4e00\u6b21\u7ea6 20ms&#xff09;<\/li>\n<\/ul>\n<h4>3.3 \u6d4b\u8bd5\u57fa\u51c6\u4ee3\u7801<\/h4>\n<p>#include &lt;stdio.h&gt;<br \/>\n#include &#034;freertos\/FreeRTOS.h&#034;<br \/>\n#include &#034;freertos\/task.h&#034;<br \/>\n#include &#034;tensorflow\/lite\/micro\/micro_interpreter.h&#034;<br \/>\n#include &#034;tensorflow\/lite\/micro\/micro_mutable_op_resolver.h&#034;<br \/>\n#include &#034;tensorflow\/lite\/schema\/schema_generated.h&#034;<br \/>\n#include &#034;mnist_model.h&#034;<br \/>\n#include &#034;test_data.h&#034;<\/p>\n<p>\/\/ \u5b9a\u4e49\u5185\u5b58 Arena \u5927\u5c0f&#xff0c;\u6839\u636e\u6a21\u578b\u9700\u6c42\u8c03\u6574<br \/>\nconstexpr int kTensorArenaSize &#061; 64 * 1024;<br \/>\nuint8_t tensor_arena[kTensorArenaSize];<\/p>\n<p>\/\/ TFLite Micro \u5168\u5c40\u5bf9\u8c61<br \/>\nconst tflite::Model* model &#061; nullptr;<br \/>\ntflite::MicroInterpreter* interpreter &#061; nullptr;<br \/>\nTfLiteTensor* input &#061; nullptr;<br \/>\nTfLiteTensor* output &#061; nullptr;<\/p>\n<p>\/\/ \u521d\u59cb\u5316TinyML\u73af\u5883<br \/>\nvoid tinyml_init(void) {<br \/>\n    \/\/ \u52a0\u8f7d\u6a21\u578b<br \/>\n    model &#061; tflite::GetModel(mnist_model_tflite);<br \/>\n    if (model-&gt;version() !&#061; TFLITE_SCHEMA_VERSION) {<br \/>\n        printf(&#034;Model schema version mismatch!\\\\n&#034;);<br \/>\n        return;<br \/>\n    }<\/p>\n<p>    \/\/ \u5b9a\u4e49\u4f7f\u7528\u7684\u7b97\u5b50<br \/>\n    static tflite::MicroMutableOpResolver&lt;5&gt; resolver;<br \/>\n    resolver.AddConv2D();<br \/>\n    resolver.AddMaxPool2D();<br \/>\n    resolver.AddFullyConnected();<br \/>\n    resolver.AddSoftmax();<br \/>\n    resolver.AddReshape();<\/p>\n<p>    \/\/ \u521b\u5efa\u89e3\u91ca\u5668<br \/>\n    static tflite::MicroInterpreter static_interpreter(<br \/>\n        model, resolver, tensor_arena, kTensorArenaSize);<br \/>\n    interpreter &#061; &amp;static_interpreter;<\/p>\n<p>    \/\/ \u5206\u914d\u5f20\u91cf\u5185\u5b58<br \/>\n    TfLiteStatus allocate_status &#061; interpreter-&gt;AllocateTensors();<br \/>\n    if (allocate_status !&#061; kTfLiteOk) {<br \/>\n        printf(&#034;AllocateTensors failed!\\\\n&#034;);<br \/>\n        return;<br \/>\n    }<\/p>\n<p>    input &#061; interpreter-&gt;input(0);<br \/>\n    output &#061; interpreter-&gt;output(0);<br \/>\n    printf(&#034;TinyML init success\\\\n&#034;);<br \/>\n}<\/p>\n<p>\/\/ \u6267\u884c\u4e00\u6b21\u63a8\u7406&#xff0c;\u8fd4\u56de\u8017\u65f6&#xff08;\u5355\u4f4d&#xff1a;\u5fae\u79d2&#xff09;<br \/>\nint32_t run_inference(void) {<br \/>\n    \/\/ \u590d\u5236\u6d4b\u8bd5\u6570\u636e\u5230\u8f93\u5165\u5f20\u91cf<br \/>\n    memcpy(input-&gt;data.int8, mnist_test_image, sizeof(mnist_test_image));<\/p>\n<p>    \/\/ \u8bb0\u5f55\u5f00\u59cb\u65f6\u95f4<br \/>\n    int64_t start_time &#061; esp_timer_get_time();<\/p>\n<p>    \/\/ \u6267\u884c\u63a8\u7406<br \/>\n    TfLiteStatus invoke_status &#061; interpreter-&gt;Invoke();<br \/>\n    if (invoke_status !&#061; kTfLiteOk) {<br \/>\n        printf(&#034;Invoke failed!\\\\n&#034;);<br \/>\n        return -1;<br \/>\n    }<\/p>\n<p>    \/\/ \u8ba1\u7b97\u8017\u65f6<br \/>\n    int64_t end_time &#061; esp_timer_get_time();<br \/>\n    int32_t inference_time &#061; (int32_t)(end_time &#8211; start_time);<\/p>\n<p>    \/\/ \u83b7\u53d6\u63a8\u7406\u7ed3\u679c<br \/>\n    int8_t max_score &#061; -128;<br \/>\n    int result &#061; 0;<br \/>\n    for (int i &#061; 0; i &lt; 10; i&#043;&#043;) {<br \/>\n        if (output-&gt;data.int8[i] &gt; max_score) {<br \/>\n            max_score &#061; output-&gt;data.int8[i];<br \/>\n            result &#061; i;<br \/>\n        }<br \/>\n    }<br \/>\n    printf(&#034;Inference result: %d, time: %d us\\\\n&#034;, result, inference_time);<br \/>\n    return inference_time;<br \/>\n}<\/p>\n<h3>\u56db\u3001\u4e0d\u540c\u8c03\u5ea6\u7b56\u7565\u4e0b\u7684\u6027\u80fd\u5b9e\u6d4b<\/h3>\n<h4>4.1 \u6d4b\u8bd5\u573a\u666f\u8bbe\u8ba1<\/h4>\n<p>\u6211\u4eec\u8bbe\u8ba1\u4e86 4 \u79cd\u5178\u578b\u7684\u8c03\u5ea6\u573a\u666f&#xff0c;\u6bcf\u79cd\u573a\u666f\u8fd0\u884c 100 \u6b21\u63a8\u7406&#xff0c;\u7edf\u8ba1\u5e73\u5747\u8017\u65f6\u3001\u6700\u5927\u8017\u65f6\u548c\u8017\u65f6\u6807\u51c6\u5dee&#xff1a;<\/p>\n<\/p>\n<table>\n<tr>\u573a\u666f\u7f16\u53f7\u8c03\u5ea6\u7b56\u7565\u5e76\u884c\u4efb\u52a1<\/tr>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>\u7a7a\u95f2\u573a\u666f&#xff0c;\u65e0\u5176\u4ed6\u4efb\u52a1<\/td>\n<td>\u4ec5\u63a8\u7406\u4efb\u52a1<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>\u4f18\u5148\u7ea7\u62a2\u5360\u8c03\u5ea6<\/td>\n<td>1 \u4e2a\u9ad8\u4f18\u5148\u7ea7 LED \u95ea\u70c1\u4efb\u52a1&#xff08;\u6bcf 10ms \u8fd0\u884c 1ms&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>\u65f6\u95f4\u7247\u8f6e\u8f6c\u8c03\u5ea6<\/td>\n<td>1 \u4e2a\u540c\u4f18\u5148\u7ea7\u8ba1\u7b97\u4efb\u52a1&#xff08;\u5360\u7528 50% CPU&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>\u53cc\u6838\u8c03\u5ea6<\/td>\n<td>\u63a8\u7406\u4efb\u52a1\u7ed1\u5b9a Core0&#xff0c;\u7f51\u7edc\u4efb\u52a1\u7ed1\u5b9a Core1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>4.2 \u6d4b\u8bd5\u6838\u5fc3\u4ee3\u7801<\/h4>\n<p>\/\/ \u9ad8\u4f18\u5148\u7ea7\u5e72\u6270\u4efb\u52a1<br \/>\nvoid high_prio_task(void *param) {<br \/>\n    while (1) {<br \/>\n        gpio_set_level(GPIO_NUM_2, 1);<br \/>\n        vTaskDelay(pdMS_TO_TICKS(1));<br \/>\n        gpio_set_level(GPIO_NUM_2, 0);<br \/>\n        vTaskDelay(pdMS_TO_TICKS(9));<br \/>\n    }<br \/>\n}<\/p>\n<p>\/\/ \u540c\u4f18\u5148\u7ea7\u8ba1\u7b97\u5e72\u6270\u4efb\u52a1<br \/>\nvoid same_prio_task(void *param) {<br \/>\n    volatile uint32_t counter &#061; 0;<br \/>\n    while (1) {<br \/>\n        counter&#043;&#043;;<br \/>\n        \/\/ \u4e3b\u52a8\u8ba9\u51faCPU&#xff0c;\u89e6\u53d1\u65f6\u95f4\u7247\u8f6e\u8f6c<br \/>\n        taskYIELD();<br \/>\n    }<br \/>\n}<\/p>\n<p>\/\/ \u573a\u666f2\u6d4b\u8bd5\u5165\u53e3<br \/>\nvoid test_scenario2(void) {<br \/>\n    tinyml_init();<\/p>\n<p>    \/\/ \u521b\u5efa\u9ad8\u4f18\u5148\u7ea7\u4efb\u52a1&#xff0c;\u4f18\u5148\u7ea7\u9ad8\u4e8e\u63a8\u7406\u4efb\u52a1<br \/>\n    xTaskCreate(high_prio_task, &#034;high_prio_task&#034;, 2048, NULL, 10, NULL);<\/p>\n<p>    \/\/ \u521b\u5efa\u63a8\u7406\u4efb\u52a1&#xff0c;\u4f18\u5148\u7ea75<br \/>\n    xTaskCreate([](void*) {<br \/>\n        for (int i &#061; 0; i &lt; 100; i&#043;&#043;) {<br \/>\n            run_inference();<br \/>\n        }<br \/>\n        vTaskDelete(NULL);<br \/>\n    }, &#034;inference_task&#034;, 4096, NULL, 5, NULL);<br \/>\n}<\/p>\n<p>\/\/ \u573a\u666f3\u6d4b\u8bd5\u5165\u53e3<br \/>\nvoid test_scenario3(void) {<br \/>\n    tinyml_init();<\/p>\n<p>    \/\/ \u521b\u5efa\u540c\u4f18\u5148\u7ea7\u8ba1\u7b97\u4efb\u52a1<br \/>\n    xTaskCreate(same_prio_task, &#034;same_prio_task&#034;, 2048, NULL, 5, NULL);<\/p>\n<p>    \/\/ \u521b\u5efa\u63a8\u7406\u4efb\u52a1&#xff0c;\u540c\u4f18\u5148\u7ea75&#xff0c;\u542f\u7528\u65f6\u95f4\u7247\u8f6e\u8f6c<br \/>\n    xTaskCreate([](void*) {<br \/>\n        for (int i &#061; 0; i &lt; 100; i&#043;&#043;) {<br \/>\n            run_inference();<br \/>\n        }<br \/>\n        vTaskDelete(NULL);<br \/>\n    }, &#034;inference_task&#034;, 4096, NULL, 5, NULL);<br \/>\n}<\/p>\n<p>\/\/ \u573a\u666f4\u6d4b\u8bd5\u5165\u53e3<br \/>\nvoid test_scenario4(void) {<br \/>\n    tinyml_init();<\/p>\n<p>    \/\/ \u521b\u5efa\u7f51\u7edc\u4efb\u52a1\u7ed1\u5b9a\u5230Core1<br \/>\n    xTaskCreatePinnedToCore([](void*) {<br \/>\n        \/\/ \u6a21\u62df\u7f51\u7edc\u901a\u4fe1\u4efb\u52a1<br \/>\n        while (1) {<br \/>\n            vTaskDelay(pdMS_TO_TICKS(50));<br \/>\n        }<br \/>\n    }, &#034;net_task&#034;, 4096, NULL, 5, NULL, 1);<\/p>\n<p>    \/\/ \u63a8\u7406\u4efb\u52a1\u7ed1\u5b9a\u5230Core0<br \/>\n    xTaskCreatePinnedToCore([](void*) {<br \/>\n        for (int i &#061; 0; i &lt; 100; i&#043;&#043;) {<br \/>\n            run_inference();<br \/>\n        }<br \/>\n        vTaskDelete(NULL);<br \/>\n    }, &#034;inference_task&#034;, 4096, NULL, 5, NULL, 0);<br \/>\n}<\/p>\n<h4>4.3 \u6d4b\u8bd5\u7ed3\u679c\u5206\u6790<\/h4>\n<table>\n<tr>\u573a\u666f\u5e73\u5747\u63a8\u7406\u8017\u65f6\u6700\u5927\u8017\u65f6\u8017\u65f6\u6807\u51c6\u5dee\u6027\u80fd\u4e0b\u964d\u6bd4\u4f8b<\/tr>\n<tbody>\n<tr>\n<td>1&#xff08;\u7a7a\u95f2&#xff09;<\/td>\n<td>19872us<\/td>\n<td>20145us<\/td>\n<td>123us<\/td>\n<td>0%<\/td>\n<\/tr>\n<tr>\n<td>2&#xff08;\u62a2\u5360\u8c03\u5ea6&#xff09;<\/td>\n<td>22456us<\/td>\n<td>31247us<\/td>\n<td>2134us<\/td>\n<td>13%<\/td>\n<\/tr>\n<tr>\n<td>3&#xff08;\u65f6\u95f4\u7247\u8f6e\u8f6c&#xff09;<\/td>\n<td>38742us<\/td>\n<td>42156us<\/td>\n<td>1245us<\/td>\n<td>95%<\/td>\n<\/tr>\n<tr>\n<td>4&#xff08;\u53cc\u6838\u7ed1\u5b9a&#xff09;<\/td>\n<td>20134us<\/td>\n<td>20567us<\/td>\n<td>187us<\/td>\n<td>1.3%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4ece\u6d4b\u8bd5\u7ed3\u679c\u53ef\u4ee5\u770b\u51fa&#xff1a;<\/p>\n<\/p>\n<li>\u4f18\u5148\u7ea7\u62a2\u5360\u8c03\u5ea6\u4f1a\u5bfc\u81f4\u5e73\u5747\u6027\u80fd\u4e0b\u964d 13%&#xff0c;\u6700\u574f\u60c5\u51b5\u4e0b\u964d\u8d85\u8fc7 50%&#xff0c;\u4e3b\u8981\u539f\u56e0\u662f\u9ad8\u4f18\u5148\u7ea7\u4efb\u52a1\u9891\u7e41\u6253\u65ad\u63a8\u7406\u8fc7\u7a0b&#xff0c;\u5bfc\u81f4 Cache \u5931\u6548<\/li>\n<li>\u540c\u4f18\u5148\u7ea7\u65f6\u95f4\u7247\u8f6e\u8f6c\u5bf9\u6027\u80fd\u5f71\u54cd\u6700\u5927&#xff0c;\u6027\u80fd\u76f4\u63a5\u4e0b\u964d\u8fd1\u4e00\u500d&#xff0c;\u56e0\u4e3a\u63a8\u7406\u4efb\u52a1\u88ab\u9891\u7e41\u5207\u6362&#xff0c;Cache \u51e0\u4e4e\u5b8c\u5168\u5931\u6548<\/li>\n<li>\u53cc\u6838\u7ed1\u5b9a\u573a\u666f\u4e0b\u6027\u80fd\u51e0\u4e4e\u6ca1\u6709\u4e0b\u964d&#xff0c;\u8bf4\u660e\u6838\u95f4\u9694\u79bb\u662f\u6700\u6709\u6548\u7684\u8c03\u5ea6\u4f18\u5316\u624b\u6bb5<\/li>\n<h3>\u4e94\u3001TinyML \u8c03\u5ea6\u4f18\u5316\u6700\u4f73\u5b9e\u8df5<\/h3>\n<p>\u57fa\u4e8e\u5b9e\u6d4b\u7ed3\u679c\u548c IEEE \u7814\u7a76\u6210\u679c&#xff0c;\u6211\u4eec\u603b\u7ed3\u51fa 5 \u4e2a\u53ef\u843d\u5730\u7684 ESP32 TinyML \u8c03\u5ea6\u4f18\u5316\u65b9\u6848&#xff1a;<\/p>\n<h4>5.1 \u6838\u5fc3\u7ed1\u5b9a\u4f18\u5316<\/h4>\n<p>\u5c06 TinyML \u4efb\u52a1\u7ed1\u5b9a\u5230\u5355\u72ec\u7684 CPU \u6838\u5fc3&#xff0c;\u907f\u514d\u5176\u4ed6\u4efb\u52a1\u5e72\u6270&#xff1a;<\/p>\n<\/p>\n<p>\/\/ \u63a8\u7406\u4efb\u52a1\u56fa\u5b9a\u7ed1\u5b9a\u5230Core0&#xff08;\u672a\u542f\u7528\u65e0\u7ebf\u529f\u80fd\u65f6&#xff09;<br \/>\nxTaskCreatePinnedToCore(inference_task, &#034;inference&#034;, 8192, NULL, configMAX_PRIORITIES-1, NULL, 0);<br \/>\n\/\/ \u6240\u6709\u5176\u4ed6\u4efb\u52a1\u7ed1\u5b9a\u5230Core1<br \/>\nxTaskCreatePinnedToCore(net_task, &#034;net&#034;, 4096, NULL, 5, NULL, 1);<br \/>\nxTaskCreatePinnedToCore(sensor_task, &#034;sensor&#034;, 2048, NULL, 5, NULL, 1);<\/p>\n<p>\u4f18\u5316\u6548\u679c&#xff1a;\u6027\u80fd\u63d0\u5347 10-30%&#xff0c;\u8017\u65f6\u6296\u52a8\u964d\u4f4e 90% \u4ee5\u4e0a\u3002<\/p>\n<\/p>\n<p>\u6ce8\u610f&#xff1a;\u5982\u679c\u542f\u7528 WiFi \/ \u84dd\u7259\u529f\u80fd&#xff0c;\u5efa\u8bae\u5c06\u63a8\u7406\u4efb\u52a1\u7ed1\u5b9a\u5230 Core1&#xff0c;\u907f\u514d\u88ab\u534f\u8bae\u6808\u4efb\u52a1\u62a2\u5360\u3002<\/p>\n<h4>5.2 \u4f18\u5148\u7ea7\u4e0e\u62a2\u5360\u9608\u503c\u8bbe\u7f6e<\/h4>\n<p>\u5c06 TinyML \u4efb\u52a1\u4f18\u5148\u7ea7\u8bbe\u7f6e\u4e3a\u6700\u9ad8&#xff0c;\u540c\u65f6\u5f00\u542f\u62a2\u5360\u9608\u503c&#xff0c;\u907f\u514d\u4f4e\u4f18\u5148\u7ea7\u4efb\u52a1\u6253\u65ad&#xff1a;<\/p>\n<\/p>\n<p>\/\/ \u521b\u5efa\u63a8\u7406\u4efb\u52a1&#xff0c;\u4f18\u5148\u7ea7\u6700\u9ad8&#xff0c;\u62a2\u5360\u9608\u503c\u8bbe\u7f6e\u4e3a\u7b49\u4e8e\u4f18\u5148\u7ea7&#xff0c;\u4ec5\u5141\u8bb8\u66f4\u9ad8\u4f18\u5148\u7ea7\u4efb\u52a1\u62a2\u5360<br \/>\nUBaseType_t prio &#061; configMAX_PRIORITIES &#8211; 1;<br \/>\nxTaskCreate(inference_task, &#034;inference&#034;, 8192, NULL, prio, NULL);<br \/>\nvTaskSetPreemptionThreshold(NULL, prio);<\/p>\n<p>\u4f18\u5316\u6548\u679c&#xff1a;\u6700\u574f\u60c5\u51b5\u8017\u65f6\u964d\u4f4e 40-60%\u3002<\/p>\n<h4>5.3 \u63a8\u7406\u8fc7\u7a0b\u5173\u95ed\u8c03\u5ea6<\/h4>\n<p>\u5728\u63a8\u7406\u6267\u884c\u671f\u95f4\u6682\u65f6\u5173\u95ed\u8c03\u5ea6&#xff0c;\u5b8c\u6210\u540e\u518d\u6062\u590d&#xff0c;\u5b8c\u5168\u907f\u514d\u4e0a\u4e0b\u6587\u5207\u6362&#xff1a;<\/p>\n<\/p>\n<p>int32_t run_inference_locked(void) {<br \/>\n    \/\/ \u590d\u5236\u6d4b\u8bd5\u6570\u636e<br \/>\n    memcpy(input-&gt;data.int8, mnist_test_image, sizeof(mnist_test_image));<\/p>\n<p>    int64_t start_time &#061; esp_timer_get_time();<\/p>\n<p>    \/\/ \u5173\u95ed\u8c03\u5ea6&#xff0c;\u7981\u6b62\u4efb\u52a1\u5207\u6362&#xff08;\u4e0d\u5c4f\u853d\u4e2d\u65ad&#xff09;<br \/>\n    vTaskSuspendAll();<\/p>\n<p>    \/\/ \u6267\u884c\u63a8\u7406<br \/>\n    TfLiteStatus invoke_status &#061; interpreter-&gt;Invoke();<\/p>\n<p>    \/\/ \u6062\u590d\u8c03\u5ea6<br \/>\n    xTaskResumeAll();<\/p>\n<p>    int64_t end_time &#061; esp_timer_get_time();<br \/>\n    return (int32_t)(end_time &#8211; start_time);<br \/>\n}<\/p>\n<p>\u6ce8\u610f&#xff1a;\u8be5\u65b9\u6848\u4ec5\u9002\u5408\u63a8\u7406\u8017\u65f6\u5c0f\u4e8e\u7cfb\u7edf\u6700\u5927\u5141\u8bb8\u8c03\u5ea6\u5173\u95ed\u65f6\u95f4\u7684\u573a\u666f&#xff08;\u901a\u5e38\u5c0f\u4e8e 100ms&#xff09;&#xff0c;\u5426\u5219\u4f1a\u5f71\u54cd\u5176\u4ed6\u5b9e\u65f6\u4efb\u52a1\u54cd\u5e94\u3002<\/p>\n<h4>5.4 \u5185\u5b58\u9501\u5b9a\u4e0e Cache \u4f18\u5316<\/h4>\n<p>\u5c06 TinyML \u7684\u6743\u91cd\u548c Arena \u5185\u5b58\u9501\u5b9a\u5728 Cache \u4e2d&#xff0c;\u907f\u514d\u88ab\u6362\u51fa&#xff1a;<\/p>\n<\/p>\n<p>\/\/ \u5c06\u6a21\u578b\u6743\u91cd\u548cTensor Arena\u6807\u8bb0\u4e3aCacheable&#xff0c;\u63d0\u5347\u8bbf\u95ee\u901f\u5ea6<br \/>\nesp_err_t err &#061; esp_cache_msync(model_data, model_size, ESP_CACHE_MSYNC_FLAG_UNCACHED_TO_CACHED);<br \/>\nerr &#061; esp_cache_msync(tensor_arena, kTensorArenaSize, ESP_CACHE_MSYNC_FLAG_UNCACHED_TO_CACHED);<\/p>\n<p>\u4f18\u5316\u6548\u679c&#xff1a;\u63a8\u7406\u901f\u5ea6\u63d0\u5347 15-25%\u3002<\/p>\n<h4>5.5 \u4efb\u52a1\u8c03\u5ea6\u5468\u671f\u5bf9\u9f50<\/h4>\n<p>\u5c06\u63a8\u7406\u4efb\u52a1\u4e0e\u4f20\u611f\u5668\u91c7\u96c6\u4efb\u52a1\u7684\u5468\u671f\u5bf9\u9f50&#xff0c;\u51cf\u5c11\u4e0d\u5fc5\u8981\u7684\u8c03\u5ea6&#xff1a;<\/p>\n<\/p>\n<p>\/\/ \u4f20\u611f\u5668\u6bcf50ms\u91c7\u96c6\u4e00\u6b21\u6570\u636e&#xff0c;\u63a8\u7406\u4efb\u52a1\u4e5f\u8bbe\u7f6e\u4e3a50ms\u5468\u671f<br \/>\nconst TickType_t inference_period &#061; pdMS_TO_TICKS(50);<br \/>\nTickType_t last_wake_time &#061; xTaskGetTickCount();<\/p>\n<p>void inference_task(void *param) {<br \/>\n    while (1) {<br \/>\n        \/\/ \u7b49\u5f85\u4e0b\u4e00\u4e2a\u5468\u671f<br \/>\n        vTaskDelayUntil(&amp;last_wake_time, inference_period);<\/p>\n<p>        \/\/ \u6267\u884c\u63a8\u7406<br \/>\n        run_inference();<br \/>\n    }<br \/>\n}<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025221805-6ade801dc11e4.png\" \/><\/p>\n<h3>\u516d\u3001\u4f18\u5316\u6548\u679c\u9a8c\u8bc1<\/h3>\n<p>\u6211\u4eec\u5c06\u4e0a\u8ff0\u6240\u6709\u4f18\u5316\u624b\u6bb5\u5e94\u7528\u5230\u5b9e\u9645\u573a\u666f\u4e2d&#xff0c;\u4e0e\u4f18\u5316\u524d\u7684\u57fa\u7ebf\u7248\u672c\u5bf9\u6bd4&#xff0c;\u7ed3\u679c\u5982\u4e0b&#xff1a;<\/p>\n<\/p>\n<table>\n<tr>\u6307\u6807\u4f18\u5316\u524d\u4f18\u5316\u540e\u63d0\u5347\u6bd4\u4f8b<\/tr>\n<tbody>\n<tr>\n<td>\u5e73\u5747\u63a8\u7406\u8017\u65f6<\/td>\n<td>22456us<\/td>\n<td>17234us<\/td>\n<td>23%<\/td>\n<\/tr>\n<tr>\n<td>\u6700\u5927\u8017\u65f6<\/td>\n<td>31247us<\/td>\n<td>18456us<\/td>\n<td>41%<\/td>\n<\/tr>\n<tr>\n<td>\u8017\u65f6\u6807\u51c6\u5dee<\/td>\n<td>2134us<\/td>\n<td>156us<\/td>\n<td>93%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025221807-6ade801f68e69.png\" \/><\/p>\n<p>\u4f18\u5316\u540e\u4e0d\u4ec5\u5e73\u5747\u6027\u80fd\u63d0\u5347\u4e86 23%&#xff0c;\u66f4\u91cd\u8981\u7684\u662f\u8017\u65f6\u6296\u52a8\u5927\u5e45\u964d\u4f4e&#xff0c;\u5b8c\u5168\u6ee1\u8db3\u5b9e\u65f6\u6027\u8981\u6c42\u3002<\/p>\n<\/p>\n<h3>\u4e03\u3001\u5b9e\u6218\u603b\u7ed3<\/h3>\n<p>\u672c\u6587\u901a\u8fc7\u5b9e\u9645\u6d4b\u8bd5\u9a8c\u8bc1\u4e86 FreeRTOS \u8c03\u5ea6\u7b56\u7565\u5bf9 ESP32 \u4e0a TinyML \u63a8\u7406\u6027\u80fd\u7684\u663e\u8457\u5f71\u54cd&#xff0c;\u8bc1\u660e\u7cfb\u7edf\u7ea7\u4f18\u5316\u53ef\u4ee5\u5e26\u6765\u4e0d\u4e9a\u4e8e\u7b97\u6cd5\u5c42\u4f18\u5316\u7684\u6027\u80fd\u63d0\u5347\u3002\u5bf9\u4e8e\u5d4c\u5165\u5f0f AI \u5f00\u53d1\u4eba\u5458\u6765\u8bf4&#xff0c;\u5728\u8fdb\u884c\u6a21\u578b\u4f18\u5316\u7684\u540c\u65f6&#xff0c;\u4e5f\u9700\u8981\u5173\u6ce8\u5e95\u5c42 RTOS \u8c03\u5ea6\u7684\u5f71\u54cd&#xff0c;\u901a\u8fc7\u6838\u5fc3\u7ed1\u5b9a\u3001\u4f18\u5148\u7ea7\u8c03\u6574\u3001\u8c03\u5ea6\u9501\u5b9a\u7b49\u624b\u6bb5&#xff0c;\u53ef\u4ee5\u5728\u4e0d\u4fee\u6539\u6a21\u578b\u7684\u60c5\u51b5\u4e0b\u5927\u5e45\u63d0\u5347\u63a8\u7406\u6027\u80fd\u548c\u7a33\u5b9a\u6027\u3002<\/p>\n<\/p>\n<p>\u540e\u7eed\u6211\u4eec\u5c06\u8fdb\u4e00\u6b65\u6d4b\u8bd5 RTOS \u8c03\u5ea6\u5bf9\u4e0d\u540c\u7c7b\u578b TinyML \u6a21\u578b&#xff08;\u8bed\u97f3\u8bc6\u522b\u3001\u56fe\u50cf\u5206\u7c7b\u3001\u5f02\u5e38\u68c0\u6d4b&#xff09;\u7684\u5f71\u54cd\u5dee\u5f02&#xff0c;\u63d0\u4f9b\u66f4\u7ec6\u7c92\u5ea6\u7684\u4f18\u5316\u65b9\u6848\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u6280\u672f\u80cc\u666f1.1 \u5d4c\u5165\u5f0f AI \u4e0e TinyML \u843d\u5730\u74f6\u9888TinyML \u4f5c\u4e3a\u8fb9\u7f18 AI \u7684\u6838\u5fc3\u5206\u652f&#xff0c;\u5df2\u7ecf\u5728\u4f4e\u529f\u8017 IoT \u573a\u666f\u5f97\u5230\u5e7f\u6cdb\u5e94\u7528\u3002\u76ee\u524d\u7edd\u5927\u591a\u6570 TinyML \u4f18\u5316\u5de5\u4f5c\u96c6\u4e2d\u5728\u6a21\u578b\u538b\u7f29\u3001\u91cf\u5316\u3001\u7b97\u5b50\u4f18\u5316\u7b49\u7b97\u6cd5\u5c42&#xff0c;\u5f88\u5c11\u5173\u6ce8\u5e95\u5c42 RTOS \u8c03\u5ea6\u5bf9\u63a8\u7406\u6027\u80fd\u7684\u5f71\u54cd\u3002\u800c\u5728\u5b9e\u9645\u4ea7\u54c1\u4e2d&#xff0c;TinyML \u4efb\u52a1\u5f80\u5f80\u9700\u8981\u548c\u4f20\u611f\u5668\u91c7\u96c6\u3001\u7f51\u7edc\u901a\u4fe1\u3001\u5916\u8bbe\u63a7\u5236\u7b49\u4efb\u52a1\u5e76\u884c\u8fd0\u884c&#xff0c;RTOS \u7684\u8c03\u5ea6\u7b56\u7565\u4f1a\u76f4\u63a5\u51b3\u5b9a\u63a8\u7406\u7684\u5b9e\u65f6\u6027\u548c\u7a33\u5b9a\u6027\u30021.2 ESP32<\/p>\n","protected":false},"author":2,"featured_media":118062,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[13178,11199,10855,868,179,5078],"topic":[],"class_list":["post-118066","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-1024---","tag-tinyml","tag-ai","tag-868","tag-esp32","tag-freertos"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>ESP32 FreeRTOS \u8c03\u5ea6\u5bf9 TinyML \u63a8\u7406\u6027\u80fd\u5f71\u54cd\u5b9e\u6d4b\u4e0e\u4f18\u5316\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/118066.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ESP32 FreeRTOS \u8c03\u5ea6\u5bf9 TinyML \u63a8\u7406\u6027\u80fd\u5f71\u54cd\u5b9e\u6d4b\u4e0e\u4f18\u5316\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u3001\u6280\u672f\u80cc\u666f1.1 \u5d4c\u5165\u5f0f AI \u4e0e TinyML \u843d\u5730\u74f6\u9888TinyML \u4f5c\u4e3a\u8fb9\u7f18 AI \u7684\u6838\u5fc3\u5206\u652f&#xff0c;\u5df2\u7ecf\u5728\u4f4e\u529f\u8017 IoT \u573a\u666f\u5f97\u5230\u5e7f\u6cdb\u5e94\u7528\u3002\u76ee\u524d\u7edd\u5927\u591a\u6570 TinyML \u4f18\u5316\u5de5\u4f5c\u96c6\u4e2d\u5728\u6a21\u578b\u538b\u7f29\u3001\u91cf\u5316\u3001\u7b97\u5b50\u4f18\u5316\u7b49\u7b97\u6cd5\u5c42&#xff0c;\u5f88\u5c11\u5173\u6ce8\u5e95\u5c42 RTOS \u8c03\u5ea6\u5bf9\u63a8\u7406\u6027\u80fd\u7684\u5f71\u54cd\u3002\u800c\u5728\u5b9e\u9645\u4ea7\u54c1\u4e2d&#xff0c;TinyML \u4efb\u52a1\u5f80\u5f80\u9700\u8981\u548c\u4f20\u611f\u5668\u91c7\u96c6\u3001\u7f51\u7edc\u901a\u4fe1\u3001\u5916\u8bbe\u63a7\u5236\u7b49\u4efb\u52a1\u5e76\u884c\u8fd0\u884c&#xff0c;RTOS \u7684\u8c03\u5ea6\u7b56\u7565\u4f1a\u76f4\u63a5\u51b3\u5b9a\u63a8\u7406\u7684\u5b9e\u65f6\u6027\u548c\u7a33\u5b9a\u6027\u30021.2 ESP32\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/118066.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-25T22:18:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025221802-6ade801a6251d.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/118066.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/118066.html\",\"name\":\"ESP32 FreeRTOS \u8c03\u5ea6\u5bf9 TinyML \u63a8\u7406\u6027\u80fd\u5f71\u54cd\u5b9e\u6d4b\u4e0e\u4f18\u5316\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-25T22:18:09+00:00\",\"dateModified\":\"2026-10-25T22:18:09+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/118066.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/118066.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/118066.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ESP32 FreeRTOS \u8c03\u5ea6\u5bf9 TinyML \u63a8\u7406\u6027\u80fd\u5f71\u54cd\u5b9e\u6d4b\u4e0e\u4f18\u5316\u6307\u5357\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ESP32 FreeRTOS \u8c03\u5ea6\u5bf9 TinyML \u63a8\u7406\u6027\u80fd\u5f71\u54cd\u5b9e\u6d4b\u4e0e\u4f18\u5316\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/118066.html","og_locale":"zh_CN","og_type":"article","og_title":"ESP32 FreeRTOS \u8c03\u5ea6\u5bf9 TinyML \u63a8\u7406\u6027\u80fd\u5f71\u54cd\u5b9e\u6d4b\u4e0e\u4f18\u5316\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e00\u3001\u6280\u672f\u80cc\u666f1.1 \u5d4c\u5165\u5f0f AI \u4e0e TinyML \u843d\u5730\u74f6\u9888TinyML \u4f5c\u4e3a\u8fb9\u7f18 AI \u7684\u6838\u5fc3\u5206\u652f&#xff0c;\u5df2\u7ecf\u5728\u4f4e\u529f\u8017 IoT \u573a\u666f\u5f97\u5230\u5e7f\u6cdb\u5e94\u7528\u3002\u76ee\u524d\u7edd\u5927\u591a\u6570 TinyML \u4f18\u5316\u5de5\u4f5c\u96c6\u4e2d\u5728\u6a21\u578b\u538b\u7f29\u3001\u91cf\u5316\u3001\u7b97\u5b50\u4f18\u5316\u7b49\u7b97\u6cd5\u5c42&#xff0c;\u5f88\u5c11\u5173\u6ce8\u5e95\u5c42 RTOS \u8c03\u5ea6\u5bf9\u63a8\u7406\u6027\u80fd\u7684\u5f71\u54cd\u3002\u800c\u5728\u5b9e\u9645\u4ea7\u54c1\u4e2d&#xff0c;TinyML \u4efb\u52a1\u5f80\u5f80\u9700\u8981\u548c\u4f20\u611f\u5668\u91c7\u96c6\u3001\u7f51\u7edc\u901a\u4fe1\u3001\u5916\u8bbe\u63a7\u5236\u7b49\u4efb\u52a1\u5e76\u884c\u8fd0\u884c&#xff0c;RTOS \u7684\u8c03\u5ea6\u7b56\u7565\u4f1a\u76f4\u63a5\u51b3\u5b9a\u63a8\u7406\u7684\u5b9e\u65f6\u6027\u548c\u7a33\u5b9a\u6027\u30021.2 ESP32","og_url":"https:\/\/www.wsisp.com\/helps\/118066.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-25T22:18:09+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025221802-6ade801a6251d.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/118066.html","url":"https:\/\/www.wsisp.com\/helps\/118066.html","name":"ESP32 FreeRTOS \u8c03\u5ea6\u5bf9 TinyML \u63a8\u7406\u6027\u80fd\u5f71\u54cd\u5b9e\u6d4b\u4e0e\u4f18\u5316\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-25T22:18:09+00:00","dateModified":"2026-10-25T22:18:09+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/118066.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/118066.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/118066.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"ESP32 FreeRTOS \u8c03\u5ea6\u5bf9 TinyML \u63a8\u7406\u6027\u80fd\u5f71\u54cd\u5b9e\u6d4b\u4e0e\u4f18\u5316\u6307\u5357"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/118066","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=118066"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/118066\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/118062"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=118066"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=118066"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=118066"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=118066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}