SPI - Serial Peripheral Interface

Example available on GitHub. Check liteboard SPI example.
SPI is a full-duplex, master - slave, synchronous serial interface used mainly used in embedded systems.
<uml> ditaa /————–\ /—————\
\————–/ | | | | | | | | /---------------\ | | | | | SPI slave 2 | | | | | | | | | | \------>+ SCLK | | | \-------->+ MOSI | | \-----------+ MISO | \------------>+ SS | | cYEL | \---------------/ </uml> |
Interface
SPI configurationTo configure SPI interface following parameters must be defined:
|
liteSOM and SPI
ECSPI block diagram (source: i.MX 6UltraLite Applications Processor Reference Manual) |
Each
Key features of the
|
Device Tree
ecspi1: ecspi@02008000 { #address-cells = <1>; #size-cells = <0>; compatible = "fsl,imx6ul-ecspi", "fsl,imx51-ecspi"; reg = <0x02008000 0x4000>; interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clks IMX6UL_CLK_ECSPI1>, <&clks IMX6UL_CLK_ECSPI1>; clock-names = "ipg", "per"; status = "disabled"; }; ecspi2: ecspi@0200c000 { [...] }; |