2024-10-08(6): Project/Peripherals/Cross

Cross Development Recap

Project Kickoff: Hack Hardware In Groups

Devices Overview

Linux And I2C

Linux And PWM

Linux And SPI

  • ws2812-spi on Github. Look into ws2812/spi.cpp:

    struct spi_ioc_transfer tr = {
        .tx_buf = (unsigned long)xfer_bytes,
        .len = (uint32_t)xfer_size,
        .speed_hz = s.profile().frequency_hz,
    };
    
    int ret = ioctl(_fd, SPI_IOC_MESSAGE(1), &tr);
    
  • https://datasheets.raspberrypi.com/bcm2711/bcm2711-peripherals.pdf

    Things to take into accout when you use SPI to clock out multi-byte waveforms. Take care of “2.3.1. SPI implementation details”, where they say that there is a garanteed gap between two bytes. During that time the MOSI signal is also low (alas it’s SPI).