Quick jump:  What's new

 
Go to:
 
Weblog: Recent Changes   
in Dobrica Pavlinušić's random unstructured stuff
Printrbot Plus
PrintrBot_Plus_LC.diff

Old 3D printer which never worked well.

DXF files: https://www.youmagine.com/designs/printrbot-lc-1302

https://web.archive.org/web/20130115210644/http://printrbot.com/shop/plus/

Contents: [Dobrica Pavlinušić's random unstructured stuff]


PrintrBot Plus LC

The Printrbot PLUS is the larger printrbot kit–containing an 8x8x8 build volume, laser cut birch construction, an assembled Ubis hot end, and 12mm Z-axis rods in an all-in-one kit. This kit also includes 1 lb of ABS filament.

This kit includes everything you need to build the printrbot PLUS:

  • printrboard: all-in-one assembled electronics with integrated SD card slot (no soldering required)
  • 5 NEMA 17 stepper motors complete with cable ends attached
  • laser cut birch construction
  • a few printed plastic parts (gears, etc)
  • WOOD Extruder Kit
  • hardware (8mm smooth rods, threaded rods, and bearings
    • Z axis is 12mm smooth rods and 12 mm linear bearings )
  • assembled Ubis hot end
  • nuts, bolts, washers, zip ties
  • laser cut print bed
  • 8×8 heated bed
  • misc assembled cables (no soldering required)
  • 3 mechanical end stops (no soldering required)
  • micro USB cable

nozzle

The Getting Started Guide says that all Printrbots currently ship with 0.4mm nozzles.
The convention for identifying nozzles is based on notches (or "rings") cut into the sides (vertices) of the hexagonal brass "nut".
No notch = 0.5mm
1 notch = 0.4mm
2 notches = 0.35mm

info

Most of information about it vanished from internet so here is some overview:

Rev.B https://github.com/Printrbot/printrboard/releases/tag/revB

PrintrBoard pinout

Annotated headers from http://blog.think3dprint3d.com/2012/07/panelolu-with-printrboard.html

Printrboard Headers.JPG

serial

[Sun Mar 18 08:23:50 2018] usb 2-4.4: new full-speed USB device number 61 using xhci_hcd
[Sun Mar 18 08:23:50 2018] usb 2-4.4: New USB device found, idVendor=16c0, idProduct=0483
[Sun Mar 18 08:23:50 2018] usb 2-4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Sun Mar 18 08:23:50 2018] usb 2-4.4: Product: USB Serial
[Sun Mar 18 08:23:50 2018] usb 2-4.4: Manufacturer: Teensyduino
[Sun Mar 18 08:23:50 2018] usb 2-4.4: SerialNumber: 12345
[Sun Mar 18 08:23:50 2018] cdc_acm 2-4.4:1.0: ttyACM0: USB ACM device

dpavlin@nuc:~$ microcom p /dev/ttyACM0 
connected to /dev/ttyACM0
Escape character: Ctrl\
Type the escape character to get to the prompt.


start
echo:PowerUp
 Brown out Reset
Marlin: 1.0.0 RC2
echo: Last Updated: 2012-02-25 | Author: erik
echo: Free Memory: 4907  Pla




echo:SD init fail
workDir open failed
echo:Unknown command:"echo"
ok
echo:Unknown command:"SD init fail"
ok
echo:Unknown command:"workDir open failed"
ok

settings

https://github.com/Printrbot/Marlin

M501
echo:Stored settings retreived:
echo:Steps per unit:
echo:  M92 X62.11 Y64.67 Z2272.72 E536.00
echo:Maximum feedrates (mm/s):
echo:  M203 X60.00 Y60.00 Z2.00 E14.00
echo:Maximum Acceleration (mm/s2):
echo:  M201 X2000 Y2000 Z30 E10000
echo:Acceleration: S=acceleration, T=retract acceleration
echo:  M204 S3000.00 T3000.00
echo:Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum xY jerk (mm/s),  Z=maximum Z jerk (mm/s)
echo:  M205 S0.00 T0.00 B20000 X20.00 Z0.40 E5.00
echo:PID settings:
echo:   M301 P22.20 I1.08 D114.00

M115
FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:http://www.mendel-parts.com PROTOCOL_VERSION:1.0 MACHINE_TYPE:Mendel EXTRUDER_COUNT:1





software bed leveler

schematics

Printrboard_RevB_Schematic150.png

Printrboard-schematics.pdf

Marlin

dpavlin@nuc:/nuc/PrintrBot$ git clone https://github.com/dpavlin/Marlin

dpavlin@nuc:/nuc/PrintrBot$ cd Marlin/

compile Marlin 1.1.8

https://github.com/dpavlin/Marlin/tree/PrintrBot_Plus_LC-1.1.8

dpavlin@nuc:/nuc/PrintrBot/Marlin$ git checkout PrintrBot_Plus_LC-1.1.8 

dpavlin@nuc:/nuc/PrintrBot/Marlin$ platformio run -e printrboard
Warning! Ignore unknown `envs_dir` option in `[platformio]` section

Processing printrboard (platform: teensy; board: teensy20pp; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: Teensy > Teensy++ 2.0
SYSTEM: AT90USB1286 16MHz 8KB RAM (127KB Flash)

compile Marlin 1.1.9

different enviroment compared to 1.1.8?

dpavlin@nuc:/nuc/PrintrBot/Marlin$ git checkout PrintrBot_Plus_LC-1.1.9 

dpavlin@nuc:/nuc/PrintrBot/Marlin$ platformio run -e teensy20

flashing

open boot jumper, press button

[Sun Apr 15 12:20:34 2018] usb 1-1.1: new full-speed USB device number 30 using xhci_hcd
[Sun Apr 15 12:20:34 2018] usb 1-1.1: unable to get BOS descriptor
[Sun Apr 15 12:20:34 2018] usb 1-1.1: New USB device found, idVendor=03eb, idProduct=2ffb
[Sun Apr 15 12:20:34 2018] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Sun Apr 15 12:20:34 2018] usb 1-1.1: Product: AT90USB128 DFU
[Sun Apr 15 12:20:34 2018] usb 1-1.1: Manufacturer: ATMEL
[Sun Apr 15 12:20:34 2018] usb 1-1.1: SerialNumber: 1.0.0


root@nuc:/nuc/PrintrBot/Marlin# apt-get install dfu-programmer


root@nuc:/nuc/PrintrBot/Marlin# dfu-programmer --targets 2>&1 | grep at90usb128
    at89c5132          at90usb1287        at90usb1286        at90usb1287-4k
    at90usb1286-4k     at90usb647         at90usb646         at90usb162

root@nuc:/nuc/PrintrBot/Marlin# dfu-programmer at90usb1286 dump --debug 99
     target: at90usb1286
    chip_id: 0x2ffb
  vendor_id: 0x03eb
    command: dump
      quiet: false
      debug: 99
device_type: AVR
------ command specific below ------

commands.c:625: dump 122880 bytes
atmel.c:579: atmel_read_flash( 0x7ffe83facaf0, 0x00000000, 0x0001e000, 0x564ef5df7000, 122880, false )
atmel.c:847: atmel_select_page( 0x7ffe83facaf0, 0 )
atmel.c:510: __atmel_read_page( 0x7ffe83facaf0, 0, 65536, 0x564ef5df7000, false )
atmel.c:537: result: -9
Unknown error.  Try enabling debug.
Failed to read 122880 bytes from device.




other useful debug levels are 100, 200, 300 - https://www.avrfreaks.net/forum/how-use-dfu-programmer

hmmm... can't backup firmware?

flash firmware

dpavlin@nuc:/nuc/PrintrBot/Marlin$ dfu-programmer at90usb1286 erase
dpavlin@nuc:/nuc/PrintrBot/Marlin$ dfu-programmer at90usb1286 flash .pioenvs/printrboard/firmware.hex
Validating...
Flash did not validate. Did you erase first?

dpavlin@nuc:/nuc/PrintrBot/Marlin$ dfu-programmer at90usb1286 erase --debug 100
     target: at90usb1286
    chip_id: 0x2ffb
  vendor_id: 0x03eb
    command: erase
      quiet: false
      debug: 100
device_type: AVR
------ command specific below ------
   validate: true

