Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use spi-gpio for L band LO #48

Open
ThirteenFish opened this issue Jul 7, 2024 · 0 comments
Open

Use spi-gpio for L band LO #48

ThirteenFish opened this issue Jul 7, 2024 · 0 comments

Comments

@ThirteenFish
Copy link

The LO (a Si4133) for the L band down conversion on the C3 is configured via SPI. On the C3 these SPI lines (LBAND_SO_SCLK, LBAND_SO_SDATA, LBAND_SO_nSEN) are hooked up to GPIO and then bitbanged in Python. This is a bit slow and clunky but it turns out the Linux kernel already knows how to do bitbanged SPI. Using the kernel driver means we can drop some of our code and would present the LO as a standard SPI device.

This is a project in two parts:

  • Configuring the C3 devicetree to use spi-gpio. Documentation is a bit sparse on exactly how to do this but there's plenty of examples in the device trees contained in the kernel source (search compatible = "spi-gpio";) and you can try to make sense of the driver itself (at drivers/spi/spi-gpio.c) This will expose a /dev/spidev* device which can then be used by userspace. One concern is how to ensure it doesn't conflict with existing SPI devices? Currently the radios are fixed at spidev0.0 and spidev1.1.
  • Replacing the oresat-c3-software bitbanged implementation with spidev.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant