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

Next revision
Previous revision
projects:crazyradio:spi_programming [2013-05-27 20:12]
arnaud created
projects:crazyradio:spi_programming [2020-05-12 14:14] (current)
kimberly
Line 1: Line 1:
 +<WRAP center round important 60%>
 +This page has deprecated and moved to the new documentation framework of the main Bitcraze website. Please go to [[https://www.bitcraze.io/documentation/system/]]
 +</WRAP>
 +
 ====== Crazyradio SPI programming ====== ====== Crazyradio SPI programming ======
  
Line 42: Line 46:
 Launch the program without argument for help. Launch the program without argument for help.
  
 +<code>
 +$ ./nrfProg
 +nrfProg V0.01 - nRF24LU1 programmer using the Amontec JTAG Key
 +
 +Usage: ./nrfProg <COMMAND> <PARAMETERS>
 +Commands:
 +  help:
 +      Display this message
 +  read <filename> [addr] [len]:
 +      read the memory and write a dump in filename
 +  write <filename> [addr]:
 +      write the content of the binary <filename> into the nRF24LU flash.
 +  hexdump [addr] [len]:
 +      Display a hex dump of the memory
 +  reset:
 +      Reset the nRF24LU1+
 +  holdreset:
 +      Hold the reset (ie. stop) the nRF24LU1+
 +
 +</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.1369678346.txt.gz · Last modified: 2015-07-15 16:30 (external edit)