Author Topic: AT45DB041D - Atmel Serial Flash and BusPirate problems  (Read 8475 times)

0 Members and 1 Guest are viewing this topic.

Offline dave_birdiTopic starter

  • Contributor
  • Posts: 29
AT45DB041D - Atmel Serial Flash and BusPirate problems
« on: January 07, 2013, 11:53:25 am »
Hi all,

# Putting a post on here as I've spent hours on Google and can't seem to figure out
# why this isn't working so here I go..

I've bought an Atmel serial-interface Flash memory chip. [AT45DB041D]

I've connected up the chip to my bus pirate like so:

GND---GND      [Brown Wire]
CS-----CS      [White Wire]
MOSI--SI      [Green wire]
CLK----CLK      [Purple Wire]
MISO--SO      [Black Wire]


I send the opcode 0x9F and read back 4 bytes but don't seem to be able to identify the chip. (I just get the response of 0x00 0x00 0x00 0x00)

See Page 25 of datasheet <url>http://www.adestotech.com/data/doc3595.pdf</url> for opcodes on getting identifier from chip.

See Pastebin for BusPirate log: <url>http://pastebin.com/v8bi5TLR</url>

Does anyone have any ideas? Is the chip dead?, it seems to be drawing about 3000 ?A when CS is asserted.
 

Offline dave_birdiTopic starter

  • Contributor
  • Posts: 29
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #1 on: January 07, 2013, 12:06:17 pm »
Pictures for anyone interested:

 

Offline papo

  • Regular Contributor
  • *
  • Posts: 93
  • Country: ch
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #2 on: January 07, 2013, 02:23:19 pm »
I cannot comment on the BP syntax and/or wiring. But you could pull up the /RESET pin and try again. Leaving that pin floating is generally not a good idea anyway. If this still does not work, check your voltage across VCC and GND, assuming you have not done so already. In case you have a scope, a logic analyzer or another bus pirate lying around, tap the bus and check what's going on there.
 

Offline dave_birdiTopic starter

  • Contributor
  • Posts: 29
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #3 on: January 07, 2013, 05:47:52 pm »
I cannot comment on the BP syntax and/or wiring. But you could pull up the /RESET pin and try again. Leaving that pin floating is generally not a good idea anyway. If this still does not work, check your voltage across VCC and GND, assuming you have not done so already. In case you have a scope, a logic analyzer or another bus pirate lying around, tap the bus and check what's going on there.

Pulled up /RESET, voltage are good across Vcc and GND. No dice I'm afraid :(
 

Offline aluck

  • Regular Contributor
  • *
  • Posts: 242
  • Country: ru
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #4 on: January 08, 2013, 02:46:34 am »
Just take your scope and see what is going on with MISO/MOSI
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8264
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #5 on: January 08, 2013, 11:55:34 am »
it seems to be drawing about 3000 ?A when CS is asserted.
3000mA? :o Something is horribly wrong if it's sinking 3A.

Otherwise, a logic analyser should help.
 

Offline dave_birdiTopic starter

  • Contributor
  • Posts: 29
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #6 on: January 08, 2013, 02:12:00 pm »
it seems to be drawing about 3000 ?A when CS is asserted.
3000mA? :o Something is horribly wrong if it's sinking 3A.

Otherwise, a logic analyser should help.

*micro amps, don't think forum could handle the character. :s
 

Offline dave_birdiTopic starter

  • Contributor
  • Posts: 29
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #7 on: January 08, 2013, 02:14:56 pm »
Just take your scope and see what is going on with MISO/MOSI

No scope I'm afraid, considering buying one. :s
 


Offline aluck

  • Regular Contributor
  • *
  • Posts: 242
  • Country: ru
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #9 on: January 09, 2013, 02:22:08 am »
No scope I'm afraid, considering buying one. :s
Don't just "consider" - go and buy! You are trying to troubleshoot blindfolded, it doesn't make sense.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8264
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #10 on: January 09, 2013, 10:38:28 am »
In this case a LA might be better, and a simple one that might be enough to track down the problem is a lot cheaper than a scope.
 

Offline aluck

  • Regular Contributor
  • *
  • Posts: 242
  • Country: ru
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #11 on: January 10, 2013, 01:07:57 am »
In this case a LA might be better, and a simple one that might be enough to track down the problem is a lot cheaper than a scope.
Did you try it, or is it a theory?

1) LA wouldn't tell you if your logic 0s and 1s are good. Last week I had a case of a bad logic 1s at 2.0V for a 4.2V device. Logic level translator went mad, and, obviously enough, a device couldn't make a good distinction.

2) Cheap LAs are crap. I have 4 different LAs. So far, the best one is from DangerousPrototypes, but still it is kind of useless for long records. Usually, they do not have any internal cache memory, and if your USB is not fast enough, you are toast. The longest record from LA I ever got was 90 seconds with 100 kHz discretization.

Never had any good experience with my cheap LAs. Unless you absolutely need to have 8-16 channels at once, it is wasted money.
 

Offline dr_p

  • Frequent Contributor
  • **
  • Posts: 309
  • Country: ro
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #12 on: January 10, 2013, 11:02:15 am »
That CY7C68013A  based logic analyzer is almost the same hardware that Saleae, USBee and others are using (3.3, but 5V tolerant). It's EEPROM actually has Saleae VID & PID, so one might think this is intentional, to allow using of original Saleae software.

It's not nice and probably not even legal, but it can be hacked quite easily into a Saleae or USBee fully compatible hardware.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8264
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #13 on: January 10, 2013, 01:04:18 pm »
If you don't need high speed or advanced options those cheap LAs are sufficient. SPI can be slowed indefinitely and speeds in the kHz range are well within the capabilities of them. OP may feel better spending little and being able to figure out the problem already, rather than have to deal with the contemplation of buying a much more expensive scope. Does that ADS1102CAL  mentioned above have SPI decode?

(Saleae/USBee/etc are nothing special either. The Chinese were producing similar 8051-based USB streaming LAs in the early 2000s.)
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2806
  • Country: au
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #14 on: January 10, 2013, 10:29:41 pm »
(Saleae/USBee/etc are nothing special either. The Chinese were producing similar 8051-based USB streaming LAs in the early 2000s.)

The Saleae software is quite nice to use though.  Often it's the software that makes all the difference.
 

Offline selkathguy

  • Supporter
  • ****
  • Posts: 88
  • Country: us
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #15 on: January 10, 2013, 10:43:32 pm »
No scope I'm afraid, considering buying one. :s
Don't just "consider" - go and buy! You are trying to troubleshoot blindfolded, it doesn't make sense.
Cannot agree more.  Even a low-end $400 scope is going to be like suddenly acquiring another sense.
 

alm

  • Guest
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #16 on: January 10, 2013, 10:46:24 pm »
1) LA wouldn't tell you if your logic 0s and 1s are good. Last week I had a case of a bad logic 1s at 2.0V for a 4.2V device. Logic level translator went mad, and, obviously enough, a device couldn't make a good distinction.
Sure, a LA is not very well suited for solving analog problems, just like a scope is not the ideal tool for digital problems.

The longest record from LA I ever got was 90 seconds with 100 kHz discretization.
How do scopes in the same price bracket compare?

Never had any good experience with my cheap LAs. Unless you absolutely need to have 8-16 channels at once, it is wasted money.
It depends on what you call cheap. The ~$150 Saleae and Usbee devices work quite well, the main limitation being the channel count and 24 MS/s sampling rate. Decent LA software will have protocol decoders for most common serial protocols, you're not going to find these on your sub-$500 scopes. Note also that you can get a decent LA for much less money than a decent scope. Both are useful tools, and both have their place.

It's not nice and probably not even legal, but it can be hacked quite easily into a Saleae or USBee fully compatible hardware.
Definitely not nice and illegal in countries where end user license agreements are enforceable. The hardware for the Cypress USB SoC logic analyzers is quite simple, Saleae probably spent some development costs on the nice aluminum case, but the far majority of the development costs are spent on software. If other companies want to compete, they should develop their own software.
 

Offline aluck

  • Regular Contributor
  • *
  • Posts: 242
  • Country: ru
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #17 on: January 11, 2013, 02:06:41 am »
That CY7C68013A  based logic analyzer is almost the same hardware that Saleae, USBee and others are using (3.3, but 5V tolerant). It's EEPROM actually has Saleae VID & PID, so one might think this is intentional, to allow using of original Saleae software.
I do have an Ukrainian-made USBee clone (same thing - not claimed as USBee, but compatible). In my opinion, it's a waste - still a miserable record time, small internal buffer and all.
 

Offline aluck

  • Regular Contributor
  • *
  • Posts: 242
  • Country: ru
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #18 on: January 11, 2013, 02:24:50 am »
1) LA wouldn't tell you if your logic 0s and 1s are good. Last week I had a case of a bad logic 1s at 2.0V for a 4.2V device. Logic level translator went mad, and, obviously enough, a device couldn't make a good distinction.
Sure, a LA is not very well suited for solving analog problems, just like a scope is not the ideal tool for digital problems.
Oscilloscope is not well suited for digital.