commands.c:69: erase 122879 bytes
atmel.c:281: atmel_erase_flash( 0x7ffc5df9bff0, 4 )
atmel.c:671: atmel_blank_check( 0x7ffc5df9bff0, 0x00000000, 0x0001dfff )
atmel.c:847: atmel_select_page( 0x7ffc5df9bff0, 0 )
atmel.c:647: __atmel_blank_check_internal( 0x7ffc5df9bff0, 0x00000000, 0x0000ffff )
atmel.c:847: atmel_select_page( 0x7ffc5df9bff0, 1 )
atmel.c:647: __atmel_blank_check_internal( 0x7ffc5df9bff0, 0x00000000, 0x0000dfff )


teensy setup pjrc

udev rule: https://www.pjrc.com/teensy/49-teensy.rules
loader: https://github.com/PaulStoffregen/teensy_loader_cli

unlock chip using flip

It seems that chip is protected. However, trying to erase and program it did destry data in it (expect bootloader) for some reason, and it seem that dfu-programmer doesn't know how to work with protection features.

So, next step is to try atmel's flip under linux but this also doesn't work well.

root@nuc:/nuc/PrintrBot/flip.3.2.1# cat debian-install.sh 
sudo apt-get install openjdk-9-jre:i386 libusb-0.1-4:i386

root@nuc:/nuc/PrintrBot/flip.3.2.1# cat env.sh 
export JAVA_HOME=/usr/lib/jvm/java-9-openjdk-i386/
export FLIP_HOME=/nuc/PrintrBot/flip.3.2.1/bin/


root@nuc:/nuc/PrintrBot/flip.3.2.1# cd bin/
root@nuc:/nuc/PrintrBot/flip.3.2.1/bin# cp -apv libatlibusbdfu.so libatlibusbdfu.so.orig
root@nuc:/nuc/PrintrBot/flip.3.2.1/bin# sed 's/\/sys\/bus\/usb/\/dev\/bus\/usb/g' libatlibusbdfu.so.orig > libatlibusbdfu.so


# run from bin directory or it won't work (?!)

root@nuc:/nuc/PrintrBot/flip.3.2.1/bin# ./flip.sh


avrdude

made cable to convert 10 pin ICSP on usbasp to 6 pin ICSP on printrboard

http://reprap.org/wiki/Printrboard#Bootloaders

Pin 1 (not red wire on my harness because of re-wiring) is closest to the SD card slot.

root@nuc:/nuc/PrintrBot# avrdude -p usb1286 -c usbasp 

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9782 (probably usb1287)

avrdude: safemode: Fuses OK (E:F3, H:99, L:5E)

avrdude done.  Thank you.

ok, factory bootloader

fuses

# disable jtag
avrdude -c usbtiny -p at90usb1286 -U lfuse:w:0xde:m -U hfuse:w:0xdb:m -U efuse:w:0xf0:m

# enabled jtag
avrdude -c usbtiny -p at90usb1286 -U lfuse:w:0xDE:m -U hfuse:w:0x9B:m -U efuse:w:0xF0:m

root@nuc:/nuc/PrintrBot# avrdude -c usbtiny -p at90usb1286 -U lfuse:w:0xde:m -U hfuse:w:0xdb:m -U efuse:w:0xf0:m
avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)

avrdude done.  Thank you.

root@nuc:/nuc/PrintrBot# avrdude -c usbasp -p at90usb1286 -U lfuse:w:0xde:m -U hfuse:w:0xdb:m -U efuse:w:0xf0:m

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9782 (probably usb1287)
avrdude: reading input file "0xde"
avrdude: writing lfuse (1 bytes):

Writing |                                                    | 0% 0.00s ***failed;
Writing | ################################################## | 100% 0.06s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xde:
avrdude: load data lfuse data from input file 0xde:
avrdude: input file 0xde contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x5e != 0xde
avrdude: verification error; content mismatch

avrdude: safemode: lfuse changed! Was de, and is now 5e
[Tue Apr 17 07:12:19 2018] usb 1-1.4: USB disconnect, device number 20
[Tue Apr 17 07:12:19 2018] usb 1-1.4: USB disconnect, device number 20
Would you like this fuse to be changed back? [y/n]
Would you like this fuse to be changed back? [y/n] n
avrdude: safemode: Fuses OK (E:F3, H:99, L:DE)

avrdude done.  Thank you.


root@nuc:/nuc/PrintrBot# avrdude -p usb1286 -c usbasp 

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9782 (probably usb1287)

avrdude: safemode: Fuses OK (E:F3, H:99, L:5E)

avrdude done.  Thank you.


flash bootloader

huh, hum, program bootloader anyway from http://blog.lincomatic.com/?p=548

root@nuc:/nuc/PrintrBot# avrdude -p usb1286 -c usbasp -U flash:w:BootloaderDFU.hex

power cycle, return jumper re-try programming fuses

root@nuc:/nuc/PrintrBot# avrdude -c usbasp -p at90usb1286 -U lfuse:w:0xDE:m -U hfuse:w:0x9B:m -U efuse:w:0xF0:m

dfu programming works

re-try dfu programming

root@nuc:/nuc/PrintrBot# dfu-programmer at90usb1286 erase
root@nuc:/nuc/PrintrBot# dfu-programmer at90usb1286 flash Marlin/.pioenvs/printrboard/firmware.hex
Validating...
61322 bytes used (49.90%)



avrdude programming

dpavlin@nuc:/nuc/PrintrBot/Marlin$ avrdude -c usbasp -p usb1286 -U flash:w:.pioenvs/printrboard/firmware.hex

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9782 (probably usb1287)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file ".pioenvs/printrboard/firmware.hex"
avrdude: input file .pioenvs/printrboard/firmware.hex auto detected as Intel Hex
avrdude: writing flash (87280 bytes):

Writing | ################################################## | 100% 58.04s

avrdude: 87280 bytes of flash written
avrdude: verifying flash memory against .pioenvs/printrboard/firmware.hex:
avrdude: load data flash data from input file .pioenvs/printrboard/firmware.hex:
avrdude: input file .pioenvs/printrboard/firmware.hex auto detected as Intel Hex
avrdude: input file .pioenvs/printrboard/firmware.hex contains 87280 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 38.49s

avrdude: verifying ...
avrdude: 87280 bytes of flash verified

avrdude: safemode: Fuses OK (E:F0, H:9B, L:DE)

avrdude done.  Thank you.

RepRapDiscount Full Graphic Smart Controller

pinouts

printrboard-lcd-pinout.png

printrboard-lcd-pinout-800px.png

Marlin pinout

diff --git a/Marlin/pins_PRINTRBOARD.h b/Marlin/pins_PRINTRBOARD.h
index 42632d174..8146505a3 100644
--- a/Marlin/pins_PRINTRBOARD.h
+++ b/Marlin/pins_PRINTRBOARD.h
@@ -166,3 +166,19 @@
   #endif
 
 #endif // ULTRA_LCD && NEWPANEL
+
+// XXX dpavlin -- my pinout
+#define LCD_PINS_RS       9   // E1       JP11-11
+#define LCD_PINS_ENABLE   8   // E0       JP11-10
+#define LCD_PINS_D4       7   // D7       JP11-8
+#define LCD_PINS_D5       6   // D6       JP11-7
+#define LCD_PINS_D6       5   // D5       JP11-6
+#define LCD_PINS_D7       4   // D4       JP11-5
+
+#define BTN_EN1        10   // C0       JP11-12
+#define BTN_EN2        11   // C1       JP11-13
+#define BTN_ENC        12   // C2       JP11-14
+
+// display delays are added to
+// Marlin/ultralcd_st7920_u8glib_rrd.h
+
diff --git a/Marlin/ultralcd_st7920_u8glib_rrd.h b/Marlin/ultralcd_st7920_u8glib_rrd.h
index db6224e47..8474bef24 100644
--- a/Marlin/ultralcd_st7920_u8glib_rrd.h
+++ b/Marlin/ultralcd_st7920_u8glib_rrd.h
@@ -49,7 +49,7 @@
   #define CPU_ST7920_DELAY_1 DELAY_NS(0)
   #define CPU_ST7920_DELAY_2 DELAY_NS(0)
   #define CPU_ST7920_DELAY_3 DELAY_NS(50)
-#elif MB(3DRAG) || MB(K8200) || MB(K8400) || MB(SILVER_GATE)
+#elif MB(3DRAG) || MB(K8200) || MB(K8400) || MB(SILVER_GATE) || MB(PRINTRBOARD)
   #define CPU_ST7920_DELAY_1 DELAY_NS(0)
   #define CPU_ST7920_DELAY_2 DELAY_NS(188)
   #define CPU_ST7920_DELAY_3 DELAY_NS(0)

