Spi communication m4 core to linux user space

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

Spi communication m4 core to linux user space

1,479 Views
Dhevan
Contributor IV

Hi,

     We are using two spi interface for sensor communication parallel we are reading two spi interface we are facing issue for data loss.

     Now we are planning to m4 code one spi and linux for one spi interface.

     1) How to assign one spi for linux and another spi for m4 core in device tree and necessary change ?

     2) How to transfer m4 spi data to linux user space code ?

Thanks & Regards,

         Vasu

Labels (1)
0 Kudos
Reply
2 Replies

1,474 Views
igorpadykov
NXP Employee
NXP Employee

Hi Vasu

 

1. one can look at ecspi examples (../driver_examples/ecspi)  in SDK_EVK-MIMX8MM

available on https://mcuxpresso.nxp.com/en/welcome

2. one can look at rpmsg i2c example (i2c-rpmsg-imx.c) as reference

https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/i2c/busses/i2c-rpmsg-imx.c?h=imx_5...

and description in sect.2.8 Remote Processor Messaging   i.MX Linux Reference Manual​

 

Best regards
igor

0 Kudos
Reply

1,456 Views
Dhevan
Contributor IV

Hi @igorpadykov,

       Thanks for your response.

       I have refereed rpmsg_lite_str_echo_rtos example code this code working fine.

       We want to read data from m4 core without send request.

          Example code flow :

                  echo "test" > /dev/ttyRPMSG30       // Linux

                  Receive message and send back message to /dev/ttyRPMSG30    // M4 core

         Our Requirement flow :

                 Send data continuously to /dev/ttyRPMSG30          // M4 Core

                 Linux user space we can read /dev/ttyRPMSG30 currently available data       // Linux

         Compulsory we has to send some dummy request then only we will get data ?

         How to achieve our requirement ?

Thanks & Regards,

        Vasu