EmbeddedRelated.com
Forums

Interface between Flash (AMIC A29L160A Series, Boot Sector Flash) and MCU (MSP430F5438IPZ)

Started by waqa...@pera.com July 15, 2010
In my project I want to save an image on an external Flash.
There will be a parallel connections between Data and address busees of Flash and GPIO's of MCU.

Initially I looked into available driver slaa281b for external flash interface, but this is limited to serial communication (SPI).

I wounder if any kind of drivers/guidelines are avaible for interfacing MCU with flash of above specifications.

Beginning Microcontrollers with the MSP430

Subject: Interface between Flash (AMIC A29L160A Series, Boot Sector Flash) and MCU (MSP430F5438IPZ)

In my project I want to save an image on an external Flash.
There will be a parallel connection between "Data and address busses" of Flash and GPIO's of MCU.

Initially I looked into available driver slaa281b for external flash interface, but this is limited to serial communication (SPI).

I wounded if any kind of drivers/guidelines are available for interfacing MCU with flash of above specifications.
Waqar Ahmed
Senior Consultant
Nor-Tek Teknologisenter
Forskningsparken
Gaustadalln 21
N-0349 Oslo
Norway

Email: w...@nor-tek.no
Pera Innovation Ltd. Company registered in England and Wales, No.01941113. Registered address Nottingham Road, Melton Mowbray LE13 0PB. Pera Innovation Ltd may monitor email traffic data and also the content of email for the purposes of security.


A29L160A uses a parallel bus interface and MSP430F5438 devices
are not designed to interface with such devices.

--- In m..., "Ahmed, Waqar" wrote:
>
> Subject: Interface between Flash (AMIC A29L160A Series, Boot Sector Flash) and MCU (MSP430F5438IPZ)
>
> In my project I want to save an image on an external Flash.
> There will be a parallel connection between "Data and address busses" of Flash and GPIO's of MCU.
>
> Initially I looked into available driver slaa281b for external flash interface, but this is limited to serial communication (SPI).
>
> I wounded if any kind of drivers/guidelines are available for interfacing MCU with flash of above specifications.
>
>
> Waqar Ahmed
> Senior Consultant
> Nor-Tek Teknologisenter
> Forskningsparken
> Gaustadalln 21
> N-0349 Oslo
> Norway
>
> Email: waqar.ahmed@...
>
>
> Pera Innovation Ltd. Company registered in England and Wales, No.01941113. Registered address Nottingham Road, Melton Mowbray LE13 0PB. Pera Innovation Ltd may monitor email traffic data and also the content of email for the purposes of security.
>
>
>
>

You wrote 'There will be a parallel connection between "Data and address busses" of Flash and GPIO's of MCU' - and there is the answer:

Emulate the bus the AMIC A29L160A needs. You connect the 20 address lines, 16 data lines, WE, OE and CE to GPIO's to have direct access to 1Mx16, and a little bit of software. Main thing is to send the addresses you need to the associated ports and use a few lines of code to switch CE, WE, and OE appropriately. You need five ports for this.
If you need more than 48 GPIO's for the other part of your project, you can use the AMIC A29L160A in BYTE mode, 56 GPIO's are left then,
but this needs a little bit more software to split the words.

That's it!

By the way, emulating this bus is a nice exercise in coding!

Cheers,

