Reply by Art Johnson September 19, 20022002-09-19
OK, here's the ZIP file containing the files from my last email.
Art -----Original Message-----
From: [mailto:]
Sent: Thursday, September 19, 2002 7:28 AM
To:
Cc: Art Johnson
Subject: Rif: RE: [motoroladsp] Program xFlash & interrupt problem
Very interest discussion. Fortunately for this application I can disable
all interrupts during flash erase&write (disabled for 40msec!!!!! during
page erase) . But I want see your code because the problem is hot.
Could send me your applicaton file another time in ZIP format ? This
because the anti virus system has block your .cmd file.
Thank you in advance.
Giuliano "Art Johnson"

<art@pmc-controls Per: <>,

.com> <>

Cc: "Greg Coonley (E-mail)"
<>
19/09/02 16.04 Oggetto: RE: [motoroladsp]
Program xFlash & interrupt
problem

We had this same problem in our applications. You cannot access any memory
in a Flash Interface Unit (FIU) while any page in the FIU is being erased
or programmed. For example, you cannot read from one page in Data Flash
while another page in Data Flash is being erased or programmed.

In our applications, we must be able to erase/program Data Flash while the
system is in normal operation. This means that all data has to be either
(a) moved from the Data Flash to the Program Flash, or (b) copied (during
initialization) from Data Flash to Data RAM or Program RAM. Obviously, any
data that is moved to Program Flash or copied to Program RAM requires some
source code changes as well.

To cut to the chase, the array configNestedIPRmask[] has to be moved to
Program Flash for our applications. This array is accessed every time an
interrupt occurs, so it cannot remain in Data Flash, because the program
would crash when we erased or programmed any page in the Data Flash.

The result is that we had to change the Motorola SDK library files "arch.c"
and "dispatcher.asm", as well as the DSP OS library file "os_dispatch.c".
DSP OS is the realtime operating system (RTOS) we use in all our
applications. We also had to change the application's "linker.cmd" file so
the array configNestedIPRmask[] is placed into Program Flash. Copies of
these files are attached so you can see what's involved.

In "arch.c", the functions archEnterNestedInterruptCommon() and
archExitNestedInterruptCommon() have been changed. In "dispatcher.asm",
the code changes are near the beginning of FastDispatcher. In
"os_dispatch.c", the code changes are near the beginning of
Os_Interrupt_Dispatcher(). In "linker.cmd", the "const.c (.data)" section
is put into a special memory section called ".pConstFlash", so the array
configNestedIPRmask[] is placed into Program Flash. This "linker.cmd" file
is for the '807 chip, which has a different memory map than the '805 chip,
but you can make similar changes in your "linker.cmd" file.

I hope this helps.

Regards,

Art Johnson
Senior Systems Analyst
PMC Prime Mover Controls Inc.
3600 Gilmore Way
Burnaby, B.C., Canada
V5G 4R8
Phone: 604 433-4644
FAX: 604 433-5570
Email:
http://www.pmc-controls.com

-----Original Message-----
From: [mailto:]
Sent: Thursday, September 19, 2002 3:17 AM
To:
Subject: [motoroladsp] Program xFlash & interrupt problem Does anyone know if is necessary to disable all interrupt ISR when
programming or erasing xFlash data ? I'm using 56805 microcontroller in
single chip mode.
Thanks
Giuliano
_____________________________________
Note: If you do a simple "reply" with your email client, only the author of
this message will receive your answer. You need to do a "reply all" if you
want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:

To Post:

To Leave:

Archives: http://www.yahoogroups.com/group/motoroladsp

More Groups: http://www.dsprelated.com/groups.php3 ">http://docs.yahoo.com/info/terms/


Attachment (not stored)
p_intvec.zip
Type: application/x-zip-compressed

Reply by Art Johnson September 19, 20022002-09-19
We had this same problem in our applications. You cannot access any memory in a
Flash Interface Unit (FIU) while any page in the FIU is being erased or
programmed. For example, you cannot read from one page in Data Flash while
another page in Data Flash is being erased or programmed.

In our applications, we must be able to erase/program Data Flash while the
system is in normal operation. This means that all data has to be either (a)
moved from the Data Flash to the Program Flash, or (b) copied (during
initialization) from Data Flash to Data RAM or Program RAM. Obviously, any data
that is moved to Program Flash or copied to Program RAM requires some source
code changes as well.

To cut to the chase, the array configNestedIPRmask[] has to be moved to Program
Flash for our applications. This array is accessed every time an interrupt
occurs, so it cannot remain in Data Flash, because the program would crash when
we erased or programmed any page in the Data Flash.

The result is that we had to change the Motorola SDK library files "arch.c" and
"dispatcher.asm", as well as the DSP OS library file "os_dispatch.c". DSP OS is
the realtime operating system (RTOS) we use in all our applications. We also
had to change the application's "linker.cmd" file so the array
configNestedIPRmask[] is placed into Program Flash. Copies of these files are
attached so you can see what's involved.

In "arch.c", the functions archEnterNestedInterruptCommon() and
archExitNestedInterruptCommon() have been changed. In "dispatcher.asm", the
code changes are near the beginning of FastDispatcher. In "os_dispatch.c", the
code changes are near the beginning of Os_Interrupt_Dispatcher(). In
"linker.cmd", the "const.c (.data)" section is put into a special memory section
called ".pConstFlash", so the array configNestedIPRmask[] is placed into Program
Flash. This "linker.cmd" file is for the '807 chip, which has a different
memory map than the '805 chip, but you can make similar changes in your
"linker.cmd" file.

I hope this helps.

Regards,

Art Johnson
Senior Systems Analyst
PMC Prime Mover Controls Inc.
3600 Gilmore Way
Burnaby, B.C., Canada
V5G 4R8
Phone: 604 433-4644
FAX: 604 433-5570
Email:
http://www.pmc-controls.com

-----Original Message-----
From: [mailto:]
Sent: Thursday, September 19, 2002 3:17 AM
To:
Subject: [motoroladsp] Program xFlash & interrupt problem Does anyone know if is necessary to disable all interrupt ISR when
programming or erasing xFlash data ? I'm using 56805 microcontroller in
single chip mode.
Thanks
Giuliano
_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this
message will receive your answer. You need to do a "reply all" if you want your
answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:

To Post:

To Leave:

Archives: http://www.yahoogroups.com/group/motoroladsp

More Groups: http://www.dsprelated.com/groups.php3 ">http://docs.yahoo.com/info/terms/



Attachment (not stored)
arch.c
Type: application/octet-stream

Attachment (not stored)
dispatcher.asm
Type: application/octet-stream

Attachment (not stored)
os_dispatch.c
Type: application/octet-stream

Attachment (not stored)
linker.cmd
Type: application/octet-stream

Reply by September 19, 20022002-09-19
Does anyone know if is necessary to disable all interrupt ISR when
programming or erasing xFlash data ? I'm using 56805 microcontroller in
single chip mode.
Thanks
Giuliano