Skip to main content
Associate II
January 25, 2026
Solved

stm32n6 gfx+cubeAI

  • January 25, 2026
  • 2 replies
  • 462 views

When using stm32n6 and enabling both GFX and AI models, the runtime continuously reports errors:
"Epoch controller error interrupt: EC_IRQ = 0x00000008 Epoch controller opcode counter: 0x00000000 Epoch controller tag: 0x00000000 ATON_STD_IRQHandler()@851: irqs=0xlx Assertion '0' failed: file 'E:/TouchGFXProjects/AR_Glasses/Middlewares/AI_Runtime/Npu/ll_aton/ll_aton_runtime.c', line 855, function: __LL_ATON_RT_IrqErr"
What could be the possible cause of this? Is it related to the XSPI2 bus? both GFX and cubeAI utilize XSP2.
The model used is the official demo program: st_yolo_x_nano_480_1.0_0.25_3_st_int8.tflite from STM32N6-GettingStarted-ObjectDetection-main.


I sincerely hope that st can help me solve this problem. Thanks

Best answer by Julian E.

Hi @dumb,

 

I know that we have a colleague working on a tutorial to use both touchGFX and XCubeAI.

I think he is using the same model.

 

Could you please wait for this document?

I would expect it to come relatively soon. I will look for a date.

 

I added this question link to our internal ticket regarding this tutorial.

 

I did some research earlier in the AI team and TouchGFX team to know how to use both and nobody knew (and they are focused on other subjects), so this article is the main possibility I see to answer such questions.

 

Thanks for your understanding.

Have a good day,

Julian 

2 replies

Julian E.
Julian E.Best answer
Technical Moderator
January 27, 2026

Hi @dumb,

 

I know that we have a colleague working on a tutorial to use both touchGFX and XCubeAI.

I think he is using the same model.

 

Could you please wait for this document?

I would expect it to come relatively soon. I will look for a date.

 

I added this question link to our internal ticket regarding this tutorial.

 

I did some research earlier in the AI team and TouchGFX team to know how to use both and nobody knew (and they are focused on other subjects), so this article is the main possibility I see to answer such questions.

 

Thanks for your understanding.

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.
dumbAuthor
Associate II
January 28, 2026

Thank you very much for your reply. I look forward to updates on your project. If possible, could you please provide me with a link when the project is completed? Thank you

Julian E.
Technical Moderator
January 28, 2026

Hi @dumb,

 

Yes of course.

Regarding the timeline, the tutorial is also handling camera middleware, and my colleague is waiting for a driver update.

Article is for now planned for mid-late February (rough estimation, depends on the update).

 

If you don't mind, could you share your project to take a look in the meantime.

 

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.
February 2, 2026

This error usually isn’t caused by the AI model itself. It mostly happens because the NPU cannot access memory correctly when it starts running.

Since both TouchGFX and Cube.AI are using XSPI2, the most likely issue is XSPI2 bus contention. When GFX is active, it continuously reads data (framebuffer, assets), and at the same time the NPU tries to fetch model data. If XSPI2 is busy, the NPU fails immediately, which is why the opcode counter stays at 0x00000000.

In simple terms:

AI alone works → XSPI2 is free

GFX + AI together → XSPI2 is overloaded

NPU cannot start → epoch controller error

Things to check:

Avoid placing NPU activations in XSPI2 (use internal RAM if possible)

Pause or limit TouchGFX refresh while AI inference is running

Make sure cache is cleaned/invalidated before starting inference

Test with GFX disabled to confirm it’s a bus-sharing issue

So yes, this problem is very likely related to XSPI2 being used by both GFX and AI at the same time, not a bad model or a Cube.AI bug.dooflixpc

dumbAuthor
Associate II
February 3, 2026

Initially, I suspected that the NPU startup failure was caused by the prominent usage of XSPI2. Therefore, I completely disabled the initialization and startup of GFX, leaving only the initialization and startup of the AI model. However, the error as described in the title still occurred. So, I thought it might be a memory conflict issue, but I had no clue about how to modify the memory. No matter how I tried, the same issue persisted