Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

LPC2214 and 16 bit flash

LPC2214 and 16 bit flash

2005-12-07 by smoutpatrick

Hi,

What would be the consequences if my hardware design based on the 
LPC2214 uses 16 bit flash devices that only supports 16 bit accesses?
Can I write bytes in the flash using the __packed type modifier?

Thanks for the feedback,

Patrick Smout

Re: [lpc2000] LPC2214 and 16 bit flash

2005-12-08 by Tom Walsh

smoutpatrick wrote:

>Hi,
>
>What would be the consequences if my hardware design based on the 
>LPC2214 uses 16 bit flash devices that only supports 16 bit accesses?
>Can I write bytes in the flash using the __packed type modifier?
>
>Thanks for the feedback,
>
>  
>
That would be solely dependant on your Flash. Look to your datasheet on 
the Flash device.

TomW

-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------------------------------------------

Re: LPC2214 and 16 bit flash

2005-12-08 by Ken Wada

This is emminently doable...A few issues to concern your self though:

1.  Make sure you have boot-up code in your internal FLASH, (if you 
are using the LPC2214). With this boot-up code, you can setup your 
external memory parameters, (wait-states, burst mode params, address 
decode etc).

2.  If you are using a FLASH-less part, then you MUST use the correct 
bus-width for the defaults for each memory bank..otherwise your system 
will not work at all! Plus, you need to make sure you have some boot 
code already resident on your external FLASH.

3.  Make absolutely sure your BCFGn register is properly setup for 
external FLASH operation.

4.  Your external FLASH will inherently run slower than the internal 
FLASH. Therefore, get as much boost as possible by picking the correct 
NOR-FLASH, and try as much as possible to get nibble-mode or burst 
mode...this will greatly improve the performance of your system with 
little increases in the unit cost of your system.

5.  Last but not least, make sure your hardware is wired up properly..
.Byte select lines, chip select etc...

Ken Wada

--- In lpc2000@yahoogroups.com, "smoutpatrick" <sonpat@b...> wrote:
>
> Hi,
> 
> What would be the consequences if my hardware design based on the 
> LPC2214 uses 16 bit flash devices that only supports 16 bit 
accesses?
Show quoted textHide quoted text
> Can I write bytes in the flash using the __packed type modifier?
> 
> Thanks for the feedback,
> 
> Patrick Smout
>

Re: LPC2214 and 16 bit flash

2005-12-08 by smoutpatrick

Ken,

We have selected a flash that supports page mode.
However, the device doesn't support byte access.
Is it nevertheless possible to write bytes with the help of the 
compiler (i.e. the __packed type modifier)?

Thanks for your feedback,

Patrick

--- In lpc2000@yahoogroups.com, "Ken Wada" <kwada@a...> wrote:
>
> This is emminently doable...A few issues to concern your self 
though:
> 
> 1.  Make sure you have boot-up code in your internal FLASH, (if you 
> are using the LPC2214). With this boot-up code, you can setup your 
> external memory parameters, (wait-states, burst mode params, 
address 
> decode etc).
> 
> 2.  If you are using a FLASH-less part, then you MUST use the 
correct 
> bus-width for the defaults for each memory bank..otherwise your 
system 
> will not work at all! Plus, you need to make sure you have some 
boot 
> code already resident on your external FLASH.
> 
> 3.  Make absolutely sure your BCFGn register is properly setup for 
> external FLASH operation.
> 
> 4.  Your external FLASH will inherently run slower than the 
internal 
> FLASH. Therefore, get as much boost as possible by picking the 
correct 
> NOR-FLASH, and try as much as possible to get nibble-mode or burst 
> mode...this will greatly improve the performance of your system 
with 
> little increases in the unit cost of your system.
> 
> 5.  Last but not least, make sure your hardware is wired up 
properly..
Show quoted textHide quoted text
> .Byte select lines, chip select etc...
> 
> Ken Wada
> 
> --- In lpc2000@yahoogroups.com, "smoutpatrick" <sonpat@b...> wrote:
> >
> > Hi,
> > 
> > What would be the consequences if my hardware design based on the 
> > LPC2214 uses 16 bit flash devices that only supports 16 bit 
> accesses?
> > Can I write bytes in the flash using the __packed type modifier?
> > 
> > Thanks for the feedback,
> > 
> > Patrick Smout
> >
>

