Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Design and build a testing/development PCB #7

Open
11 of 15 tasks
jonas-schievink opened this issue Aug 21, 2019 · 0 comments
Open
11 of 15 tasks

Design and build a testing/development PCB #7

jonas-schievink opened this issue Aug 21, 2019 · 0 comments
Assignees

Comments

@jonas-schievink
Copy link
Owner

jonas-schievink commented Aug 21, 2019

(this is currently being worked on on the dev-board branch) (merged into master)

I no longer have a way to test this crate, so I want to build a development PCB with a bunch of SPI Flash and EEPROM chips on it that can also be used for hardware-in-the-loop testing. The PCB should have the following features:

  • USB interface via a USB-to-SPI chip, to make development easy (no #![no_std] requirement since everything runs on a normal PC).
  • A Raspberry Pi header as an alternative interface, bypassing the USB chip (this makes it easy to set up a very compact CI bot that runs against real hardware).
  • Contain Flash and EEPROM chips (if applicable) of all chip families we want to support, that is, 24, 25, and 45 (are there others we want to support?). If possible, from different vendors.

This sort of setup is perhaps a bit overkill for a crate like this, but it seems like a very good starting point regarding HIL-testing that I can hopefully later transfer to Rubble, which is way more complex to test.

Current progress and notes:

  • Plugging in USB while the PCB is mounted on a Pi is potentially dangerous, it would be nice to make this safe. This means we need power supply switchover, and some sort of mux for switching the SPI mastering between Pi and the USB chip. The circuit should switch everything over to USB once it's connected. Connecting the grounds together should be safe, as long as an isolated power supply is used (isolation is required by regulations; and even the cheapest USB wall warts are isolated).
  • USB interface chips:
    • MCP2210
      • not FTDI
      • built-in bus release function for multi-master (meaning we might not need an analog mux)
    • FT4222H
      • supports dual/quad SPI (not really needed for now, but might be useful in the future)
  • Power selection circuit

Work left to do:

  • Find a set of Flash and EEPROM chips to test
  • Finish the schematic
    • Reset lines should be software-controllable The chips can't be reset (some only have a \HOLD pin that just pauses transfers), need to switch off their power supply I guess.
  • Decide on specific parts (mostly passives, etc.)
    • Need to be obtainable from a supplier that sells to private persons
  • Actually design the board
  • Order
  • Assemble
  • Electric Bringup
    • Test power switch
    • Test chip selects
    • Test bus release/ack mechanism
    • Test/Fix polarity of Master LEDs
    • Test chip power control
  • Write a library for talking to the USB chip (should be straightforward; the docs are pretty good, and libusb-rs should work fine; needs to impl embedded-hals SPI traits of course)
  • Configure the MCP so that using the Pi header is safe (by default, it is not)
    • NVRAM GPn modes set to GPIO, default direction input
  • Write a tool that uses either the USB chip library, or the Raspberry Pi's interface using linux-embedded-hal or rppal
@jonas-schievink jonas-schievink self-assigned this Oct 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant