Cannot Communicate with Crazyradio after Flashing NRF51822
Posted: Tue Jul 31, 2018 4:27 pm
Hi,
I flashed the firmware to a brand new NRF51822 by the command 'make factory_reset'. All of the MCUs in my drone are brand new, meaning no programs or no correct programs have been flashed to them before. The method of flashing is soldering STlink cable to four NRF debug pins on the drone and flashing by STlink. My working environment is BitcrazeVM_2018.01. The files in crazyflie2-nrf-firmware hasn't been modified.
After flashing, I tried to download the code of STM32 by 'make cload' using Crazyradio PA, but it fails, showing 'cannot connect the bootloader'. The 'make cload' method always succeeded when I downloaded the program to the drones whose firmware was flashed by the manufacturer.
I am also not sure about whether the leds were blinking correctly after flashing the NRF51822 firmware. Right after I flashed the nrf firmware, all the lights turned off, except led M2 keeping on. Then I unplugged the stlink cable and connected the battery and tried to make M2 blink slowly by pressing the switch for some time. After that, I executed 'make cload' and it showed 'cannot connect the bootloader'.
I think the communication between crazyradio and crazyflie is not connected. I also tried the DFU method. The drone could enter DFU mode but unfortunately it couldn't be detected by lsusb. The EEPROM also can't be changed by the python script for the device couldn't be detected.
Another strange thing is that during the flashing, error often occured when doing 'make flash'. Executing 'make clean', 'make' and 'make flash' in order after the error occurs can eliminate the error. I don't know the reason for that.
I am really confused by the problem of flashing firmware to NRF51822 and STM32. Is there any difference between flashing to MCUs with correct firmware and without any firmware or with wrong firmware? How can I solve my problem? I am waiting for your response.
Thanks!
I flashed the firmware to a brand new NRF51822 by the command 'make factory_reset'. All of the MCUs in my drone are brand new, meaning no programs or no correct programs have been flashed to them before. The method of flashing is soldering STlink cable to four NRF debug pins on the drone and flashing by STlink. My working environment is BitcrazeVM_2018.01. The files in crazyflie2-nrf-firmware hasn't been modified.
After flashing, I tried to download the code of STM32 by 'make cload' using Crazyradio PA, but it fails, showing 'cannot connect the bootloader'. The 'make cload' method always succeeded when I downloaded the program to the drones whose firmware was flashed by the manufacturer.
I am also not sure about whether the leds were blinking correctly after flashing the NRF51822 firmware. Right after I flashed the nrf firmware, all the lights turned off, except led M2 keeping on. Then I unplugged the stlink cable and connected the battery and tried to make M2 blink slowly by pressing the switch for some time. After that, I executed 'make cload' and it showed 'cannot connect the bootloader'.
I think the communication between crazyradio and crazyflie is not connected. I also tried the DFU method. The drone could enter DFU mode but unfortunately it couldn't be detected by lsusb. The EEPROM also can't be changed by the python script for the device couldn't be detected.
Another strange thing is that during the flashing, error often occured when doing 'make flash'. Executing 'make clean', 'make' and 'make flash' in order after the error occurs can eliminate the error. I don't know the reason for that.
I am really confused by the problem of flashing firmware to NRF51822 and STM32. Is there any difference between flashing to MCUs with correct firmware and without any firmware or with wrong firmware? How can I solve my problem? I am waiting for your response.
Thanks!