AP Power Control on Cortex-M4F

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AP Power Control on Cortex-M4F

761 Views
pigbrian
Contributor I

Dear NXP,

I'm using imx8dxl with cortex-M4F.

When I test sc_pm_set_resource_power_mode() to power off of A35, A35 is always Power On mode.

 

    sc_pm_set_resource_power_mode(ipc, SC_R_A35_0, SC_PM_PW_MODE_STBY);
    sc_pm_get_resource_power_mode(ipc, SC_R_A35_0, &get_mode);
    PRINTF("SC_R_A35_0 Mode = %d\r\n", get_mode);
result : SC_R_A35_0 Mode = 3
 
    sc_pm_set_resource_power_mode(ipc, SC_R_A35_0, SC_PM_PW_MODE_OFF);
    sc_pm_get_resource_power_mode(ipc, SC_R_A35_0, &get_mode);
    PRINTF("SC_R_A35_0 Mode = %d\r\n", get_mode);
result : SC_R_A35_0 Mode = 3
 
I'm using below procedure.
 
1.boards/evkmimx8dxl/demo_apps/power_mode_switch/armgcc/build_ddr_debug.sh.
2. copy bin file to mk_image
3. make SOC=iMX8DXL REV=B0 flash_regression_linux_m4_ddr
4. download flash.bin
 
 
I want to power off A35 until check power resource on M4. when power resource is stable to boot A35, I want to power on A35.
 
Thank you.
Labels (1)
0 Kudos
Reply
4 Replies

688 Views
pigbrian
Contributor I

Dear Aldo,

Thank you for reply.

 

Could you explain how to to isolate the M4 subsystem in its own partition (pt_m4_0).

 

Thank you.

0 Kudos
Reply

730 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Please try by setting the boot flag SC_BD_FLAGS_NO_AP when building using mkimage -flags option, this flag makes it so AP do not boot even if requested by ROM.

Best regards/Saludos,
Aldo.

0 Kudos
Reply

722 Views
pigbrian
Contributor I

Dear Aldo,

 

Thank you for reply.

Firstly, I made a hello_world without flag. It's working well.


./../mkimage_imx8 -soc DXL -rev A0 -append mx8dxlb0-ahab-container.img -c -flags 0x00200000 -scfw scfw_tcm.bin -ap u-boot-atf.bin a35 0x80000000 -p3 -m4 m4_image.bin 0 0x88000000 -dummy 0x87fc0000 -out flash.bin

pigbrian_0-1706657545744.png

Secondly, I made with flags. but I think it's halt. it's not displayed "hello world" on M4.

./../mkimage_imx8 -soc DXL -rev A0 -append mx8dxlb0-ahab-container.img -c -flags 0x00200000 -flags SC_BD_FLAGS_NO_AP -scfw scfw_tcm.bin -ap u-boot-atf.bin a35 0x80000000 -p3 -m4 m4_image.bin 0 0x88000000 -dummy 0x87fc0000 -out flash.bin

pigbrian_1-1706657713310.png

Could you comment for me.

 

PS : When I used power_mode_switch demo, I got same result.

Thank you.

0 Kudos
Reply

703 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Sorry for the confusion, but please note that extra work is needed if you want for M4 to control the boot process.

First on SCFW, you'll need to isolate the M4 subsystem in its own partition (pt_m4_0), with its own resources. The remaining will live within the OS partition (pt_boot). For this you'll need to adapt the alt_config definition on the SCFW.

Next, while compiling SCFW you'll need to use this 2 flags:
SC_BD_FLAGS_ALT_CONFIG
SC_BD_FLAGS_NO_AP

First one will use the alternate configuration for hardware partitioning you have done above, the second one will prevent A35 from booting.

Please try it and let us know of the results.
Best regards/Saludos,
Aldo.

0 Kudos
Reply