Programming for production (Atmel)

Thread Starter

WascallyWabbit

Joined Jan 10, 2013
2
I am contemplating starting a project that will eventually (hopefully) go into mass production. Each device will need to have a small amount (~4 bytes) of configuration information written to it before it ships. Each device will of course also have code.

In the development environment, I program the device by USB into flash.

In production, I am not sure how this will work. I have a need for very low cost so the USB interface will of course be gone.

So, some questions:
- What are the relative benefits of running out of flash vs. EEPROM?
- How is the device programmed during production?
- How (through what interface) can I load that little bit of configuration data?

Chips will most likely be Atmel ATTiny.

Thanks for all assistance.

Wabbit
 

thatoneguy

Joined Feb 19, 2009
6,359
All programs run out of Flash memory, unless you are using one time programmable chips. EEPROM is changeable by the program or programmer, but code cannot run from EEPROM.

Configuration data such as serial number, date created, etc are typically stored in EEPROM.

The chips will likely be programmed out of circuit on programming banks that can burn many chips at once.

A USB or Serial boot-loader isn't used unless that is a desired feature to add with the program you are building for customers to easily update firmware in the field.

If you are going into high production, make sure:
1) All memory is managed perfectly, with error checking in place to prevent overflows
2) All possible inputs are handled, even inputs that you don't plan on having enabled once programmed.
3) <more things here> there are a lot of things to be absolutely sure of to avoid spending tens of thousands of dollars for a recall. I would suggest contacting ATmel to see what they charge for controllers pre-written with your code (ordered in lots). They may also look over your code and provide advice if something is badly wrong (extra charge).
 

Thread Starter

WascallyWabbit

Joined Jan 10, 2013
2
OK, s'pose Atmel programs the chips. The additional configuration information will vary a lot by product line and even by customer, so I will maybe sell 100 devices with one ID, increment to sell another 50, etc.

What options to I have to program the EEPROM after the devices leave Atmel and I get 'em? Will I be going in through SPI? Does it vary a lot depending on chips, devices, etc.? The devices will have a simple wireless interface so over the air is always an option, although problematic.

Wascally
 

kubeek

Joined Sep 20, 2005
5,795
Spi over some zif socket or in-circuit would probably be easiest. Also some kind of bootloader or hidden function could be used to get the configuration say over uart.
 

thatoneguy

Joined Feb 19, 2009
6,359
How secure does the application on the chip need to be?

Code protected? I/O encrypted? How much access are you allowing the user to have?

The answers to these types of questions decide what else needs to be added on top of the basic functionality.

If you contact an ATmel design rep, they should help you out, if dealing in large lots, though for < 500, you would be dealing with a "Value Added" type distributor that specializes in bringing small lots of projects to market.
 

hgmjr

Joined Jan 28, 2005
9,027
You should have a look at avrdude.exe. This is a dos program that comes with the free avrstudio IDE. It can handle the low level fuse programming as well as the EEPROM image.

hgmjr
 

takao21203

Joined Apr 28, 2012
3,702
Microchip has some interesting 3-pin devices. Only one pin is used for programming. Haven't tried them but they would be good for your purpose (when you don't want an extra connector or header).

It is perfectly normal to FLASH or write EEPROM via PCB pads. If you only need power supply and one pin, that would be better than 2 or more pins. Yet, you must also make sure the MCU will float the pin (solder bridge or jumper).
 
Top