Electronics project notes/Microcontroller and computer platforms
Contents
- 1 Microcontrollers and their common platforms (or otherwise comparatively slow)
- 2 Haven't personally used" list
- 3 Computer-like
- 4 NSLU, NSLU2
- 5 Router hacking (mostly for Linksys WRT54 and similar)
- 6 See also
Microcontrollers and their common platforms (or otherwise comparatively slow)
Some pointers for choosing:
- programmability ease - if it means an expensive programmer, hobbyists won't be so interested. If you can do it via an USB/serial cable, yay.
- memory size
- (...and limits imposed by architecture)
- 8KB isn't much if you want one complex library
- External RAM/ROM is possible, but often bothersome
- physical packaging - if it has a tiny-pitch SMT, you'll probably rely on buying pre-built boards, while 0.1" DIP is more flexible, and can be cheaper than said boards.
AVR and Arduino
The Arduino is mostly based on (8-bit) Atmel AVR[1] microcontrollers. (With recent models this is shifting)
Probably the main reason for its initial popularity is the fairly low price combined with the ease of prototyping (both for standalone and for slave-to-a-PC projects).
Arduinos/AVRs technically always were slowish for their price, in that even a decade ago there were better speed-for-price choices, but most also require more investment of time and peripheral hardware.
In short, Arduino was great for hobby stuff. (PIC too, actually, it was just a different community)
You get
- programmability without a costly programmer
- (for most boards you only need a USB cable, and in some minimal boards you need a USB-to-serial device)
- an IDE were you don't have to dig deep to get started
- a bunch of IO pins that you can leverage using just a few bits of code (bunch of GPIO pins, a 10 bit ADC multiplexed to some of them, PWM on some of them),
The arduino board is a very convenient wrapper around the heart of the board that is the AVR (which by itself costs only ~EUR 5 or less, and you can build stripped-down versions yourself.
When you do want more speed, video (color composite video generation is about the limit, and you need an AVR pretty much dedicated to it), audio intput/output, USB, Ethernet at faster-than-serial-port speeds, or such you probably want boards with things like ARM processors and chips dedicated to such input and ouput. beagleboard and sheevaplug come to mind.
See Electronics project notes/Arduino notes for some more detailed notes.
ARM Cortex(-M)
For context
ARM, the company[2] mainly designs a specific RISC-style architecture[[3]], for various markets, and includes various distinct microarchitectures[4].
It's a popular enough design series that various companies create licensed derivations.
One you may recognize is Qualcomm's Snapdragon e.g. used in phones.
In the embedded/DIY realm we are more interested in ARM Cortex family, itself split into three series:
- Cortex-M made for low cost and low power,
- Cortex-A which is fast enough for a basic OS (e.g. used in Raspberry Pi)
- there's also Cortex-R, similar to Cortex-A but geared towards real-time uses (e.g. no MMU)
Us hobbyists are mainly interested in Cortex-M, being a good balance in power efficiency, cheap, and a good step up from the AVR/PIC style of microcontrollers.
Atmel SAM
For example:
- Arduino Zero uses ATSAMD21G18, which is Cortex-M0+
- Arduino Due uses AT91SAM3X8E, which is Cortex-M3
https://en.wikipedia.org/wiki/Atmel_ARM-based_processors
STM32
A licensed[5] bunch of series of Cortex-M based devices.
Many individual models over various series, but (currently) broadly with speeds somewhere between 20 and 200MHz, and with SRAM and flash up to a few hundred KB.
Regularly run at 3.3V (down to 2V)
- A subset of pins are 5V tolerant (when you disable pullup/pulldown), others are not.
Many have (12-bit(verify)) ADCs (some multiple)
Some have (12-bit) DACs (max speed in the megasample range, varying with series)
Have a bunch of timers, some usable as PWM(verify). Others have more dedicated PWM (e.g. with dead time / phase control generator)(verify).
http://www.emcu.eu/stm32-basic-timer/
e.g.:
Starting to understand model codes
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
Type/market (1 letter)
- F - Foundation / general purpose (probably the most common?)
- L - Low-power
- G - Mainstream
- H - High performance
- W - Wireless
Core (1 digit)
- 0 - Cortex M0
- 1 - Cortex M3
- 2 - Cortex M3
- 3 - Cortex M4
- 4 - Cortex M4
- 7 - Cortex M7
(These two combine as a series. Not all exist, see series list below)
Product line within the series (2 digits) - so the meaning varies per series
- e.g. for F1
- 00 - 24MHz, motor control
- 01 - 36MHz
- 02 - 48MHz, USB
- 03 - 72MHz, USB, CAN, motor control
- 05, 07 - 72MHz, Ethernet, CAN, USB OTG
- e.g. for F4 (most have USB, many have crypto and rng) (verify) TODO: finish this list
- 01 - 84MHz
- 05/15 - 168MHz, 2 DACs,
- 07/17 - 168MHz, 2 DACs, Ethernet, camera interface
- 10 - 100MHz, DAC
- 11 - 100MHz, 5 SPI
- 12 - 100MHz,
- 13/23 - 100MHz, more serial ports than most
- 27/37 - 180MHz, memory controller
- 29/39 - 180MHz, memory controller
- 46 - 180MHz, memory controller
- 69/79 - 180MHz, LCD-TFT and MPI-DSI
Pin count (will roughly correlate with package type), e.g.
- C - 48 (or 49)
- R - 64 (or 66)
- V - 100
- O - 90
- Z - 144
- (the list is longer, omitted for brevity)
Flash size (strongly correlated to RAM per line(verify)), e.g.
- 4 - 16KiB Flash (RAM e.g. 6KiB for F1)
- 6 - 32KiB Flash (RAM e.g. 10KiB for F1)
- 8 - 64KiB Flash (RAM e.g. 20KiB for F1)
- B - 128KiB Flash (RAM e.g. 20KiB for F1, 64KiB for F4)
- C - 256KiB Flash (RAM e.g. 48KiB for F1, 64KiB for F4)
- D - 384KiB Flash (RAM e.g. 96KiB for F4)
- E - 512KiB Flash (RAM e.g. 96KiB for F4)
- F - 768KiB Flash
- G - 1024KiB Flash (RAM e.g. 96KiB for F4)
- H - 1536KiB Flash
- I - 2048KiB Flash
- (the list is longer, omitted for brevity)
Package, e.g.
- T - LQFP
- (the list is longer, omitted for brevity)
Temperature
- 6 - -40C to 85C
- 7 - -40C to 105C
See also:
- https://www.digikey.com/en/maker/blogs/2020/understanding-stm32-naming-conventions
- https://www.st.com/en/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus.html
It seems the series that exist are currently:
- F1 series (launched 2007), Cortex-M3
- F2 series (launched 2010), Cortex-M3
- L1 series (launched 2010), Cortex-M3
- F4 series (launched 2011), Cortex-M4F
- F3 series (launched 2012), Cortex-M4F
- F0 series (launched 2012), Cortex-M0
- F7 series (launched 2014), Cortex-M7F (pin compatible with F4, faster)
- L0 series (launched 2014), Cortex-M0+
- L4 series (launched 2015), Cortex-M4F
- L4+ series (launched 2016)
- H7 series (launched 2017), Cortex-M7F
- L5 series (launched 2018), Cortex-M33F
- G0 series (launched 2018), lower-power variants of L0 (Cortex-M0+)
Also:
Examples
Consider
- STM32F103C8T6
- STM32F103RBT6
- STM32F103RCT6
- STM32F405RGT6
- STM32F407VGT6
- STM32F401CEU6
- STM32F411CEU6
The first three are F1 series and all F103 line.
The last four are F4 series, and four different lines (F405, F407, F401, F411).
IO featureset will vary between distinct lines,
but also note that fewer-pin versions within a line can omit things because they don't have enough pins to expose them, so consult the datasheet.
Datasheets will often be for a line, part of a line , or group a few similar-enough lines basically varying with how similar their features are.
Semi-sorted notes
Blue pill notes
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
Blue Pill boards are typically based on the STM32F103C8T6 (a Cortex-M3, STM32F1 series)
If USB doesn't work:
- R10 problem: R10 on the board is the USB's D+ line pullup, which should be 1.5k -- but is higher on many older
- there's a hack in putting something in parallel on external pins (e.g. if the resistor is 10k, adding ~1.8k should work)
- Many boards do not come with a USB-capable firmware/bootloader(verify)
- you will need to flash one over serial
- Note that USB code takes ~20KB, so if you don't need it, you may want to skip that
- (that said, most people don't need a huge amount of code, so USB is just nice to have)
BOOT0 BOOT1 0 x on-board flash (the firmware you wrote) 1 0 system ROM (mostly for programming mode, see ST AN2606) 1 1 SRAM (certain debugging, sometimes being controlled by something else)
...so most of us only care to set BOOT0, to switch between low=flashing and high=operating (on many versions that't the top jumper left and right, respectively)
You can use SWD programmer/debugger if you have the hardware (see the pins on the edge), which is pretty simple/cheap hardware in itself (see e.g. ST-LINK/V2), is faster and requires no jumpering, and potentially allows embedded debugging.
But if you don't have one then a generic serial port takes just a few seconds more, so those are the typical instructions.
So to flash:
- connect:
- your serial Gnd to Gnd
- your serial TX to (STM32's RX1, board-labeled) A10
- your serial RX to (STM32's TX1, board-labeled) A9
- give the STM32 3.3V
- the often-simpler option is to also plug in the board's USB (yes, the one that currently does not do anything)
- if your USB-serial board outputs 3.3V on its Vcc (or can be jumpered to) connect it to 3.3V
- if your USB-serial board outputs 5V on its Vcc, connect it to 5V
- Set BOOT0 to 1, BOOT1 to 0 (system ROM)
- press reset
- run the flasher
- Set BOOT0 to 0, BOOT1 to 0 (user flash)
- unplug (also for the implied reset)
Black pill (Blue Pill 2) notes
Black Pill boards are typically based on the STM32F401CCU6 or STM32F411CEU6 (Cortex-M4F, STM32F4 series)
Compared to blue pill, these will have
- higher clock speed
- 256 or 512KB flash
- 64 or 128KB SRAM
- USB-C port
- FPU
- a few more IO options (but how much is exposed)
They cost maybe twice as much, which is still not much
ADC notes
Sound notes
Firmware flashing
Coding
Others
e.g.
- Teensy 3 series boards (Cortex-M4F) (NXP)
ESP8266, ESP32, etc.
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
See Electronics project notes/ESP notes
Teensy
Teensy 2 series are AVRs at 16MHz and are comparable to Arduino Mini/Nano, with different features;
Teensy 3 series are ARM:
- Teensy LC is an ARM Cortex-M0+ at 48MHz, ~EUR13
- Teensy 3.0 is an ARM Cortex M4 48MHz, ~EUR20
- Teensy 3.1 is an ARM Cortex M4 72MHz, ~EUR20
- Teensy 3.2 is an ARM Cortex-M4 at 72MHz, ~EUR20
- Teensy 3.5 is an ARM Cortex-M4F at 120MHz, ~EUR30
- Teensy 3.6 is an ARM Cortex-M4F at 180MHz, ~EUR35
Teensy 4 are also ARM
- Teensy 4.0 and 4.1 are an ARM Cortex-M7 at 600MHz
- 4.0 is more bare-bones (2 Mbyte flash, 1 Mbyte RAM), for EUR20
- 4.1 adds an Ethernet IC, SD card socket, 5-pin USB header. ~EUR26
RAM:
- 64KB for 3.2
- 256KB for 3.5 and 3.6
- 1024KB for 4.0, 4.1 (4.1 has pads for PSRAM and/or more flash)
Current:
- Teensy 3 up to ~40mA?(verify)
- Teensy 4 ~100mA at 600MHz
Teensy 3 and 4 are 3.3v devices and not 5V tolerant.
See
Note that the 3+ are 3.3V devices (only some 5V tolerant)
Teensy 4 memory
The 1024 KByte is split into
- RAM1
- 512KB
- more tightly coupled, so code, static variables, and stack will be put here
- RAM2
- 512KB
- runs slower
- used for buffers, larger arrays, and dynamic allocations
Haven't personally used" list
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
PIC
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
Comparable with AVR in many ways, has a wider range of choices and features, sometimes the more capable choice for a given project.
The main difference for starter hobbyists is that it lacks and Arduin-style standard board.
Also, people stick to what they already know, though, so for a large part, PIC people use PIC, AVR people use AVR.
Max32
Wiring
There is a Wiring board, made for the Wiring software.
The basic Wiring board is comparable to an Arduino Mega, with a few differences.
(sold e.g. here)
(MIT) HandyBoard
Based on (Freescale) 6811 microcontrollers (at 2MHz?)
...and cricket?
Parallax
http://www.parallax.com/ProductInfo/Microcontrollers/tabid/121/Default.aspx
Basic Stamp
https://www.parallax.com/microcontrollers/basic-stamp
Propeller
https://www.parallax.com/microcontrollers/propeller
BUG
PICAXE
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
http://www.rev-ed.co.uk/picaxe/
(NetMedia) BasicX (BX)
Forebrain
(Leaflabs) Maple
See also
Computer-like
Some thin clients, netbooks, palm/pocket sized stuff
Effectively a middle way (in capabilities and price) between things like the beagleboard and a regular computer.
Often not so hip on the sort of IO you want in projects, but if you want an interface, particularly if a palmtop has a touchscreen, it's a lot easier to use a ready-made thing with an IDE for it than try to drive a tiny LCD from a microcontroller.
You may find options in the EUR/USD100-250 range, which often isn't a whole lot more than some dedicated-purpose devices, and can be a lot more flexible since they give you common interfaces and may let you run something general-purpose like linux.
At some point netbooks may become interesting, as from this perspective they are battery-backed, small and nicely boxed devices with built-in screens and start in this price range.
Currently often based on one of:
- Intel Atom[8] (x64)
- AMD's newer low-power chips (Competitors to Atom, CULV, and such), including Huron (Neo) and Geneva (Yukon and Nile refer to portable platforms that include the Huron and Geneva, respectively)
- VIA Nano[9] (x64)
- ARM7[13] (ARM architecture[14] is often used for specific-purpose embedded applications, and can be very good for their price)
- ARM9[15]
- ARM11[16]
- (ARM) Cortex
ARM processors span a wide range of speeds (stopping short of being part of the competitive netbook market, making it fit for various embedded and mobile uses. Quite a few phones use ARMs (often ARM11, occasionally ARM9), as do various tablets, the Nintendo DS
Raspberry Pi
Comparable to a plug computer, but more like a real PC in use.
Architecture is ARM rather than x86, though.
Could run anything you can compile for ARM.
Meaning that it will basically never run Windows or its drivers - but easily run linux and (all but the proprietary) drivers, and some distros have tooling to make this easier, and often ready-made pi-specific builds (e.g. Arch, Debian).
Various hardware (e.g. WiFi, sound in) could be added via USB dongles, assuming the driver is compiled for ARM.
The video playing ability is fairly impressive, where particularly on the first generation doing anything else on the CPU feels relatively sluggish.
Initial boot is from SD card.
See also:
Hardware (mostly for first-gen model B, see below for the others):
- BCM2835 package, contains
- CPU: a 700 MHz ARM11 (ARMv6 arch)
- GPU: a Videocore 4
- USB
- SDRAM
- memory has been specced higher in later variants. 128MB, 256MB, or 512MB RAM (not physically upgradable)
- Composite video out
- HDMI out
- audio out (3.5mm jack, also via HDMI)
- the 26-pin is for the Arduinory crowd (there's also the VideoCore's JTAG, the USB/Ethernet chip's JTAG, but few will be interested in those)
- 3.3V (50mA limit), 5V (direct from power source)
- GPIO pins
- some of which have specializations like SPI, I2C, UART, PWM, JTAG
- Most can hook to interrupt handlers(verify)
- note that the exact layout has changed between board revisions. Pay attention.
Model A - above, but...
- no Ethernet
- just the one internal USB port
Model B - as above, but in the comparison to A and B+ ...
- 10/100 wired Ethernet (via USB2, so gigabit wouldn't make sense)
- Two USB ports (via on-board hub device)
- MIPI (for 15-pin camera interface. Not very usable yet?(verify))
Model B+: Like B, but...
- 14 more GPIO pins
- Four USB ports, better hotplug and overcurrent behaviour (much less likely to reset at USB insert)
- micro-SD slots instead of SD (and click instead of friction-lock)
- a little more power efficient (swithing regulator instead of a linear one)
- audio circuit less noisy
- composite video out is now part of the 3.5" jack, not a separate RCA plug (nor broken out elsewhere)
- It's a TRRS plug, with the ordering (from sleeve to tip) Video, Ground, Left Right -- see notes below.
Raspberry Pi Zero
- BCM2835 (same as Pi 1, though clocked 40% faster)
- 512MB RAM
- smaller board, and GPIO pins come unpopulated to stay slim.
- USB host port is micro style so you need a USB OTG cable
- TV out is on two (unpopulated) pins
- On sound:
- Omits the headphone-jack-and-RC-filter (and a opamp buffer on B+ and 2 models) that the basic Pis have
- if you want, you can reproduce that externally, see e.g.
- HDMI sound's still there
- USB sound can be cheap, but not all are supported, and quality still isn't great
- if you care about good quality analog sound, you want a decent DAC anyway (is available HAT-style)
Raspberry Pi Zero W
- like Zero, adds Wifi (11n) and bluetooth (4)
- (note this allows using a bluetooth keyboard/mouse)
Raspberry Pi 2
- BCM2836, ARM Cortex-A7 (ARMv7 arch), 900MHz 4-core
- VideoCore 4 @ 900MHz
- CPU up to ~2x as fast as Pi1 B+
- 1GB RAM
Raspberry Pi 3
- BCM2837, ARM Cortex-A53 (ARMv8 arch), 1200MHz 4-core
- 1GB RAM (DDR2)
- WiFi (11ac, 2.4+5ghz)
- Bluetooth 4
Raspberry Pi 4
- BCM2711, Cortex-A72 (ARMv8 arch) 1500MHz 4-core
- VideoCore 6 @ 500MHz
- 1/2/4GB RAM (DDR2)
- bluetooth 5
- wifi (11ac, 2.4+5ghz)
- ethernet port is gBit capable
- adds USB3 (though with initial hiccups)
- dual video output / 4K res now at 60p
- reported issues:
- cooling: at maximum cpu it runs hot enough to throttle
- Powering from a proper USB-C power source wo (due to a slight misdesign it can misreport what it is (depending both on charger and cable you use[17]), which can lead to a proper USB-C charger (sensibly) refusing to charge i.e. power it). There are easy workarounds, like running it via an adapter from a basic USB-A wallwart (given it's ~2A-capable)
Notes on power
Pi1
- Model A specced for ~300mA max(verify)
- Model B for ~700mA max(verify)
- Zero ~250mA max (verify)
- Zero W ~350mA max (verify)
Pi2
- ~700mA max (verify)
Pi3
- ~800mA max (verify)
Pi 4:
- people have reported ~2A supplies tend to be good even under high CPU use (and something between 1A~2A under simple use)
- on paper worst case may be up to 3A
- ...plus whatever you draw through USB (consider powered USB hubs)
- See the note above on (not) using a proper USB-C charger.
Note that Pi 3 and 4(verify) have a switch mode supply, that detects and reports low voltage (under ~4.7V),
making it easier to diagnose insufficient power supplies.
See also:
Saving power
You can save
- ~20mA (verify) by disabling HDMI
- a few mA by disabling a LED or two
- 0 .. 100mA by disabling daemons you don't need
Networking
Save ~40mA idle-ish (verify) by disabling wifi on RPi 3 and 4, if you're not using it
BT and ethernet seem to idle to very little when not used. (verify)
USB
Also keep in mind that peripherals tend to use a bunch, so unplug any you don't use. It may be possible to disably specific hubs or ports(verify)
Some report saving ~200mA(verify) by disabling USB completely, if you're not using it.
CPU
CPU underclocking seems largely unnecessary because the frequency it runs at is dynamic anyway.
If you're mostly idle, you may save a little lowering the minimum speed(verify)
Also keep in mind that if you limit the maximum speed it may spend less time sleeping to do what it needs to, which may save nothing and even be a little worse.(verify) Changing the CPU governor is not likely to change much for similar reasons. Depending on how idle you are/aren't.
You may prefer rpi-config for this. You can also find the variables yourself.
Keep in mind that aside from the ARM CPU, there are some other somewhat-dedicated cores that can be slowed
TODO: read:
http://www.earth.org.uk/note-on-Raspberry-Pi-setup.html
https://www.raspberrypi.org/documentation/configuration/config-txt/overclocking.md
https://mlagerberg.gitbooks.io/raspberry-pi/content/5.1-power-consumption.html
https://community.roonlabs.com/t/underclocked-pi-4-the-perfect-low-budget-77-usb-bridge/93743/8
https://www.raspberrypi.org/forums/viewtopic.php?t=257144
https://www.jeffgeerling.com/blogs/jeff-geerling/controlling-pwr-act-leds-raspberry-pi
Notes on video out
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
The B+ has a 4-pin plug (a.k.a. TRRS, Tip-Ring-Ring-Sleeve) on which you can immediately use audio using a regular 3.5mm plug, while using composite video out (at all or alongside audio) will require a 4-pin (TRRS) plug.
Note that if you have a TRRS-to-four-RCA adapter cable, it can have a variant wiring. Often it just has two functions swapped (e.g. video and audio-right) so only requires a little trial and error. Sometimes it requires rewiring.
The behaviour of forced / auto-detection between HDMI and composite depends on settings in /boot/config.txt (see pages like this for reference if your config.txt doesn't have a lot of elaboration).
Mainly: If you want to force use of HDMI, even if it won't always be attached at boot:
hdmi_force_hotplug=1
If you want to force use of composite, even if HDMI is attached at boot:
hdmi_ignore_hotplug=1
Both these settings are 0 by (stock-)default.
edidparser edid.dat > edid.txt
(For CEA modes from that list, use hdmi_group=1, for DMT modes use hdmi_group=2)
If you want a resolution that is not in that list, look atIf you have a HDMI TV that wakes up when rebooting the Pi, that's because it sends an Active-Signal message. You can disable that:
hdmi_ignore_cec_init=1
When tweaking for your specific monitor, you may want to:
Some software won't send audio over HDMI unless you force it:
hdmi_drive=2
(1 is no sound, 'DVI mode')
Composite variants:
sdtv_mode=2
Where:
0 Normal NTSC 1 Japanese version of NTSC – no pedestal 2 Normal PAL 3 Brazilian version of PAL – 525/60 rather than 625/50, different subcarrier
And its aspect ratio - 4:3 is default
sdtv_aspect=1
Where:
1 4:3 (default) 2 14:9 3 16:9
You may wish to play with overscan, e.g.
disable_overscan=1
and e.g.
# larger, TV that shows more black border than you want: overscan_left=-10 overscan_right=-10 overscan_top=-30 overscan_bottom=-30
or:
# smaller, e.g. for a TV that removes too much of the edge by default: overscan_left=10 overscan_right=10 overscan_top=30 overscan_bottom=30
See also:
- http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=82063]
- http://www.raspberrypi-spy.co.uk/2014/07/raspberry-pi-model-b-3-5mm-audiovideo-jack/
Notes on the videocore
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
VideoCore has parts like:
- VPU
- media coprocessor (think JPEG and H264 accel) (verify), so a a SIMD type thing (also 2 cores of it?)
- runs firmware (partly closed because licensing) that drives video acceleration, and 3D
- In typical use the VPU uses the QPU for OpenGL. the QPU is a 12-way(verify) SIMD, running a fairly fixed pipeline for fragment, vertex, and coordinate shading.
https://www.youtube.com/watch?v=eZd0IYJ7J40
https://github.com/hermanhermitage/videocoreiv/wiki/VideoCore-IV-Programmers-Manual
On SD corruption
HATs
HAT (Hardware Attached on Top) are are 65x56mm boards with a 2x20-pin header, following a spec[19] designed to make it standard-n-easy to connect hardware.
It has an autoconfiguration system based on an EEPROM, connected on the ID_SD (GPIO0) and ID_SC (GPIO1) pins (more details in the specs).
HATs are made for 40-pin-GPIO Pi variants, as of this writing A+, B+, 2, Zero.
Physically, if you want to use a HAT and pins for other reasons, you'll want a female header with long pins.
HATs can, in general, not be stacked.
It was considered, and can work in specific cases, but because the point of HAT was that things were more or less automatic (and various pins may clash), it generally can't be guaranteed.
But if there's no clash, or the HAT was designed to stack (e.g. with more of itself[20]) it'll work.(verify)
pHAT
A pHAT (partial HAT) is an informal variant, basically anything that doesn't meet the HAT specs physically or electrically. Adafruit call them bonnets.
Usually it means a smaller variant for the Zero. It seems they typically tend not to have the EEPROM either.
Compliant HATs won't work on 26-pin Pis as automtically configured things, in that the EEPROM pins aren't in that set (they're among the 14 added ones).
Manual configuration / use, and many pHATs, can work fine on 26-pin if all the pins they use are in the set of 26.
See also:
pHAT DAC notes
Seems to just use the 5V, ground and I2S pins (no EEPROM/I2C)
i.e.:
- Pin 2 (5V)
- Pin 12 (GPIO 18, I2S)
- Pin 35 (GPIO 19, I2S)
- Pin 39 (Ground)
- Pin 40 (GPIO 21, I2S)
http://forums.pimoroni.com/t/phat-dac-which-gpio-are-in-use/1388/9
https://pinout.xyz/pinout/phat_dac
https://learn.pimoroni.com/tutorial/phat/raspberry-pi-phat-dac-install
uHAT
Follows HAT standard (unlike pHAT), but have a smaller board.
Windows 10 IoT notes
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
Notes:
- no serial port access
- It will never run your desktop apps - they're not compiled for ARM.
- The only reason Linux can do this moderately easily is because source to most apps is open, meaning it can be compiled for other platforms (...and usually someone else has already done the fighting involved in that). With most windows apps the x86 binary is all you will ever have.
- no shell
- Microsoft's hardware support here is pretty poor
- no windows desktop
- It will show a screen on HDMI, but does nothing more than tell you the IP address and list USB devices.
- You can develop/run GUI-less apps
- you can develop graphical apps UWP style
So Microsoft understands it as a souped-up-arduino at best.
If that's what you wanted, and what you're comfortable with, great.
Arguably this makes it quite useful at fulfilling a single purpose, which is a good approach to IoT
But if you're a maker, and/or want to squeeze more out of the platform, and/or wanted to use an existing graphical interface (X windows), linux is often objectively the better choice.
Unsorted
LEDs, meaning and config: https://www.jeffgeerling.com/blogs/jeff-geerling/controlling-pwr-act-leds-raspberry-pi#:~:text=All%20Raspberry%20Pi%20models%20have,ACT%20(a%20green%20LED).
Plug computers
This hasn't been updated for a while, so could be outdated (particularly if it's about something that evolves constantly, such as software). |
Sheevaplug, GuruPlug, Plug Computer 3.0
(from Marvell)
Sheevaplug (basic version)
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
From the outside, this looks mostly like a networked USB port.
Has:
- Low power ARM(-compatible) CPU, ~1GHz, draws only a few watts of power
- Gigabit Ethernet
- 512MB SDRAM
- 512MB Flash
- USB2 host
- USB socket with USB-to-serial connected to RS232 terminal, and the JTAG bus
- SD interface
Can run a few *nixes (ARM builds; there are some pre-made).
Commercial derivatives seem to include network file sharing, network backup, VoIP, and such.
USD/EUR ~100, depending on variant
Sheevaplug+ (a.k.a. eSata Sheeva)
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
Like the basic Sheevaplug, but adds an eSATA port
Guru Plug (a.k.a. Sheevaplug2)
Guru Plug Standard
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
- One Gigabit Ethernet port
- Two USB ports
- Wifi
- Bluetooth
- U-SNAP (Utility Smart Network Access Port) [21]
Guru Plug Server Plus
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
Much the same setup, but with:
- Two Gigabit Ethernet ports instead of one
- Two USB ports
- Micro SD
- eSATA plug
- Wifi
- Bluetooth
- U-SNAP [22]
GuruPlug Display
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
Like Server Plus, but
- 3 USB2 ports
- either a HDMI Port OR a Touch Panel Display
Plug Computer 3.0
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
PogoPlug
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
PogoPlug is a Sheevaplug derivative.
Comes with OS / firmware and PC-side software to go along. This This setup is for cloud-style, remote access, social-site sharing, with files tied to people and accounts. It can take files from USB (automounting and understanding FAT32, NTFS, HFS+, ext2, ext3), and has a decent interface.
That default setup does NOT do NAS in the sense of sharing files or media on a LAN with something like SMB/CIFS (a.k.a. windows file sharing), NFS, FTP, HTTP, DAAP, or such. The PC-side client makes files appear as if on a (new) local drive, which in itself is pretty handy - but only allows sharing with people with the same client and pogoplug accounts.
This all isn't a huge limitation. For one, you can enable ssh and install Samba on the existing setup within five minutes.
Tinkerers will like that it's an open-enough platform. You can install PlugApps (previously OpenPogo), which turns it into a generic linux server (but beware that not all hardware is necessarily supported, and driver stuff can be a pain).
Hardware:
- PogoPlug V1
- PogoPlug V2
- the fancier design, specifically the pink one (verify)
- 1.2GHz ARM
- 4 USB ports
- 256MB RAM
- 128MB Flash
- gigE networking
- PogoPlug Biz (mostly) seems to be the V2 hardware (verify)
- PogoPlug Pro (a.k.a. V3?)
- the fancier design, specifically the black one (verify)
- Not Sheeva-based
- armv6tel CPU (dual core CPU clocked to 700MHz) (verify)
- 128MB of RAM, 128MB of flash
- PCIE slot has 801.11 b/g/n WiFi (Pogoplug Video has some video transcoder hardware instead?(verify)) (later versions don't have PCIE?(verify))
- http://plugapps.com/index.php5/Hardware:_Pogoplug_Pro
See also:
- http://www.pogoplug.com/home-en-whats-pogoplug-product-comparison.html
- http://plugapps.com/index.php5/Portal:Hardware
PlugApps notes
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
See also
- http://en.wikipedia.org/wiki/SheevaPlug
- http://en.wikipedia.org/wiki/SheevaPlug#Commercial_products for various variants
- http://en.wikipedia.org/wiki/GuruPlug
- http://www.plugcomputer.org/plugwiki/index.php/GuruPlug
- http://www.marvell.com/platforms/plug_computer/
Chumby
G20
Beagleboard
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
Wants 5V, consumes less than 2W.
Basic resources:
- 600MHz ARM processor
- 256MB Flash
- 256MB RAM
- GPU
- DSP chip
IO:
- USB socket for communication with host, and <500mA of power from it
- SD reader (MMC+/SD/SDIO)
- Sound (3.5mm input and output)
- S-Video / Composite video
- DVI-D (0n HDMI connector)
- USB 2 host, two ports
- JTAG header
- RS232 header
- (The CPU can speak I2C, SPI) (verify)
Costs EUR/USD~150
See also:
NSLU, NSLU2
Popular for its price/ability balance, but has been discontinued.
You probably want to look to the #Sheevaplug now.
See also:
Router hacking (mostly for Linksys WRT54 and similar)
(See also Wireless notes)
Alternative firmware, and interfaces for them
- Tomato
- for wireless routers (broadcom)
- Perhaps most user-friendly for common uses (though less wildly configurable than some others)
- http://www.polarcloud.com/tomato
- OpenWrt
- for wireless routers
- http://www.openwrt.org/
- X-Wrt
- Extensions for OpenWrt
- http://www.x-wrt.org/
- Gargoyle
- Interface on OpenWRT (similar to X-Wrt in a number of ways)
- http://www.gargoyle-router.com/
- WIFI-BOX
- for wireless routers
- http://sourceforge.net/projects/wifi-box/
- DD-WRT
- FreeWRT
- (professional-market variant on OpenWRT)
- http://www.freewrt.org/
Router OS setups
- The Linux Router Project (LRP)
- Abandoned (see e.g. http://web.archive.org/web/20030624030005/http://www.linuxrouter.org/)
- LEAF Project (Linux Embedded Appliance Framework) (began as fork of LRP)
- Ipcop
- Zeroshell
- Meant to use most any computer (regular PC) as a router
- http://www.zeroshell.net/
- pfSense
- m0n0wall
- Floppy OSes (can be used for a HDD-less computer for firewall/NAT/other such purposes):
- floppyfw
- Fdgw (BSD)
Unsorted:
- Vyatta
- FREESCO
- CoovaAP
Some OpenWRT / X-WRT notes
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
Notes on the ports, switch, VLAN, wireless, and such
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
Note that details also vary per product, so while much of the below may apply, chances are that not everything does:
On many WRT54G and variants, you have
- five physical external ethernet ports (which are on the same internal switch)
- an internal link from the CPU to that switch
- an internal link from the CPU to the wireless device
The five external ports are functionally split into one marked 'internet' (meant to go to your gateway/modem), and four internal/lan. The internet port may be physically spaced differently, but sits on the same internal switch, and seen that way by the CPU because it mainly sees the switch device, which it (usually) calls eth0.
This is split by using VLAN (802.1q) tagging, which means that eth0 does not have an IP address, and routing rules involve the two vlan devices:
- eth0.0 (VLAN 0, the four basic ports (and the internal one))
- eth0.1 (VLAN 1, the internet port (and the internal one))
Note that since this VLAN stuff is software controlled, this is just the default configuration you usually see. You can reconfigure this the way you want, e.g. merge all ports to use the thing as a plain switch, use multiple ports in a WAN-like way to use multiple broadband connections (probably each on their own VLAN) for redundancy, or whatnot.
The wireless device can also potentially get complicated, partially because of the way the hardware lets you emulate multiple wireless devices on a single physical device. As such, you have a sort of dummy parent device, and one that you use in routing, often wlan0, which is connected to what to the CPU is eth1 (or eth2, or sometimes ath0, depending on product).
Further interfaces you may see include:
- br-lan exists when you put a device in bridging mode.
- imq0, imq1: InterMediate Queueing devices, which assist traffic control [23]
- monitor interfaces
How you want to configure the device varies, and OpenWRT and X-WRT don't assume they know what you want, so don't assist you much either.
Networks can be defined in any way on the various interfaces -- but it seems fairly easy to cause OpenWRT/X-WRT to be confused in terms of the routing it should do (I've seen various confused routing tables, though that also had to do with what I was trying to make it do).
The default configuration seems to often be lan+wireless bridged as 192.168.1.1/24, wan as dhcp. (verify)
(wifi is often bridged to LAN)
Notes on configuration notes
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
boot_wait and flashing
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
boot_wait makes it harder to brick your hardware, by always allowing you to flash it.
Somewhat simplified, it refers to a setting that the bootloader listens to. When enabled, the bootloader will wait for three seconds before trying to load the kernel. Within those three seconds (or, if the kernel image doesn't pass CRC check, indefinitely), you can send a new firmware image in via tftp at 192.168.1.1 (what the bootloader listens to, regardless of later config(verify)).
The boot_wait period starts fairly quickly after the device powers up, so timing matters. I like atftp since you can give a single command, and it'll do a few attempts, meaning you can start it off, then plug in the router, and just wait and see whether this attempt worked or not. Example command:
atftp --trace --option "timeout 1" --option "mode octet" --put --local-file file.bin 192.168.1.1
Failsafe startup
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
In OpenWRT, if you misconfigure the device and can't reach it, you probably want to start it in failsafe mode. This will cause the device to use some default configuration, such as taking 192.168.1.1 to be easily reachable on the LAN ports.
(Note: If you have another device that uses 192.168.1.1, you should disconnect it or you may cause some OSes and switches to become very confused about where to switch, which can break your network temporarily)
To do a failsafe startup: Yank out the power cord, plug it back in, and wait for the DMZ light to come on (signals the start of boot (verify)) to press the reset button on the back a few times (methods mention that the SES buttons should work too, but it didn't seem to for me. The amount of presses also seems to matter - not too often. My Random Superstition Procedure is three times in two seconds
Wait for the power/dmz to start blinking, and keep blinking (if it doesn't keep blinking, it's not in failsafe mode).
If it does, you can now reach the device through passwordless telnet (instead of the usual SSH) via one of the LAN ports, on 192.168.1.1.
What you want to do depends on what you did wrong. If you forgot your password, you want passwd. If you messed too much with all the settings, you can do a sort of factory-defaults thing using /bin/firstboot.
See also / unsorted links
http://sarwiki.informatik.hu-berlin.de/Programming_the_Linksys_WRT54GS_Wireless_Broadband_Router
http://x-wrt.org/ http://wiki.x-wrt.org/index.php/User_Manual http://wiki.x-wrt.org/index.php/Main_Page http://martybugs.net/wireless/openwrt/flash.cgi
https://dev.openwrt.org/ http://oldwiki.openwrt.org/
http://cyberforat.squat.net/openwrt/OpenWrt-HOWTO/x402.html
http://wiki.x-wrt.org/index.php/Multi-Route
https://forum.openwrt.org/viewtopic.php?id=13414
Some Tomato notes
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
The WOL tool wants the MAC delimited using colons (as ether-wake does, and the value is fed straight to it)