STR71x EMI

Hello to everybody. I’m working on STR710, that supports external memory (EMI). My board has 4 MB of external RAM memory (located in Bank1) and 4 MB of Flash memory (located in Bank0). How can I use this FLASH memory? About RAM, I can load my programs in external RAM adding some lines to my gdb file:

monitor mww 0xE0005000 0x000F

monitor mww 0xE0005004 0x000F

monitor mww 0xE0005008 0x000F

monitor mww 0x6C000004 0x8001

monitor mdw 0x6C000004

With the first 3 lines I set the registers PC0, PC1 and PC2 of IOPORT2 (I don’t know why but it’s the only way to make it work) and with the 4th line I set Bank1 register to allow RAM writing.

How can I obtain this with external FLASH? I suppose I have to flash the program in this memory, but it seems that OpenOCD supports only a flash bank in its cfg file, in my case it’s

flash bank str7x 0x40000000 0x00040000 0 0 STR71x 0

that is the principal embedded flash bank.

Is it possible to add information about another flash bank?

Thanks in advance,

l3golas

Hi,

just add another “flash bank” line. You can add as many as you want, and reference them in the order they were defined, i.e. the first one is 0, second one is 1, etc.

You’ll have to configure the EMI for the appropriate bus width and so on, just like you did for your external memory.

External flashes have to be compliant to the CFI standard. The latest code from subversion supports both Intel and AMD/Spansion (including Atmel for example) command set flashes, while the last windows binary release only supports Intel flashes. The correct flash bank would be something like:

This is the configuration I’m using on a LPC-H2294 board from Olimex:

#flash configuration

flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum

flash bank cfi 0x80000000 0x400000 2 2 0

One internal flash (lpc2000 driver), referenced by #0, and one external flash (cfi driver), referenced by #1.

Regards,

Dominic