2025-03-07 2:28 AM
Hello,
I am facing a serious issue in my STM32 project related to the neai_classification function. Here's the context of my code:
When calling the function neai_classification(inst_current, output_class_buffer, &id_class);, I observe that the output_class_buffer contains very strange values (such as 0.72333524e-24), which don't make sense. More troubling, however, is that not only does output_class_buffer contain these weird values, but adjacent variables and registers are also being corrupted in the process.
In particular, variables that are adjacent to output_class_buffer are getting overwritten with unexpected values. This corruption extends to other variables in the program, causing them to hold invalid data, which in turn disrupts the application’s logic.
I would greatly appreciate any insights or suggestions on how to resolve this issue.
2025-03-07 6:53 AM - edited 2025-03-07 7:07 AM
Hello @ACP ,
Could you share your libneai.a and knowledge (in a zip fie).
Yes, it is possible, you need to check on your own the buffer size and alignment
It is unlikely but maybe
I would suggest putting hardware breakpoints (memory access) on the variables that are corrupted and check for the backtrace.
No, it is the first time we encounter such an issue
Could you share more details: data type, board used etc
Also what do you mean by " I observe that the output_class_buffer contains very strange values (such as 0.72333524e-24), which don't make sense".?
What make you think that these values are incorrect?
And: "adjacent variables and registers are also being corrupted in the process."
Do you mean your own variables are being corrupted?
Can you provide us with a memory map describing variables and allocated buffers?
Have a good day,
Julian