Author Topic: Raspberry Pi: A supercharged Bus Pirate  (Read 6196 times)

0 Members and 1 Guest are viewing this topic.

Offline Scratch.HTFTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: au
Raspberry Pi: A supercharged Bus Pirate
« on: November 03, 2017, 03:55:18 am »
This idea is going to be part of my "ultimate" test bench.

Native hardware functions on the GPIO pins are I2C, SPI (two chip selects), UART and JTAG, although optional handshaking pins can be defined - USB emulation at Low Speed/Full Speed (1.5/12 Mbit respectively) is also possible.
A powerful function which can be implemented is the emulation of "devices" (I2C, SPI and UART) in Slave mode (e.g. a 24LC02 EEPROM at Address 0x50 (Read/_Write) emulated by the Raspberry Pi) of the above buses up to a certain clock rate, and it can also support emulation of multiple I2C "devices" on the same bus.
For interfacing to logic levels other than +3.3V (+1.65 to +5V), bidirectional voltage translators such as the TI TXS0108E can be used and are available as premade modules; this device is rated at 110 MHz for push pull and 1.2 MHz for open collector (suitable for I2C Fast Mode Plus at 1 Mbit) although pullup resistors are required on certain pins of the Raspberry Pi due to hardware characteristics.
If it runs on Linux, there is some hackability in it.
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2322
  • Country: au
Re: Raspberry Pi: A supercharged Bus Pirate
« Reply #1 on: November 03, 2017, 04:20:29 am »
The value of the Bus Pirate is in the firmware, not in the fact that the onboard MCU has a handful of handy peripherals. What software are you going to load on to your RPi to give it features approximating a Bus Pirate?
 
The following users thanked this post: ivan747, cdev

Offline xani

  • Frequent Contributor
  • **
  • Posts: 400
Re: Raspberry Pi: A supercharged Bus Pirate
« Reply #2 on: November 03, 2017, 01:16:39 pm »
First as rs20 mentioned you'd have to write some fancy software for it.

Then you have to take into consideration that using full fledged non-realtime-by-default OS like Linux might cause some problems, like what will happen if kernel sleeps your program in middle of transfer because it needs to handle ethernet/display/input/whatever ? You *can* make Linux more realtime but at the very least that's a kernel recompile and some tweaking.

Sending won't be too bad for serial busses (because basically that will just stop bus/clock for a while) but receiving data directly on rPi by polling (hardware SPI/i2c would probaby be just fine) might be hard to do reliably without dead zones caused by kernel doing some stuff.

rPi might be interesting *base* for such device but to make it reliable you'd either have to run some RTOS on it, or have a  "buffer" chip that handled realtime stuff (and at that point you basically just strapped a bus pirate onto rPi).

I find that devices like rPi are great as a bus pirate/programmer/JTAG *host*, just plug your pirate/programmer/debugger into rPi and ssh to it remotely via wifi. That way I can leave my project on bench when debugging code and without having to drag long cables from my main PC

 
The following users thanked this post: cdev

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: Raspberry Pi: A supercharged Bus Pirate
« Reply #3 on: November 03, 2017, 02:35:25 pm »
That sounds interesting.

All those SOCs with their GPIO's are uniquely well suited to doing things like that and the real GPIOs they possess seem really to have no equivalents in desktop PCs that I know of.

This idea is going to be part of my "ultimate" test bench..
"What the large print giveth, the small print taketh away."
 

Offline CM800

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
Re: Raspberry Pi: A supercharged Bus Pirate
« Reply #4 on: November 03, 2017, 05:19:51 pm »
That sounds interesting.

All those SOCs with their GPIO's are uniquely well suited to doing things like that and the real GPIOs they possess seem really to have no equivalents in desktop PCs that I know of.

This idea is going to be part of my "ultimate" test bench..

I'd say a PCIe I/O card is basically the equivilent.

It's just a matter of peripherals on a bus and the interrupt priority.
 

Offline eugenenine

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: us
Re: Raspberry Pi: A supercharged Bus Pirate
« Reply #5 on: November 03, 2017, 05:22:12 pm »
A Beaglebone might be a easier start, their beagle script would let you throw together some some BP like functionality and control over the GPIO pis faster than compiling code on the pi's
 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: Raspberry Pi: A supercharged Bus Pirate
« Reply #6 on: November 03, 2017, 05:39:01 pm »
Does anybody sell a PCI-e I/O card thats got an accessible API, thats affordable?

That sounds interesting.

All those SOCs with their GPIO's are uniquely well suited to doing things like that and the real GPIOs they possess seem really to have no equivalents in desktop PCs that I know of.


I'd say a PCIe I/O card is basically the equivilent.

It's just a matter of peripherals on a bus and the interrupt priority.
« Last Edit: November 03, 2017, 05:54:28 pm by cdev »
"What the large print giveth, the small print taketh away."
 

Offline Christopher

  • Frequent Contributor
  • **
  • Posts: 429
  • Country: gb
Re: Raspberry Pi: A supercharged Bus Pirate
« Reply #7 on: November 03, 2017, 05:51:05 pm »
Because you have the abstraction of linux, you cannot always set the peripherals up to the same granularity as you can on a PIC,

You're better off buying a Saele analyser and just making your end product with a PIC talking straight to the SPI/I2C IC IMO.
 

Offline CJay

  • Super Contributor
  • ***
  • Posts: 4136
  • Country: gb
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf