Identify Mega32A revision with undocumented problem

Go To Last Post
29 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Attached image of ATMEGA32A-AU batch that has no correct sensing on the analog input pin ( the one used anyway).
My suspicion is that it is revision K but there are plenty of additional markings that I cannot decode. It does not look like current off the shelf part.
The errata for rev K only species a delay for analog comparator, not for the analog input port being unresponsive.
My product has been assembled in China, and the part purchased locally by the CEM company. Of course I am chasing them for a response, but meanwhile, Microchip (Atmel) has responded by effectively telling me tough luck.. ask China.
All they need to do is identify the chip from the markings as attached, but being told to take a hike is somewhat a major letdown. I've requested more senior involvement, but until then hopefully someone will help.

Attachment(s): 

Last Edited: Sat. Oct 14, 2017 - 09:33 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm no expert, but aren't there markings on the underside that have more information about batch and die revision and such?

 

So if you take one of the "bad" boards and replace the AVR with one from a different batch, then everything works OK?

 

If you haven't done this exercise, then how have you proven the "incorrect analog sensing"?  Could there be a board/assembly fault that is affecting the level of the signal in question?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I didn't check the underside , good thinking. But Microchip have immediately refused to help which I consider to be a highly inappropriate response, so what would more information do?
Of course, I changed the chip to a brand new batch obtained in the UK and it works fine. The analog input pin measures the supply input using a divider and zener protection, in preperation for a controlled power down.
Measuring the actual pin voltage during a slow power down process shows that the faulty chips have a somewhat different pin voltage suggesting an internal problem. The good chips follow the voltage drop whereas the bad chips do not.
Although I've not done exhaustive tests yet, it seemed that this different response occurred when the program was running rather than when the chip was erased.
I've had to stop the tests and work towards dealing with the commercial problems this is causing.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

rowifi wrote:

My suspicion is that it is revision K...

 

As I read the datasheet the last chip revision was revision F which was the last revision.

 

There was however a datasheet revision K.

 

Scrub that. I read your post which said 'mega32' and not the topic which said 'mega32A'.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

Last Edited: Sat. Oct 14, 2017 - 08:37 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, The chip is a Mega32A, I'll edit the post to make it clear.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Most companies will fob you off if you can't give adequate provenance to the source of the devices. Counterfitting is rife especially in China, so you're lucky the devices half work. If you want attention, then you'll have to put forward a rock-solid case. You could speak to your local Microchip/Atmel FAE, but I suspect they'll want some credible evidence as well. Anyways, rule out the obvious by trying a known, legit chip and work from there.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A known legal chip works fine. Actually so have the many hundreds I've had from the same supplier. It's clearly gone awry this time.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That’s the core problem - you just don’t know what you’re getting. For my prototypes, i use a company that will buy the bits i specify from Digikey and assemble using them. The downside is in China, the company needs an import license or suchlike otherwise they add duty to it.
Wait until you get dodgy capacitors that go leaky over time and other horror stories. Even getting boards assembled in australia i had a number of instances where counterfeit parts were used.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Someone bought expensive very low noise "audiophile" power transistors at a super-high price, but they noticed something was very wrong...on a cheapo tester they tested "good" , but open opening one of the cans, instead of a premium power transistor, it was something like a 2N3904 installed inside---not even a power device!

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

rowifi wrote:
 many hundreds I've had from the same supplier.

So have you spoken to that supplier?

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

.. ' Have I tried swapping the chip for a new legit one.. '
.. ' Have I contacted the supplier..'
Seriously, what do you think?? Come on guys, take this up a notch.. There's a photo of the chip that maybe somebody can help me decode..

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Google 'fake avr sparkfun', it's worth a read.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

rowifi wrote:
.. ' Have I tried swapping the chip for a new legit one.. '
.. ' Have I contacted the supplier..'
Seriously, what do you think?? Come on guys, take this up a notch.. There's a photo of the chip that maybe somebody can help me decode..

