Programming for production (Atmel)

Discussion in 'Embedded Systems and Microcontrollers' started by WascallyWabbit, Jan 10, 2013.

  1. WascallyWabbit

    Thread Starter New Member

    Jan 10, 2013
    2
    0
    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
     
  2. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    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).
     
  3. WascallyWabbit

    Thread Starter New Member

    Jan 10, 2013
    2
    0
    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
     
  4. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    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.
     
  5. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    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.
     
  6. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    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
     
  7. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    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).
     
Loading...