Dirk
--- In m..., "CHAD" wrote:
>
>
> A29L160A uses a parallel bus interface and MSP430F5438 devices
> are not designed to interface with such devices.
>
> --- In m..., "Ahmed, Waqar" wrote:
> >
> > Subject: Interface between Flash (AMIC A29L160A Series, Boot Sector Flash) and MCU (MSP430F5438IPZ)
> >
> > In my project I want to save an image on an external Flash.
> > There will be a parallel connection between "Data and address busses" of Flash and GPIO's of MCU.
> >
> > Initially I looked into available driver slaa281b for external flash interface, but this is limited to serial communication (SPI).
> >
> > I wounded if any kind of drivers/guidelines are available for interfacing MCU with flash of above specifications.
> >
> >
> > Waqar Ahmed
> > Senior Consultant
> > Nor-Tek Teknologisenter
> > Forskningsparken
> > Gaustadalln 21
> > N-0349 Oslo
> > Norway
> >
> > Email: waqar.ahmed@
> >
> >
> > Pera Innovation Ltd. Company registered in England and Wales, No.01941113. Registered address Nottingham Road, Melton Mowbray LE13 0PB. Pera Innovation Ltd may monitor email traffic data and also the content of email for the purposes of security.
> >
> >
> >
>

Subject: Interface between Flash (AMIC A29L160A Series, Boot Sector Flash) and MCU (MSP430F5438IPZ)

In my project I want to save an image on an external Flash.
There will be a parallel connection between "Data and address busses" of Flash and GPIO's of MCU.

Initially I looked into available driver slaa281b for external flash interface, but this is limited to serial communication (SPI).

I wounded if any kind of drivers/guidelines are available for interfacing MCU with flash of above specifications.

thanks ..
@ Dirk
You wrote: ",,, and a little bit of software. Main thing is to send the addresses you need to the associated ports and use a few lines of code to switch CE, WE, and OE appropriately. You need five ports for this."

I have enough numbers of ports available, but I am quite new to Device/Memory drivers world, a little bit of software can be a lot of software for me... can you refer to any example software, which I can adapt for this purpose, or at least can have a look for inspiration….

Waqar
Subject: Interface between Flash (AMIC A29L160A Series, Boot Sector Flash) >and MCU (MSP430F5438IPZ)
>
>In my project I want to save an image on an external Flash.
>There will be a parallel connection between "Data and address busses" of Fl>ash and GPIO's of MCU.
>
>Initially I looked into available driver slaa281b for external flash interf>ace, but this is limited to serial communication (SPI).
>
>I wounded if any kind of drivers/guidelines are available for interfacing M>CU with flash of above specifications.
>Waqar Ahmed

thanks ..
@ Dirk
You wrote: ",,, and a little bit of software. Main thing is to send the addresses you need to the associated ports and use a few lines of code to switch CE, WE, and OE appropriately. You need five ports for this."

I have enough numbers of ports available, but I am quite new to Device/Memory drivers world, a little bit of software can be a lot of software for me... can you refer to any example software, which I can adapt for this purpose, or at least can have a look for inspiration….
Subject: Interface between Flash (AMIC A29L160A Series, Boot Sector Flash) >and MCU (MSP430F5438IPZ)
>
>In my project I want to save an image on an external Flash.
>There will be a parallel connection between "Data and address busses" of Fl>ash and GPIO's of MCU.
>
>Initially I looked into available driver slaa281b for external flash interf>ace, but this is limited to serial communication (SPI).
>
>I wounded if any kind of drivers/guidelines are available for interfacing M>CU with flash of above specifications.
>Waqar Ahmed
>Senior Consultant
>Nor-Tek Teknologisenter
>Forskningsparken
>Gaustadalln 21
>N-0349 Oslo
>Norway
>
>Email: w...@nor-tek.no
>Pera Innovation Ltd. Company registered in England and Wales, No.01941113. >Registered address Nottingham Road, Melton Mowbray LE13 0PB. Pera Innovatio>n Ltd may monitor email traffic data and also the content of email for the >purposes of security.
>
>
>
--- In m..., "CHAD" wrote:
> A29L160A uses a parallel bus interface and MSP430F5438 devices
> are not designed to interface with such devices.

Sure they are.

The A29L160A needs 20 Address line and 16 Data line and 4 control lines, thats 40 pins on the MSP430F5438, its got .

Bit Bang the control lines, no problem.

Speed ? slow !

SPI would be faster and easier, but the OP wants a parallel buss.

Can be done, just read the fine manuals. ;-)

don

Thanks..
Being new to memory/device driver world can you refer to some example codes?
Waqar
From: m... [mailto:m...] On Behalf Of Donald H
Sent: 16 July 2010 04:47
To: m...
Subject: [msp430] Re: Interface between Flash (AMIC A29L160A Series, Boot Sector Flash) and MCU (MSP430F5438IPZ)

--- In m..., "CHAD" wrote:
> A29L160A uses a parallel bus interface and MSP430F5438 devices
> are not designed to interface with such devices.

Sure they are.

The A29L160A needs 20 Address line and 16 Data line and 4 control lines, thats 40 pins on the MSP430F5438, its got .

Bit Bang the control lines, no problem.

Speed ? slow !

SPI would be faster and easier, but the OP wants a parallel buss.

Can be done, just read the fine manuals. ;-)

don
Pera Innovation Ltd. Company registered in England and Wales, No.01941113. Registered address Nottingham Road, Melton Mowbray LE13 0PB. Pera Innovation Ltd may monitor email traffic data and also the content of email for the purposes of security.


Why the fascination with parallel flash? Serial flash is much easier,
and, because the interface is hardware, may actually be faster than
parallel flash, especially one that requires address and data busses to
be constructed across multiple ports. In this case the most efficient
way to access the device is in 16 bit mode, so you need two data ports
and 3 address ports for the 20 bit address, plus 3 extra pins for /CE,
/WE and /OE, which could conceivably be part of the third address port,
with care, thus potentially saving a few clocks per access.

Anyway you still need to load data port 1 load data port 2
load 3 address ports, then toggle the control pins to effect the write.

Depending on how you structure your code this could take as many as 6
cycles for each of the 5 port load operations, plus 5 clocks for each of
the 4 control signal steps. So you're looking at around 50 clock cycles
per byte of data, a few less if you judiciously apply the instruction
set and registers, a few more if you structure your code inefficiently.

Most modern serial flash can handle a clock rate up to 20MHz or even
higher. The 5438 can operate up to 25MHz, and the SPI clock can be up to
the value of BRCLK, which may be up to 25MHz, hence, given the right
serial memory you could send an 8 bit command, followed by a 24 bit
address, followed by a stream of data. Thus by sending data in, say
pages of 1k, the total time would be 1056 bit clocks, or slightly over 1
clock cycle per data bit sent.

In the parallel mode you require 50 cycles per bit. Of course the gains
aren't so great if you send a wrod at a time, in fact they are almost
identical, at around 48 clock cycles.

The calculations here are not 100% precise, but are given to illustrate
a point. Not only can you save precious I/O bits with a serial flash,
but, contrary to what might seem obvious, it is usually faster than
using a parallel bus with microcontrollers (the opposite likely applies
with microprocessors).

Cheers

Al

w...@pera.com wrote:
> thanks ..
> @ Dirk
> You wrote: ",,, and a little bit of software. Main thing is to send the addresses you need to the associated ports and use a few lines of code to switch CE, WE, and OE appropriately. You need five ports for this."
>
> I have enough numbers of ports available, but I am quite new to Device/Memory drivers world, a little bit of software can be a lot of software for me... can you refer to any example software, which I can adapt for this purpose, or at least can have a look for inspiration….
>
> Waqar
> Subject: Interface between Flash (AMIC A29L160A Series, Boot Sector Flash) >> and MCU (MSP430F5438IPZ)
>>
>> In my project I want to save an image on an external Flash.
>> There will be a parallel connection between "Data and address busses" of Fl>> ash and GPIO's of MCU.
>>
>> Initially I looked into available driver slaa281b for external flash interf>> ace, but this is limited to serial communication (SPI).
>>
>> I wounded if any kind of drivers/guidelines are available for interfacing M>> CU with flash of above specifications.
>> Waqar Ahmed
>
>