What makes you think we can decode the numbers any better than you can? If you’re in the UK, contact your local Microchip/Atmel FAE. Hopefully they can assist you. I can understand your position - i got some Infineon igbts from a dodgy source and asked Infineon if they were legit - the response was blunt. Did i get them from an authorised source? TI was the same. Maxim were more responsive as they seem to get targetted more. They analysed the photos i sent and told me my chips were fake for xxx reasons. Sometimes the counterfeiters put legit markings and the only way is to analyse the die.
Do not underestimate the lengths some people will go to in order to make a few cents. For all we know your chips could be a pull from a batch of damaged boards.
My suggestion is to put legit chips in your boards, then use the experience to talk to management about the risks involved in your board assembly process. With the recent experience you can quantify the costs of when it goes wrong. Realise that even a $0.001 part can cost many $$$ to fix. Get all your parts from legit sources.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The fact that this forum is frequented by avr professionals gives me hope that there may be just one person who can answer (and read) the actual question instead of giving me technical or business advice.
I've no doubt it is a learning experience for me and the readers, and this is the reason the business relationship was built from 50 off, then 100 off orders, to 200 then 500 +.
The latter point is when it has a more serious effect.
By finding out the chip details I will be able to confront the CEM with factual information about the chip. Using older stock from reputable grey markets is commonplace and seems to be what happens.
I have halted further production until I have more information (from any source) and it will be interesting to see how the CEM ultimately responds to this issue.
Thank you all.

Last Edited: Tue. Oct 17, 2017 - 05:48 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This might help...

 

https://www.microchip.com/mymicr...

 

 

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also...

 

Quote:

Product Traceability

Atmel ensures forward and backward traceability. Inside Atmel manufacturing locations, traceability is ensured through the lot number. After delivery, the traceability is ensured via lot number and shipment number. The lot number is marked on each package (this does not apply to multi-chip modules, or bare die). For wafer shipments, the lot number and wafer number are scribed at the base of the wafer. The lot number is also marked on the intermediate container label (inner-most shipping carton). For ceramic imaging products, the lot number is traceable via the Certificate of Conformance. From the lot number, Atmel can retrieve all associated manufacturing, final test, and shipment paperwork within 24 hours.

Atmel's base lot number uses the following format: Y@XXXX, whereby, "Y" corresponds to the last digit in the year, "@" indicates both the fabrication site and quarter, and "XXXX" is a counter that resets at the beginning of each quarter.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can you post a photo of the known good chip?

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you sure it is not a board problem, layout/decoupling issue, or software bug, or fuse setting? Did you actually work with one of the defective boards/chips to see what is going on?  Could the signals driving the pin(s) in question be out of tolerance, noisy, glitchy (especially if IRQs are involved) etc?

Weird things like uninitialized variables or registers can cause strange effects---system works 99.8% of the time, then suddenly "Stop" working for no apparently reason. Perhaps writing a very specific routine to just test/twiddle this specific pin function would be helpful for diagnosis. Generically, it is much more likely to be a code problem than a chip problem...(until it is a chip problem). Of course, I did spend several days wondering why a pic chip's 2nd uart was not responding (copying the same working code used on uart 0)...found out there was an errata on the 2nd uart's flag bit.

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So, I've got some 328Ps going into production boards at the moment. And I know these came from a reliable source. Their markings are...

 

On the topside...

[Atmel logo] 1724

ATMEGA328P-PU

 

On the underside...

A98Y4A

35473D

1-P1724 e3

 

So these are 328P-PUs, made in week 24 of 2017, and are chip revision D

 

Yours are...

 

[Atmel logo]

ATMEGA32A

AU

35460K-D

17131OS

 

...which I reckon are chip rev K made in week 13 of 2017

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, .. I've actually had confirmation from Micro chip that they are indeed April 2017, Version K. which matches your assessment.
As background info, I've had several thousand of this board type made (able it varients of this board) just the same voltage sense circuit. Never seen this problem before.

Interestingly I don't recall ever seeing a version number on any of them.. which now I see is because I'm only looking on the top side of similar assembled boards.
What has happened here, is that this batch has all the markings on the top side, making them notable different from earlier batches.
When the faulty board has its chip replaced with a new part ( date code on reverse) it works.
I've had to stop testing but will resume asap, however, when taking a faulty board into debug it transpires that the analog input does actualy operate, just the returned values are not as expected..they are too high so the power down level is never reached.
The simple answer would be incorrect divider resistors, but that doesn't explain how different chips respond differently... they are profoundly different.
Different input impedance could account for it, but I'm using 27k and 47k as the divider.. quite low compared to the typical input R of the chip.
The drive to this pin is simply a voltage drop of the DC (10 to 15V) supply to the pcb, with a 5v zener protection.
The ADC routine is free running I think.

Are the pull ups enableable if the port is in A to D mode? I need to check that, a stronger pull up on this batch if enabled could be the reason.

Last Edited: Mon. Oct 23, 2017 - 01:34 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you want help, you need to give details, schematic etc...is there some reason you aren't able to provide a description of what you are doing? You don't even describe what the issue other than a vague "it doesn't work"  Does itrip when the voltage is varied?  How far off is it?

 What is the normal response & voltage level when it does work?

 

You didn't say until now what your resistors are (27k, 47k)...the adc expects a max of 10K impedance....so your resistor values are too high (for best accuracy)

You don't say what the ADC ref is...is it Vcc, the internal 1.1V bandgap, or your own external voltage?  If the 1.1 bandgap ,it has +/-10% accuracy..so needs calibrated

 

they are profoundly different.

IN WHAT WAY?

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Mon. Oct 23, 2017 - 01:57 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

rowifi wrote:

What has happened here, is that this batch has all the markings on the top side, making them notable different from earlier batches.

 

So that'll be down to the switch from Atmel to Microchip. TBH, having everything on the top where you can get to it makes a lot of sense.

 

I'm sure you know all this but it might trigger something...

 

Quote:

The ADC is optimized for analog signals with an output impedance of approximately 10kΩ or less. If such
a source is used, the sampling time will be negligible. ...

 

Hmmm, later chips have DIDR - Digital Input Disable Register. I wonder what effect not having that has on the 32A? Which might imply that pull-ups could be activated. I don't have any 32As here or else I'd try enabling and disabling the pull-ups to what happens.

 

 

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

Last Edited: Mon. Oct 23, 2017 - 02:06 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why would you even turn on the pull ups on the ADC?  Keep them off on those pins (by not turning those pullups on---they are off by default).  Writing 1 to a PORT bit that is an input turns on the pullup (unless global pullup disabled)

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

All read... There's nothing special about the schmatic, as I've stated it's is literally the DC Input through a divider to the pin, with a 5v zener. 5v rail to reference pin.
The answer it seems is the pull ups. They were enabled, for whatever reason, code copying from similar designs... etc. It happens.
What has evidently been consistent throughout the recent batches, (I suspect this design has only seen one or two batches) was that the pull ups made a consistent result, or at least a result that gave sufficiently correct measurements to operate correctly.
I put a device into reset and measured the pin voltage, which was as expected given the divider, then stepped through the code whilst watching the pin voltage.
First line turned on the pull ups, immediately pin voltage went up.
Deleting the pull ups put the code back to functioning state.
Noted about the 10K input and accuracy.
Not sure about the DIDR, I've not looked at the code yet, and I will do more extensive checking now I've come this far.
However, all valid points and taken on board. So far, it looks like the Chinese didn't let me down after all.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm confused:

rowifi wrote:
I've had several thousand of this board type made 

rowifi wrote:
I suspect this design has only seen one or two batches

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

rowifi wrote:
What has happened here, is that this batch has all the markings on the top side, making them notable different from earlier batches.

...

https://media.digikey.com/pdf/PCNs/Microchip/GBNG-15KQFZ896.pdf

...

11 Jul 2017

CCB 2971 Final Notice: Implement marking changes for virtually all Atmel products

[bottom marking ceases]

via https://www.digikey.com/product-detail/en/microchip-technology/ATMEGA32A-AUR/ATMEGA32A-AURTR-ND/2357129

IIRC, there's a way to subscribe to the Microchip PCNs for a part.

rowifi wrote:
Different input impedance could account for it, but I'm using 27k and 47k as the divider.. quite low compared to the typical input R of the chip.
The drive to this pin is simply a voltage drop of the DC (10 to 15V) supply to the pcb, with a 5v zener protection.
Zener too leaky?

 

Edit: URL

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Mon. Oct 23, 2017 - 07:03 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Several thousand.... indeed. The same detection circuit and code lives on quite a few diferent board types, all detecting the voltage for power down.
The board batch with the problem is just one of these varients so this specific board has only seen probably 2 maybe 3 different batche of chips at most.
The entire device family would have seen more batches, , but still this is actualy the first occurrence of this issue.
Coincidental with Microchip..I don't know.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Could be less leaky zener in this instance but the pull ups have taken the ADC values back to the expected range for the input voltage, so I'm happy enough with that for now.
It doesn't need to be highly accurate, just accurate enough to sense the power is failing to give sufficient time for the residual capacitance to save to eemem.