Forums

RE: page erasing DFLASH ON DSP56F807 - the mystery continues...

Started by Roberts Paul February 19, 2003
Has anyone ever PAGE erased DFLASH on the dsp56f807 ?  I finally had to solve my problem by 1) MASS erasing DFLASH, instead of page erasing a portion of the total data flash, and 2) rewriting, and reorganizing code to make this viable.
My experiments have proven to me that page erasing is possible with the PFIU2, but not possible with the DFIU.
 
Someone could please prove me wrong, I am all ears.
 
-----Original Message-----
From: Roberts Paul [mailto:p...@cidra.com]
Sent: Friday, February 14, 2003 6:11 PM
To: m...@yahoogroups.com
Subject: [motoroladsp] page erasing DFLASH ON DSP56F807



I'm having difficulties page erasing the data flash unit.  I've followed all
steps for intelligent erasing on 5-15 of the User's manual.  I can only mass
erase with no problem, and get immediate feedback in the Metrowerks IDE's
debugger.  Addresses 0x2000 through 0x3fff only erase to all 0xffff's if I
mass erase. (MAS1 bit set in FIU_CNTL register).

Can anyone shed any light?  (It's valentine's day, we have to ship, and I
have to get the hell out of here!!!)



_____________________________________
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:  m...@yahoogroups.com

To Post:  m...@yahoogroups.com

To Leave: m...@yahoogroups.com

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

More Groups: http://www.dsprelated.com/groups.php3


">Yahoo! Terms of Service.


Yes, we have been page erasing and programming the Data Flash in the DSP56F807
chip for many months. The C code we use for erasing and programming the Flash
is attached. You must call the function Flash_Appl_Func_Init() in your
initialization code, to initialize the data structures that are used by the
Flash programming functions.

You begin the erasing/programming operation by calling the function
Flash_Appl_First_Block(), with the appropriate parameters. Everything after
that is handled automatically by the Flash Interface Units (FIUs, which are used
in the "intelligent" erase and programming mode), and the Interrupt Service
Routines (ISRs) for the FIU interrupts. A complete example of how to use the
Flash programming functions is in the file "syslog_func.c". In our software,
the function Syslog_Func() is called every 25 milliseconds, to perform the state
machine operations for erasing and programming the Flash.

I hope this information is helpful to you.

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: Roberts Paul [mailto:]
Sent: Wednesday, February 19, 2003 12:23 PM
To:
Subject: RE: [motoroladsp] page erasing DFLASH ON DSP56F807 - the mystery
continues... Has anyone ever PAGE erased DFLASH on the dsp56f807 ? I finally had to solve my
problem by 1) MASS erasing DFLASH, instead of page erasing a portion of the
total data flash, and 2) rewriting, and reorganizing code to make this viable.
My experiments have proven to me that page erasing is possible with the PFIU2,
but not possible with the DFIU.

Someone could please prove me wrong, I am all ears.

-----Original Message-----
From: Roberts Paul [mailto:]
Sent: Friday, February 14, 2003 6:11 PM
To:
Subject: [motoroladsp] page erasing DFLASH ON DSP56F807

I'm having difficulties page erasing the data flash unit. I've followed all
steps for intelligent erasing on 5-15 of the User's manual. I can only mass
erase with no problem, and get immediate feedback in the Metrowerks IDE's
debugger. Addresses 0x2000 through 0x3fff only erase to all 0xffff's if I
mass erase. (MAS1 bit set in FIU_CNTL register).

Can anyone shed any light? (It's valentine's day, we have to ship, and I
have to get the hell out of here!!!)
_____________________________________
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


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


Another possible problem might be caused by your program accessing one page in
Data Flash while you are erasing and programming another page. 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.

I hope this information is helpful for you.

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: Roberts Paul [mailto:]
Sent: Wednesday, February 19, 2003 12:23 PM
To:
Subject: RE: [motoroladsp] page erasing DFLASH ON DSP56F807 - the mystery
continues... Has anyone ever PAGE erased DFLASH on the dsp56f807 ? I finally had to solve my
problem by 1) MASS erasing DFLASH, instead of page erasing a portion of the
total data flash, and 2) rewriting, and reorganizing code to make this viable.
My experiments have proven to me that page erasing is possible with the PFIU2,
but not possible with the DFIU.

Someone could please prove me wrong, I am all ears.

-----Original Message-----
From: Roberts Paul [mailto:]
Sent: Friday, February 14, 2003 6:11 PM
To:
Subject: [motoroladsp] page erasing DFLASH ON DSP56F807

I'm having difficulties page erasing the data flash unit. I've followed all
steps for intelligent erasing on 5-15 of the User's manual. I can only mass
erase with no problem, and get immediate feedback in the Metrowerks IDE's
debugger. Addresses 0x2000 through 0x3fff only erase to all 0xffff's if I
mass erase. (MAS1 bit set in FIU_CNTL register).

Can anyone shed any light? (It's valentine's day, we have to ship, and I
have to get the hell out of here!!!)
_____________________________________
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

_____________________________________
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


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

The page erase feature on the DSP56F807 works for both program and data flash. The Flash driver in the SDK uses the page erase feature of the flash. The example application flash.mcp located in the directory applications\flash programs the data flash using the page erase mode. So page erasing the Data flash is possible and is currently being used in many end applications.
 
The flash driver code is located in a file called flashdrv.c and the specific code that performs a page erase is the routine flashHWErasePage. Thanks.
 
- Bill
 
 
-----Original Message-----
From: Roberts Paul [mailto:p...@cidra.com]
Sent: Wednesday, February 19, 2003 1:23 PM
To: m...@yahoogroups.com
Subject: RE: [motoroladsp] page erasing DFLASH ON DSP56F807 - the mystery continues...

Has anyone ever PAGE erased DFLASH on the dsp56f807 ?  I finally had to solve my problem by 1) MASS erasing DFLASH, instead of page erasing a portion of the total data flash, and 2) rewriting, and reorganizing code to make this viable.
My experiments have proven to me that page erasing is possible with the PFIU2, but not possible with the DFIU.
 
Someone could please prove me wrong, I am all ears.
 
-----Original Message-----
From: Roberts Paul [mailto:p...@cidra.com]
Sent: Friday, February 14, 2003 6:11 PM
To: m...@yahoogroups.com
Subject: [motoroladsp] page erasing DFLASH ON DSP56F807



I'm having difficulties page erasing the data flash unit.  I've followed all
steps for intelligent erasing on 5-15 of the User's manual.  I can only mass
erase with no problem, and get immediate feedback in the Metrowerks IDE's
debugger.  Addresses 0x2000 through 0x3fff only erase to all 0xffff's if I
mass erase. (MAS1 bit set in FIU_CNTL register).

Can anyone shed any light?  (It's valentine's day, we have to ship, and I
have to get the hell out of here!!!)



_____________________________________
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:  m...@yahoogroups.com

To Post:  m...@yahoogroups.com

To Leave: m...@yahoogroups.com

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

More Groups: http://www.dsprelated.com/groups.php3


">Yahoo! Terms of Service.


_____________________________________
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:  m...@yahoogroups.com

To Post:  m...@yahoogroups.com

To Leave: m...@yahoogroups.com

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

More Groups: http://www.dsprelated.com/groups.php3


">Yahoo! Terms of Service.