SPI

From ElectroDragon
Jump to navigation Jump to search

Mode

Mode Line Header text
One line half-duplex PA5, PA7 -
Two lines full-duplex PA5, PA6, PA7 -
NSS full-deplex PA4 - CS, PA5, PA6, PA7 -

FPS speed for RPI SPI LCD

Each Pixel is 16 bits (RGB565)

  • FPS = 16 000 000(SPI) /480 (px) /320 (px) /32 (SPI FIFO) / 2 (R&W) =1.63 FPS
  • FPS

Linux

Install for MCP2515, for crystal 12Mhz

dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=12000000,interrupt=25,spimaxfrequency=2000000

dmesg | grep -i '\(can\|spi\)'

[    2.079149] systemd[1]: cron.service: Cannot add dependency job, ignoring: Unit cron.service is not loaded properly: Invalid argument.
[    3.774154] CAN device driver interface
[    3.794525] mcp251x spi0.0 can0: MCP2515 successfully initialized.