Skip to main content
Graduate
May 7, 2025
Question

STM32MP257F-DK CM33 peripheral initialization crashes A35

  • May 7, 2025
  • 5 replies
  • 940 views

I generated the M33 code using CubeIDE by following the lab manual.

During the driver initializations:
MX_ADC1_Init();
MX_I2C1_Init();
MX_ICACHE_Init();
MX_RTC_Init();

The A35 halts CPU1 and resets after sometime.

E/TC:0 stm32_iac_itr:192 IAC exceptions [159:128]: 0x10000000
E/TC:0 stm32_iac_itr:197 IAC exception ID: 156
E/TC:0 Panic at /usr/src/debug/optee-os-stm32mp/4.0.0-stm32mp-r1/core/drivers/firewall/stm32_iac.c:212 <stm32_iac_itr>
E/TC:0 TEE load address @ 0x82000000
E/TC:0 Call stack:
E/TC:0 0x82007ed8
E/TC:0 0x82041b44
E/TC:0 0x8202c2c0
E/TC:0 0x8203f678
E/TC:0 0x82013cf4
E/TC:0 0x820017dc
I/TC: Halting CPU 1

Unfortunately I failed to create astable functional M33 for my MPU project yet. Are there no proper manual of code generation and configuration?

    This topic has been closed for replies.

    5 replies

    Graduate
    May 7, 2025

    Attached is the ioc file.

    Technical Moderator
    May 7, 2025

    Hi @partha_sarathi1000 ,

    You are facing issue related to RIFF configuration. 

    If you generate project using CubeMX you might carefully consider the RIFF configuration pane. ( RIFSC for peripheral assignement, RISAB and RISAF for memory ) 

    Refer the related documentation on Wiki and in RM : 

    https://wiki.st.com/stm32mpu/wiki/RIFSC_internal_peripheral

    https://wiki.st.com/stm32mpu/wiki/RISAB_internal_peripheral

    https://wiki.st.com/stm32mpu/wiki/RISAF_internal_peripheral

    Olivier 

     

     

    Graduate
    May 7, 2025

    Thanks @Olivier GALLIEN for the reply.

    But did config RIF as per manual.

    What I have found that its crashing during GPIO RCC enable macros, like:
    __HAL_RCC_GPIOI_CLK_ENABLE();

    So in any peripheral initialization, wherever there is any GPIO RCC clock enable statement in its respective _MspInit() function, I commented them out and then the initialization passed without any issue.

    I tested UART is working with that. But I don't think its a solution.

    Regards
    Partha

    Visitor II
    June 29, 2025

    Hello,

    I am facing the exact same problem with this board when creating a blank project in STM32CubeIDE.

    The provided examples of the STM32MP2 package work, but they don't have any ioc CubeMX configuration file that would allow me to make my own project.

    Would it be possible to make the blank project work ?

    Visitor II
    June 29, 2025

    @Olivier GALLIENI can report the same problem on my end with this board, I can't get a blank M33 project to work. Would you have any tip ?

    Technical Moderator
    June 30, 2025

    Hi,

    Not RIF expert, but according to 


    IAC exception ID: 156

    this is referring to an illegal access to the RCC (i.e. CM33 might not have write access to the RCC register used for instance to enable a clock). So your findings are in right direction. Probably the GPIOI should be defined as shared in RCC (GPIOI is RCC resource 98)

    Unfortunately, I cannot help you to set the right config in CubeMx.

    Regards.

     

     

    ST Employee
    July 2, 2025

    Hi @partha_sarathi1000 ,

    To work on the M33, use the template provided in the firmware package. This template is compatible with the Starter Package.

    I believe your issue arises because you are building M33 firmware with an RIF configuration that differs from the one used by the A35. Are you using the Starter Package image?

    Which board are you using?

    Best regards,
    Febus