2025-09-24 10:41 PM
안녕하세요,
현재 STM32N657-DK 와 X-CUBE-AI(ST Edge AI Core v2.2.0)를 사용하고 있습니다 .
TensorFlow Lite 모델을 NPU에서 실행되도록 변환했으며, 펌웨어를 성공적으로 빌드하고 플래싱할 수 있습니다.
하지만 내가 전화하면:
ret = LL_ATON_RT_RunEpochBlock(&NN_Instance_Default);
함수가 결코 반환되지 않습니다.
시계 및 재설정
NPU 클럭을 활성화하고 재설정을 해제했습니다.
set_clk_sleep_mode()에서도 슬립 모드 클록이 활성화됩니다.
인터럽트 라우팅
보안 프로젝트에서:
NonSecure 프로젝트에서:
RIF / RISAF 구성
NPU 마스터/슬레이브 속성을 비보안 + 특권으로 구성했습니다.
NonSecure에서 NPU RAM3~RAM6(0x3420_0000~0x343C_0000)에 액세스할 수 있도록 RISAF 구성을 추가했습니다.
활성화 버퍼
32바이트 정렬로 .noncacheable 섹션에 선언되었습니다.
위의 모든 구성에도 불구하고:
LL_ATON_RT_RunEpochBlock()이 끝나지 않습니다.
ret은 LL_ATON_RT_DONE에 도달하지 않습니다.
NPU IRQ(NPU3_IRQn)가 트리거되지 않는 것 같습니다.
NPU가 비보안 환경에서 IRQ를 생성할 수 있도록 하려면 추가적인 RISAF 또는 RIF 구성이 필요합니까?
Epoch Controller 인터럽트를 활성화하려면 ATON_INTCTRL 레지스터(예: ATON_INTCTRL_CTRL_SET_EN, ATON_INTCTRL_INTORMSK0_SET)를 명시적으로 구성해야 합니까 ? 아니면 X-CUBE-AI가 이를 자동으로 처리해야 합니까?
이 문제가 NPU 메모리 영역 속성 (캐시 가능 대 캐시 불가능) 과 관련이 있을 수 있나요 ? 그렇다면 권장되는 구성은 무엇인가요?
보안/비보안 TrustZone 프로젝트에서 STM32N6 NPU 인터럽트 라우팅(NPU3_IRQn) 과 관련하여 알려진 문제가 있습니까 ?
응원해주셔서 감사합니다.
감사합니다.
[seokjs]
2025-09-30 4:07 PM
Hello, @Julian E.
Thank you again for your support.
I still have one unresolved issue: when I run inference and debug the code, the process does not proceed past the line
LL_ATON_RT_RunEpochBlock(&NN_Instance_Default);
Do you know of any possible solutions or common causes for this issue?
Have a good day,
[seokjs]
2025-09-30 4:55 PM
Hello, @Julian E.
Thank you again for your support.
I still have one unresolved issue: when I run inference and debug the code, the process does not proceed past the line
LL_ATON_RT_RunEpochBlock(&NN_Instance_Default);
Do you know of any possible solutions or common causes for this issue?
Have a good day,
[seokjs]
2025-10-01 8:01 AM
Hello, @seokjs.
Does the code completely stop at the RunEpochBlock() or does your ret variable never change to LL_ATON_RT_DONE? If it stays completely stuck I would suggest looking at the RunEpochBlock() function and adding your own return value at the end of it, since all of it's normal return values are protected by ifdef guards, there is the possibility your epoch block is straight up returning you nothing and as a result your variable never changes from the default value since declaration, getting you stuck in the loop.