[SOLVED] BrickPi Motors Are Not Running

Just brought a BrickPi. Nothing seems to work at all.
First: there are no blue less on the board so cannot tell whether the LED test works or not.
Second, try to run the LEGO-Motor_Test.py. No motors were moving.
Cannot find any other diagnostic tool for BrickPi.
What should I do?

Sorry that it isn’t working. First what BrickPi are you using? Could you post a picture of it? You may be running the wrong code for the wrong version.

Also are you running Raspbian For Robots? If your using the sd card that/if came you are using raspbian for robots. If you are not using that operating system I highly recommend switching. Everything will all be setup and work nice.

On Raspbian For Robots there should be on the Desktop a shortcut that brings will run some debugging tests. Could you run that selecting BrickPi and post the output?

Also what do you mean by “blue less?” Do you mean there is no led on your board?

This is the BrickPi I use
I cannot find any blue LEDs on the circuit board ( my model looks to be different from the one used in some youtube video showing flashing LEDs )

I download Raspbian for Robots on an SD card using this link:

I try to run the python files under BrickPi+

After trying everything, I ran the DI Software Update and update Robot with the option BrickPi3. Later, I realised that my model is BrickPi.

My raspberry pi model is raspberry pi 3.
Which debugging tests should I run? If I click on the ‘Test and Troubleshoot’ icon, I cannot find a test for BrickPi+.

Thanks for looking into it.

My desktop looks like this:

The test and troubleshoot screen looks like this:

Ok so you are using raspbian for robots then and a BrickPi3. The problem is you are trying to run BrickPi+ code on the new BrickPI3. It cannot work. So you need to run the code in the BrickPi3 folder. Also check out the BrickPi3 documentation, you can most likely find most of your answers there, of course you can always ask questions here! :slight_smile:

Your BrickPi3 probably looks different because the one in the video is most likely an old one.

Run the Test and Troubleshoot for BrickPi3. I got BrickPi3 not connected.

Try to run the software update for BrickPi3. The followings are the log:

Script started on Sat 18 Mar 2017 21:25:34 UTC
access control disabled, clients can connect from any host
None
(165, 30)
default drop down
BrickPi3
Start Firmware test!BrickPi3
Open On-Chip Debugger 0.10.0-dev (2016-12-16-18:07)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO nums: swclk = 25, swdio = 24
BCM2835 GPIO config: srst = 18
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
adapter speed: 400 kHz
cortex_m reset_config sysresetreq
adapter speed: 100 kHz
adapter_nsrst_delay: 100
adapter_nsrst_assert_width: 100
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Info : clock speed 100 kHz
Info : SWD DPIDR 0x0bc11477
Info : at91samd21j18.cpu: hardware has 4 breakpoints, 2 watchpoints
TargetName Type Endian TapName State


0* at91samd21j18.cpu cortex_m little at91samd21j18.cpu halted
Info : SWD DPIDR 0x0bc11477
at91samd21j18.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00006624 psp: 0x20002638
Info : SWD DPIDR 0x0bc11477
at91samd21j18.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x61000000 pc: 0x0000662c psp: 0x20002638
** Programming Started **
auto erase enabled
Info : SAMD MCU: SAMD21J18A (256KB Flash, 32KB RAM)
Info : SWD DPIDR 0x0bc11477
Error: Failed to write memory at 0x00001e04
Error: samd_write: 777
Error: error writing to flash at address 0x00000000 at offset 0x00000000
auto erase enabled
SAMD MCU: SAMD21J18A (256KB Flash, 32KB RAM)
SWD DPIDR 0x0bc11477
Failed to write memory at 0x00001e04
samd_write: 777
error writing to flash at address 0x00000000 at offset 0x00000000
Updating the BrickPi3 SAMD Firmware with ‘/home/pi/Dexter/BrickPi3/Firmware/brickpi3_firmware.bin’.

I tried to run BrickPi3 codes but got an error of 'BrickPi3 not connected

Could you run the Debugging tests? You just opened it up but didn’t run it. Just open it and click on Troubleshoot BrickPi3. Then could you print the output?

Also make sure the BrickPi3 is connected properly on the pins, that can cause an error.

I clicked the button ‘Troubleshoot BrickPi3’ and I was told all the tests are done very quickly.

The log simply stated ‘BrickPi3 not connected’

I ran the test with raspberry Pi powered by USB and BrickPi powered by battery ( I have switched on Brickpi )

Also tried to power using the battery from BrickPi. The same result.
Not sure there is any issue with the pin connection as (1) Raspberry Pi can be powered by BrickPi and (2) when I ran the LED test, by connecting LED directly to the corresponding pin on BrickPi, the LED flashes.

If I try to update the software of BrickPi3, I see several errors in the log. Does it imply hardware issue?

Start Firmware test!BrickPi3
Open On-Chip Debugger 0.10.0-dev (2016-12-16-18:07)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO nums: swclk = 25, swdio = 24
BCM2835 GPIO config: srst = 18
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
adapter speed: 400 kHz
cortex_m reset_config sysresetreq
adapter speed: 100 kHz
adapter_nsrst_delay: 100
adapter_nsrst_assert_width: 100
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Info : clock speed 100 kHz
Info : SWD DPIDR 0x0bc11477
Info : at91samd21j18.cpu: hardware has 4 breakpoints, 2 watchpoints
Error: at91samd21j18.cpu – clearing lockup after double fault
Polling target at91samd21j18.cpu failed, trying to reexamine
Info : at91samd21j18.cpu: hardware has 4 breakpoints, 2 watchpoints
TargetName Type Endian TapName State


0* at91samd21j18.cpu cortex_m little at91samd21j18.cpu halted
Info : SWD DPIDR 0x0bc11477
Error: at91samd21j18.cpu – clearing lockup after double fault
at91samd21j18.cpu: target state: halted
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0xf1000003 pc: 0xfffffffe msp: 0x20005170
Info : SWD DPIDR 0x0bc11477
Error: at91samd21j18.cpu – clearing lockup after double fault
Error: JTAG failure 7
Info : SWD DPIDR 0x0bc11477
at91samd21j18.cpu: target state: halted
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0xf1000003 pc: 0xfffffffe msp: 0x20005170
** Programming Started **
auto erase enabled
Info : SAMD MCU: SAMD21J18A (256KB Flash, 32KB RAM)
Info : SWD DPIDR 0x0bc11477
Error: Failed to read memory at 0x000070bc
Error: Can’t read NVM status
Error: samd_write: write failed at address 0x00007080
Error: error writing to flash at address 0x00000000 at offset 0x00000000
embedded:startup.tcl:454: Error: ** Programming Failed **
in procedure 'program’
in procedure ‘program_error’ called at file “embedded:startup.tcl”, line 510
at file “embedded:startup.tcl”, line 454
Updating the BrickPi3 SAMD Firmware with ‘/home/pi/Dexter/BrickPi3/Firmware/brickpi3_firmware.bin’.

Based on your pictures, you have a BrickPi3. Only BrickPi3 software will work with your BrickPi3.

What do you mean by “connecting LED directly to the corresponding pin on BrickPi, the LED flashes”? Do you mean you connected an LED to the RPi GPIO header, and it flashed when you ran the LED test? In that case, you were running the LED test for the older BrickPi.

Can you run this command in the terminal and show me the output?
sudo bash /home/pi/Dexter/BrickPi3/Firmware/brickpi3samd_flash_firmware.sh

The BrickPi3 has two LEDs. The green LED near the power switch indicates if the BrickPi3 is powered. The yellow LED near the power jack normally flashes to indicate battery voltage level, but can be controlled by user software. See here for expected LED behavior (again, user software can take control of the yellow LED).

You are right about what how I did the LED test.

The following is the output of your command ( I did it several times and seems to get different results )

pi@dex:~ $ sudo bash /home/pi/Dexter/BrickPi3/Firmware/brickpi3samd_flash_firmware.sh
Updating the BrickPi3 SAMD Firmware with ‘/home/pi/Dexter/BrickPi3/Firmware/brickpi3_firmware.bin’.
Open On-Chip Debugger 0.10.0-dev (2016-12-16-18:07)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO nums: swclk = 25, swdio = 24
BCM2835 GPIO config: srst = 18
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
adapter speed: 400 kHz
cortex_m reset_config sysresetreq
adapter speed: 100 kHz
adapter_nsrst_delay: 100
adapter_nsrst_assert_width: 100
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Info : clock speed 100 kHz
Info : SWD DPIDR 0x0bc11477
Info : at91samd21j18.cpu: hardware has 4 breakpoints, 2 watchpoints
TargetName Type Endian TapName State


0* at91samd21j18.cpu cortex_m little at91samd21j18.cpu running
Info : SWD DPIDR 0x0bc11477
at91samd21j18.cpu: target state: halted
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0x01000003 pc: 0x00005974 msp: 0x20005158
Info : SWD DPIDR 0x0bc11477
at91samd21j18.cpu: target state: halted
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0x01000003 pc: 0x00005974 msp: 0x20005158
** Programming Started **
auto erase enabled
Info : SAMD MCU: SAMD21J18A (256KB Flash, 32KB RAM)
wrote 49152 bytes from file /home/pi/Dexter/BrickPi3/Firmware/brickpi3_firmware.bin in 7.222714s (6.646 KiB/s)
** Programming Finished **
** Verify Started **
verified 41964 bytes in 3.428472s (11.953 KiB/s)
** Verified OK **
Info : SWD DPIDR 0x0bc11477
shutdown command invoked
pi@dex:~ $ sudo bash /home/pi/Dexter/BrickPi3/Firmware/brickpi3samd_flash_firmware.sh
Updating the BrickPi3 SAMD Firmware with ‘/home/pi/Dexter/BrickPi3/Firmware/brickpi3_firmware.bin’.
Open On-Chip Debugger 0.10.0-dev (2016-12-16-18:07)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO nums: swclk = 25, swdio = 24
BCM2835 GPIO config: srst = 18
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
adapter speed: 400 kHz
cortex_m reset_config sysresetreq
adapter speed: 100 kHz
adapter_nsrst_delay: 100
adapter_nsrst_assert_width: 100
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Info : clock speed 100 kHz
Info : SWD DPIDR 0x0bc11477
Info : at91samd21j18.cpu: hardware has 4 breakpoints, 2 watchpoints
TargetName Type Endian TapName State


