Code Monkey home page Code Monkey logo

csrusbspidevicere's Introduction

CsrUsbSpiDeviceRE

Description

This is a reverse engineered re-implementation of CSR's USB<->SPI Converter on a TI Stellaris Launchpad. It is compatible with CSR's own drivers and BlueSuite tools, and should work on any BlueCore chip that supports programming through SPI.

Disclaimer

I make no guarantees about this code. For me it worked, but it might not for you. If you break your BlueCore module or anything else by using this software this is your own responsibility.

How to use

  • Get a TI Stellaris Launchpad ($10), StellarisWare, TI's Code Composer (free with the launchpad), and an extra USB<->microUSB cable.
  • Import this project into Code composer as usual.
  • Ensure SW_ROOT is set to your StellarisWare directory in both of these locations:
    • Project -> Properties -> Resource -> Linked Resources -> Path Variables -> SW_ROOT
    • Window -> Preferences -> C/C++ -> Build -> Environment -> SW_ROOT.
  • Build using Project -> Build Project
  • Connect your BlueCore module. 3.3v -> 3.3v, GND -> GND, PC4 -> SPI_CSB, PC5 -> SPI_MOSI, PC6 -> SPI_MISO, PC7 -> SPI_CLK. (PC4 - PC7 are located on the second column from the right)
  • Connect your Stellaris Launchpad with the microUSB port at the top (next to power select), and set power select to DEBUG.
  • Debug using Run -> Debug
  • When paused on main, do Run -> Resume
  • Plug in the other microUSB port.
  • Device should be recognized. Drivers can be found at csrsupport.com (needs registration), under Browse category tree -> Bluetooth PC Software/Tools -> USB-SPI Converter.
  • Use any of the BlueSuite or BlueLabs tools to play with your bluecore module! (BlueSuite can be found on CSRSupport.com under Browser category tree -> Bluetooth PC Software/Tools -> Current BlueSuite Development Tools)
  • Green led will light up during reading, Red during writing, Blue when using BCCMD's.

Notes

  • The SPI clock may not be accurate.
  • The code was written to match CSR's original firmware as closely as possible, it might not be the most efficient way to things on the Stellaris.
  • If something does or does not work, let me know.

TODO

  • Clean up: The code works, but should still be cleaned up, and some bits aren't fully reverse engineered yet (e.g. the BCCMD timeout)
  • Refactor/rewrite: The code as it is now is as close to CSR's code as I could get, but it's not the most readable. I intend to refactor this at some point (maybe in a different project) to make it more readable and portable to other platforms.

csrusbspidevicere's People

Contributors

frans-willem avatar pelrun avatar

Watchers

Jaechoon Cho avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.