What's the relationship between Cortex-M4 and A53 with Linux

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

What's the relationship between Cortex-M4 and A53 with Linux

4,541 次查看
wenfu
Contributor III

I need to use M4 core to handle SPI communication with a onboard device. Up to now I have read some docs about how to use M4 with the A53 core whith Linux OS. There some tips I have got, but I'm not sure if it is correct. Will some one figure it out?

1, M4 program is build with MCUXpresso SDK, the output bin image is flashed to emmc sectors, which is packaged with u-boot image, dtb, and hdmi firmwares. Adding enviroment variable to U-boot will boot up M4 core and A53 parallelly.

2, M4 can share all the peripherals with A53. For example in schematic I connect SPI device to ECSPIx founded in IMX8MDQLQRM.pdf, without any changes I can use ECSPIx in M4 program? If it is so, what happens if both side, M4 and A53, access the same ECSPIx?

3, M4 and A53 use RPMSG to share infos?

Also there some question I want to ask:

1, Can M4 image be loaded from Linux kernel? I mean use some tool to load a firmware to M4 instead of flashing it to EMMC. Also, can Linux reset M4 core?

5 回复数

4,230 次查看
wanbenzhou
Contributor II

I not found ttyRPMsg device in my system.  and  I am not sure the CM4 running , how to know the CM4 is running? 

0 项奖励
回复

4,230 次查看
Rita_Wang
NXP TechSupport
NXP TechSupport

You can see the document, it will do some help for you.

4,230 次查看
kunalkotecha1
Senior Contributor II

Hi wenfu,

Please find below in-line response:

M4 program is build with MCUXpresso SDK, the output bin image is flashed to emmc sectors, which is packaged with u-boot image, dtb, and hdmi firmwares. Adding enviroment variable to U-boot will boot up M4 core and A53 parallelly.

Yes. M4 image is flashed in eMMC.Refer to section "4.7.6 Running the Arm Cortex-M4 image" of Linux User's Guide for running the M4 image.

M4 can share all the peripherals with A53. For example in schematic I connect SPI device to ECSPIx founded in IMX8MDQLQRM.pdf, without any changes I can use ECSPIx in M4 program? If it is so, what happens if both side, M4 and A53, access the same ECSPIx?

RDC will take care of peripherals that are shared. If you are using any peripheral in M4 then you can disable that node in A7 and also use RDC API in M4 to lock that peripheral. Please refer to the section "3.2 Resource Domain Controller(RDC)" of IMX8MDQLQRM for the working of RDC.

M4 and A53 use RPMSG to share infos?

Yes.

Can M4 image be loaded from Linux kernel? I mean use some tool to load a firmware to M4 instead of flashing it to EMMC. Also, can Linux reset M4 core?

For now, I don't come across any documents for i.MX8 which provides a method for loading the M4 image from Linux kernel. I believe "SRC_M4RCR" can be used to reset the M4 core.

Attached the Reference manual and Linux user's guide for your reference. Feel free to reach out in case you have any further queries.

Regards,

Kunal

4,229 次查看
wenfu
Contributor III

Thank you.

I have noted Linux can use ttyRPMSG30, a tty-like API, to talk with M4. We need share big block of data between A53 and M4, about 16KBytes/sec. I'm considering if the tty-like API be suitable for this scenario?

0 项奖励
回复

4,229 次查看
kunalkotecha1
Senior Contributor II

Hi wenfu,

Please refer to section 2.8 and 10.1.4 for the RPMsg unit test in the attached i.MX Reference Manual. You can also verify the source code of the unit test and implement based application based on your requirement.

Regards,

Kunal