Hardware upgrade

RAMPS1.4 LCD 12864

LM8UU

Y axis coupler

belts and pulleys

Y axes rod

Needs 3d printed adapter for nut to fit: https://www.thingiverse.com/thing:2963508

Nut is friction fit which I consider somewhat as safety feature, if I found problems with it, I will probably add a bit of ABS goo in holes to fix it in place

bed leveling

self-made sensor from RFID card, paper clip and case intrusion switch, connected in parallel with z-axis switch (it has to be normally closed, so that trigger interrupts signal)

BL touch

http://www.geeetech.com/wiki/index.php/3DTouch_Auto_Leveling_Sensor

pinout, right to left

pin wire color board label
5 green G
4 red 5V
3 yellow S
2 black G
1 white Z-

Needs additional pin for servo control (S - servo)

Marlin configuration

commit 18396a8cd25585d5d562d4345ed851b91fb58821 (HEAD -> PrintrBot_Plus_LC-1.1.9)
Author: Dobrica Pavlinusic <dpavlin@rot13.org>
Date:   Sat Sep 8 11:05:54 2018 +0200

    probe offset from extruder

diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index 438494220..aeed322a7 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -770,8 +770,8 @@
  *      O-- FRONT --+
  *    (0,0)
  */
-#define X_PROBE_OFFSET_FROM_EXTRUDER 10  // X offset: -left  +right  [of the nozzle]
-#define Y_PROBE_OFFSET_FROM_EXTRUDER 10  // Y offset: -front +behind [the nozzle]
+#define X_PROBE_OFFSET_FROM_EXTRUDER 35  // X offset: -left  +right  [of the nozzle]
+#define Y_PROBE_OFFSET_FROM_EXTRUDER 5   // Y offset: -front +behind [the nozzle]
 #define Z_PROBE_OFFSET_FROM_EXTRUDER 0   // Z offset: -below +above  [the nozzle]
 
 // Certain types of probes need to stay away from edges

commit 2329e561e0f2997e78495c249706e9ce62608293
Author: Dobrica Pavlinusic <dpavlin@rot13.org>
Date:   Sat Sep 8 10:51:07 2018 +0200

    enable bed leveling
    
    AUTO_BED_LEVELING_UBL doesn't seem to compile for me ATM

diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index 38e0c343b..438494220 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -969,7 +969,7 @@
  */
 //#define AUTO_BED_LEVELING_3POINT
 //#define AUTO_BED_LEVELING_LINEAR
-//#define AUTO_BED_LEVELING_BILINEAR
+#define AUTO_BED_LEVELING_BILINEAR
 //#define AUTO_BED_LEVELING_UBL
 //#define MESH_BED_LEVELING
 
@@ -1023,6 +1023,8 @@
   //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
   //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE)
 
+  #define RIGHT_PROBE_BED_POSITION 190 // dpavlin -- probe overhangs on the right
+
   // Probe along the Y axis, advancing X after each column
   //#define PROBE_Y_FIRST
 

commit b867a948cd3b64d69e900b99a1306631d62753df
Author: Dobrica Pavlinusic <dpavlin@rot13.org>
Date:   Sun Sep 2 08:40:52 2018 +0200

    added bltouch config and pin on e-stop

diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index fd8463456..38e0c343b 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -721,7 +721,7 @@
 /**
  * The BLTouch probe uses a Hall effect sensor and emulates a servo.
  */
-//#define BLTOUCH
+#define BLTOUCH
 #if ENABLED(BLTOUCH)
   //#define BLTOUCH_DELAY 375   // (ms) Enable and increase if needed
 #endif
@@ -1909,7 +1909,7 @@
  * Set this manually if there are extra servos needing manual control.
  * Leave undefined or set to 0 to entirely disable the servo subsystem.
  */
-//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
+#define NUM_SERVOS 1 // Servo index starts with 0 for M280 command
 
 // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
 // 300ms is a good value but you can try less delay.
diff --git a/Marlin/pins_PRINTRBOARD.h b/Marlin/pins_PRINTRBOARD.h
index 8146505a3..a68802725 100644
--- a/Marlin/pins_PRINTRBOARD.h
+++ b/Marlin/pins_PRINTRBOARD.h
@@ -182,3 +182,9 @@
 // display delays are added to
 // Marlin/ultralcd_st7920_u8glib_rrd.h
 
+// bltouch - use e-stop for servo
+// dpavlin@nuc:/nuc/PrintrBot/Marlin$ grep E5 m43-pins.txt 
+// PIN:  37   Port: E5        <unused/unknown>            Input  = 1
+//
+#define SERVO0_PIN	37	// E5 E-STOP
+

gcode for bl-touch

M280 P0 S10 ; pushes the pin down

M280 P0 S90 ; pulls the pin up

M280 P0 S120 ; Self test – keeps going until you do pin up/down or release alarm

M280 P0 S160 ; Release alarm


permalink
ZPB30A1
load_detail1.jpg

dummy-load-sch.pdf

ZHIYU ZPB30A1 60W dummy load

input voltage: 12V 0.5A (11-14V)
constant current: 0.20-9.99 A

modes

hold run button at power on

Fun1 - dc load (continue working on voltage alarm)
Fun2 - battery test (stop load at specified voltage)8n

serial

115200 8n1

pins from bottom of the board upwards

G - GND
R - RX
T - TX
L - always low?
F - 50 Khz quare wave
Vc - input voltage

3 byte output, first two bytes are BCD voltage (3.35V) and last one is status (1=ok, 0=under voltage alarm)

pi@rpi2 ~ $ microcom -s 115200 -p /dev/ttyUSB4 | od -An -t x1 -w3
 04 35 01
*
 04 36 01
 04 35 01
*
 04 36 01
*
 04 35 01
*
 04 36 01
 04 35 01

replacement firmware

permalink
Galaxy Nexus i9250

Schematics and service manual for i9250: Samsung_i9250_schem_sm.rar



127|root@maguro:/ # cat /proc/cpuinfo                                          
Processor       : ARMv7 Processor rev 10 (v7l)
processor       : 0
BogoMIPS        : 1194.24

processor       : 1
BogoMIPS        : 1194.24

Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0xc09
CPU revision    : 10

Hardware        : Tuna
Revision        : 0009
Serial          : 014994b30201c013

BLE

GSM modem over serial port

HID keyboard

Unlegacy Android

ASOP for OMAP4 devices:

https://forum.xda-developers.com/galaxy-nexus/development/rom-omap4-aosp-project-t3334574

https://github.com/Unlegacy-Android/

kernel

http://unlegacy-android.cf/

https://github.com/Unlegacy-Android/android_kernel_samsung_tuna

dpavlin@klin:/virtual/android/galaxy-nexus$ git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/

dpavlin@klin:/virtual/android/galaxy-nexus/omap$ git checkout -b asop-7.1 unlegacy/aosp-7.1

dpavlin@klin:/virtual/android/galaxy-nexus/omap$ make tuna_defconfig ARCH=arm

dpavlin@klin:/virtual/android/galaxy-nexus/omap$ cp include/linux/compiler-gcc4.h include/linux/compiler-gcc5.h


dpavlin@klin:/virtual/android/galaxy-nexus/omap$ make -j9 ARCH=arm CROSS_COMPILE=arm-none-eabi-

Links

Somewhat interesting things that I can take a look at some time in the future:

Odin

serial

Nexus-usb-debug.png

Device Codename Resistor (R3) Connected VCC
Google Galaxy Nexus (GSM) samsung-maguro 619K ohm No
Samsung Galaxy Mini 2 samsung-s6500d 530K ohm No
Samsung Galaxy S4 Mini LTE samsung-i9195 619K ohm No
Samsung Galaxy S5 samsung-klte 619K ohm No

It seems that other suggestion is 150k from https://redmine.replicant.us/projects/replicant/wiki/SamsungSerial - I will have to test which value works

UART modes

Resistance Jig Boot
150k Inactive Inactive
523k Active Inactive
619k Active Active
permalink
RaspberryPi
mount-rpi-image.sh

Contents: [Dobrica Pavlinušić's random unstructured stuff]




Interestring projects

TODO: test them out and write full description on this wiki :-)

development

OV7670

DHT11/DHT22

BlinkM + i2c

CEC - control your TV

http://www.raspberrypi.org/forum/viewtopic.php?f=35&t=15749

