This can be implemented by using the hardware SPI slave mode.
The primary challenge is buffering incomming data while the Bus Pirate converts the raw value into ASCII for the terminal. This will probably require reconfiguring the UART and SPI to use their buffers, and using interrupts to move bytes from the SPI slave buffer to a larger processing buffer.
Comment #1
Posted on Mar 31, 2009 by Happy GiraffeComment deleted
Comment #2
Posted on Mar 31, 2009 by Happy GiraffeAdd a macro to the SPI library that reads activity from a bus and prints it to the terminal until stopped with escape.
Comment #3
Posted on Apr 5, 2009 by Happy GiraffeMacro added, setup and teardown functions added. For some reason it doesn't work yet (probably setup value).
Comment #4
Posted on Apr 5, 2009 by Happy Giraffe(No comment was entered for this change.)
Comment #5
Posted on Apr 6, 2009 by Happy GiraffeFixed pin assignment problem. Bus sniffer works. According to errata, CS filter doesn't work in rev 3 silicon. Workaround is to watch (poll) the PORT pin and wait for correct CS direction change (this also allows directional configuration).
Need to add: CS filter routine, Configurable CS edge select, resync command for no filter mode (?)
Comment #6
Posted on Apr 6, 2009 by Happy GiraffeAdded configurable edge select and detect. No resync command (later?)
Comment #7
Posted on Apr 6, 2009 by Happy Giraffe(No comment was entered for this change.)
Comment #8
Posted on Apr 11, 2009 by Happy GiraffeNeed to put second SPI hardware module on the MOSI pin so it snoopes data in both directions.
Comment #9
Posted on Apr 11, 2009 by Happy Giraffe(No comment was entered for this change.)
Comment #10
Posted on Apr 14, 2009 by Happy Giraffe(No comment was entered for this change.)
Comment #11
Posted on Apr 14, 2009 by Happy Giraffe(No comment was entered for this change.)
Status: Done
Labels:
Type-Enhancement
Priority-Medium