cancel
Showing results for 
Search instead for 
Did you mean: 

Validation on Target issues-STM32L496G

allamjayaprakash
Associate II


Starting AI validation on target with random data... 
C:/Users/allamjayaprakash/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/9.1.0/Utilities/windows/stedgeai.exe validate --target stm32l4 --name network -m C:/Users/allamjayaprakash/Dropbox/STM32/STM32L496G-DISCO/Updated_Model.h5 --compression lossless --verbosity 1 --allocate-inputs --allocate-outputs --memory-pool C:\Users\ALLAMJ~1\AppData\Local\Temp\mxAI_workspace70879369566600013930323030594161238\mempools.json --workspace C:/Users/ALLAMJ~1/AppData/Local/Temp/mxAI_workspace70879369566600013930323030594161238 --output C:/Users/allamjayaprakash/.stm32cubemx/network_output --mode target --desc serial:COM1:115200 --classifier 
ST Edge AI Core v1.0.0-19894 
Setting validation data... 
 generating random data, size=10, seed=42, range=(0, 1) 
 I[1]: (10, 128, 1, 1)/float32, min/max=[0.005, 1.000], mean/std=[0.498, 0.294], input_1 
 No output/reference samples are provided 
Creating c (debug) info json file C:\Users\ALLAMJ~1\AppData\Local\Temp\mxAI_workspace70879369566600013930323030594161238\network_c_info.json 
  
 Exec/report summary (validate) 
 ------------------------------------------------------------------------------------------------------------------------------ 
 model file         :   C:\Users\allamjayaprakash\Dropbox\STM32\STM32L496G-DISCO\Updated_Model.h5                               
 type               :   keras                                                                                                   
 c_name             :   network                                                                                                 
 compression        :   lossless                                                                                                
 options            :   allocate-inputs, allocate-outputs, multi-heaps                                                          
 optimization       :   balanced                                                                                                
 target/series      :   stm32l4                                                                                                 
 memory pool        :   C:\Users\ALLAMJ~1\AppData\Local\Temp\mxAI_workspace70879369566600013930323030594161238\mempools.json    
 workspace dir      :   C:\Users\ALLAMJ~1\AppData\Local\Temp\mxAI_workspace70879369566600013930323030594161238                  
 output dir         :   C:\Users\allamjayaprakash\.stm32cubemx\network_output                                                   
 model_fmt          :   float                                                                                                   
 model_name         :   Updated_Model                                                                                           
 model_hash         :   0xf2ee7bd09a567da89f5684d36b016138                                                                      
 params #           :   75,237 items (293.89 KiB)                                                                               
 ------------------------------------------------------------------------------------------------------------------------------ 
 input 1/1          :   'input_1', f32(1x128x1), 512 Bytes, activations                                                         
 output 1/1         :   'dense', f32(1x5), 20 Bytes, activations                                                                
 macc               :   8,753,072                                                                                               
 weights (ro)       :   302,484 B (295.39 KiB) (1 segment) / +1,536(+0.5%) vs float model                                       
 activations (rw)   :   9,856 B (9.62 KiB) (1 segment) *                                                                        
 ram (total)        :   9,856 B (9.62 KiB) = 9,856 + 0 + 0                                                                      
 ------------------------------------------------------------------------------------------------------------------------------ 
 (*) 'input'/'output' buffers can be used from the activations buffer 
   
  Memory-pools summary (activations/ domain) 
  --------------- -------- -------------------------- ---------  
  name            id       used                       buffer#    
  --------------- -------- -------------------------- ---------  
  POOL_0_RAM      0        9.62 KiB (4.1%)            12         
  POOL_1_RAM2     unused   -                          0          
  weights_array   2        295.39 KiB (30248400.0%)   10         
  --------------- -------- -------------------------- ---------  
  Warning: ['POOL_1_RAM2'] memory pool is not used 
Running the Keras model... 
Running the STM AI c-model (AI RUNNER)...(name=network, mode=TARGET) 
INTERNAL ERROR: E801(HwIOError): Invalid firmware - COM1:115200

6 REPLIES 6
Julian E.
ST Employee

Hello @allamjayaprakash ,

 

JulianE_1-1741276284433.png

When launching the validation on target make sure to use the right come port.

The baudrate can also be an issue. For the STM32N6 it needs to be 921600.

 

Then make sure to check the enable box, select a valid communication port and select the right Toolchain/ide

 

Have a goo day,

Julian


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

I already tried these steps. But still, I am facing the same issue. 

I have a memory card on my STM32L496G-Disco, but I am unable to access that also. Can you suggest a process to access memory card.

Julian E.
ST Employee

Hello @allamjayaprakash ,

Are you sure to have a data cable and it is plugged on the st link port ? (on the right).

I just tried to do a validation of a simple model on your board and it worked with a baudrate of 115200.

 

Can you share your model (using a zip files).

 

Concerning the memory card, I don't have knowledge in this field, you should ask in a MCU forum board instead of this one.

 

Have a good day.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
allamjayaprakash
Associate II

Can you send me the step-by-step process That you implemented exactly? I consulted so many and read many articles, but no one is explaining the validation on Target. Kindly provide me with the exact process with a small video or screenshots. It will be very helpful to the entire STM community.

Hello @allamjayaprakash,

 

Sorry, I just saw that I never responded...

 

Here is a step by step guide on how to validate your model (attached on your last message) on a STM32L496:

1. Select the board on STM32CubeMX:

JulianE_3-1744127232148.png

2. I initialize peripherals by default when I am asked if want to.

3. Activate X Cube AI in Middleware and Software packages and select validation as application:

JulianE_0-1744127169358.png

4. I click automatically fix, but I don't think it changes anything.

5. click add network

6. Browse for your keras model:

JulianE_4-1744127421671.png

7. click validation on target, check the box and select cubeIDE.
In this case the default proposed baudrate is 209700, I leave it as it is.

It is the first time I use this board, read the data sheet for more info on that.

JulianE_5-1744127468415.png

Then click ok and it should work as it did for me

JulianE_1-1744127190548.png

 

Have a good day,

Julian

 


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.