root@raspberrypi:/home/pi# git clone https://github.com/Pulse-Eight/libcec.git
root@raspberrypi:/home/pi# cd libcec/
root@raspberrypi:/home/pi/libcec# apt-get install autoconf automake libtool liblockdev1-dev libudev-dev libraspberrypi-dev
root@raspberrypi:/home/pi/libcec# sh -x bootstrap
root@raspberrypi:/home/pi/libcec# ./configure --with-rpi-include-path=/opt/vc/include/ --with-rpi-lib-path=/opt/vc/lib/

##############################################################################

libCEC version 2:1:0 configured

Compilation flags:
  CXXFLAGS :       -g -O2 -fPIC -Wall -Wextra -Wno-missing-field-initializers  -Wno-psabi
  libCEC LDFLAGS : -lbcm_host -llockdev -lrt -ldl -lpthread  -L/opt/vc/lib/ -lvcos -lvchiq_arm -ludev  
  client LDFLAGS : -lrt -ldl -lpthread 

Configured features:
  Pulse-Eight CEC Adapter :             yes
  Pulse-Eight CEC Adapter detection :   yes
  Raspberry Pi support :                yes
  TDA995x support :                     no

You can now build libCEC by running:
  make

##############################################################################

make install

TV on

pi@raspberrypi ~ $ echo "on 0" | cec-client -s

Hints from forum

screen saver

http://www.raspberrypi.org/phpBB3/viewtopic.php?p=84831#p84831

# prevent screensaver from powering down display
setterm -blank 0 -powerdown 0 > /dev/tty0

# clear the display and turn off the flashing cursor
clear > /dev/tty0
setterm -cursor 0 > /dev/tty0

# turn the cursor back on when done with omxplayer
setterm -cursor 1 > /dev/tty0

YouTube transcoding in VLC

http://www.raspberrypi.org/phpBB3/viewtopic.php?p=163658#p163658

cvlc 'youtube.com/watch?v=XXXXXXXXXX' :sout='#transcode{vcodec=h264,vb=0,fps=0,scale=0,height=720,acodec=mp4a,ab=128,channels=2,samplerate=44100}:http{mux=ffmpeg{mux=flv},dst=:8080/youtube}' :sout-keep

Education materials

Raspberry Pi Accessories Starter Kit

http://www.conrad.com/ce/en/product/409208/Raspberry-Pi-Accessories-Starter-Kit?ref=searchDetail

  • 1x Rapberry sticker

GPU

Arduino

JTAG

Arduino ProMini 3.3V 8MHz

Disable serial port console

edit /boot/cmdline.txt and remove all ttyAMA0 leaving:

pi@raspberrypi ~ $ cat /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait bcm2708.w1_gpio_pin=4

also, comment out ttyAMA0 in /etc/inittab

connect Arduino serial

RX->TX
TX->RX

https://github.com/dpavlin/avrdude-rpi/tree/fix_channel_in_use

pin definitions in GPIO.RPi are physical pins on board not BCM or wiring ip!

gpio1.png

flasing

