Is possible to configure i2c sensor to the M4 in the A7

cancel
Showing results for 
Search instead for 
Did you mean: 

Is possible to configure i2c sensor to the M4 in the A7

315 Views
Contributor II

Hello,

Is possible to configure i2c sensor to to the M4 (freertos) in the A7 (linux)?

I think the answer to the question is true. But I think that I must use the RDC like examples freeRtos.

But in linux I do not see an implementation of the rdc.

How should I proceed ?

Have you got an example to configure i2c sensor to the M4 (freertos) in the A7 (linux)?

Thanks,

Best Regards,

François.

Labels (2)
4 Replies

7 Views
Contributor I

I recently worked on a project using the iMX8MQ and iMX8M Mini, where we controlled many devices on the M4 and some others on the Linux side.

We did not use the RDC, though planned to for safety prior to production.

The trick is to disable in the Linux device tree the buses you wish to dedicate to the M4, so that Linux basically does not know they exist.  As a result, the M4 side can freely use them. This means you would need to start with NXP's Yocto distribution for your processor, modify and rebuild the device tree and install it on your board.  It wouldn't hurt to rebuild the whole thing (kernel, kernel modules, root fs) so they all definitely match each other.

Another trick relates to GPIO pin interrupts.  Each side (Linux and M4) can set up and receive interrupts, but only when they are properly allocated in separate 16 bit GPIO blocks.  The reason being, that there is only a single hardware interrupt line per 16 GPIOs (e.g., GPIO4 pins 0-15; GPIO1 pins 16-31; etc.).  As long as the hardware is correctly designed, the M4 can also use these without fear.  If you are using an NXP dev kit, you probably can't change much in this regard so would need to work within the limitations of that design.

This advice should apply to your i.MX7 Dual as well, I believe.

7 Views
Contributor II

Hello,

I have already read these examples but it seems to me that in linux nothing is done in devices  to manage the RDC. I didn't seen  examples in linux that use the RDC.  Have you got example in linux that use the RDC?

Thanks,

Best Regards,

François.

0 Kudos

7 Views
NXP TechSupport
NXP TechSupport

I don't find such example, but maybe you can see the topic about this, hope helpful for you

https://community.nxp.com/message/984763 

0 Kudos

7 Views
NXP TechSupport
NXP TechSupport

one can refer to the freerots source code, then check the samples

i.MX 7Dual Applications Processors | Dual Arm® Cortex®-A7 + Cortex-M4 | NXP 

0 Kudos