cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Bank 0 EMI

andrzejbiz
Associate II
Posted on September 05, 2008 at 13:36

Problem with Bank 0 EMI

5 REPLIES 5
andrzejbiz
Associate II
Posted on September 05, 2008 at 07:02

I have a problem with Bank 0 EMI. I try to use 8-bit width bus on Bank 0.

I write following code:

{

u16 data;

...

// Initialize Pin 0 Port 2 to Alternate function

GPIO_Config(GPIO2, 0x0001, GPIO_AF_PP); //0x000F

// Initialize the EMI bank 0: enable, 2 wait states, 8-bit wide external

memory device

EMI_Config(0, EMI_ENABLE | EMI_WAITSTATE(10) | EMI_SIZE_8)

// Write data to the external memory

*(u32*)0x60000000 = 0x1234; // write 1234 in bank 0

// Read data from the external memory

data = *(u16*)0x60000000; // read from bank 0

...

}

The problem is that i have only one read and write strobe. Data are send on 16-bit width data bus. When I read EMI_BCON0 register, bits B_SIZE[1:0] are still 0x01. Proccessor dosen't change data bus width from 16-bit to 8-bit. Why does it happend? What I did wrong? Did someone have such problem with bank 0?

Bank 0 can be 8-bit access?? I have pin BOOTEN tied to ground.

kleshov
Associate II
Posted on September 05, 2008 at 09:12

In the section 'EMI Memory Map' of the manual, there is a small footnote:

'If External memory is used for boot operation, it must be 16-bit as the CSN0 memory bank has been hardwired for 16-bit memory interface only.'

It does sound a bit vague, but it suggests that bank 0 is 16-bit only. I know, unnecessary limitation. But that's the way it is.

andrzejbiz
Associate II
Posted on September 05, 2008 at 10:16

Hello, thank you for replay.

Yes I saw this footnote.

But I understand that Bank 0 must be 16-bit width when I use External memory (EMI) for booting operation that is when pins BOOTEN = '1', BOOT1 = '1', BOOT0 = '1' (table 5 on page 18).

I have BOOTEN = '0' (connected to ground).

In this application note:

http://www.st.com/stonline/books/pdf/docs/13709.pdf

on page 15 is example how to use EMI Bank 0 to Expand the number of inputs and/or outputs to 8 lines (8-bit data bus wide).

So Must it work?

kleshov
Associate II
Posted on September 05, 2008 at 11:52

I just read the application note. It does suggest that bank 0 should be able to work in 8-bit mode. But it's not definitive proof.

Unfortunately, I don't have an STR710-based board at hand, so I can't test this right now. Try writing and reading EMI_BCONn of all four memory banks. If you can confirm that only bank 0 cannot be switched to 8-bit mode, than that's it.

andrzejbiz
Associate II
Posted on September 05, 2008 at 13:36

I did some phisical changes in my board with STR710 and in my project now I use Bank 1 to comunicate with my slave (MPI12x). It works correct. But I still want to know what must be done to use Bank 0 to communicate with my slave. Maybe there is some point which I must do but I don't now what:( It's mystery for my.