dpavlin@blue:~/Arduino/RF433_Sockets$ scp /tmp/build*.tmp/*.hex pi@rpi.tv:/tmp/
RF433_Sockets.cpp.hex                                        100%   19KB  18.6KB/s   00:00

pi@raspberrypi ~ $ cat avrdude.sh 
#!/bin/sh
hex=`ls -t /tmp/*.hex | head -1`
echo "flash hex: $hex"
sudo /home/pi/avrdude-rpi/avrdude-autoreset -C /home/pi/avrdude.conf -v -v -patmega328p -carduino -P/dev/ttyAMA0 -b57600 -D -Uflash:w:$hex:i 

pi@raspberrypi ~ $ ./avrdude.sh
flash hex: /tmp/RF433_Sockets.cpp.hex

avrdude: Version 6.1, compiled on Sep 17 2014 at 05:41:35
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/pi/avrdude.conf"
         User configuration file is "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyAMA0
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
done with autoreset
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 2
         Firmware Version: 1.16
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: reading input file "/tmp/RF433_Sockets.cpp.hex"
avrdude: writing flash (6770 bytes):

Writing | ################################################## | 100% 1.98s

avrdude: 6770 bytes of flash written
avrdude: verifying flash memory against /tmp/RF433_Sockets.cpp.hex:
avrdude: load data flash data from input file /tmp/RF433_Sockets.cpp.hex:
avrdude: input file /tmp/RF433_Sockets.cpp.hex contains 6770 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.49s

avrdude: verifying ...
avrdude: 6770 bytes of flash verified

avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK (E:00, H:00, L:00)
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe
strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe

avrdude done.  Thank you.

strace: |/home/pi/avrdude-rpi/autoreset: Broken pipe

DS1307 Tiny RTC

Check if module has 5V pull-up I2C resistors! If it does (like Tiny RTC has R2 and R3) you will have to remove them.

tiny-rtc-3.3v-remote-r2-r3.jpg

root@raspberrypi:/home/pi# apt-get install i2c-tools

root@raspberrypi:/home/pi# modprobe i2c-dev

root@raspberrypi:/home/pi# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

root@raspberrypi:/home/pi# modprobe rtc-ds1307

root@raspberrypi:/home/pi# echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device

root@raspberrypi:/home/pi# hwclock --systohc -D --noadjfile --utc
hwclock from util-linux 2.20.1
Using /dev interface to clock.
Assuming hardware clock is kept in UTC time.
Time elapsed since reference time has been 0.722720 seconds.
Delaying further to reach the new time.
Setting Hardware Clock to 11:53:41 = 1429876421 seconds since 1969
ioctl(RTC_SET_TIME) was successful.

DS18B20

root@raspberrypi:/home/pi# grep w1 /boot/config.txt 
dtoverlay=w1-gpio

# reboot

root@raspberrypi:/home/pi# cat /sys/bus/w1/devices/28-0000043c5507/w1_slave 
50 05 4b 46 7f ff 0c 10 1c : crc=1c YES
50 05 4b 46 7f ff 0c 10 1c t=85000

Hmm, you will also want to remove R1 pullup to make it work?

avrdude

Using Raspberry Pi as Arduino ISP programmer

root@raspberrypi:/home/pi# avrdude -c linuxgpio -p atmega328p

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f

avrdude: safemode: Fuses OK (E:05, H:DA, L:FF)

avrdude done.  Thank you.

logic analyzer

rotary encoder

http://www.bobrathbone.com/raspberrypi_rotary.htm

SWD

http://www.disk91.com/2015/technology/programming/swd-programming-using-a-raspberrypi/
https://github.com/disk91/PySWD

pi@raspberrypi ~ $ git clone https://github.com/disk91/PySWD
pi@raspberrypi ~ $ cd PySWD/


PIC

esp8089

PS/2 GPIO

GPIO header annotations

Signal generator

pi@rpi2 ~/WsprryPi $ sudo ./wspr --test-tone 1000000
A test tone will be generated at frequency 1.000000 MHz

Using local mbox device file with major 249.
Transmitting test tone on frequency 1.000000 MHz
Press CTRL-C to exit!

LCD panels

http://blog.reasonablycorrect.com/raw-dpi-raspberry-pi/

Pi Zero USB OTG

libcomposite

PATA IDE emulation

DPI LCD screen

i2c clock stretching

permalink
Olympus C-5050 ZOOM
permalink
WiFi@SDCF

links

info

WIFI Adapter Memory Card TF Micro-SD to CF Compact Flash Card Kit for Digit Y8X8

Insert your Micro-SD HC card into WiFi CF adapter and you can access high quality photos and videos sent wirelessly from your camera via Wi-Fi to your Smartphone or tablet to share.
Supports "with the beat-per-view" feature and both Apple Ios & Android devices
WiFi-CF settings: WiFi password,AP Mode and Station Mode switch, IP, channels, number or users, SSID.
some camera don't support wifi function, then the wifi unavailable.
Please check the camera manual before you use the wifi function.
Insert your Micro-SD HC card into WiFi CF adapter and you can access high
quality photos and videos sent wirelessly from your camera via Wi-Fi to
your Smartphone or tablet to share.
1.Connect up to 3 devices simultaneously
2.Supports "with the beat-per-view" feature.
3.Supports both Apple Ios & Android devices.
4.WiFi-CF settings: WiFi password,AP Mode and Station Mode switch, IP,
channels, number or users, SSID.
5. Please choose the quality,performance,higher microSDHC Card(recommend
Class 10).
6. Capacity: based on your microSDHC / microSDXC card.
7. SD browse file formats supported:
1) Photo (photo): JPG,PNG,BMP.
2) Video(Video): MP4,AVI,MOV.
3) Music(Music): MP3,WAV.
Note: WiFi-CF can display above file formats,but the ability to play
depends on whether the Wi-Fi device you use can support.
WIFI-CF Default Password: 999999 or 99999999
WIFI-CF Apps Default Username: admin
WIFI-CF Apps Default Password: admin
colour: black+white
Material: ABS
Package Contents:
1*WIFI Adapter Memory Card
Note: WiFi-CF can display above file formats,but the ability to play depends on whether the Wi-Fi device you use can support.
The TF Micro-SD memory card is not included.
Only the above package content, other products are not included.
Note: Light shooting and different displays may cause the color of the item in t

permalink
Mikrotik RB260GS

Overview

STM32F107 RBT6 + QCA8337 AL3C based router with serial and swd headers

Mainstream Connectivity line, ARM Cortex-M3 MCU with 128 Kbytes Flash, 72 MHz CPU, Ethernet MAC, CAN and USB 2.0 OTG

Firmware

According to https://wiki.mikrotik.com/wiki/SwOS/RB250_RB260#Summary

new RB260GS (CSS106-5G-1S), new RB260GSP(CSS106-1G-4P-1S) supports SwOS v2.0 and newer.

Example working (as of 2018-07-06) url download links which work for CSS106-5G-1S:

https://download2.mikrotik.com/swos2/css106/swos-css1061g4p1s-2.0.bin
https://download2.mikrotik.com/swos2/css106/swos-css1061g4p1s-2.2.bin

dpavlin@lib10:/lib10/arh-hw/backup/Mikrotik-RB260GS-CSS106-5G-1S/rb260gsp$ md5sum *
bf110ca7e1cd0558cefeacd9e0b62c19  swos-css1061g4p1s-2.0.bin
a491bbf2732937839e6a8222a876cc7a  swos-css1061g4p1s-2.2.bin
f098106dfc8ac5ad0fedf0181c68d8de  swos-css1061g4p1s-2.3.bin
f4f74f697039a83baa99d37017251805  swos-css1061g4p1s-2.4.bin
90d2ec8571dd9d9aeab1bfbaaa99dea2  swos-css1061g4p1s-2.5.bin
a7f046fc8a12b5ebeb85f9a4bb0dd275  swos-css1061g4p1s-2.6.bin
a1e7adc6ad63e5560156b0f2b6f272ce  swos-css1061g4p1s-2.7.bin




version

from web interface

Firmware
Current Installed Version	2.7 (built at Fri Dec 15 2017 09:42:48 GMT+0100 (CET))
Latest Available Version	2.7 (built at Fri Dec 15 2017 09:42:48 GMT+0100 (CET))

reset

  • hold reset while poweron

SwOS v2.x - RB260GS(CSS106-5G-1S) and RB260GSP(CSS106-1G-4P-1S)

The new RB260GS(CSS106-5G-1S) and RB260GSP(CSS106-1G-4P-1S) has built-in backup SwOS firmware which can be loaded in case standard firmware breaks or upgrade fails:

    Holding Reset button for few seconds while device is booting resets configuration and loads backup firmware SwOS 2.0p.
    After loading backup firmware SwOS 2.0p it is possible to connect to 192.168.88.1 using web browser and install new SwOS firmware.

default ip: 192.168.88.1

Current Installed Version	2.0p (built at Fri Oct 21 2016 10:18:39 GMT+0200 (CEST))
Latest Available Version	2.7 (built at Fri Dec 15 2017 09:42:48 GMT+0100 (CET))



After this, router knows that there is new version, but can't download it from http://upgrade.mikrotik.com/swos2/css106/swos-css106-2.7.bin

Linux setup

dpavlin@x230:~$ sudo ifconfig enp0s25 192.168.88.240


wget --http-user=admin --http-password='' 'http://192.168.88.1/!stats.b'


permalink
CubieBoard
cubieboard_schematic_2012-08-08.pdf

BreadBoard V1.0 03-25 For CubieBoard.pdf

Contents: [Dobrica Pavlinušić's random unstructured stuff]


A20

Running UBI/UBIFS on MLC NAND

NAND in mainline kernel

Samsung K9GBG08U0A NAND

dpavlin@cubieboard:~$ dmesg | grep -A 5 nand
[    4.395437] nand: Could not find valid JEDEC parameter page; aborting
[    4.401898] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xd7
[    4.408272] nand: Samsung NAND 4GiB 3,3V 8-bit
[    4.412719] nand: 4096 MiB, MLC, erase size: 1024 KiB, page size: 8192, OOB size: 640
[    4.421299] Bad block table found at page 524160, version 0x25
[    4.427987] Bad block table found at page 524032, version 0x25
[    4.434238] nand_read_bbt: bad block at 0x000001000000
[    4.439379] nand_read_bbt: bad block at 0x000001100000
[    4.445411] 6 ofpart partitions found on MTD device 1c03000.nand
[    4.451420] Creating 6 MTD partitions on "1c03000.nand":
[    4.456769] 0x000000a00000-0x0001ffa00000 : "rootfs"
[    4.461737] mtd: partition "rootfs" extends beyond the end of device "1c03000.nand" -- size truncated to 0xff600000
[    4.472910] 0x000001000000-0x000001400000 : "env"
[    4.477926] 0x000000c00000-0x000001000000 : "U-Boot.backup"
[    4.483748] 0x000000800000-0x000000c00000 : "U-Boot"
[    4.488997] 0x000000400000-0x000000800000 : "SPL.backup"
[    4.494580] 0x000000000000-0x000000400000 : "SPL"



dpavlin@cubieboard2:~$ dmesg | grep -A 5 nand
[    4.709427] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xd7
[    4.715876] nand: Hynix H27UBG8T2BTR-BC 32G 3.3V 8-bit
[    4.721021] nand: 4096 MiB, MLC, erase size: 2048 KiB, page size: 8192, OOB size: 640
[    4.728997] Scanning device for bad blocks
[    8.484659] 6 ofpart partitions found on MTD device 1c03000.nand
[    8.490678] Creating 6 MTD partitions on "1c03000.nand":
[    8.496021] 0x000000a00000-0x0001ffa00000 : "rootfs"
[    8.500992] mtd: partition "rootfs" extends beyond the end of device "1c03000.nand" -- size truncated to 0xff600000
[    8.515527] 0x000001000000-0x000001400000 : "env"
[    8.520564] 0x000000c00000-0x000001000000 : "U-Boot.backup"
[    8.526504] 0x000000800000-0x000000c00000 : "U-Boot"
[    8.531755] 0x000000400000-0x000000800000 : "SPL.backup"
[    8.537395] 0x000000000000-0x000000400000 : "SPL"

many bad blocks

http://linux-sunxi.org/Mainline_NAND_Howto#Many_bad_blocks

To fix many bad blocks issue you should:

1. Disable nand-on-flash-bbt in your dts
2. Remove this test: http://lxr.free-electrons.com/source/drivers/mtd/nand/nand_base.c?v=4.7#L2940
3. Boot your new kernel and erase chip with flash_erase /dev/mtd[0-X]
4. Re-introduce the bad block check removed in 2, re-enable nand-on-flash-bbt
   and boot the new kernel

Let's try to do this with armbian.

cubieboard

First, enable nand overlay

dpavlin@cubieboard:~$ cat /boot/armbianEnv.txt
overlays=nand

Then remove nand-om-flash-btt:

dpavlin@cubieboard:/$ cd /boot/dtb-`uname -r`/overlay
dpavlin@cubieboard:/boot/dtb-4.14.23-sunxi/overlay$ 

# backup original
root@cubieboard:/boot/dtb-4.14.23-sunxi/overlay# cp sun4i-a10-nand.dtbo sun4i-a10-nand.dtbo.orig

# remote nand-on-flash-bbt
root@cubieboard:/boot/dtb-4.14.23-sunxi/overlay# dtc -I dtb -O dts sun4i-a10-nand.dtbo | grep -v nand-on-flash-bbt > /tmp/nand.dts
root@cubieboard:/boot/dtb-4.14.23-sunxi/overlay# dtc -I dts -O dtb /tmp/nand.dts > sun4i-a10-nand.dtbo

Compile armbian kernel with this patch applied

dpavlin@armbian:~/build$ cp ./patch/kernel/sunxi-dev/nand-disable-badblock-check-for-migration.patch.disabled \
    ./userpatches/kernel/sunxi-next/nand-disable-badblock-check-for-migration.patch

Reboot and check that nand is available:

dpavlin@cubieboard:~$ dmesg | grep -A 8 MTD
[   13.696198] 6 ofpart partitions found on MTD device 1c03000.nand
[   13.702205] Creating 6 MTD partitions on "1c03000.nand":
[   13.707550] 0x000000a00000-0x0001ffa00000 : "rootfs"
[   13.712517] mtd: partition "rootfs" extends beyond the end of device "1c03000.nand" -- size truncated to 0xff600000
[   13.723693] 0x000001000000-0x000001400000 : "env"
[   13.728713] 0x000000c00000-0x000001000000 : "U-Boot.backup"
[   13.734568] 0x000000800000-0x000000c00000 : "U-Boot"
[   13.739778] 0x000000400000-0x000000800000 : "SPL.backup"
[   13.745368] 0x000000000000-0x000000400000 : "SPL"
[   13.751476] sun4i-mdio 1c0b080.mdio: 1c0b080.mdio supply phy not found, using dummy regulator

Now init nand:

root@cubieboard:~# mtd_debug info /dev/mtd0
mtd.type = MTD_MLCNANDFLASH
mtd.flags = MTD_CAP_NANDFLASH
mtd.size = 4284481536 (3G)
mtd.erasesize = 1048576 (1M)
mtd.writesize = 8192 (8K)
mtd.oobsize = 640 
regions = 0


root@cubieboard2:~# mtd_debug info /dev/mtd0
mtd.type = MTD_MLCNANDFLASH
mtd.flags = MTD_CAP_NANDFLASH
mtd.size = 4284481536 (3G)
mtd.erasesize = 2097152 (2M)
mtd.writesize = 8192 (8K)
mtd.oobsize = 640 
regions = 0

root@cubieboard:/home/dpavlin# flash_erase /dev/mtd0 0 0
Erasing 1024 Kibyte @ 600000 --  0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 6 (mtd0)
        error 5 (Input/output error)
flash_erase: error!: /dev/mtd0: MTD Erase failure
             error 5 (Input/output error)
Erasing 1024 Kibyte @ 700000 --  0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 7 (mtd0)
        error 5 (Input/output error)
flash_erase: error!: /dev/mtd0: MTD Erase failure
             error 5 (Input/output error)
Erasing 1024 Kibyte @ ff500000 -- 100 % complete 


root@cubieboard:/home/dpavlin# ubiformat /dev/mtd0
ubiformat: mtd0 (mlc-nand), size 4284481536 bytes (4.0 GiB), 4086 eraseblocks of 1048576 bytes (1024.0 KiB), min. I/O size 8192 bytes
libscan: scanning eraseblock 4085 -- 100 % complete  
ubiformat: 4084 eraseblocks are supposedly empty
ubiformat: warning!: 2 of 4086 eraseblocks contain non-UBI data
ubiformat: continue? (y/N) y
ubiformat: warning!: only 0 of 4086 eraseblocks have valid erase counter
ubiformat: erase counter 0 will be used for all eraseblocks
ubiformat: note, arbitrary erase counter value may be specified using -e option
ubiformat: continue? (y/N) y
ubiformat: use erase counter 0 for all eraseblocks
ubiformat: formatting eraseblock 6 --  0 % complete  libmtd: error!: MEMERASE64 ioctl failed for eraseblock 6 (mtd0)
        error 5 (Input/output error)

ubiformat: error!: failed to erase eraseblock 6
           error 5 (Input/output error)
ubiformat: mark it as bad? (y/N) y
ubiformat: marking block 6 bad
ubiformat: formatting eraseblock 7 --  0 % complete  libmtd: error!: MEMERASE64 ioctl failed for eraseblock 7 (mtd0)
        error 5 (Input/output error)

ubiformat: error!: failed to erase eraseblock 7
           error 5 (Input/output error)
ubiformat: mark it as bad? (y/N) y
ubiformat: marking block 7 bad
ubiformat: formatting eraseblock 4085 -- 100 % complete  




ubiattach -p /dev/mtd0

ubimkvol /dev/ubi0 -s 2GiB -N root

mount /dev/ubi0_0 /mnt/ -t ubifs

root@cubieboard:~# mount /dev/ubi0_0 /mnt/ -t ubifs
[Wed Feb 28 17:49:38 2018] UBIFS error (pid: 4709): cannot open "/dev/ubi0:root", error -22
[Wed Feb 28 17:49:43 2018] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 4722
[Wed Feb 28 17:49:44 2018] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "root"
[Wed Feb 28 17:49:44 2018] UBIFS (ubi0:0): LEB size: 1032192 bytes (1008 KiB), min./max. I/O unit sizes: 8192 bytes/8192 bytes
[Wed Feb 28 17:49:44 2018] UBIFS (ubi0:0): FS size: 2137669632 bytes (2038 MiB, 2071 LEBs), journal size 33030144 bytes (31 MiB, 32 LEBs)
[Wed Feb 28 17:49:44 2018] UBIFS (ubi0:0): reserved for root: 4952683 bytes (4836 KiB)
[Wed Feb 28 17:49:44 2018] UBIFS (ubi0:0): media format: w5/r0 (latest is w5/r0), UUID 8E9A30F0-241F-4013-916F-C0B995F22BB1, small LPT model


cubieboard2

This is mostly redundant from cubieboard, but with attempt to define mtd partitions correctly

root@cubieboard2:/home/dpavlin# ubiformat /dev/mtd0
ubiformat: mtd0 (mlc-nand), size 4273995776 bytes (4.0 GiB), 2038 eraseblocks of 2097152 bytes (2.0 MiB), min. I/O size 8192 bytes
libscan: scanning eraseblock 2037 -- 100 % complete  
ubiformat: 2038 eraseblocks have valid erase counter, mean value is 1
ubiformat: formatting eraseblock 2037 -- 100 % complete  



mount ubifs filesystem

dpavlin@cubieboard:~$ grep ubi /mnt/boot/armbianEnv.txt
rootdev=ubi0:root ubi.mtd=0
rootfstype=ubifs

dpavlin@cubieboard:~$ grep ubi /etc/fstab 
ubi0:root / ubifs defaults,noatime,nodiratime 0 1

u-boot

Original u-boot output

HELLO! BOOT0 is starting!
boot0 version : 1.5.1
dram size =1024
Succeed in opening nand flash.
Succeed in reading Boot1 file head.
The size of Boot1 is 0x0003c000.
The file stored in 0X00000000 of block 2 is perfect.
Check is correct.
Ready to disable icache.
Succeed in loading Boot1.
Jump to Boot1.
[       0.133] boot1 version : 1.4.0
[       0.133] pmu type = 3
[       0.134] bat vol = 0
[       0.161] axi:ahb:apb=3:2:2
[       0.161] set dcdc2=1400, clock=1008 successed
[       0.163] key
[       0.175] no key found
[       0.175] flash init start
[       4.051] flash init finish
[       4.052] fs init ok
[       4.053] fattype FAT16
[       4.053] fs mount ok
[       4.060] script finish
[       4.061] power finish
[       4.069] BootMain start
[       4.069] 13
[       4.089] key value = 0
[       4.089] recovery key high 6, low 4
[       4.090] unable to find fastboot_key key_max value
[       4.098] test for multi os boot with display
[       4.100] show pic finish
[       4.103] load kernel start
[       4.127] load kernel successed
[       4.127] start address = 0x4a00000

U-Boot 2011.09-rc1 (Nov 26 2012 - 14:01:52) Allwinner Technology 

CPU:   SUNXI Family
Board: A10-EVB
DRAM:  512 MiB
NAND:  3776 MiB
In:    serial
Out:   serial
Err:   serial
--------fastboot partitions--------
-total partitions:11-
-name-        -start-       -size-      
bootloader  : 1000000       1000000     
env         : 2000000       1000000     
boot        : 3000000       2000000     
system      : 5000000       14000000    
data        : 19000000      20000000    
misc        : 39000000      1000000     
recovery    : 3a000000      2000000     
cache       : 3c000000      8000000     
private     : 44000000      1000000     
sysrecovery : 45000000      14000000    
UDISK       : 59000000      93000000    
-----------------------------------
Hit any key to stop autoboot:  0 
sunxi#

compile with nand support

On Cubieboard2 with those patches we get:

=> nand info

Device 0: nand0, sector size 2048 KiB
  Page size       8192 b
  OOB size         640 b
  Erase size   2097152 b
  subpagesize     8192 b
  options     0x00001000
  bbt options 0x00070000

# which comparted to booted linux kernel with mtd support....

root@cubieboard2:~# mtd_debug info /dev/mtd0
mtd.type = MTD_MLCNANDFLASH
mtd.flags = MTD_CAP_NANDFLASH
mtd.size = 4284481536 (3G)
mtd.erasesize = 2097152 (2M)
mtd.writesize = 8192 (8K)
mtd.oobsize = 640 
regions = 0

# it looks somewhat OK, but mtdparts doesn't (yet) return anything.

Another day, another try to get mtdparts to display something...

root@armbian:~/build/cache/sources/u-boot/v2017.11# grep -i mtd .config
CONFIG_SPL_MTD_SUPPORT=y
CONFIG_CMD_MTDPARTS=y
CONFIG_MTDIDS_DEFAULT="nand0=sunxi-nand"
CONFIG_MTDPARTS_DEFAULT="mtdparts=sunxi-nand:4m(spl),4m(spl-backup),4m(uboot),4m(uboot-backup),4m(env),-(UBI)"
# CONFIG_CMD_MTDPARTS_SPREAD is not set
# MTD Support
CONFIG_MTD=y
# CONFIG_MTD_NOR_FLASH is not set
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MTD_UBI_BEB_LIMIT=20
# CONFIG_MTD_UBI_FASTMAP is not set

=> mtdparts

device nand0 <sunxi-nand>, # parts = 6
 #: name                size            offset          mask_flags
 0: spl                 0x00400000      0x00000000      0
 1: spl-backup          0x00400000      0x00400000      0
 2: uboot               0x00400000      0x00800000      0
 3: uboot-backup        0x00400000      0x00c00000      0
 4: env                 0x00400000      0x01000000      0
 5: UBI                 0xfec00000      0x01400000      0

active partition: nand0,0 - (spl) 0x00400000 @ 0x00000000

defaults:
mtdids  : nand0=sunxi-nand
mtdparts: mtdparts=sunxi-nand:4m(spl),4m(spl-backup),4m(uboot),4m(uboot-backup),4m(env),-(UBI)







Instructions after this are hit-or-miss...

dpavlin@klin:/klin/u-boot$ cp configs/Cubieboard_defconfig .config

# add NAND, MTD options, A10 for cubieboard1

# compile while defining flash:

dpavlin@klin:/klin/u-boot$ cat build-cubieboard.sh 
# parametars are probably wrong for your chip!
make V=1 CONFIG_NAND_SUNXI_SPL_ECC_STRENGTH=40 CONFIG_SYS_NAND_PAGE_SIZE=4036 CONFIG_SYS_NAND_OOBSIZE=640 CONFIG_SYS_NAND_BLOCK_SIZE=0x100000


dpavlin@cubieboard:~$ scp 10.60.0.92:/klin/u-boot/u-boot*spl* .

dpavlin@cubieboard:~$ sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8 
488+1 records in
488+1 records out
500154 bytes (500 kB) copied, 0.0423498 s, 11.8 MB/s


It would be better to define params in u-boot config file like:

CONFIG_SYS_EXTRA_OPTIONS="SYS_NAND_BLOCK_SIZE=0x40000,SYS_NAND_PAGE_SIZE=4096,SYS_NAND_OOBSIZE=256"

(with correct values of course).

pinout

U14 (Next to SATA connector)

  SPI0
48 PI13 (SPI0-MISO/UART6-RX/EINT25) 47 PI11 (SPI0-CLK/UART5-RX/EINT23)
46 PI12 (SPI0-MOSI/UART6-TX/EINT24) 45 PI10 (SPI0-CS/UART5-TX/EINT22)
  LCD
44 3.3V (nc in 2012-08-08) 43 VCC-5V
42 Ground 41 SPDIF
40 PB10 (LCD0-SCK/LCD-PIO1) 39 PB11 (LCD0-SDA/LCD-PIO2)
38 Ground 37 PH7 (LCD0-BL-EN/LCD-PIO0/UART5-RX/EINT7)
36 XN_TP (TP-X2) 35 YN_TP (TP-Y2)
34 XP_TP (TP-X1) 33 YP_TP (TP-Y1)
32 PD25 (LCDDE) 31 PB2 (PWM0)
30 PD26 (LCDHSYNC)-VGA-HSYNC 29 PD24 (LCDCLK)
28 PD23 (LCDD23) 27 PD27 (LCDVSYNC)-VGA-VSYNC
26 PD21 (LCDD21) 25 PD22 (LCDD22)
24 PD19 (LCDD19/LVDS1N3) 23 PD20 (LCDD20)
22 PD17 (LCDD17/LVDS1NC) 21 PD18 (LCDD18/LVDS1P3)
20 Ground 19 PD16 (LCDD16/LVDS1PC)
18 PD14 (LCDD14/LVDS1P2) 17 PD15 (LCDD15/LVDS1N2)
16 PD12 (LCDD12/LVDS1P1) 15 PD13 (LCDD13/LVDS1N1)
14 PD10 (LCDD10/LVDS1P0) 13 PD11 (LCDD11/LVDS1N0)
12 PD8 (LCDD8/LVDS0P3) 11 PD9 (LCDD9/LVDS0N3)
10 PD7 (LCDD7/LVDS0NC) 9 Ground
8 PD5 (LCDD5/LVDS0N2) 7 PD6 (LCDD6/LVDS0PC)
6 PD3 (LCDD3/LVDS0N1) 5 PD4 (LCDD4/LNVS0P2)
4 PD1 (LCDD1/LVDS0N0) 3 PD2 (LCDD2/LVDS0P1)
2 Ground 1 PD0 (LCDD0/LVDSP0)

U15 (Between Ethernet port and USB ports)

  CSI1/TS
1 VCC-5V 2 PH15 (CSI1-PWR/EINT15)
3 CSI1-IO-2V8 4 PH14 (CSI1-RST#/EINT14)
5 PG0 (CSI1-PCLK/SDC1-CMD) 6 PB18 (TWI1-SCK)
7 PB19 (TWI1-SDA) 8 PG3 (CSI1-VSYNC/SDC1-D1)
9 PG2 (CSI1-HSYNC/SDC1-D0) 10 PG1 (CSI1-MCLK/SDC1-CLK)
11 PG4 (CSI1-D0/SDC1-D2) 12 PG5 (CSI1-D1/SDC1-D3)
13 PG6 (CSI1-D2/UART3-TX) 14 PG7 (CSI1-D3/UART3-RX
15 PG8 (CSI1-D4/UART3-RTS) 16 PG9 (CSI1-D5/UART3-CTS)
17 PG10 (CSI1-D6/UART4-TX) 18 PG11 (CSI1-D7/UART4-RX)
19 Ground 20 Ground
  Analog SDIO3
21 FMINL 22 PI4 (SDC3-CMD)
23 FMINR 24 PI5 (SDC3-CLK)
25 Ground 26 PI6 (SDC3-D0)
27 VGA-R 28 PI7 (SDC3-D1)
29 VGA-G 30 PI8 (SDC3-D2)
31 VGA-B 32 PI9 (SDC3-D3)
  CSI0/TS
33 LCD1-VSYNC 34 PE4 (CSI0-D0)
35 LCD1-HSYNC 36 PE5 (CSI0-D1)
37 Ground 38 PE6 (CSI0-D2)
39 AVCC 40 PE7 (CSI0-D3)
41 LRADC0 42 PE8 (CSI0-D4)
43 CVBS 44 PE9 (CSI0-D5)
45 HPL 46 PE10 (CSI0-D6)
47 HPR 48 PE11 (CSI0-D7)


everything below line is for legacy kernel and quite old

disk speed

NAND

root@cubieboard2:/home/dpavlin# uname -a
Linux cubieboard2 3.4.109-sun7i #4 SMP PREEMPT Sun Oct 11 14:32:15 CEST 2015 armv7l GNU/Linux
root@cubieboard2:/home/dpavlin# hdparm -t /dev/nand

/dev/nand:
 Timing buffered disk reads:  32 MB in  3.22 seconds =   9.94 MB/sec

# this is different, faster sdcard
root@cubieboard2:~# uname -a
Linux cubieboard2 4.3.3-sunxi #3 SMP Mon Dec 28 11:27:16 CET 2015 armv7l GNU/Linux
root@cubieboard2:~# hdparm -tT /dev/mmcblk0

/dev/mmcblk0:
 Timing cached reads:   770 MB in  2.00 seconds = 384.59 MB/sec
 Timing buffered disk reads:  60 MB in  3.05 seconds =  19.67 MB/sec



SATA

Powered by 2A Nexus 7 power supply (for SATA)

https://groups.google.com/d/searchin/cubieboard/sata/cubieboard/hKJgJneGVmQ/xme3w4Y7XtsJ?fromplusone=1

root@debian:~/sunxi-tools# ./bin2fex /boot/script.bin script.fex
fexc-bin: /boot/script.bin: version: 0.1.2
fexc-bin: /boot/script.bin: size: 42144 (76 sections)

root@debian:~/sunxi-tools# cp script.fex script+sata.fex

root@debian:~/sunxi-tools# diff -urw script.fex script+sata.fex 
--- script.fex  2013-05-30 10:41:13.979510762 +0000
+++ script+sata.fex     2013-05-30 10:42:36.380244101 +0000
@@ -595,7 +595,7 @@
 
 [sata_para]
 sata_used = 1
-sata_power_en =
+sata_power_en = port:PB08<1><default><default><0>
 
 [mmc0_para]
 sdc_used = 1

root@debian:~/sunxi-tools# ./fex2bin script+sata.fex /boot/script.bin

root@debian:/etc# git diff
diff --git a/modules b/modules
index d8894c3..9e65a80 100644
--- a/modules
+++ b/modules
@@ -4,3 +4,4 @@
 # at boot time, one per line. Lines beginning with "#" are ignored.
 # Parameters can be specified after the module name.
 
+sw_ahci_platform

Reboot to activate changes and test speed (using 80G intel SSD to have sense of maximum performance)

root@debian:~# hdparm -i /dev/sda

/dev/sda:

 Model=INTEL SSDSA2M080G2GC, FwRev=2CV102HD, SerialNo=CVPO035101VN080JGN
 Config={ Fixed }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=unknown, MaxMultSect=16, MultSect=1
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: ATA/ATAPI-7 T13 1532D revision 1:  ATA/ATAPI-2,3,4,5,6,7

 * signifies the current active mode

root@debian:~# hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   784 MB in  2.00 seconds = 392.08 MB/sec
 Timing buffered disk reads: 460 MB in  3.00 seconds = 153.32 MB/sec

And test with disk:

root@debian:~# hdparm -i /dev/sda

/dev/sda:

 Model=ST96812AS, FwRev=7.24, SerialNo=3PJ1GCKE
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=off
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=117231408
 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 
 AdvancedPM=yes: unknown setting WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode

root@debian:~# hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   746 MB in  2.00 seconds = 372.90 MB/sec
 Timing buffered disk reads: 120 MB in  3.03 seconds =  39.56 MB/sec

GPIO

Camera

OV7670 is supported http://linux-sunxi.org/CSI

hardware

pinout: gpio_defination_large.jpg

https://www.olimex.com/wiki/How_to_add_pwm

cat /sys/class/pwm-sunxi/pwm0/pin 
PB2

echo 10khz > /sys/class/pwm-sunxi/pwm0/period

echo 25 > /sys/class/pwm-sunxi/pwm0/duty_percent

echo 1 > /sys/class/pwm-sunxi/pwm0/run

LEDs

dpavlin@cubieboard2:~$ grep . /sys/class/leds/*/trigger 
/sys/class/leds/blue:ph21:led2/trigger:none battery-charging-or-full battery-charging battery-full battery-charging-blink-full-solid ac-online usb-online mmc0 timer [heartbeat] backlight cpu0 cpu1 default-on 
/sys/class/leds/green:ph20:led1/trigger:[none] battery-charging-or-full battery-charging battery-full battery-charging-blink-full-solid ac-online usb-online mmc0 timer heartbeat backlight cpu0 cpu1 default-on 

