Skip to main content
Visitor II
July 8, 2021
Solved

How to disable STM32MP1 cortex M4 core

  • July 8, 2021
  • 3 replies
  • 2032 views

We are using a STM32MP157 chip on a custom low-power design and don't need the Cortex M4 core. We would like to disable it properly to reduce power consumption and also remove dedicated support in linux kernel.

Is there any recommended way to do this ? Is disabling clock enough ?

Thanks in advance for your help

    This topic has been closed for replies.
    Best answer by PatrickF

    Hi,

    You usually have nothing to do.

    Cortex-M4 is disabled by default (i.e. MCU is in HOLD_BOOT, i.e. Cortex-M4 core clocks are stopped), unless it is specifically started (see https://wiki.st.com/stm32mpu/wiki/How_to_start_the_coprocessor_from_the_bootloader)

    Similar root clock gating is available for peripherals , i.e. if no related peripherals are assign to m4 in the device tree, their clock sources are not started by Linux. (See https://wiki.st.com/stm32mpu/wiki/How_to_assign_an_internal_peripheral_to_a_runtime_context)

    Note that many peripherals, which could be assigned to Linux runtime context, reside on 'MCU side', so when Linux is running and those peripherals are active, the related buses could be active too.

    There is no power switch able to remove the static leakage for the unused portion of the device (including Cortex-M4, memories, peripherals).

    Regards,

    Patrick

    3 replies

    PatrickFAnswer
    Technical Moderator
    July 8, 2021

    Hi,

    You usually have nothing to do.

    Cortex-M4 is disabled by default (i.e. MCU is in HOLD_BOOT, i.e. Cortex-M4 core clocks are stopped), unless it is specifically started (see https://wiki.st.com/stm32mpu/wiki/How_to_start_the_coprocessor_from_the_bootloader)

    Similar root clock gating is available for peripherals , i.e. if no related peripherals are assign to m4 in the device tree, their clock sources are not started by Linux. (See https://wiki.st.com/stm32mpu/wiki/How_to_assign_an_internal_peripheral_to_a_runtime_context)

    Note that many peripherals, which could be assigned to Linux runtime context, reside on 'MCU side', so when Linux is running and those peripherals are active, the related buses could be active too.

    There is no power switch able to remove the static leakage for the unused portion of the device (including Cortex-M4, memories, peripherals).

    Regards,

    Patrick

    PGEAuthor
    Visitor II
    July 8, 2021

    Ok so I believe it's disabled already.

    Then do you confirm I can also remove all rproc related things in the device tree files ?

    Thank you

    Patrick

    Technical Moderator
    July 8, 2021

    no need to remove (there could be side effects), just ensure nodes are:

    status = "disabled";

    But CubeMX should generate it for you.

    Regards,

    PGEAuthor
    Visitor II
    July 9, 2021

    ok thanks

    Technical Moderator
    July 9, 2021

    In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'