0* at91samd21j18.cpu cortex_m little at91samd21j18.cpu running
Info : SWD DPIDR 0x0bc11477
Info : SWD DPIDR 0x0bc11477
at91samd21j18.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0000664c psp: 0x20001bf8
Info : SWD DPIDR 0x0bc11477
at91samd21j18.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x61000000 pc: 0x00006670 psp: 0x20001bf8
** Programming Started **
auto erase enabled
Info : SAMD MCU: SAMD21J18A (256KB Flash, 32KB RAM)
wrote 49152 bytes from file /home/pi/Dexter/BrickPi3/Firmware/brickpi3_firmware.bin in 7.175817s (6.689 KiB/s)
** Programming Finished **
** Verify Started **
Error: checksum mismatch - attempting binary compare
diff 0 address 0x00003224. Was 0x81 instead of 0x01
diff 1 address 0x00003225. Was 0x9d instead of 0x3b
diff 2 address 0x00003226. Was 0x6d instead of 0xdb
diff 3 address 0x00003227. Was 0x59 instead of 0xb2
diff 4 address 0x00003c5a. Was 0x10 instead of 0x20
diff 5 address 0x00003c5b. Was 0x80 instead of 0x00
No more differences found.
embedded:startup.tcl:454: Error: ** Verify Failed **
in procedure 'program’
in procedure ‘program_error’ called at file “embedded:startup.tcl”, line 498
at file “embedded:startup.tcl”, line 454
pi@dex:~ $ sudo bash /home/pi/Dexter/BrickPi3/Firmware/brickpi3samd_flash_firmware.sh
Updating the BrickPi3 SAMD Firmware with ‘/home/pi/Dexter/BrickPi3/Firmware/brickpi3_firmware.bin’.
Open On-Chip Debugger 0.10.0-dev (2016-12-16-18:07)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO nums: swclk = 25, swdio = 24
BCM2835 GPIO config: srst = 18
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
adapter speed: 400 kHz
cortex_m reset_config sysresetreq
adapter speed: 100 kHz
adapter_nsrst_delay: 100
adapter_nsrst_assert_width: 100
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Info : clock speed 100 kHz
Info : SWD DPIDR 0x0bc11477
Info : SWD DPIDR 0x0bc11477
Error: Failed to write memory at 0xf000201c
Info : SWD DPIDR 0x0bc11477
Error: Failed to write memory at 0xe00020d4
Info : at91samd21j18.cpu: hardware has 112 breakpoints, 2 watchpoints
TargetName Type Endian TapName State


0* at91samd21j18.cpu cortex_m little at91samd21j18.cpu halted
Info : SWD DPIDR 0x0bc11477
Info : SWD DPIDR 0x0bc11477
Error: Failed to write memory at 0xf0001094
TARGET: at91samd21j18.cpu - Not halted
in procedure 'reset’
in procedure ‘ocd_bouncer’

pi@dex:~ $ sudo bash /home/pi/Dexter/BrickPi3/Firmware/brickpi3samd_flash_firmware.sh
Updating the BrickPi3 SAMD Firmware with ‘/home/pi/Dexter/BrickPi3/Firmware/brickpi3_firmware.bin’.
Open On-Chip Debugger 0.10.0-dev (2016-12-16-18:07)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO nums: swclk = 25, swdio = 24
BCM2835 GPIO config: srst = 18
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
adapter speed: 400 kHz
cortex_m reset_config sysresetreq
adapter speed: 100 kHz
adapter_nsrst_delay: 100
adapter_nsrst_assert_width: 100
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Info : clock speed 100 kHz
Info : SWD DPIDR 0x0bc11477
Info : at91samd21j18.cpu: hardware has 4 breakpoints, 2 watchpoints
TargetName Type Endian TapName State


0* at91samd21j18.cpu cortex_m little at91samd21j18.cpu halted
Info : SWD DPIDR 0x0bc11477
Info : SWD DPIDR 0x0bc11477
Error: JTAG failure 7
Info : SWD DPIDR 0x0bc11477
at91samd21j18.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x61000000 pc: 0x00006658 psp: 0x20001c20
Info : SWD DPIDR 0x0bc11477
at91samd21j18.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x41000000 pc: 0x00004a7c psp: 0x20001bd0
** Programming Started **
auto erase enabled
Info : SAMD MCU: SAMD21J18A (256KB Flash, 32KB RAM)
wrote 49152 bytes from file /home/pi/Dexter/BrickPi3/Firmware/brickpi3_firmware.bin in 7.174910s (6.690 KiB/s)
** Programming Finished **
** Verify Started **
verified 41964 bytes in 0.103854s (394.597 KiB/s)
** Verified OK **
Info : SWD DPIDR 0x0bc11477
shutdown command invoked

Thanks Matt and graykevinb. It works now about running the script suggested by Matt. Thanks a lot!

This topic was automatically closed after 24 hours. New replies are no longer allowed.