HM2_SPI(9)

πŸ’– HM2_SPI πŸ’–

okay so bestie, this is a HAL Component page β€” like, section 9 of the LinuxCNC docs β€” and it's literally called hm2_spi. It's a LinuxCNC HAL driver for the Mesa Electronics SPI Anything IO boards, with HostMot2 firmware. Buckle up, it's giving ✨hardware girlie✨ energy.


🌸 NAME 🌸

hm2_spi β€” LinuxCNC HAL driver for the Mesa Electronics SPI Anything IO boards, with HostMot2 firmware. no cap, that's the whole vibe.


πŸŽ€ SYNOPSIS πŸŽ€

loadrt hm2_spi [config="str[,str...]"] [spidev_path=path[,path...]]
       [spidev_rate=rate[,rate...]]

so here's the tea on every single parameter, and I'm not skipping a single one:

  • config [default: ""] β€” the HostMot2 config strings, all described in the hostmot2(9) manpage. go read that one, bestie, I'm not doing its job for it.
  • spidev_path [default: "/dev/spidev1.0"] β€” the path to the spi device node, which is a character special device living in /dev.
  • spidev_rate [default: 24000] β€” the desired rate of the SPI clock, in kHz. now listen: if the exact clock you asked for isn't available, a lower clock gets used instead. and because the spidev API is lowkey a mess, it is not possible for hal to report back which clock actually got used. so you ask, and the universe decides. 🫠

πŸ¦‹ DESCRIPTION πŸ¦‹

hm2_spi is a device driver that interfaces Mesa's SPI based Anything I/O boards (with the HostMot2 firmware) to the LinuxCNC HAL. it's the little matchmaker between your board and your machine, fr fr.

the supported boards are: 7I90HD.

the board must have a compatible firmware loaded on the board by the mesaflash(1) program. no firmware, no vibes, no service. πŸ”₯

okay important: hm2_spi is only available when LinuxCNC is configured with "uspace" realtime. if you're not on uspace, this is not your page, sorry babe. 😭

🌈 INTERFACE CONFIGURATION 🌈

it is possible for one SPI bus to connect several devices β€” in this configuration, a master device has several chip select lines. (shared bus, main character master, entourage of chip selects, you get it.)

but in order to meet realtime deadlines, hm2_spi should be used on a dedicated SPI interface, not shared with any other slaves. like, give it its own room. it deserves it. πŸ’…


⚑ REALTIME PERFORMANCE OF LINUX SPIDEV DRIVERS ⚑

as of kernel 3.8, most or all kernel SPI drivers do not achieve the high realtime response rate required for a typical LinuxCNC configuration. like, they simply cannot keep up. πŸ’€

the driver was tested with a modified version of the spi-s3c64xx SPI driver on the Odroid U3 platform. the patched kernel resides on github. that's the receipts, that's the lore.


⭐ SPI CLOCK RATES ⭐

the maximum SPI clock of the 7i90 is documented as 50MHz. other elements of the data path between HAL and the 7i90 may impose other limitations. so like, that's the ceiling on paper β€” reality may have opinions. πŸ‘‘


🌸 SEE ALSO 🌸


πŸ’œ LICENSE πŸ’œ

GPL β€” free as in go wild, bestie.


and that's the whole page, periodt. this one's from the LinuxCNC Documentation crew, dated 2008-05-13, and it lives at HM2_SPI(9) in the manual. mwah πŸ’– thanks for reading, go flash that firmware 🧚✨