Runs ONE DEEPCRAFT model — or one set of models — at a time on CM55 (TFLite-Micro + Ethos-U55) and publishes a result snapshot for the UI and the MicroPython model link.
The archive exports 40 API functions (lib/edge_ai/api.txt), declared in ai_engine.h and ai_model_staged.h. printf and puts on CM55 do not come from this archive (printf/puts on CM55).
- Variant
- mtb-mpy and mtb-only
- Note
- Credit: the Ready Models are Infineon's. The Siren, Cough and Factory Alarm models this engine can run — siren_lib_eval.a, cough_lib_eval.a, alarm_lib_eval.a — are DEEPCRAFT™ Ready Models authored by Imagimob AB, an Infineon Technologies company, and published by Infineon: https://www.infineon.com/design-resources/embedded-software/deepcraft-edge-ai-solutions/deepcraft-ready-models They are why this kit can demonstrate real audio Edge AI at all. TESAIoT references them under the Imagimob AI Model Evaluation License Agreement and abides by it — the use here is research and teaching, we hold no rights in them and pass none on, and the archives are included in this package. Evaluating them on your own board is permitted for 60 days (§2.1); shipping a product that links them, redistributing them, or any commercial use is not (§2.2(a), §2.2(c)). For production, buy the non-evaluation model from Imagimob/Infineon, or train your own in DEEPCRAFT™ Studio: https://www.infineon.com/design-resources/embedded-software/deepcraft-edge-ai-solutions/deepcraft-studio A model you train yourself runs on this same API unchanged, and its licensing metrics are not the Ready Model ones. Full credit, the clause citations and our disclosed per-model symbol renaming: THIRD_PARTY_NOTICES.md §2.4.
-
Credit: the models this firmware ships are Infineon's too. The motion, audio and radar models — proj_cm55/modules/ai_models/model_motion.c, model_audio.c and model_radar.c — are DEEPCRAFT™ Studio exports, generated by Infineon's Edge AI tool and copyright Imagimob AB, an Infineon Technologies company. The line at the top of each file reads "Copyright © 2023- Imagimob AB, All Rights Reserved." TESAIoT did not train them, did not author them and does not own them; what is ours is the engine around them — the model registry, model sets and the run-time loader. Anything generated by DEEPCRAFT™ Studio, or derived from a DEEPCRAFT™ model, is Imagimob's and Infineon's. Those headers reserve all rights and grant nothing, so nothing here licenses them on, and the Apache-2.0 grant on this project's own code does not reach inside those files. The use here is research and teaching, not commercial deployment: to put these models, or anything derived from them, into a product, settle it with Infineon and Imagimob first. Train your own at https://www.infineon.com/design-resources/embedded-software/deepcraft-edge-ai-solutions/deepcraft-studio Full entry: THIRD_PARTY_NOTICES.md §2.2 and §4.3.
CM55 is variant-agnostic: every symbol in this module behaves identically in the mtb-mpy and mtb-only builds.
Two layers of access, and they do not overlap. C code compiled into proj_cm55 calls ai_engine_* and ai_model_staged_* directly. MicroPython** runs on CM33_NS and cannot call ai_engine_* at all: it reaches this module only over the IPC model link — edge_ai.select(), edge_ai.result(), edge_ai.diag() and the rest, whose semantics are the ones documented here. The full statement is Two layers of access — who can call what.
The select → confirm → start discipline
The engine reports two indices, and the whole module hinges on the difference:
A cold TFLite-Micro + Ethos-U55 bring-up runs inside the model's init(), so active() lags requested() by the whole cold-init window (the MicroPython side budgets 15 s for it). Three rules follow:
- Select, then confirm, then rely on start. After ai_engine_start(), poll: active() == want means loaded. Otherwise poll requested() — once requested() == want has been seen, a later requested() < 0 can only mean the model's init() failed, so fail fast instead of waiting the ceiling.
- Never gate a fallback on ai_engine_active(). A fallback that tests active() fires while a perfectly good start is still in flight and clobbers the selection back to the default model — the recorded symptom is "select Radar, Load, get Motion". Guard on ai_engine_requested().
- ai_engine_init() must precede ai_engine_start(); it is idempotent, so the shipped idiom re-calls it immediately before every start.
Set pseudo-indices (252..255) and the legacy 13/14/15 translation are covered in Set pseudo-indices and the legacy translation.