Reply by Art Johnson October 7, 20022002-10-07
There is no difference, between resetting the registers in a function called
directly or through the COP interrupt. Technically, the ALU and AGU registers
do not have a "reset" state, other than what you decide to put into them in your
code. The Program Controller and the on-chip peripherals are the only parts of
the DSP56800 chips that truly have a "reset" state.

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: Santi Corera [mailto:]
Sent: Monday, October 07, 2002 1:01 AM
To: Christian Brauchli; ; Art Johnson
Subject: Re: [motoroladsp] DSP56807: Linker Cmd File main()- function
always at the same address About the initiliazation of registers, Which is the diference between
resetting them in a function called directly or through the COP interrupt ?

----- Original Message -----
From: "Art Johnson" <>
To: "Christian Brauchli" <>;
<>
Sent: Friday, October 04, 2002 7:33 PM
Subject: RE: [motoroladsp] DSP56807: Linker Cmd File main()- function always
at the same address > 1. You can do the following in your linker.cmd file: #***************************************************************************
****
> # Linker.cmd file for the DSP56F807 chip,
> # using internal data memory only ( EX = 0, Boot Mode 0A )
#***************************************************************************
****
> MEMORY {
>
> # .pInterruptVector (RX) : ORIGIN = 0x0000, LENGTH = 0x0086
> .pInterruptVector (RX) : ORIGIN = 0x0004, LENGTH = 0x0082
> .pMain_C_Flash (RX) : ORIGIN = 0x0086, LENGTH = 0x0F7A
> .pFlash (RX) : ORIGIN = 0x1000, LENGTH = 0xE000
> .pIntRAM (RWX) : ORIGIN = 0xF000, LENGTH = 0x0800
> .pIntRAM_Mirror (RWX) : ORIGIN = 0xF000, LENGTH = 0x0800
> .pBootFlash (RX) : ORIGIN = 0xF800, LENGTH = 0x0800
>
> .xAvailable (RW) : ORIGIN = 0x0000, LENGTH = 0x0020
> .xOSRegisters (RW) : ORIGIN = 0x0020, LENGTH = 0x0010
> .xCWRegisters (RW) : ORIGIN = 0x0030, LENGTH = 0x0010
> .xIntRAM (RW) : ORIGIN = 0x0040, LENGTH = 0x0FC0
> .xIntRAM_Mirror (RWX) : ORIGIN = 0x0040, LENGTH = 0x0FC0
> .xStack (RW) : ORIGIN = 0x0F00, LENGTH = 0x0100
> .xPeripherals (RW) : ORIGIN = 0x1000, LENGTH = 0x0800
> .xReserved (R) : ORIGIN = 0x1800, LENGTH = 0x0800
> .xFlash (R) : ORIGIN = 0x2000, LENGTH = 0x2000
> .xExtRAM (RW) : ORIGIN = 0x4000, LENGTH = 0xBF80
> .xExtRAM_Mirror (RWX) : ORIGIN = 0x4000, LENGTH = 0xBF80
> .xCoreRegisters (RW) : ORIGIN = 0xFF80, LENGTH = 0x0080
> }
>
#***************************************************************************
****
> In your SECTIONS section, add the following just after the
".ApplicationInterruptVector" block:
>
>
#***************************************************************************
****
> .Main_C_Code :
> {
> # Place main.c code into Main_C_Flash
> main.c (.text)
>
> } > .pMain_C_Flash
>
#***************************************************************************
****
>
> Your main() function must, of course, be the first code in the main.c
file, so it will be placed at the address you want. This method is more
direct than the other method, which would be to put main.c as the first file
in the Link Order settings.
> 2. You could enable the COP (Watchdog) timer, and let it time out. You
will need to have its Interrupt Vector (number 1, address X:$0002) point to
your function that handles the interrupt when it occurs. This should put
all of the on-chip peripherals in their reset state. It does not, of
course, change the value of the ALU or AGU registers (X0, Y0, Y1, etc.).
>
>
> 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: Christian Brauchli [mailto:]
> Sent: Friday, October 04, 2002 9:20 AM
> To:
> Subject: [motoroladsp] DSP56807: Linker Cmd File main()- function always
> at the same address > Hi,
>
> 1. For my application I need to have the main() routine allways linked to
the same address in my P-Flash (for example 0x0086). Does anybody have an
idea how to define this in the linker.cmd file.
>
> 2. Is there an easy way to reset all the DSP- Registers to the reset state
without putting the DSP into Reset Condition?
>
>
> Thanks
> Chris >
>
> _____________________________________
> 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/ >
> _____________________________________
> 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/ >



