Only M2 blue led on

Post here to get support
david
Beginner
Posts: 22
Joined: Wed Aug 30, 2017 2:10 pm

Re: Only M2 blue led on

Post by david »

I have been trying to flash the NRF and after the last flash the M2 LED is flashing at a high frequency.

This was the console output.

Code: Select all

bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$ make factory_reset 
make mass_erase
make[1]: Entering directory `/home/bitcraze/projects/crazyflie2-nrf-firmware'
openocd -d2 -f interface/stlink-v2.cfg  -f target/nrf51_stlink.tcl -c init -c targets -c "reset halt" \
                 -c "nrf51 mass_erase" -c shutdown
GNU ARM Eclipse 32-bits Open On-Chip Debugger 0.9.0-00073-gdd34716-dirty (2015-05-19-09:59)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
WARNING: target/nrf51_stlink.cfg is deprecated, please switch to target/nrf51.cfg
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v28 API v2 SWIM v6 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.930543
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* nrf51.cpu          hla_target little nrf51.cpu          running
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0xfffffffe msp: 0xfffffffc
Warn : Unknown device (HWID 0x00000057)
shutdown command invoked
make[1]: Leaving directory `/home/bitcraze/projects/crazyflie2-nrf-firmware'
make flash_s110
make[1]: Entering directory `/home/bitcraze/projects/crazyflie2-nrf-firmware'
openocd -d2 -f interface/stlink-v2.cfg  -f target/nrf51_stlink.tcl -c init -c targets -c "reset halt" \
                 -c "nrf51 mass_erase" \
                 -c "flash write_image erase s110/s110_nrf51822_7.0.0_softdevice.hex" \
                 -c "reset run" -c shutdown
GNU ARM Eclipse 32-bits Open On-Chip Debugger 0.9.0-00073-gdd34716-dirty (2015-05-19-09:59)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
WARNING: target/nrf51_stlink.cfg is deprecated, please switch to target/nrf51.cfg
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v28 API v2 SWIM v6 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.930543
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* nrf51.cpu          hla_target little nrf51.cpu          halted
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0xfffffffe msp: 0xfffffffc
Warn : Unknown device (HWID 0x00000057)
auto erase enabled
Info : Padding image section 0 with 2112 bytes
Warn : using fast async flash loader. This is currently supported
Warn : only with ST-Link and CMSIS-DAP. If you have issues, add
Warn : "set WORKAREASIZE 0" before sourcing nrf51.cfg to disable it
target state: halted
target halted due to breakpoint, current mode: Thread 
xPSR: 0x61000000 pc: 0x2000001e msp: 0xfffffffc
wrote 87040 bytes from file s110/s110_nrf51822_7.0.0_softdevice.hex in 11.816589s (7.193 KiB/s)
shutdown command invoked
make[1]: Leaving directory `/home/bitcraze/projects/crazyflie2-nrf-firmware'
make flash_mbs
make[1]: Entering directory `/home/bitcraze/projects/crazyflie2-nrf-firmware'
openocd -d2 -f interface/stlink-v2.cfg  -f target/nrf51_stlink.tcl -c init -c targets -c "reset halt" \
                 -c "flash write_image erase bootloaders/nrf_mbs_v1.0.hex" -c "verify_image bootloaders/nrf_mbs_v1.0.hex" -c "reset halt" \
	               -c "mww 0x4001e504 0x01" -c "mww 0x10001014 0x3F000" \
	               -c "reset run" -c shutdown
GNU ARM Eclipse 32-bits Open On-Chip Debugger 0.9.0-00073-gdd34716-dirty (2015-05-19-09:59)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
WARNING: target/nrf51_stlink.cfg is deprecated, please switch to target/nrf51.cfg
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v28 API v2 SWIM v6 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.930543
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* nrf51.cpu          hla_target little nrf51.cpu          running
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
auto erase enabled
Warn : Unknown device (HWID 0x00000057)
Warn : using fast async flash loader. This is currently supported
Warn : only with ST-Link and CMSIS-DAP. If you have issues, add
Warn : "set WORKAREASIZE 0" before sourcing nrf51.cfg to disable it
target state: halted
target halted due to breakpoint, current mode: Thread 
xPSR: 0x61000000 pc: 0x2000001e msp: 0x000007c0
wrote 3072 bytes from file bootloaders/nrf_mbs_v1.0.hex in 0.841998s (3.563 KiB/s)
target state: halted
target halted due to breakpoint, current mode: Thread 
xPSR: 0x61000000 pc: 0x2000002e msp: 0x000007c0
verified 2112 bytes in 0.280447s (7.354 KiB/s)
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
shutdown command invoked
make[1]: Leaving directory `/home/bitcraze/projects/crazyflie2-nrf-firmware'
make flash_cload
make[1]: Entering directory `/home/bitcraze/projects/crazyflie2-nrf-firmware'
openocd -d2 -f interface/stlink-v2.cfg  -f target/nrf51_stlink.tcl -c init -c targets -c "reset halt" \
                 -c "flash write_image erase bootloaders/cload_nrf_v1.0.hex" -c "verify_image bootloaders/cload_nrf_v1.0.hex" -c "reset halt" \
	               -c "mww 0x4001e504 0x01" -c "mww 0x10001014 0x3F000" \
	               -c "mww 0x4001e504 0x01" -c "mww 0x10001080 0x3A000" -c "reset run" -c shutdown
GNU ARM Eclipse 32-bits Open On-Chip Debugger 0.9.0-00073-gdd34716-dirty (2015-05-19-09:59)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
WARNING: target/nrf51_stlink.cfg is deprecated, please switch to target/nrf51.cfg
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v28 API v2 SWIM v6 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.930543
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* nrf51.cpu          hla_target little nrf51.cpu          running
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
auto erase enabled
Warn : Unknown device (HWID 0x00000057)
Error: Couldn't read NVMC_READY register
Error: Failed to erase reg: 0x4001e508 val: 0x0003b400
Error: failed erasing sectors 232 to 244

make[1]: *** [flash_cload] Error 1
make[1]: Leaving directory `/home/bitcraze/projects/crazyflie2-nrf-firmware'
make: *** [factory_reset] Error 2
bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$ 
Does anyone have an idea of what it means? To me it looks like it fails in the end, but I have no idea why. I haven't set any breakpoints but it also looks like there are some, does anyone knows how to remove them?