forum

ina219

device tree

dpavlin@cubieboard2:~$ sensors
ina219-i2c-1-40
Adapter: mv64xxx_i2c adapter
in0:          +0.04 V  
in1:          +4.64 V  
power1:       66.88 W  
curr1:       +13.64 A  

iio_hwmon-isa-0000
Adapter: ISA adapter
temp1:        +33.6�C  

root@cubieboard2:~# dmesg | grep ina | tail -1
[ 6597.685287] ina2xx 1-0040: power monitor ina219 (Rshunt = 100 uOhm)

# hum, it should be 10uA, so I changed that in device tree

dpavlin@cubieboard2:~$ dmesg | grep ina219
[   11.594536] ina2xx 1-0040: power monitor ina219 (Rshunt = 10 uOhm)
dpavlin@cubieboard2:~$ sensors
ina219-i2c-1-40
Adapter: mv64xxx_i2c adapter
in0:          +0.02 V  
in1:          +4.75 V  
power1:       85.00 W  
curr1:       +17.97 A  

iio_hwmon-isa-0000
Adapter: ISA adapter
temp1:        +32.5�C  

# still wrong current!


user-land C

User-land implementation which works: https://github.com/ZigFisher/Glutinium/blob/master/i2c-telemetry/src/ina219.c

modified a little to provide full timestamp and fflush: ina219.c