Reply by Santi Corera October 7, 20022002-10-07
About the initiliazation of registers, Which is the diference between
resetting them in a function called directly or through the COP interrupt ?

----- Original Message -----
From: "Art Johnson" <>
To: "Christian Brauchli" <>;
<>
Sent: Friday, October 04, 2002 7:33 PM
Subject: RE: [motoroladsp] DSP56807: Linker Cmd File main()- function always
at the same address > 1. You can do the following in your linker.cmd file: #***************************************************************************
****
> # Linker.cmd file for the DSP56F807 chip,
> # using internal data memory only ( EX = 0, Boot Mode 0A )
#***************************************************************************
****
> MEMORY {
>
> # .pInterruptVector (RX) : ORIGIN = 0x0000, LENGTH = 0x0086
> .pInterruptVector (RX) : ORIGIN = 0x0004, LENGTH = 0x0082
> .pMain_C_Flash (RX) : ORIGIN = 0x0086, LENGTH = 0x0F7A
> .pFlash (RX) : ORIGIN = 0x1000, LENGTH = 0xE000
> .pIntRAM (RWX) : ORIGIN = 0xF000, LENGTH = 0x0800
> .pIntRAM_Mirror (RWX) : ORIGIN = 0xF000, LENGTH = 0x0800
> .pBootFlash (RX) : ORIGIN = 0xF800, LENGTH = 0x0800
>
> .xAvailable (RW) : ORIGIN = 0x0000, LENGTH = 0x0020
> .xOSRegisters (RW) : ORIGIN = 0x0020, LENGTH = 0x0010
> .xCWRegisters (RW) : ORIGIN = 0x0030, LENGTH = 0x0010
> .xIntRAM (RW) : ORIGIN = 0x0040, LENGTH = 0x0FC0
> .xIntRAM_Mirror (RWX) : ORIGIN = 0x0040, LENGTH = 0x0FC0
> .xStack (RW) : ORIGIN = 0x0F00, LENGTH = 0x0100
> .xPeripherals (RW) : ORIGIN = 0x1000, LENGTH = 0x0800
> .xReserved (R) : ORIGIN = 0x1800, LENGTH = 0x0800
> .xFlash (R) : ORIGIN = 0x2000, LENGTH = 0x2000
> .xExtRAM (RW) : ORIGIN = 0x4000, LENGTH = 0xBF80
> .xExtRAM_Mirror (RWX) : ORIGIN = 0x4000, LENGTH = 0xBF80
> .xCoreRegisters (RW) : ORIGIN = 0xFF80, LENGTH = 0x0080
> }
>
#***************************************************************************
****
> In your SECTIONS section, add the following just after the
".ApplicationInterruptVector" block:
>
>
#***************************************************************************
****
> .Main_C_Code :
> {
> # Place main.c code into Main_C_Flash
> main.c (.text)
>
> } > .pMain_C_Flash
>
#***************************************************************************
****
>
> Your main() function must, of course, be the first code in the main.c
file, so it will be placed at the address you want. This method is more
direct than the other method, which would be to put main.c as the first file
in the Link Order settings.
> 2. You could enable the COP (Watchdog) timer, and let it time out. You
will need to have its Interrupt Vector (number 1, address X:$0002) point to
your function that handles the interrupt when it occurs. This should put
all of the on-chip peripherals in their reset state. It does not, of
course, change the value of the ALU or AGU registers (X0, Y0, Y1, etc.).
>
>
> 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: Christian Brauchli [mailto:]
> Sent: Friday, October 04, 2002 9:20 AM
> To:
> Subject: [motoroladsp] DSP56807: Linker Cmd File main()- function always
> at the same address > Hi,
>
> 1. For my application I need to have the main() routine allways linked to
the same address in my P-Flash (for example 0x0086). Does anybody have an
idea how to define this in the linker.cmd file.
>
> 2. Is there an easy way to reset all the DSP- Registers to the reset state
without putting the DSP into Reset Condition?
>
>
> Thanks
> Chris >
>
> _____________________________________
> 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/ >
> _____________________________________
> 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/ >


Reply by Art Johnson October 4, 20022002-10-04
1. You can do the following in your linker.cmd file:

#*******************************************************************************
# Linker.cmd file for the DSP56F807 chip,
# using internal data memory only ( EX = 0, Boot Mode 0A )

