Skip to main content
Topic: [SOLVED] Bus Pirate General Question (Read 5593 times) previous topic - next topic

[SOLVED] Bus Pirate General Question

I think I may be lost on what exactly I can do with the Bus Pirate.  From what I have read it sounded like I could read/write or re-program for example an SPI EEPROM device while still in circuit.

Here is an example:

I have a D-Link DWA-140 that is a USB Wireless Adapter.  The ATMEL 25080AN EEPROM firmware somehow got screwed up.

I have a copy of the bin I extracted a long time ago and want to flash this back to the device.

Can I do this with the Bus Pirate?  The USB Wireless Device will be connected to the USB port of the PC along with the Bus Pirate.

Will I be able to access the EEPROM on the USB Wireless device to program it or does the chip have to be desoldered off the board and hooked up to the Bus Pirate?

I have a product from Microchip MPLAB Starter kit but I have to put the I2C, SPI etc chips onto the board and re-program.  SO how does the Bus pirate make this part easier than what I have now?  Taking  away the disadvantage that of EEPROM has to be removed from the D-Link and placed onto the microchip adapter board to re-program it.

For those who want to see what Microchip product I am referring to it is product # DV243003

Re: Bus Pirate General Question

Reply #1
It's pretty tough to program on circuit unless the device is designed for it. The main processor pins will interfere with programming unless you hold the processor on reset. The way to do that varies from device to device.
Got a question? Please ask in the forum for the fastest answers.

Re: Bus Pirate General Question

Reply #2
The way I look at this is how do vendors make software to update firmware for their devices while the PC is running for example Graphics card, CDRom, Hard drive, Motherboard as the list goes on.

The software/firmware targets the device and no other and updates the eeprom chip.  So if this works then why would I not be able to do this with Bus Pirate and the right program or commands?

The firmware is most definitely read/write on the Atmel 25080AN chip.  Its an SPI 8 bit 5MHZ EEprom that is on the D-Link USB DWA-140 wireless adapter.

I just don't want to desolder it an place it in my eeprom reader/writer.

WIl Microchips MPLAB starter kit software work wit the Bus Pirate?  I know you can use MPLAB with the PICKIT2 or PICKIT 3 to upload a boot loader to Bus Pirate.

Does PICKIT 2 or 3 by Microchip and sureelectronics clone work similar to Bus Pirate?  If that is the case then it may be better for me to go that route since MPLAB is so easy to use for me at least.

Re: Bus Pirate General Question

Reply #3
[quote author="ian"]It's pretty tough to program on circuit unless the device is designed for it. The main processor pins will interfere with programming unless you hold the processor on reset. The way to do that varies from device to device.[/quote]

I saw a post on how the Bus Pirate saved someone from a bricked Motherboard because their Bios was corrupted.

So they had to remove the Bios chip from the Motherboard or does Bus Pirate connect the pins from the Bus Pirate to the Motherboard serial pins to re-program the Bios chip?

Exactly how does this work?  I don't see the point in Bus Pirate versus my current Microchip Starter kit or Microchip PICKIT 2 etc.  I have a Zif socket on my board.  I don't think my board can access the chips any other way where PICKIT 2 can do it other ways.

So the device itself has to have some way of connecting to it like Serial pins in order to re-program or just dump/write the hex code back to the device eeprom?

Tell me what I am missing here or where I am confused.

I actually thought the USB connection to your PC allowed you to access the Bus's inside the PC accessing some of the memory chips on the different devices inside the PC.  If I misread how the Bus Pirate functions I am sorry but then I was mislead by the description of the Bus Pirate to.

Description:

Description: The Bus Pirate, created by Ian Lesnet and featured on Hack a Day, is a troubleshooting tool that communicates between a PC and any embedded device over most standard serial protocols, which include I2C, SPI, and asynchronous serial - all at voltages from 0-5.5VDC. This product eliminates a ton of early prototyping effort when working with new or unknown chips.


So I have misinterpreted its meaning.  The embedded device must be external and not connected inside the PC?  How in the world is one to simple access the device then?  How does one re-program a bricked motherboard Bios or a bricked Graphics card Bios etc?

The D-link DWA-140 wireless adapter is another story.  I was able to remove the surface mount 8 pin SOIC 150mil in size chip and soldered 8 wires to the pins and inserted those wires into my starter kits zif socket and was able to read, make changes/dump/export/import and write back to the device.  I just ordered on ebay an adapter to just fit the chip inside then into my programmer (zif socket) to make my life easier next time but I still had to remove the chip and solder it back using chipquick.

How would Bus Pirate helped me out in this regard?

Re: Bus Pirate General Question

Reply #4
As ian has pointed out, when a chip is inside a circuit you can't control the circuit. Some other process could be accessing the chip and interfere your write actions. This will lead to unpredictable results. By removing the circuit from the chip you prevent this. It could be working in circuit but without any knowledge about the circuit it is in or the way the firmware of that circuit is working you can't be sure, hence the advise to iunsolder the chip.

I don't get your question about comparing the buspirate to a microchip development board. The buspirate is an universal tool to access chip or devices through some serial protocols, like i2c or spi. It has an easy interface to quickly send commands to the chip or device. A developer board can also use those protocols, but require some coding.

Re: Bus Pirate General Question

Reply #5
THanks for the help.  I am still lost as to how Vendors make firmware update software to access their device solely and update the device without worrying about something interfering with it unless their software does somehow do exactly this stop any other signals in its path thus no interference?

In the comments section someone who bought a BP told their story on how it saved their bricked motherboard.  How were they able to update the firmware on it without removing the Bios chip?

So the Microchip board and BP do the same thing then right?  The BP is easier to use because it does not have the coding as the microchip developer board does? I am sorry but maybe I need more clarification on this.

I was able to update the firmware on a Atmel SPI eeprom 25080AN  SOIC package 150Mil very tiny.  I had to desolder with Quick Chip and since I did not have an adapter at the time solder wires to each of the 8 pins.  I use the MPLAB starter kit to do this easily.  There was no coding involved at all.

Re: Bus Pirate General Question

Reply #6
A vendor know exactly when it is 'safe' to do an upgrade. When the firmware gets updated everything is stalled and only the firmware get written, with nothing else interfering. Also the vendor has thorough knowledge about his product and knows the best way to program an onboard memory chip. What I meant with interference is the microcontroller that could be reading or writing the chip (or even use the pins for other function then rom access). SUppose  your are accessing the chip, this would lead to unpredictable data writing to or reading off the chip.

The recovery of that bricked motherboard was possible while holding everything in reset. That would assure that nothing is messing with the memory chip. it woudl require some knowledge of the circuit and the way it operates. Removing the chip and reprogram will always work, holding in reset could work.

I was wrong about the developer boards. sorry for that. I Though it was a microcontroller development board instead of a memory development board. It seem like you could use MPLAB to program memory chips in an automated manner. regarding programming memory  they provide the same functions. The buspirate is more focused on user interaction and the microchip board is more automated. Also the buspirate isn't  limited in reading/writing memory chips.

Re: Bus Pirate General Question

Reply #7
The manufacturer update usually uses the main chip to program the memory chip, so there is no chance of interference. If you do it with another device you may end up fighting with the.main chip communication.  This may even dostroy the bus pirate or device. The bus pirate is generally used by people jacking together a new circuit, instead of am existing device. Flashrom is the program used to flash rpm in a PC with bus pirate,  you could ask them how it works. They are experts on Rom though and understand how the circuit works. Without that understanding if your own device it may not be possible to do what you want.
Got a question? Please ask in the forum for the fastest answers.