dpavlin@cubieboard2:~$ ./ina219 -b 1 -i 1
2017-10-23T12:40:24 4744mV  262.2mA
2017-10-23T12:40:26 4756mV  249.1mA
2017-10-23T12:40:27 4776mV  223.0mA
2017-10-23T12:40:28 4772mV  223.8mA
2017-10-23T12:40:29 4760mV  224.0mA
2017-10-23T12:40:30 4768mV  223.0mA
2017-10-23T12:40:31 4772mV  223.1mA
2017-10-23T12:40:32 4748mV  224.6mA
2017-10-23T12:40:33 4776mV  223.1mA
2017-10-23T12:40:34 4768mV  223.5mA

SPI flash

flashrom

dpavlin@cubieboard:~$ sudo grep spidev /boot/armbianEnv.txt
overlays=pwm nand uart3 uart4 spi-spidev
#overlays=spi-spidev
param_spidev_spi_bus=0


dpavlin@cubieboard:~$ sudo flashrom -p linux_spi:dev=/dev/spidev0.0
flashrom v0.9.9-2-g51e4303 on Linux 4.14.47-sunxi (armv7l)
flashrom is free software, get the source code at https://flashrom.org

Calibrating delay loop... OK.
Found GigaDevice flash chip "GD25Q80(B)" (1024 kB, SPI) on linux_spi.
No operations were specified.