#*******************************************************************************
MEMORY {

# .pInterruptVector (RX) : ORIGIN = 0x0000, LENGTH = 0x0086
.pInterruptVector (RX) : ORIGIN = 0x0004, LENGTH = 0x0082
.pMain_C_Flash (RX) : ORIGIN = 0x0086, LENGTH = 0x0F7A
.pFlash (RX) : ORIGIN = 0x1000, LENGTH = 0xE000
.pIntRAM (RWX) : ORIGIN = 0xF000, LENGTH = 0x0800
.pIntRAM_Mirror (RWX) : ORIGIN = 0xF000, LENGTH = 0x0800
.pBootFlash (RX) : ORIGIN = 0xF800, LENGTH = 0x0800

.xAvailable (RW) : ORIGIN = 0x0000, LENGTH = 0x0020
.xOSRegisters (RW) : ORIGIN = 0x0020, LENGTH = 0x0010
.xCWRegisters (RW) : ORIGIN = 0x0030, LENGTH = 0x0010
.xIntRAM (RW) : ORIGIN = 0x0040, LENGTH = 0x0FC0
.xIntRAM_Mirror (RWX) : ORIGIN = 0x0040, LENGTH = 0x0FC0
.xStack (RW) : ORIGIN = 0x0F00, LENGTH = 0x0100
.xPeripherals (RW) : ORIGIN = 0x1000, LENGTH = 0x0800
.xReserved (R) : ORIGIN = 0x1800, LENGTH = 0x0800
.xFlash (R) : ORIGIN = 0x2000, LENGTH = 0x2000
.xExtRAM (RW) : ORIGIN = 0x4000, LENGTH = 0xBF80
.xExtRAM_Mirror (RWX) : ORIGIN = 0x4000, LENGTH = 0xBF80
.xCoreRegisters (RW) : ORIGIN = 0xFF80, LENGTH = 0x0080
}
#*******************************************************************************
In your SECTIONS section, add the following just after the
".ApplicationInterruptVector" block:

#*******************************************************************************
.Main_C_Code :
{
# Place main.c code into Main_C_Flash
main.c (.text)

} > .pMain_C_Flash
#*******************************************************************************

Your main() function must, of course, be the first code in the main.c file, so
it will be placed at the address you want. This method is more direct than the
other method, which would be to put main.c as the first file in the Link Order
settings.
2. You could enable the COP (Watchdog) timer, and let it time out. You will
need to have its Interrupt Vector (number 1, address X:$0002) point to your
function that handles the interrupt when it occurs. This should put all of the
on-chip peripherals in their reset state. It does not, of course, change the
value of the ALU or AGU registers (X0, Y0, Y1, etc.). 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: Christian Brauchli [mailto:]
Sent: Friday, October 04, 2002 9:20 AM
To:
Subject: [motoroladsp] DSP56807: Linker Cmd File main()- function always
at the same address Hi,

1. For my application I need to have the main() routine allways linked to the
same address in my P-Flash (for example 0x0086). Does anybody have an idea how
to define this in the linker.cmd file.

2. Is there an easy way to reset all the DSP- Registers to the reset state
without putting the DSP into Reset Condition? Thanks
Chris

_____________________________________
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/


Reply by Christian Brauchli October 4, 20022002-10-04
Hi,

1. For my application I need to have the main() routine allways linked to the
same address in my P-Flash (for example 0x0086). Does anybody have an idea how
to define this in the linker.cmd file.

2. Is there an easy way to reset all the DSP- Registers to the reset state
without putting the DSP into Reset Condition? Thanks
Chris



Reply by Christian Brauchli October 7, 20012001-10-07
Hi,

To place the main() routine always to the same P-Flash Address change the
following in your linker.cmd file:

#***************************************************************************
****
.ApplicationCode :
{
# Place all code into Program Flash
stepper.c (.text) #do not delete this here. main() needs to be
#the first function in the file stepper.c so
the linker will located main() to the address
#0x0086 all the time.
* (.text)
* (rtlib.text)
* (fp_engine.text)
* (user.text)

} > .pFlash **************************
rgds Chris

-----Ursprgliche Nachricht-----
Von: Santi Corera <>
An: Christian Brauchli <>;
<>; Art Johnson
<>
Datum: Montag, 7. Oktober 2002 09:03
Betreff: Re: [motoroladsp] DSP56807: Linker Cmd File main()- function always
at the same address >About the initiliazation of registers, Which is the diference between
>resetting them in a function called directly or through the COP interrupt ?
>
>----- Original Message -----
>From: "Art Johnson" <>
>To: "Christian Brauchli" <>;
><>
>Sent: Friday, October 04, 2002 7:33 PM
>Subject: RE: [motoroladsp] DSP56807: Linker Cmd File main()- function
always
>at the same address >> 1. You can do the following in your linker.cmd file:
>>
>>
>#**************************************************************************
*
>****
>> # Linker.cmd file for the DSP56F807 chip,
>> # using internal data memory only ( EX = 0, Boot Mode 0A )
>>
>>
>#**************************************************************************
*
>****
>> MEMORY {
>>
>> # .pInterruptVector (RX) : ORIGIN = 0x0000, LENGTH = 0x0086
>> .pInterruptVector (RX) : ORIGIN = 0x0004, LENGTH = 0x0082
>> .pMain_C_Flash (RX) : ORIGIN = 0x0086, LENGTH = 0x0F7A
>> .pFlash (RX) : ORIGIN = 0x1000, LENGTH = 0xE000
>> .pIntRAM (RWX) : ORIGIN = 0xF000, LENGTH = 0x0800
>> .pIntRAM_Mirror (RWX) : ORIGIN = 0xF000, LENGTH = 0x0800
>> .pBootFlash (RX) : ORIGIN = 0xF800, LENGTH = 0x0800
>>
>> .xAvailable (RW) : ORIGIN = 0x0000, LENGTH = 0x0020
>> .xOSRegisters (RW) : ORIGIN = 0x0020, LENGTH = 0x0010
>> .xCWRegisters (RW) : ORIGIN = 0x0030, LENGTH = 0x0010
>> .xIntRAM (RW) : ORIGIN = 0x0040, LENGTH = 0x0FC0
>> .xIntRAM_Mirror (RWX) : ORIGIN = 0x0040, LENGTH = 0x0FC0
>> .xStack (RW) : ORIGIN = 0x0F00, LENGTH = 0x0100
>> .xPeripherals (RW) : ORIGIN = 0x1000, LENGTH = 0x0800
>> .xReserved (R) : ORIGIN = 0x1800, LENGTH = 0x0800
>> .xFlash (R) : ORIGIN = 0x2000, LENGTH = 0x2000
>> .xExtRAM (RW) : ORIGIN = 0x4000, LENGTH = 0xBF80
>> .xExtRAM_Mirror (RWX) : ORIGIN = 0x4000, LENGTH = 0xBF80
>> .xCoreRegisters (RW) : ORIGIN = 0xFF80, LENGTH = 0x0080
>> }
>>
>#**************************************************************************
*
>****
>>
>>
>>
>> In your SECTIONS section, add the following just after the
>".ApplicationInterruptVector" block:
>>
>>
>#**************************************************************************
*
>****
>> .Main_C_Code :
>> {
>> # Place main.c code into Main_C_Flash
>> main.c (.text)
>>
>> } > .pMain_C_Flash
>>
>#**************************************************************************
*
>****
>>
>> Your main() function must, of course, be the first code in the main.c
>file, so it will be placed at the address you want. This method is more
>direct than the other method, which would be to put main.c as the first
file
>in the Link Order settings.
>>
>>
>>
>> 2. You could enable the COP (Watchdog) timer, and let it time out. You
>will need to have its Interrupt Vector (number 1, address X:$0002) point to
>your function that handles the interrupt when it occurs. This should put
>all of the on-chip peripherals in their reset state. It does not, of
>course, change the value of the ALU or AGU registers (X0, Y0, Y1, etc.).
>>
>>
>> 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: Christian Brauchli [mailto:]
>> Sent: Friday, October 04, 2002 9:20 AM
>> To:
>> Subject: [motoroladsp] DSP56807: Linker Cmd File main()- function always
>> at the same address
>>
>>
>> Hi,
>>
>> 1. For my application I need to have the main() routine allways linked to
>the same address in my P-Flash (for example 0x0086). Does anybody have an
>idea how to define this in the linker.cmd file.
>>
>> 2. Is there an easy way to reset all the DSP- Registers to the reset
state
>without putting the DSP into Reset Condition?
>>
>>
>> Thanks
>> Chris
>>
>>
>>
>>
>> _____________________________________
>> 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/
>>
>>
>>
>>
>>
>>
>> _____________________________________
>> 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/
>>
>>
>>
>