Boot Select, Feature Row & SPI External Flash

MachXO3L has three ways of programming:

  • SRAM
  • External SPI Flash
  • NVCM (Non-Volatile Configration Memory)

SRAM is volatile and should only be used for prototyping, where as NVCM can only be written 2 times in its life-time (reference: Innovative Non-Volatile Configuration Memory Technology Enables Low-cost, Multi-time Programmable ULD FPGAs, White Paper, and also MachXO3 Programming and Configuration Usage Guide). THEREFORE, AVOID USING NVCM BY ALL MEANS.

Problems with SPI Flash

At first when I try to program through SPI Flash, due to benefit that it is non-volatile, the new program does not reflect on the physical board. It does not show up after reboot as well.

After quite a bit of Internet searching, the reason is that, the default boot sequence have NVCM over the external SPI. The way to change that is to modify Boot Select, residing in the Feature Row memory space in MachXO3L. However, Feature Row can only be modified 8 times (MachXO3 Programming and Configuration Usage Guide). EXTRA CAUTION need to  be taken here.

To modify Feature Row, it is done through the programmer in Lattice Diamond:

Programme Feature Row - before.png

Change the Boot Select [2:1] and MSPI bit to [011], according to

Feature Row & Boot Select.png

This will allow “EXTERNAL” configuration (not really sure what it means). After this change, the program in the SPI flash fires up!

Bingo!

SPI Programming Mode Setting

The following SPI Flash Setting must be used for MachXO3L.

machxo3l-spi-programming

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: