cancel
Showing results for 
Search instead for 
Did you mean: 

Hard Fault Occurs When Calling ai_mnetwork_run with X-CUBE-AI

dfsfdsf
Associate

Hello,

I am using X-CUBE-AI to run an AI model on an embedded system. While executing the following line of code:

batch = ai_mnetwork_run(net_exec_ctx[0].handle, ai_input, ai_output);

a Hard Fault error occurs.

What’s puzzling is that the error initially occurred, but without any code modifications or corrective actions, the issue temporarily resolved itself. However, after some time, the same Hard Fault error reappeared.

Has anyone encountered a similar issue, or could you suggest possible solutions?
I would greatly appreciate your help.

Thank you!

1 REPLY 1
Julian E.
ST Employee

Hello @dfsfdsf,

 

Sorry for the late answer.

Sometime I observe this also, but I don't really understand where it comes from.

I think it may be linked to printf. I don't know if you are using some.

 

I would suggest using the application template if you are not already and clicking no after loading a model and when cubeMX asks for automatic optimization of the clock and peripherals.

 

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.