Bootloader - erase flash memory

From: Thomas Baier (thomas_at_tho-bai.de)
Date: 11/16/04


Date: Tue, 16 Nov 2004 21:38:00 +0100

Hi there,

I've got a C164CI and I have to write a bootloader in assembly to load my
Hex-Files into the Flash memory. I've got a 32-Byte primary loop that loads
another loop, refered to as secondary loop, which should load the main prog
and write it into the flash memory. Everything seems to work fine, as I've
inserted some LED controll codes, and the code seems to work, but when I've
finshed sending the Hex-File and reseted the microcontroller it starts the
prog that was (and obviously still is) in memory before.
My secondary loop only temporarly stores the data in a register and then
directly writes it into the flash starting on 00h.

I've got the disassembled code of an existing bootloader and there I found
that it is deleting the flash memory before it writes the data to it. But I
could not really find out how that works. The dissasembled code uses
instructions like
        MEMMOV 0XAAAA, #0xAAAA, R3
but I havn't found out what this instruction does and the assembler I use
(Reads166 - Rigel Cooperation) doesn't even know it. So could anybody tell
me what MEMMOV does? (google didn't help :'-( )

Or/And

how you can erase the flash with assembly code?
What exactly is the principle of erasing memory? Is it to set every bit to
zero or exactly does that mean?

Thanks for your help

Thomas



Relevant Pages

  • Re: EXE error
    ... to load damaged data. ... I don't know if it is the case with flash memory. ... damaged exe to the memory with no system fatal error? ... indicating that my software, running on an Hp iPaq, ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: EXE error
    ... Even if some of the code in the EXE is in damaged sectors, ... The error might not be detected by the disk ... trying to load damaged data. ... I don't know if it is the case with flash memory. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Build NK.BIN for WM5 in old fashion
    ... I can load it to RAM with my old boootloader and it looks ... I know that Microsoft has FLASH memory as a requirement, ...
    (microsoft.public.windowsce.platbuilder)
  • IE6 hangs after trying to load flash driver
    ... I tried to load a driver to allow a flash memory stick to ...
    (microsoft.public.windows.inetexplorer.ie6.browser)