AT45DB041D - Atmel Serial Flash and BusPirate problems - Page 1
Forum section: electronics / beginners

author: dave_birdi
author_rank: Contributor
timestamp: January 07, 2013, 11:53:25 am
content: 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. 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.

author: dave_birdi
author_rank: Contributor
timestamp: January 07, 2013, 12:06:17 pm
content: Pictures for anyone interested:

author: papo
author_rank: Regular Contributor
timestamp: January 07, 2013, 02:23:19 pm
content: 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.

author: dave_birdi
author_rank: Contributor
timestamp: January 07, 2013, 05:47:52 pm
content: Quote from: papo on January 07, 2013, 02:23:19 pmPulled up /RESET, voltage are good across Vcc and GND. No dice I'm afraid

author: aluck
author_rank: Regular Contributor
timestamp: January 08, 2013, 02:46:34 am
content: Just take your scope and see what is going on with MISO/MOSI

author: amyk
author_rank: Super Contributor
timestamp: January 08, 2013, 11:55:34 am
content: Quote from: dave_birdi on January 07, 2013, 11:53:25 am3000mA?Something is horribly wrong if it's sinking 3A.Otherwise, a logic analyser should help.

author: dave_birdi
author_rank: Contributor
timestamp: January 08, 2013, 02:12:00 pm
content: Quote from: amyk on January 08, 2013, 11:55:34 am*micro amps, don't think forum could handle the character. :s

author: dave_birdi
author_rank: Contributor
timestamp: January 08, 2013, 02:14:56 pm
content: Quote from: aluck on January 08, 2013, 02:46:34 amNo scope I'm afraid, considering buying one. :s

author: dave_birdi
author_rank: Contributor
timestamp: January 08, 2013, 02:18:06 pm
content: eBay auction: #http://www.ebay.co.uk/itm/ATTEN-ADS1102CAL-100MHz-Digital-Oscilloscope-1102CAL-Shipping-from-UK-/190724341892?pt=UK_VideoGames_VideoGameAccessories_VideoGameAccessories_JN&hash=item2c680e8084

author: aluck
author_rank: Regular Contributor
timestamp: January 09, 2013, 02:22:08 am
content: Quote from: dave_birdi on January 08, 2013, 02:14:56 pmDon't just "consider" - go and buy! You are trying to troubleshoot blindfolded, it doesn't make sense.

author: amyk
author_rank: Super Contributor
timestamp: January 09, 2013, 10:38:28 am
content: In this case a LA might be better, and a simple one that might be enough to track down the problem isa lot cheaperthan a scope.

author: aluck
author_rank: Regular Contributor
timestamp: January 10, 2013, 01:07:57 am
content: Quote from: amyk on January 09, 2013, 10:38:28 amDid 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.

author: dr_p
author_rank: Frequent Contributor
timestamp: January 10, 2013, 11:02:15 am
content: That CY7C68013A based logic analyzer isalmostthe 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.

author: amyk
author_rank: Super Contributor
timestamp: January 10, 2013, 01:04:18 pm
content: 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.)

author: David_AVD
author_rank: Super Contributor
timestamp: January 10, 2013, 10:29:41 pm
content: Quote from: amyk on January 10, 2013, 01:04:18 pmThe Saleae software is quite nice to use though. Often it's the software that makes all the difference.

author: selkathguy
author_rank: Unknown
timestamp: January 10, 2013, 10:43:32 pm
content: Quote from: aluck on January 09, 2013, 02:22:08 amCannot agree more. Even a low-end $400 scope is going to be like suddenly acquiring another sense.

author: Unknown
author_rank: Unknown
timestamp: January 10, 2013, 10:46:24 pm
content: Quote from: aluck on January 10, 2013, 01:07:57 amSure, a LA is not very well suited for solving analog problems, just like a scope is not the ideal tool for digital problems.Quote from: aluck on January 10, 2013, 01:07:57 amHow do scopes in the same price bracket compare?Quote from: aluck on January 10, 2013, 01:07:57 amIt 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.Quote from: dr_p on January 10, 2013, 11:02:15 amDefinitely 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.

author: aluck
author_rank: Regular Contributor
timestamp: January 11, 2013, 02:06:41 am
content: Quote from: dr_p on January 10, 2013, 11:02:15 amI 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.

author: aluck
author_rank: Regular Contributor
timestamp: January 11, 2013, 02:24:50 am
content: Quote from: alm on January 10, 2013, 10:46:24 pmOscilloscope 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?Quote from: alm on January 10, 2013, 10:46:24 pmScopes 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.Quote from: alm on January 10, 2013, 10:46:24 pmI 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.

author: amyk
author_rank: Super Contributor
timestamp: January 11, 2013, 10:37:44 am
content: Quote from: aluck on January 11, 2013, 02:24:50 amA 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.QuoteThe 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

author: cybergibbons
author_rank: Frequent Contributor
timestamp: January 11, 2013, 03:58:43 pm
content: Quote from: aluck on January 10, 2013, 01:07:57 amI 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.

author: aluck
author_rank: Regular Contributor
timestamp: January 12, 2013, 03:07:49 am
content: Reverse engineering? WOW. Seriously, WOW.Please do tell about your "standard" procedures on protocol reverse engineering. Do you use triggers a lot?