Table of Contents
Banana Pi
The Banana Pi is a Linux compatible computer with high speed GPIO.
In appearance the Banana Pi is similar to the Raspberry Pi but the hardware is different. The Banana Pi uses the AllWinner A20 whereas the RPi uses the Broadcom BCM2835.
GPIO
The board has a Raspberry Pi compatible GPIO header with 26 pins.
+--CON3--+ 3V3 01 02 5V I2C-SDA2 B21 03 04 5V I2C-SCL2 B20 05 06 GND GPCLK IO-7 I03 07 08 H00 UART3-TX GND 09 10 H01 UART3-RX UART2 RX IO-0 I19 11 12 H02 IO-1 UART2 TX IO-2 I18 13 14 GND UART2 CTS IO-3 I17 15 16 H20 IO-4 CAN TX 3V3 17 18 H21 IO-5 CAN RX SPI0 MOSI I12 19 20 GND SPI0 MISO I13 21 22 I16 IO-6 UART2 RTS SPI0 SCLK I11 23 24 I10 SPI0 CE0 GND 25 26 I14 SPI0 CE1 +--------+
This is the relationship between the Banana Pi IO, RPi GPIO, A20 I/O and the Linux sysfs interface.
Banana Pi IO | CON3 pin | Raspberry Pi GPIO | A20 I/O | sysfs |
---|---|---|---|---|
0 | 11 | 17 | I19 | 275 |
1 | 12 | 18 | H02 | 226 |
2 | 13 | 21/27 | I18 | 274 |
3 | 15 | 22 | I17 | 273 |
4 | 16 | 23 | H20 | 244 |
5 | 18 | 24 | H21 | 245 |
6 | 22 | 25 | I16 | 272 |
7 | 7 | 4 | I03 | 259 |
The BPi IO designation is also used by WiringPi.
A ribbon cable may be used to extend the GPIOs. In this instance a female presentation will be given (see picture).
______________________________________________________ / / +-----------------------------------------------------+ | I14 I10 I16 0V H21 H20 0V H2 H1 H0 0V 5V 5V | | | | | | 0V I11 I13 I12 3V I17 I18 I19 0V I3 B20 B21 3V | 1 +-------------------------___-------------------------+
The above ribbon header naming is the port and pin for A20 I/O.
______________________________________________________ / / +-----------------------------------------------------+ | 270 266 272 0V 245 244 0V 226 225 224 0V 5V 5V | | | | | | 0V 267 269 268 3V 273 274 275 0V 259 52 53 3V | 1 +-------------------------___-------------------------+
The above ribbon header numbering is for the Linux sysfs interface.
Alternatively, a GPIO extension cable may present male pins as follows.
______________________________________________________ / / +-----------------------------------------------------+ | 0V 267 269 268 3V 273 274 275 0V 259 52 53 3V | 1 | | | | | 270 266 272 0V 245 244 0V 226 225 224 0V 5V 5V | +-------------------------___-------------------------+
Pickle Microchip PIC ICSP
Along with USB serial we can use the BPi GPIOs to program PICMicros using Pickle Microchip PIC ICSP.
Install GPIO bit-bang driver for Linux.
Low Voltage Programming with VPP at 3V3
Low voltage ICSP at 3V3 can be performed directly from the BPi GPIOs.
The following connections refer to the BPi GPIO header. Ensure that power is only ever applied from GPIO 3V3 on PIN 1 and never 5V.
Single common data I/O connection (BPi or GPIO bit-bang driver)
BPi A20 PICMicro GPIO header .pickle ======= ======== =========== ======= 3V3-------------------------------VDD--+ PIN 1 | GND-------------------------------VSS R1 PIN 6 | I14-----------R3-470R-------------VPP--+ PIN 26 VPP=270 I10-----------R4-470R-------------PGC PIN 24 PGC=266 I16-----------R5-470R-------------PGD PIN 22 PGD=272 I11-----------R6-470R-------------PGM--R2-+ PIN 23 PGM=267 | /// (R1) 10K !MCLR pull-up (R2) 10K where appropriate (PGM is not present on all devices). (R3..R6) 470R. DEVICE=GPIO-BB IFACE=/dev/gpio-bb
Issues
Excessive CPU load can be seen in kernel process `events_freezable_power'
This has been seen in Debian BOOKWORM and goes back some time.
Add the following to rc.local to solve this
rmmod sun4i_gpadc sun4i_gpadc_iio
NB blacklisting doesn't appear to work.