LA is not suited for analog at all! Remember my example of a bad logic 1? It turned out that one of devices on a bus had too much of input current, and the PCB is still is a work-in-progress. If I did not have an oscilloscope, how am I supposed to discover that?

The longest record from LA I ever got was 90 seconds with 100 kHz discretization.
How do scopes in the same price bracket compare?
Scopes do this task even worse than LAs, but one do not expect a scope to perform well on this task. And I still do not have a slightest idea of why LA makers fail to put some more memory (and internal data compression) on their devices.

Never had any good experience with my cheap LAs. Unless you absolutely need to have 8-16 channels at once, it is wasted money.
It depends on what you call cheap. The ~$150 Saleae and Usbee devices work quite well, the main limitation being the channel count and 24 MS/s sampling rate. Decent LA software will have protocol decoders for most common serial protocols, you're not going to find these on your sub-$500 scopes. Note also that you can get a decent LA for much less money than a decent scope. Both are useful tools, and both have their place.
I do have a USBee AX clone. I was going to buy an original after trying it, but never did: it works as it is claimed to, but it's software is a fail in so many ways, that it still collects dust somewhere. As I reckon, my test device had some noise on the bus on power-up, and "USBee" triggered like hell, never showing me of what is going on after the noise came off. Putting a delay on startup was not an option.

Also, I have a chinese LA1016. It's software sucks even more, and it cost me about $450 a couple of years ago.

Surprisingly, the best one I have is an Open Bench Logic Sniffer from DP. It saved my ass a couple of times, but still if I did not have a scope - I wouldn't even bother to get LA.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8264
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #19 on: January 11, 2013, 10:37:44 am »
LA is not suited for analog at all! Remember my example of a bad logic 1? It turned out that one of devices on a bus had too much of input current, and the PCB is still is a work-in-progress. If I did not have an oscilloscope, how am I supposed to discover that?
A multimeter. Surely you should have one of those. The good thing with protocols like SPI is they can be clocked as slow as you want, and a DMM on the bus will show you the voltages. Of course this isn't too useful for problems that occur "at speed", but OP was debugging an SPI problem.
Quote
I do have a USBee AX clone. I was going to buy an original after trying it, but never did: it works as it is claimed to, but it's software is a fail in so many ways, that it still collects dust somewhere. As I reckon, my test device had some noise on the bus on power-up, and "USBee" triggered like hell, never showing me of what is going on after the noise came off. Putting a delay on startup was not an option.
The good thing about the Cypress ones is they are so cheap and common that people have written alternative software for them: http://sigrok.org/wiki/Fx2lafw
 

Offline cybergibbons

  • Frequent Contributor
  • **
  • Posts: 400
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #20 on: January 11, 2013, 03:58:43 pm »
In this case a LA might be better, and a simple one that might be enough to track down the problem is a lot cheaper than a scope.
Did you try it, or is it a theory?

1) LA wouldn't tell you if your logic 0s and 1s are good. Last week I had a case of a bad logic 1s at 2.0V for a 4.2V device. Logic level translator went mad, and, obviously enough, a device couldn't make a good distinction.

2) Cheap LAs are crap. I have 4 different LAs. So far, the best one is from DangerousPrototypes, but still it is kind of useless for long records. Usually, they do not have any internal cache memory, and if your USB is not fast enough, you are toast. The longest record from LA I ever got was 90 seconds with 100 kHz discretization.

Never had any good experience with my cheap LAs. Unless you absolutely need to have 8-16 channels at once, it is wasted money.

I have a Saleae Logic and a Open Bench Logic Sniffer, and they complement each other perfectly. Disclaimer - a lot of the work I do is reverse engineering, so application may be different. The Logic is fast enough for most embedded systems, and it is very powerful for diagnosing a lot of issues. The Logic Sniffer works at much higher speeds if required, but the record length is shorter, and the software nowhere near as good.

The scope comes in when both fail in digital projects.
 

Offline aluck

  • Regular Contributor
  • *
  • Posts: 242
  • Country: ru
Re: AT45DB041D - Atmel Serial Flash and BusPirate problems
« Reply #21 on: January 12, 2013, 03:07:49 am »
Reverse engineering? WOW. Seriously, WOW.

Please do tell about your "standard" procedures on protocol reverse engineering. Do you use triggers a lot?  :-/O
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf