EIM on M4, while using Linux on i.MX7D

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

EIM on M4, while using Linux on i.MX7D

跳至解决方案
1,722 次查看
dominiksteinhau
Contributor I

Hi,

I would like to use the EIM on the Cortex-M4 of a i.MX7D to access an FPGA. Deploying my program to M4 using u-boot without starting Linux on the A7 works perfectly fine. I am already able to use EIM for communication when I manually reconfigure  the pins in iomuxc registers to use EIM.

However, when the program is running and I boot Linux on the A7, EIM stops working on the M4 and memory accesses to EIM memory space can take up to five seconds. I already tried to disable EIM on the Linux side changing the device-tree. I also tried to load the program for the M4 directly from Linux considering AN5317, which works fine (if I had a program running on M4 already previously, starting it from u-boot), but as soon as I access EIM memory space, Linux and the M4 freeze.

So, could there still be any conflict with EIM at the M4 running Linux? Can you give me some suggestions how to configure Linux in order to avoid those conflicts or do you have in case some example configuration?

Thank you very much for your help!

标签 (2)
标记 (2)
0 项奖励
回复
1 解答
1,330 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Dominik

issue may be caused by linux clock reinitialization during start-up, in such process
it is necesary to gate some clocks. This is described in sect.1.2.4 PFD restrictions
EB790 Configuration of Phase Fractional Dividers
http://cache.nxp.com/docs/en/engineering-bulletin/EB790.pdf
So EIM can stop working even not using by linux, if its parent clock source
needs to be used by some other peripheral (used by linux). One can try to debug it
using AN4553 Using Open Source Debugging Tools for Linux on i.MX Processors
http://www.nxp.com/assets/documents/data/en/application-notes/AN4553.pdf

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

4 回复数
1,330 次查看
erikfriedel
Contributor III

Hi

I know this is a bit offtopic, but could you maybe tell me how you loaded the code to the M4 from Linux?

I am trying to write a script but I am quiet new to loading files to the memory.

could you eventually share your code with me?

0 项奖励
回复
1,331 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Dominik

issue may be caused by linux clock reinitialization during start-up, in such process
it is necesary to gate some clocks. This is described in sect.1.2.4 PFD restrictions
EB790 Configuration of Phase Fractional Dividers
http://cache.nxp.com/docs/en/engineering-bulletin/EB790.pdf
So EIM can stop working even not using by linux, if its parent clock source
needs to be used by some other peripheral (used by linux). One can try to debug it
using AN4553 Using Open Source Debugging Tools for Linux on i.MX Processors
http://www.nxp.com/assets/documents/data/en/application-notes/AN4553.pdf

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,330 次查看
dominiksteinhau
Contributor I

Hi Igor,

thank you very much, that was indeed the problem, now it works!

Best regards

Dominik

0 项奖励
回复
1,330 次查看
jingyangxie
Contributor V

Hi,Dominik

    Could you share your solution ? I have reconfigure  the pins in iomuxc registers to use EIM on M4,and also clk. but I don't know how to access the addr of EIM(when in A9,I can use mmap).

0 项奖励
回复