Re: LPC2214 and 16 bit flash

2005-12-08 by smoutpatrick

--- In lpc2000@yahoogroups.com, Tom Walsh <tom@o...> wrote:
>
> smoutpatrick wrote:
> 
> >Hi,
> >
> >What would be the consequences if my hardware design based on the 
> >LPC2214 uses 16 bit flash devices that only supports 16 bit 
accesses?
> >Can I write bytes in the flash using the __packed type modifier?
> >
> >Thanks for the feedback,
> >
> >  
> >
> That would be solely dependant on your Flash. Look to your 
datasheet on 
> the Flash device.
> 
> TomW
> 
> -- 
> Tom Walsh - WN3L - Embedded Systems Consultant
> http://openhardware.net, http://cyberiansoftware.com
> "Windows? No thanks, I have work to do..."
> ----------------------------------------------------
>
Tom,

what should i look for in the datasheet?
The datasheet tells me that no byte access is supported (see original 
posting).
My guess is that the compiler might help me but I'm not sure.

Patrick

Re: LPC2214 and 16 bit flash

2005-12-08 by Ken Wada

Yes, it is possible to write bytes!
What you need to do, is to read the entire 16-bit word, modify the 
byte, (upper or lower), then write the entire 16-bit word back into 
the flash device.

Ken Wada

--- In lpc2000@yahoogroups.com, "smoutpatrick" <sonpat@b...> wrote:
>
> Ken,
> 
> We have selected a flash that supports page mode.
> However, the device doesn't support byte access.
> Is it nevertheless possible to write bytes with the help of the 
> compiler (i.e. the __packed type modifier)?
> 
> Thanks for your feedback,
> 
> Patrick
> 
> --- In lpc2000@yahoogroups.com, "Ken Wada" <kwada@a...> wrote:
> >
> > This is emminently doable...A few issues to concern your self 
> though:
> > 
> > 1.  Make sure you have boot-up code in your internal FLASH, (if 
you 
> > are using the LPC2214). With this boot-up code, you can setup your 
> > external memory parameters, (wait-states, burst mode params, 
> address 
> > decode etc).
> > 
> > 2.  If you are using a FLASH-less part, then you MUST use the 
> correct 
> > bus-width for the defaults for each memory bank..otherwise your 
> system 
> > will not work at all! Plus, you need to make sure you have some 
> boot 
> > code already resident on your external FLASH.
> > 
> > 3.  Make absolutely sure your BCFGn register is properly setup for 
> > external FLASH operation.
> > 
> > 4.  Your external FLASH will inherently run slower than the 
> internal 
> > FLASH. Therefore, get as much boost as possible by picking the 
> correct 
> > NOR-FLASH, and try as much as possible to get nibble-mode or burst 
> > mode...this will greatly improve the performance of your system 
> with 
> > little increases in the unit cost of your system.
> > 
> > 5.  Last but not least, make sure your hardware is wired up 
> properly..
> > .Byte select lines, chip select etc...
> > 
> > Ken Wada
> > 
> > --- In lpc2000@yahoogroups.com, "smoutpatrick" <sonpat@b...> 
wrote:
> > >
> > > Hi,
> > > 
> > > What would be the consequences if my hardware design based on 
the 
Show quoted textHide quoted text
> > > LPC2214 uses 16 bit flash devices that only supports 16 bit 
> > accesses?
> > > Can I write bytes in the flash using the __packed type modifier?
> > > 
> > > Thanks for the feedback,
> > > 
> > > Patrick Smout
> > >
> >
>

Re: LPC2214 and 16 bit flash

2005-12-08 by Ken Wada

Byte accesses on these 16-bit FLASH devices are not a problem! From 
what I can tell, you are most likely using an Intel 16-bit wide 
StrataFlash, or one of those Micron 16-bit wide, (very much like the 
Intel NOR-StrataFlash).

The issues are:
1.  You can do all reads as a 16-bit device, (just configure your 
BCFGn register properly for 16-bit bus
2.  To write bytes to this device, you just read the 16-bit value, 
modify the upper, or lower byte, and write the value back.
3.  From what I can tell, the only real reason you need to write to 
this device is to download the code...in this case, you do not need to 
concern yourself with byte accesses at all! Just do everything using 
unsigned short data types.
4.  If your BCFGn register is properly configured, your code will run 
just fine from the external FLASH device....provided you burned it 
properly.
5.  Don't forget to make sure your interrupt vectors are setup 
properly, otherwise nothing will work. This is one of the small 
caveats on using external FLASH for the LPC devices.

Ken Wada

--- In lpc2000@yahoogroups.com, "smoutpatrick" <sonpat@b...> wrote:
>
> 
> --- In lpc2000@yahoogroups.com, Tom Walsh <tom@o...> wrote:
> >
> > smoutpatrick wrote:
> > 
> > >Hi,
> > >
> > >What would be the consequences if my hardware design based on the 
> > >LPC2214 uses 16 bit flash devices that only supports 16 bit 
> accesses?
> > >Can I write bytes in the flash using the __packed type modifier?
> > >
> > >Thanks for the feedback,
> > >
> > >  
> > >
> > That would be solely dependant on your Flash. Look to your 
> datasheet on 
> > the Flash device.
> > 
> > TomW
> > 
> > -- 
> > Tom Walsh - WN3L - Embedded Systems Consultant
> > http://openhardware.net, http://cyberiansoftware.com
> > "Windows? No thanks, I have work to do..."
> > ----------------------------------------------------
> >
> Tom,
> 
> what should i look for in the datasheet?
> The datasheet tells me that no byte access is supported (see 
original 
Show quoted textHide quoted text
> posting).
> My guess is that the compiler might help me but I'm not sure.
> 
> Patrick
>

Re: LPC2214 and 16 bit flash

2005-12-11 by smoutpatrick

--- In lpc2000@yahoogroups.com, "Ken Wada" <kwada@a...> wrote:

Ken,

thanks for the feedback. Regarding topic 5°, any differences in 
vector setup between using internal flash and external flash (did use 
the 2106 before)?

Patrick

>
> Byte accesses on these 16-bit FLASH devices are not a problem! From 
> what I can tell, you are most likely using an Intel 16-bit wide 
> StrataFlash, or one of those Micron 16-bit wide, (very much like 
the 
> Intel NOR-StrataFlash).
> 
> The issues are:
> 1.  You can do all reads as a 16-bit device, (just configure your 
> BCFGn register properly for 16-bit bus
> 2.  To write bytes to this device, you just read the 16-bit value, 
> modify the upper, or lower byte, and write the value back.
> 3.  From what I can tell, the only real reason you need to write to 
> this device is to download the code...in this case, you do not need 
to 
> concern yourself with byte accesses at all! Just do everything 
using 
> unsigned short data types.
> 4.  If your BCFGn register is properly configured, your code will 
run 
> just fine from the external FLASH device....provided you burned it 
> properly.
> 5.  Don't forget to make sure your interrupt vectors are setup 
> properly, otherwise nothing will work. This is one of the small 
> caveats on using external FLASH for the LPC devices.
> 
> Ken Wada
> 
> --- In lpc2000@yahoogroups.com, "smoutpatrick" <sonpat@b...> wrote:
> >
> > 
> > --- In lpc2000@yahoogroups.com, Tom Walsh <tom@o...> wrote:
> > >
> > > smoutpatrick wrote:
> > > 
> > > >Hi,
> > > >
> > > >What would be the consequences if my hardware design based on 
the 
> > > >LPC2214 uses 16 bit flash devices that only supports 16 bit 
> > accesses?
> > > >Can I write bytes in the flash using the __packed type 
modifier?
Show quoted textHide quoted text
> > > >
> > > >Thanks for the feedback,
> > > >
> > > >  
> > > >
> > > That would be solely dependant on your Flash. Look to your 
> > datasheet on 
> > > the Flash device.
> > > 
> > > TomW
> > > 
> > > -- 
> > > Tom Walsh - WN3L - Embedded Systems Consultant
> > > http://openhardware.net, http://cyberiansoftware.com
> > > "Windows? No thanks, I have work to do..."
> > > ----------------------------------------------------
> > >
> > Tom,
> > 
> > what should i look for in the datasheet?
> > The datasheet tells me that no byte access is supported (see 
> original 
> > posting).
> > My guess is that the compiler might help me but I'm not sure.
> > 
> > Patrick
> >
>

Re: LPC2214 and 16 bit flash

2005-12-12 by Ken Wada

--- In lpc2000@yahoogroups.com, "smoutpatrick" <sonpat@b...> wrote:
>
> --- In lpc2000@yahoogroups.com, "Ken Wada" <kwada@a...> wrote:
> 
> Ken,
> 
> thanks for the feedback. Regarding topic 5°, any differences in 
> vector setup between using internal flash and external flash (did 
use > the 2106 before)?
2106? The 2106 does not support an external address or data bus.

Anyway...to answer your question. Yes, there are differences in 
setting up interrupts between using internal vs. external flash. In my 
case, I setup the system such that there really are no differences at 
all. This is because; in my system, I copy the vectors, (code) into 
internal RAM, and execute from all the ISR's from the internal RAM. In 
this way, I only need to deal with how to get the system to properly 
vector into internal RAM for execution.

Getting code to execute from internal RAM is not a problem with most 
compiler toolchains. Basically, for the Keil, I use the ERAM 
directive. This allows me to place the code into RAM on startup. The 
Keil toolchain basically takes care of the details here.

Ken Wada

> 
> Patrick
> 
> >
> > Byte accesses on these 16-bit FLASH devices are not a problem! 
From 
> > what I can tell, you are most likely using an Intel 16-bit wide 
> > StrataFlash, or one of those Micron 16-bit wide, (very much like 
> the 
> > Intel NOR-StrataFlash).
> > 
> > The issues are:
> > 1.  You can do all reads as a 16-bit device, (just configure your 
> > BCFGn register properly for 16-bit bus
> > 2.  To write bytes to this device, you just read the 16-bit value, 
> > modify the upper, or lower byte, and write the value back.
> > 3.  From what I can tell, the only real reason you need to write 
to 
> > this device is to download the code...in this case, you do not 
need 
> to 
> > concern yourself with byte accesses at all! Just do everything 
> using 
> > unsigned short data types.
> > 4.  If your BCFGn register is properly configured, your code will 
> run 
> > just fine from the external FLASH device....provided you burned it 
> > properly.
> > 5.  Don't forget to make sure your interrupt vectors are setup 
> > properly, otherwise nothing will work. This is one of the small 
> > caveats on using external FLASH for the LPC devices.
> > 
> > Ken Wada
> > 
> > --- In lpc2000@yahoogroups.com, "smoutpatrick" <sonpat@b...> 
wrote:
Show quoted textHide quoted text
> > >
> > > 
> > > --- In lpc2000@yahoogroups.com, Tom Walsh <tom@o...> wrote:
> > > >
> > > > smoutpatrick wrote:
> > > > 
> > > > >Hi,
> > > > >
> > > > >What would be the consequences if my hardware design based on 
> the 
> > > > >LPC2214 uses 16 bit flash devices that only supports 16 bit 
> > > accesses?
> > > > >Can I write bytes in the flash using the __packed type 
> modifier?
> > > > >
> > > > >Thanks for the feedback,
> > > > >
> > > > >  
> > > > >
> > > > That would be solely dependant on your Flash. Look to your 
> > > datasheet on 
> > > > the Flash device.
> > > > 
> > > > TomW
> > > > 
> > > > -- 
> > > > Tom Walsh - WN3L - Embedded Systems Consultant
> > > > http://openhardware.net, http://cyberiansoftware.com
> > > > "Windows? No thanks, I have work to do..."
> > > > ----------------------------------------------------
> > > >
> > > Tom,
> > > 
> > > what should i look for in the datasheet?
> > > The datasheet tells me that no byte access is supported (see 
> > original 
> > > posting).
> > > My guess is that the compiler might help me but I'm not sure.
> > > 
> > > Patrick
> > >
> >
>

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.