Spi on linux

Hi! Does someone knows how initialize the SPI port on m4 from vf61?
What compiler?
I already tried use mqx and ecos but unsuccessfully.

So you actually not seeking for SPI on Linux but for SPI on the firmware on Cortex-M4, is that right? Is there any specific reason you plan to use M4 instead of using SPI directly from Linux?

Thanks Stefan. You are right, I want use the M4 because I need acquire datas from a external ADC and the OS on A5 could interfer on determinism of aquisition.
Do you how access the spi by linux using mqx or ecos?

We do not have a full example which shows access of SPI via M4 core. We do have examples which use GPIO and PWM on the M4 side and communicate with Linux, see the Colibri VF61 Real-Time Demo (XY Pen Plotter).

Note also that there are two different types of SPI peripherals: DSPI and QuadSPI. The latter is a bidirectional form of SPI with 4 data lines. Typically DSPI is used for classic SPI communication.

eCos currently has no DSPI peripheral support. However, DSPI is not very complex, and depending on the protocol, can be easily programmed through register access directly from your application code. The Vybrid Reference Manual describes the DSPI periphery.

MQX is not officially supported by Toradex, but we do have an article which shows how to bring-up MQX. As far as I know, there is support for DSPI in MQX. At least the release notes of MQX lists limitations, which I assume means that there is a certain level of support for DSPI.

Hi Stefan, wich compiler do you recommend to use with this processor?
Regards.

@Julio, that depends on which operating system you are using. For eCos, we recommend to use the eCos toolchain (see also respective developer article), for bare-metal developement I usually use the Linaro emebdded compilers (either the 4.8 or the 4.9 series), the Linaro toolchain also seems to work well with MQX.