SPI from M4 running freeRTOS on iMX7D

I am wondering if it is possible to use SPI from freeRTOS running on the M4 core on iMX7D, instead of using SPI from Linux on the A7?

Thanks!

Yes! it’s possible. ECSPI driver based on FreeRTOS is available here

An example usage of ECSPI driver is available here.

Hi bhuvan.tx,

Do you have any estimate on when there will be example of drivers usage for the M4 of the VF61?

Thanks!

We currently have no plans to add SPI support. However, in a micro controller environment you can also directly write to the SPI registers, essentially operating without (or with your own) driver.

I am using Arduino nano as slave, working in spi mode 0

Please create new post and do not resurrect old posts.

Hello!
I have gone through the above links and successfully compiled the code for ecspi2 for M4 but does not getting any response from the designated pin. I have used sodim pin no 196,59,67,194 for MISO,MOSI,SCK,SS respectively on Colibri Evaluation board with iMX7d. I have commented out the code of I2C bus and added the ecspi2 in board.h, pin_mux.h, pin_mux.c and main.h file uploaded. Can anybody point out the mistake or suitable change required?

I have taken the reference sample code from :
freertos-colibri-imx7/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_polling/master/main.c

just a note, I’m working on trying to port M4 spi code to the A7. I got it to compile, but along the way, lost the interrupt that code needs. The interrupts are very different between the M4 and A7. As of today April 12 2017, I am trying to get user interrupts working on my build so I can add in an interrupt that I think is needed by the spi code I ported. Unfortunately, little support exists for using the second A7 processor or doing bare metal on the A7 cores. I’m happy to trade code with others working on this stuff erickrieg at gmail

Please do not hijack other threads, this thread is clearly about using SPI on M4. Changing the topic to bare-metal A7 can lead to confusion. I created a new thread here: FreeRTOS bare metal Interrupt controller support on Cortex-A7 - Toradex Community