Home » Corelis Boundary-Scan Blog » JTAG Boundary-Scan » SPI Flash Programming and Data Files for Atmel AT45

SPI Flash Programming and Data Files for Atmel AT45

Introduction
A peculiar case pops up in our customers’ applications from time to time: The
Atmel AT45 series serial Flash is on a board and needs to be programmed. These
parts offer a configurable page size that has results in some peculiar
addressing hurdles for in-system-programmers. More information about this
feature is available from Atmel at

http://www.atmel.com/dyn/resources/prod_documents/doc3688.pdf

Programming and the “Gap” Problem
From a programming tool perspective, the non-default page size creates a sort of
"gap" in the addressing. Let’s take a look at how this works with an AT45DB021D.

  • Each page is represented by 12 page address bits.
  • Each page has 264 locations, represented by 9 data address bits. Page addresses
    go from 0b000000000 to 0b100001000. Note that this stops short of the expected
    0b111111111.

The serial protocol defines each address as the concatenation of the page
address with the data address. So when we take a page address, for example:

Code:


and add the data address (here we see the last address in page 1 and the first
address in page 2):

Code:

We end up with non-contiguous addressing:

Code:

Now, what happens if your data file asks you to program to address
0b000000000000100001000? This address doesn’t really exist on this part, so how
can we program it? The answer is: it depends on what the data file generator
expected, and it’s not consistent across all tool sets; we’ll need to handle it
on a case by case basis.

Handling the Main Cases
Depending on the situation and the source of the data file to be programmed, we
need to change our method of handling these parts. Let’s consider the main
cases.

  1. Configuration PROM. The best option is usually to create a third party
    programming file for indirect programming. Most vendors’ software will handle
    addressing just fine–especially since the same toolkit is likely responsible
    for both creating the data file and turning it into a JTAG programming file. For
    more information about indirect programming, see

    Tip: JTAG Programming of CPLDs & FPGAs
    .
     
  2. Boundary-scan ISP, binary page size. Binary page size shouldn’t require any
    additional considerations from the tool; in this mode programming the AT45 is
    just like any other SPI Flash.
     
  3. Boundary-scan ISP, custom page size. Here is where things get complicated–we’ve
    seen data files from our customers that take into account the "gaps" in
    addressing as well as data file that do not.
     

    1. Data file includes address information & skips the gaps. This is
      straightforward–the tools will write each page to the specified address. The
      addresses in the data file take care of ensuring that all data goes to the
      correct page. When using
      ScanExpress tools, use the default AT45* models.
       
    2. Data file does not include address information or does not skip the gaps. When
      using ScanExpress tools, use the AT45*_NOGAP models. This tells the software
      that, regardless of what addressing is included in the data file, it will need
      to add additional space to account for the gaps in addresses.

Conclusion
If you use this or a similar device and are unsure of how to handle it,
Contact Corelis. By looking at the data file and data file
generation software, we can usually determine how the intended and help set up
ScanExpress tools to program the data file the right way.

Leave a Reply

Your email address will not be published. Required fields are marked *