Problem with Bank 0 EMI
Company  
ST Home | Microcontrollers

Index  »  ARM7 STR7  »  Problem with Bank 0 EMI
     
   Problem with Bank 0 EMI
 Moderated by :   »  AnisAS  -  coucou

Author
beginning argument    ( Replies received: 4 )
andrzejbiz   Posted 05-09-2008 at 10:32   



Registered on :
09-05-2008

Messages : 3

 OFF-Line

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.




 Profile   Quote  
volius   Posted 05-09-2008 at 12:42   



Registered on :
09-12-2006

From UK (United Kingdom)

Messages : 134

 OFF-Line

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.



 Profile   Quote  
andrzejbiz   Posted 05-09-2008 at 13:46   



Registered on :
09-05-2008

Messages : 3

 OFF-Line

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?



 Profile   Quote  
volius   Posted 05-09-2008 at 15:22   



Registered on :
09-12-2006

From UK (United Kingdom)

Messages : 134

 OFF-Line

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.




 Profile   Quote  
andrzejbiz   Posted 05-09-2008 at 17:06   



Registered on :
09-05-2008

Messages : 3

 OFF-Line

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.



 Profile   Quote  
On Top

Search in the forums
 
Jump To