Re: [uCsimm] FLASH questions

From: Tom Walsh (
Date: Sat Feb 05 2000 - 21:28:50 EST

David Beckemeyer wrote:

> I could really use answers to these questions. Is there a formal
> tech. support number for RT-Control? I'm grateful for this list and
> the fantastic support from the community of volunteers, but I'm a
> little concerned about the number of seemingly simple questions
> regarding uCsimm that really fall to RT-Control but go answered.
> Here are my questions again:
> 1. How many times, practically speaking, can one rewrite boot env
> vars?

    As they are kept into Flash devices, the standard spec on a Flash device is
1,000,000 write cycles. Goto '' and get the spec sheet for the
device that is on your board, this will tell all the technical data on the device.

> 2. Regarding the flash_erase_range() and flash_write_range() API
> calls, I need help interpreting the documentation. I presume I
> could use locations from the top of the OS area down, assuming I
> keep my OS image small enough to avoid conflict. Will that work?

    Yes, the device that is shipped with the ucsimm is a sectored device, your
manual should document the locations that you must stay away from, there is, as I
believe, the boot block is reserved to contain the proprietary software that
RT-Controls ships with each ucsimm, you must stay away from that sector or risk
disabling your ucsimm. The device is constructed of several sectors that are
generally reserved within any system as boot / configuration data. You would be
given a range (documented by RT-Controls) as to where you may program your data
into. The O/S will be down in the lower part of the Flash memory map, it must be
(probably) within the first 1 meg of the device, this is due to the way the 68EZ328
MPU boots, and as I have read the uClinux code for the ucsimm implemenation.

    In general, you would be able to use any sectors above the last sector consumed
by the O/S and below the reserved proprietary area of storage. This should have
been documented in your manual.

> I need clarification on the arguments. I believe for the "flashptr"
> argument one would always the pass the starting address of the
> flash, e.g. 0x10c00000. Is that correct? Regarding the "start" and
> "end" arguments, are they byte offsets (vs. page numbers)? I
> further assume that start/end must be on 4K boundries. Is that
> correct? Are there other limits on start/end? Is the range
> start/end inclusive (i.e. start=0x1ff000 and end=0x1fffff or
> start=0x1ff000 end=0x200000)?

    This would depend on how RT-Controls limited how their proprietary software
operates, the sectors are actually 64KB in length, I would assume that a 4K
limitation that may be imposed is due to how their Flash software behaves.

    Keep in mind, the 4K limitation may be to keep the O/S "alive" during Flash
programming. I think I saw somewhere in this list that the device they are shipping
is the 29LV160, this device is unreadable during the program / erase cycles and as
the ucsimm executes the kernel / apps from the Flash, the ucsimm must STOP running
linux for the period of time that it would take to finish the program / erase
cycle. I say this just to warn you that an excessive amount of programming / erase
operations may impact the O/S.

    In order to program the flash, the programming code must be placed into RAM and
executed there, not from the flash. There are few flash devices which actually
allow your to read one sector while erase / program cycles are occuring within
another sector within the same device. You are not limited to using their
programming software, you could write your own, but remember to avoid using the
sectors already containing the O/S, env vars, and their software! I would advise
you to get the flash sources that Vladimir is using, also his kermit script, and
offload the RT-Controls code and archive it before you start playing with building
your own code, just to be safe. I am cold-loading my boot code and kernel into the
barren flash (of the EZ328SIMM) from these utilities of Vladimir's.



Tom Walsh - WN3L - Embedded Systems Consultant - tom over_at mytoys(.)com
'', '', ''
"Windows? No thanks, I have work to do..."

This message resent by the list server

This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:34 EST