I’m trying to deploy my model on a STM32WB55CCUX using the STM32Cube.MX package, following the tutorial on the docs page here. Everything does work fine until I include the code part in the while loop: EI_IMPULSE_ERROR res = run_classifier(&signal, &result, true);
A build / Run will then lead to the following output:
ST-LINK FW : V2J39S7
Board : --
Voltage : 1.74V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x495
Revision ID : Rev Y
Device name : STM32WB5x
Flash size : 256 KBytes
Device type : MCU
Device CPU : Cortex-M4
BL Version : 0xd5
Debug in Low Power mode enabled
Memory Programming ...
Opening and parsing file: st-link_gdb_server_a13924.srec
File : st-link_gdb_server_a13924.srec
Size : 158.36 KB
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 39]
Error: failed to erase memory
Error: failed to erase memory
Shutting down...
Exit.
I tried with both Quantized (int8) as Unoptimized (float32). Also played a bit witth the Linker settings Minimum Heap Size/ Stack size. Default 0x800 for both.
Can you tell me which one of your project have the issue?
Not entirely sure it is related to your project but I want to make sure your model is not too big for your board.
This is the first project in the list of my projects (4 chars).
In this project I just made a simple model based on 3 activities (standing, walking, running) with a total of 9 samples of each 10 seconds.
Could it be possible that the BLE Stack of the STM32WB series has overlap with the EI stack?
Thank you for your quick response and help on the compilation of the C++ standalone example.
I hope someone internally does have a solution for this, or an advice on how I can tackle this issue.
Note, I managed already to generate and import a similar .h5 model directly via STM32CubeMX (using X-CUBE-AI) for this microcontroller as an output of a tensorflow python script. But I would really prefer using your platform as this is way more intuitive.
Thank you!
Unfortunately still having issues loading the model. The X-CUBE-AI package from ST only supports Keras models ← 2.6.0. The .h5 model is saved with Keras 2.7.0.
Since the STM32Cube.MX package also does not work for the STM32WB, might it be possible that a 2.6.0. is provided by your website?
E010(InvalidModelError): Model saved with Keras 2.7.0 but <= 2.6.0 is supported