root@cubieboard:/home/dpavlin# time flashrom -p linux_spi:dev=/dev/spidev0.0 -r /dev/null
flashrom v0.9.9-2-g51e4303 on Linux 4.14.47-sunxi (armv7l)
flashrom is free software, get the source code at https://flashrom.org

Calibrating delay loop... OK.
Found GigaDevice flash chip "GD25Q80(B)" (1024 kB, SPI) on linux_spi.
Reading flash... done.

real    0m11.210s
user    0m0.796s
sys     0m0.381s


build u-boot with SPI support

http://linux-sunxi.org/Bootable_SPI_flash

git clone -b sunxi-spi https://github.com/StephanvanSchaik/u-boot

dpavlin@armbian:~/u-boot$ git diff
diff --git a/configs/Cubieboard_defconfig b/configs/Cubieboard_defconfig
index 0389d4c..cbafac9 100644
--- a/configs/Cubieboard_defconfig
+++ b/configs/Cubieboard_defconfig
@@ -16,3 +16,13 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_EHCI_HCD=y
+
+CONFIG_CMD_SF=y
+CONFIG_CMD_SPI=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_DM_SPI=y
+CONFIG_SUNXI_SPI=y
+
dpavlin@armbian:~/u-boot$ make Cubieboard_defconfig




This doesn't actually work for me (since it's missing device tree overlays), but rebasing to current u-boot master doesn't
produce code which compiles.

https://forum.armbian.com/topic/3252-opi-zero-boot-with-spi/

permalink
Announcements and Links
permalink
PICkit

PICKit 2

pk2cmd

pi@rpi2 ~ $ git clone https://github.com/psmay/pk2cmd
pi@rpi2 ~ $ cd pk2cmd/pk2cmd
pi@rpi2 ~/pk2cmd/pk2cmd $ make linux

pi@rpi2 ~/pk2cmd/pk2cmd $ ./pk2cmd -P
Auto-Detect: Found part PIC16F684.

# power on target from pickit 2
pi@rpi2 ~/pk2cmd/pk2cmd $ ./pk2cmd -PPIC16F684 -T

serial

https://github.com/majenkotech/pk2serial

permalink
Weblog Navigation
Loading...
Weblog Archives
  • Loading...