Using UART as wakeup source to wake Cortex A55 from Cortex M33 core on iMX93EVK

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using UART as wakeup source to wake Cortex A55 from Cortex M33 core on iMX93EVK

Using UART as wakeup source to wake Cortex A55 from Cortex M33 core on iMX93EVK

Hey everyone !! This piece covers how to configure the iMX93EVK board to wake up Cortex A55[ running Linux] from Cortex M33 core[running a bare metal application]. 

 

We will be using UART console on Cortex M33 to signal Cortex A55 via RPMSG to wake-up from deep sleep.

 

This can be done as follows:-

 

1. Boot iMX93EVK with RPMSG enabled DTB and load M33 binary via UBOOT

 

After booting to Uboot terminal, set the fdtfile variable to <rpmsg dtb> that will help us enable rpmsg in the kernel.

 

u-boot=> setenv fdtfile imx93-11x11-evk-rpmsg.dtb


u-boot=> setenv bootargs ${jh_clk} ${mcore_clk} console=${console} root=${mmcroot}

 

then, load the M33 binary from the eMMC partition 

 

u-boot=> fatload mmc 0:1 0x80000000 imx93-11x11-evk_m33_TCM_power_mode_switch.bin

18996 bytes read in 14 ms (1.3 MiB/s)

 

u-boot=> cp.b 0x80000000 0x201e0000 0x4a34

u-boot=> saveenv

Note:-  Do not run the M33 core via bootaux at this point, instead just boot to Linux

 

u-boot=> boot      

 

2. Starting the Cortex M33 core from Cortex A55[running Linux]

 

Once linux is up, load the elf of Cortex M33 power mode switch application.

 

echo ~/power_mode_switch.elf > /sys/devices/platform/imx93-cm33/remoteproc/remoteproc0/firmware

 

start the M33 core

 

echo start > /sys/devices/platform/imx93-cm33/remoteproc/remoteproc0/state

 

On console of Cortex M33 you will see the output as below:-

 

The log below shows the output of the power mode switch demo in the terminal window:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Start SRTM communication

Task 1 is working now

#################### Power Mode Switch Task ####################

Build Time: Nov 10 2023--15:15:16

Core Clock: 200000000Hz

Select the desired operation

Press A to enter: Normal RUN mode

Press B to enter: WAIT mode

Press C to enter: STOP mode

Press D to enter: SUSPEND mode

Press W to wakeup A55 core

Press M for switch M33 Root Clock frequency between OD/ND.

Waiting for power mode select..

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

M33 at this point is ready to wake up the A55 core.

 

 

3. Put A55 core to deep sleep and trigger a wakeup from M33 console

 

To put A55 to deep sleep

 

echo mem > /sys/power/state

you will see something like below on linux console:-

 

gauravsharma7_1-1707934074817.jpeg

 

At this point, A55 core is in deep sleep power saving mode. So the A55 console will not respond to any of the key presses. Go on, give it a try

 

Now to wake up this core, go to M33 serial console and type 'W' 

This will wake up A55 core and you will see the logs denoting that the core has woken up:-

 

gauravsharma7_0-1707933932760.jpeg



That's it! that's how you exercise UART wake-up functionality on imx93evk. Please feel free to drop any follow-up questions or additional thoughts on this.

評価なし
バージョン履歴
最終更新日:
‎02-19-2024 04:59 AM
更新者: