Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler

Ads

Discussion Groups

Discussion Groups | LPC2000 | LPC2214 and 16 bit flash

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

LPC2214 and 16 bit flash - smoutpatrick - Dec 7 15:35:00 2005

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




(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )


Re: LPC2214 and 16 bit flash - Tom Walsh - Dec 8 11:11:00 2005

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..."
----------------------------------------------------




(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2214 and 16 bit flash - Ken Wada - Dec 8 14:00:00 2005

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@lpc2..., "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




(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2214 and 16 bit flash - smoutpatrick - Dec 8 14:27:00 2005

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@lpc2..., "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@lpc2..., "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
>




(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2214 and 16 bit flash - smoutpatrick - Dec 8 14:28:00 2005


--- In lpc2000@lpc2..., 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




(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2214 and 16 bit flash - Ken Wada - Dec 8 15:02:00 2005

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@lpc2..., "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@lpc2..., "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@lpc2..., "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
> > >
>





(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2214 and 16 bit flash - Ken Wada - Dec 8 15:09:00 2005

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@lpc2..., "smoutpatrick" <sonpat@b...> wrote: > --- In lpc2000@lpc2..., 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




(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2214 and 16 bit flash - smoutpatrick - Dec 11 16:07:00 2005

--- In lpc2000@lpc2..., "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@lpc2..., "smoutpatrick" <sonpat@b...> wrote:
> >
> >
> > --- In lpc2000@lpc2..., 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
>




(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2214 and 16 bit flash - Ken Wada - Dec 12 15:14:00 2005

--- In lpc2000@lpc2..., "smoutpatrick" <sonpat@b...> wrote:
>
> --- In lpc2000@lpc2..., "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@lpc2..., "smoutpatrick" <sonpat@b...>
wrote:
> > >
> > >
> > > --- In lpc2000@lpc2..., 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
> > >
>





(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )