User Tools

Site Tools


projects:crazyradio:spi_programming

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
projects:crazyradio:spi_programming [2013-05-27 20:18]
arnaud [Usage]
projects:crazyradio:spi_programming [2018-10-17 12:04]
arnaud
Line 63: Line 63:
 </code> </code>
  
 +===== Using BusPirate =====
 +<WRAP center round alert>
 +**WARNING**
 +This script will mass erase the nRF24 chip so it will erase the bootloader. Make sure you have a backup of the bootloader before using this script.
  
 +Unless you are absolutely sure of what you are doing, **do not use this script**.
 +</WRAP>
 +
 +
 +
 +It's possible to re-program the Crazyradio using a BusPirate and [[https://github.com/koolatron/buspirate_nrf24lu1p|this script]] via SPI.
 +
 +Couple of caveats:
 +  * Tested only on OS X. Should work on Linux without modification, and Windows with very minor changes to use the windows serial module.
 +  * It's very slow (~5 minutes to flash the entire .bin file). I deemed this acceptable as this script is for emergency recovery only. I can make it faster if necessary.
 +
 +Prerequisites:
 +  * A Bus Pirate (you should know where to get one of these, if you don't already have one).
 +  * perl and either Device::SerialPort (*nix) or Win32::SerialPort (Windows)
 +  * Some jumper wires to connect the SPI lines on the radio to the ones on the Bus Pirate.
 +
 +Instructions:
 +  - Solder a 2x5 pin header onto the programming port of the crazyradio. There's an unpopulated footprint already there for you.
 +  - Connect the crazyradio to your Bus Pirate using the table below (also noted in the script and readme on git) <code>
 +Bus Pirate       CrazyRadio
 +===========================
 +MOSI ()      ->  MOSI  (6)
 +MISO ()      ->  MISO  (8)
 +SCK  ()      ->  SCK   (4)
 +CS   ()      ->  CS    (10)
 +AUX  ()      ->  PROG  (2)
 +3V3  ()      ->  3V3   (5)
 +GND  ()      ->  GND   (9)
 +</code>
 +  - Run the script: perl ./flasher.pl -input ./cradio-0.51.bin -device [serial device]
 +  - Wait till you see lots of hex addresses crawling up your screen. Your device is programming.
 +  - Go make a sandwich or have a beer (or both).
projects/crazyradio/spi_programming.txt · Last modified: 2020-05-12 14:14 by kimberly