However, when powering up (W) in SPI mode, I get “VREG too low”. NOTHING is connected to the board, just USB cable to the PC.
SPI>W
VREG too low, is there a short?
Power supplies OFF
When staring the bootloader from the menu, the connection closes before expected “BL4+” reply appears.
HiZ>$
Are you sure? y
BOOTLOADER
FATAL: read zero bytes from port
term_exitfunc: reset failed for dev UNKNOWN: Input/output error
(these two lines are from picocom terminal program)
I tried different USB cables and different USB ports.
$ sudo ./pirate-loader --dev=/dev/ttyACM0 --hello
+++++++++++++++++++++++++++++++++++++++++++
Pirate-Loader for BP with Bootloader v4+
Loader version: 1.0.3 OS: UNKNOWN
+++++++++++++++++++++++++++++++++++++++++++
Opening serial device /dev/ttyACM0...OK
Configuring serial port settings...OK
Sending Hello to the Bootloader...ERROR
No reply from the bootloader, or invalid reply received: 4
Please make sure that PGND and PGC are connected, reconnect
the device and try again
I used powering on with a jumper between PGC and PGD to enter the bootloader. I don’t know if $ would have worked. pirate-loader (github_com/mikebdp2/Bus_Pirate/tree/master/BPv4-bootloader/pirate-loader) message “jumper between PGND and PGC” was misleading.
The bootloader is one-shot (dangerousprototypes_com/forum/index.php?topic=271.0). Replug USB after saying --hello.
$ sudo ./pirate-loader --dev=/dev/ttyACM0 --hello
+++++++++++++++++++++++++++++++++++++++++++
Pirate-Loader for BP with Bootloader v4+
Loader version: 1.0.3 OS: Linux
+++++++++++++++++++++++++++++++++++++++++++
Opening serial device /dev/ttyACM0...OK
Configuring serial port settings...OK
Sending Hello to the Bootloader...OK
Bootloader version: 4,06
Device ID [f1]:PIC24FJ256GB106
Replug USB (re-enter the bootloader)
$ sudo ./pirate-loader --dev=/dev/ttyACM0 --hex=bpv4_fw7.0_opt3_18092016.hex
+++++++++++++++++++++++++++++++++++++++++++
Pirate-Loader for BP with Bootloader v4+
Loader version: 1.0.3 OS: Linux
+++++++++++++++++++++++++++++++++++++++++++
Parsing HEX file [bpv4_fw7.0_opt3_18092016.hex]
Found 46212 words (138636 bytes)
Opening serial device /dev/ttyACM0...OK
Configuring serial port settings...OK
Sending Hello to the Bootloader...OK
Bootloader version: 4,06
Device ID [f1]:PIC24FJ256GB106
Erasing page 0, 0000...OK
Writing page 0 row 0, 0000...OK
. . .
Writing page 97 row 783, 18780...OK
Erasing page 170, 2a800...OK
. . .
Writing page 170 row 1367, 2ab80...(SKIPPED by bootloader)...OK
Firmware updated successfully :)!
“VREF too low” gone, “clutch engaged” appears:
$ sudo picocom /dev/ttyACM0
HiZ>i
Bus Pirate v4
Community Firmware v7.0 - goo.gl/gCzQnW [HiZ 1-WIRE UART I2C SPI 2WIRE 3WIRE KEYB LCD PIC DIO]
DEVID:0x1019 REVID:0x0004 (24FJ256GB106 UNK)
dangerousprototypes.com
HiZ>m
5. SPI
(1)>5
. . .
(1)>
Clutch disengaged!!!
To finish setup, start up the power supplies with command 'W'
Ready
SPI>W
POWER SUPPLIES ON
Clutch engaged!!!
SPI>