Thanks again.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Only M2 blue led on

Post by arnaud »

Hi,
the line "Warn : Unknown device (HWID 0x00000057)" is a bit suspicious, it looks like openocd is discovering another chip. Are you connected to the nRF51 debug port on the side of the board?
david
Beginner
Posts: 22
Joined: Wed Aug 30, 2017 2:10 pm

Re: Only M2 blue led on

Post by david »

Hi,

Yes, I'm connected to the one that has to be soldered to the Crazyflie board.
desmond13
Beginner
Posts: 1
Joined: Tue Nov 19, 2019 9:22 am

Re: Only M2 blue led on

Post by desmond13 »

I am experiencing the same problem. Does anyone knows what does it mean when the M2 blue led is on?

Thanks in advance.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Only M2 blue led on

Post by arnaud »

The blue leds are used as "power" LEDs for both CPU of the Crazyflies: M2 is lit up early in the nRF51 boot process and M3 is lit up early in the STM32 boot process.

If only the Blues LED are lit up it is most likely that a corrupted firmware has been flashed somewhere. The bootloader can always be restarted, worst case by removing the battery, pressing the button while connecting the battery and releasing the button when M2 starts blinking. Then both blue LED should blink indicating that both CPUs are in bootloader mode. You can then program a release firmware to the Crazyflie which should fix the booting issue.
Post Reply