cancel
Showing results for 
Search instead for 
Did you mean: 

ll-aton Running a model but always get Nans as the result

I used the N6 to run the mobilenet_v1_0.25_224_fft_int8.tflite, input is correctly put into the input buffer, memory map activated, NPU RAM enabled, AXICACHE enabled, everything seems to be right, the input I also test the input inside the PC in python, and the model can output things right.

I dot know why, but in some steps it either jumps in to HardFault_Handler (if I directly start the debugging process without any break point)

or runs everything right (using some breakpoints inside the runtime and network.c) but outputs are all Nans

do you have any ideas how I can fix them ?

1 ACCEPTED SOLUTION

Accepted Solutions
Julian E.
ST Employee

Hello @Einstein_rookie_version ,

 

Can you explain further what you mean by "outputs are all Nans".

If the results are inconsistent, a common issue is the need to properly configure the RIF.
Don't forget to enable the clocks (for the NPU, RAM, etc.) during WFE operations.

 

This documents presents most of the matters to be careful with:

STM32N6 Example projects & tips for creating new projects

 

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.

View solution in original post

4 REPLIES 4
Julian E.
ST Employee

Hello @Einstein_rookie_version ,

 

Can you explain further what you mean by "outputs are all Nans".

If the results are inconsistent, a common issue is the need to properly configure the RIF.
Don't forget to enable the clocks (for the NPU, RAM, etc.) during WFE operations.

 

This documents presents most of the matters to be careful with:

STM32N6 Example projects & tips for creating new projects

 

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.

Thank you for the documentation, It's really helpful.

I found the problem, and It might because I was using UART to transfer a more than 100KB image to the in_buffer in the AXIRAM, so, the HAL_receive itself can not receive so much once, and I wrote a while fo it, to receive it seperately, with every timne 64KB max.

And the aligment of the data some how get wrong, do you have idea how I can use DMA of the N6 to directly transfer a more than 64KB data to the AXIRAM5 directly with only one time HALDMA beginning? the size is uint16, so max 64KB, I heard I might can use LLI of the HPDMA to do this, but I haven't learnd any thing about that, in university 64KB is far from enough, so have no experience on how to do that with LLI, do you have any documentations regarding that ?

Hello @Einstein_rookie_version ,

 

I don't have much knowledge about that kind of things.

I found this that may help you:

https://www.st.com/resource/en/application_note/an5593-how-to-use-the-gpdma-for-stm32-mcus-stmicroelectronics.pdf 

 

I think my colleagues answering questions for hardware will know much more that I do, please try asking them with the tag STM32N6 here: 

STM32 MCUs Boards and hardware tools - STMicroelectronics Community 

 

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.

Thanks a lot, I'll post my issue there :)

And thank you for you documentations:)