EIM on M4, while using Linux on i.MX7D

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

EIM on M4, while using Linux on i.MX7D

Jump to solution
1,307 Views
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!

Labels (2)
Tags (2)
0 Kudos
1 Solution
915 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

4 Replies
915 Views
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 Kudos
916 Views
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!
-----------------------------------------------------------------------------------------------------------------------

915 Views
dominiksteinhau
Contributor I

Hi Igor,

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

Best regards

Dominik

0 Kudos
915 Views
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 Kudos